WoWInterface

WoWInterface (http://www.wowinterface.com/forums/index.php)
-   Macro Help (http://www.wowinterface.com/forums/forumdisplay.php?f=140)
-   -   Fun random generator rez macro... (http://www.wowinterface.com/forums/showthread.php?t=38970)

Smokable 02-17-11 07:19 AM

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 :(

Smokable 02-17-11 07:32 AM

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

Smokable 02-17-11 10:34 AM

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!

Ketho 02-17-11 01:32 PM

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


All times are GMT -6. The time now is 12:03 PM.

vBulletin © 2014, Jelsoft Enterprises Ltd
©2012 ZAM Network LLC