RP and Spell Combo macros

90 Tauren Druid
9710
Hey guys, it's been a while since I've visited the board. Back in Wrath, I'd gotten a script for sorta RP when using cooldowns from this board, that when I used a spell it would have an X% chance to say a phrase randomly selected from a bank of options. It looked like:

#showtooltip
/cast Icebound Fortitude
/run if random(100)<=75 then SendChatMessage(GetRandomArgument("Cold embrace me!","Fortitude!","Frost!")) end


Where 75 is a 75% chance to proc the /say phrase, and you can see the three phrases it has to select from. You can laugh, but I've found that having these little scripts has made my characters a LOT of fun to play, and it gives them a little extra personality.

The /s macro can be changed to a /y by using:

#showtooltip
/cast [target=mouseover,harm][] Strangulate
/run if random(100)<=50 then SendChatMessage(GetRandomArgument("Silence!","Bite your tongue, fool!","You INSUFFERABLE little...!"), "YELL") end


Finally, one other little thing I use is a /whisper script when doing things like battle rez, innervate, or regular rez, that looks like:

#showtooltip
/cast Resurrection
/s Come now %t, the Twisting Nether will not embrace you yet...
/i Pulling <%t> back from the other side
/script SendChatMessage("%t. it is not yet your time....Return!", "WHISPER", nil, UnitName("target"));


Where the last part is the target whisper function.

Now, I put all that out there to ask basically 2 main questions:

1) I remember someone back in Wrath mentioning this, but lost the script and could not remember how to do it, but supposedly there is a way that you can make the macro run the RP script in another language you can speak (Taurahee, Thalassian, Darnassian, etc). I thought it was done by replacing the "YELL" in the second example with the language, but that didn't work for me...

2) Is tit possible to make the RP or, more importantly, the whisper function fire for only ONE spell in a macro that combines two or more? For example, I have Ironbark and Barkskin bound to one macro by /cast [mod:shift] Ironbark; Barkskin And I want to know if I can make it so that the macro whispers the target, but ONLY when cast Ironbark. Is there like a "/run if cast/spell =" option?

I know this probably seems a little out there, but I'd really appreciate any input that you guys have! Thanks a lot!
Edited by Naneth on 3/20/2013 8:39 AM PDT
Reply Quote
90 Tauren Druid
9710
Bonus question, and I know this is really stretching: Is it possible to write the macro in a way that when it randomly chooses between a set of phrases, that it also randomly chooses whether to /say or /yell it? Or even to randomly say it in your native language? XD

Again, thanks for taking a look at this!
Reply Quote
100 Dwarf Mage
11305
1) I remember someone back in Wrath mentioning this, but lost the script and could not remember how to do it, but supposedly there is a way that you can make the macro run the RP script in another language you can speak (Taurahee, Thalassian, Darnassian, etc). I thought it was done by replacing the "YELL" in the second example with the language, but that didn't work for me...

Previously the third argument to SendChatMessage was a language name, but now it's a languageID instead. To find the languageID of your language, follow the instructions here:
http://us.battle.net/wow/en/forum/topic/7810522737#2

If the languageID of your desired language was 42, you'd replace your macros with these:
#showtooltip
/use Icebound Fortitude
/run if random(100)<=75 then SendChatMessage(GetRandomArgument("Cold embrace me!","Fortitude!","Frost!"), nil, 42) end
#showtooltip
/use [@mouseover,harm][]Strangulate
/run if random(100)<=50 then SendChatMessage(GetRandomArgument("Silence!","Bite your tongue, fool!","You INSUFFERABLE little...!"), "YELL", 42) end
#showtooltip
/use Resurrection
/s Come now %t, the Twisting Nether will not embrace you yet...
/i Pulling <%t> back from the other side
/run SendChatMessage("%t. it is not yet your time....Return!", "WHISPER", 42, GetUnitName("target",1):gsub(" ","",2))


I also replaced a few things with shorter aliases (/cast with /use, /script with /run, target=unit with @unit) and changed your whisper macro to work with people from other servers.

2) Is tit possible to make the RP or, more importantly, the whisper function fire for only ONE spell in a macro that combines two or more? For example, I have Ironbark and Barkskin bound to one macro by /cast [mod:shift] Ironbark; Barkskin And I want to know if I can make it so that the macro whispers the target, but ONLY when cast Ironbark. Is there like a "/run if cast/spell =" option?

I know this probably seems a little out there, but I'd really appreciate any input that you guys have! Thanks a lot!

/use [mod:shift]Ironbark;Barkskin
/run if IsShiftKeyDown() and random(100)<=75 then SendChatMessage(GetRandomArgument("Some phrase","Another phrase!","A third phrase!"), "SAY", 42) end

/use [mod:shift]Ironbark;Barkskin
/run if IsShiftKeyDown() then SendChatMessage("Some whisper message", "WHISPER", 42, GetUnitName("target",1):gsub(" ","",2)) end


Bonus question, and I know this is really stretching: Is it possible to write the macro in a way that when it randomly chooses between a set of phrases, that it also randomly chooses whether to /say or /yell it? Or even to randomly say it in your native language? XD

/run local G=GetRandomArgument SendChatMessage(G("Some phrase","Another phrase!","Yet another phrase!"),G("YELL",nil),G(42,nil))
This chooses a random phrase then chooses whether to yell or say it, then chooses whether to send it in your native language or in your faction's default language (Orcish/Common).
Edited by Choonster on 3/20/2013 3:15 PM PDT
Reply Quote
90 Tauren Druid
9710
Choonster, this is incredible! I was even able to get the last macro to work on the X% chance by putting the /run local G=... before the if random (100)<=75. Seriously, I'm in awe right now.

The only problem I've run into is that when I use the Ironbark whisper, it says "No player named '0' is currently playing"? I have it written as:

#showtooltip
/use [mod:shift] Ironbark; Barkskin
/run if IsShiftKeyDown() then SendChatMessage("message","WHISPER",GetUnitName("target",1):gsub(" ","",2)) end


Everything other than that one hiccup is flawless and everything I could have hoped for!
Edited by Naneth on 3/20/2013 9:30 PM PDT
Reply Quote
100 Dwarf Mage
11305
You need to put the languageID (or nil for your default language) between the chatType ("WHISPER") and the name of the player to whisper.

#showtooltip
/use [mod:shift] Ironbark; Barkskin
/run if IsShiftKeyDown() then SendChatMessage("message","WHISPER",nil,GetUnitName("target",1):gsub(" ","",2)) end
Reply Quote
90 Tauren Druid
9710
That fixed it perfectly! Thank you again!!
Reply Quote

Please report any Code of Conduct violations, including:

Threats of violence. We take these seriously and will alert the proper authorities.

Posts containing personal information about other players. This includes physical addresses, e-mail addresses, phone numbers, and inappropriate photos and/or videos.

Harassing or discriminatory language. This will not be tolerated.

Forums Code of Conduct

Report Post # written by

Reason
Explain (256 characters max)
Submit Cancel

Reported!

[Close]