working like a charm now! thanks alot!
working like a charm now! thanks alot!
Was trying to troubleshoot around this one. Lets say I have Tank(partyleader) and Healer. With Trust set up already, i think this code, when run from the Tank, will create a macro on the healer that will cast heal on the tank.
If we add another member, say DPS, then it would look like this.Code:/rpc Healer CreateMacro("Heal1", 1, "/cast [target="+UnitName(Party1)+"]heal", 1, 1)
You would probably have to run something like....Code:/rpc Razorbax CreateMacro("Heal2", 1, "/cast [target="+UnitName(Party2)+"]heal", 1, 1)
....first, but i think has promise.....Code:/rpc Razorbax DeleteMacro("Heal1")
NB. I am not a coder so I won't take offence to being corrected![]()
OK, so I am home now and I have had a play.
This works as straight text with no variables..
But when I do the version with the variablesCode:/rpc Razorslax CreateMacro "Heal1" 1 "/cast [target=razorbaxftw]heal" 1 1
It errors and only graps the first "/cast [target=" part. Anyone know what is used as joiners? I have tried ".." and "&" and "," and "and".Code:/rpc Razorslax CreateMacro "Heal1" 1 "/cast [target=" .. UnitName(Player) .. "]heal" 1 1
[quote='razorbax',index.php?page=Thread&postID=1163 45#post116345]But when I do the version with the variables
[code]/rpc Razorslax CreateMacro "Heal1" 1 "/cast [target=" .. UnitName(Player) .. "]heal" 1 1[/code]
It errors and only graps the first "/cast [target=" part. Anyone know what is used as joiners? I have tried ".." and "&" and "," and "and".[/quote]The [url='http://www.lua.org/manual/5.1/manual.html#2.5.4']concatentation[/url] operator is .. try it without spaces (blah..blah..blah) and also on that page at linked there is a section 2.1 - Lexical Conventions which explains what I say below.
UnitName takes a string (type of variable); so you'll need to pass "player" to it for it to work. But because you are using " in UnitName, you need to use [[ and ]] instead of " around the complete string.
so you might like to try:
[[/cast [target="..UnitName("player").."] heal]]
I make no guarantees that this will work for you; good luck in your macro manipulation quest. (Do you get a phat reward when you hand it in?)
Jafula.
Jamba - Jafula's Awesome Multi Boxer Assistant. An addon for YOU.
I'm not playing WoW anymore (at least not until the next time I get sucked back in). If anybody is still using this and wants to pick up the last version I was working on the code is here:
http://code.google.com/p/wow5box
Check out the projects MultiboxRoster and Remoting.
All my codes r belong to you: wow5box
I'll have a look, thanks for sharing your work!Originally Posted by 'Chorizotarian',index.php?page=Thread&postID=12717 8#post127178
Jafula.
Jamba - Jafula's Awesome Multi Boxer Assistant. An addon for YOU.
Connect With Us