Thread Tools Display Modes
02-17-11, 07:19 AM   #1
Smokable
A Defias Bandit
Join Date: Feb 2011
Posts: 3
Fun random generator rez macro...

Hey guys, let me start by saying I've been looking for this for like 3 days now, and I need help from the pros lol. Back in the day, I used to have a rez macro, that I lost when I took a break for a few months, and now I can't find it.

It was a rez macro that when cast on a targeted player, would emote "Smokable loots (target) for Xg Ys." Smokable being my in game name. The complicated part for me, is the X and Y were randomly generated, to the point where if i spam clicked it on someone to be funny, it would be different amounts of gold that I could set - and I remember being able to set the "Xg Ys" as different entries, so I only had 1 variable as opposed to having different random gold and silver numbers.

I could be wrong but I found this:
/script s={"Phrase 1","Phrase 2","Phrase 3"};SendChatMessage(s[random(1,3)], "SAY")
/cast Revive

Which I'm not sure how to make it an emote - nor do I know how to have s be in the middle of a fixed emote, so that the "phrase" isn't random between different ones, but only the amount of gold and silver is.

Help! I appreciate help from whoever can in advance, and sorry for the nubbishness, I just couldn't crack this one myself
  Reply With Quote
02-17-11, 07:32 AM   #2
Smokable
A Defias Bandit
Join Date: Feb 2011
Posts: 3
Here's an example of the variables that I wanted, I remember changing the macro to reflect what I just put here, but again i don't know how to make it an emote and to make it so that my variables are random but inside of a fixed emote that says "Smokable loots (target) for {variable}."

/script s={2g 37s,9g 22s,16g 89s,37g 55s};SendChatMessage(s[random(1,4)], "SAY")
/cast Revive
  Reply With Quote
02-17-11, 10:34 AM   #3
Smokable
A Defias Bandit
Join Date: Feb 2011
Posts: 3
I have no idea if I'm doin it right, but I have a feeling it will look something like this ....

/script s={2g 37s,3g 99s,9g 22s,11g 68s,16g 89s,37g 55s};SendChatMessage(loots %t for s[random(1,6)]., "EMOTE")
/cast Revive

Am i doin it right? lol ... i can't test it because I'm at work right now, but if someone has any changes or if it's not right, please lemme kno!
  Reply With Quote
02-17-11, 01:32 PM   #4
Ketho
A Pyroguard Emberseer
 
Ketho's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,026
Code:
/run local t={"2g 37s","3g 99s","9g 22s","11g 68s","16g 89s","37g 55s"} SendChatMessage("loots %t for "..t[random(6)]..".", "EMOTE")
/cast Revive
But in your case it can be simplified to this:
Code:
/run SendChatMessage("loots %t for "..random(40).."g "..random(0,99).."s.", "EMOTE")
/cast Revive
More info: String Concatenation

Edit:
Sorry, I didn't imply to "rob" players if u just "looted" 97 gold from some1
Went a bit overboard there xD

Last edited by Ketho : 02-17-11 at 06:54 PM.
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » Macro Help » Fun random generator rez macro...

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off