WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Macro Help (https://www.wowinterface.com/forums/forumdisplay.php?f=140)
-   -   Exists+yell (https://www.wowinterface.com/forums/showthread.php?t=55405)

ctepik 05-18-17 01:49 AM

Exists+yell
 
Hi, help please, me need send text if i have target and send different text if i no have target.
I think some like this
Quote:

/run if IsExists() then SendChatMessage("mod", "yell") else SendChatMessage("nomod", "yell"); end;
or
Quote:

/yell [exists] text
but this dont work

ctepik 05-18-17 02:01 AM

Mb can work macro like this
Quote:

/cast [exists] spellname1 +send text1
/cast [noexists] spellname2 +send text2
3.3.5

Kanegasi 05-18-17 07:21 AM

Code:

#showtooltip
/run if SecureCmdOptionParse("[@target]") then SendChatMessage("TARGET!","YELL") else SendChatMessage("no target","YELL") end
/use [@target] spell1; spell2


SDPhantom 05-18-17 08:47 AM

UnitExists("target") should work fine.

ctepik 05-18-17 08:56 AM

Thanks a lot, but he say only "target" i litle fix this and he work right.
Quote:

#showtooltip
/run if SecureCmdOptionParse("[exists]") then SendChatMessage("TARGET!","YELL") else SendChatMessage("no target","YELL") end

ctepik 05-18-17 08:58 AM

Quote:

Originally Posted by SDPhantom (Post 323449)
UnitExists("target") should work fine.

I try this but didn't work.

ctepik 05-18-17 09:05 AM

Quote:

Originally Posted by SDPhantom (Post 323449)
UnitExists("target") should work fine.

I checked it again and it will start working
Quote:

/run if UnitExists("target") then SendChatMessage("TARGET!","YELL") else SendChatMessage("no target","YELL") end

ctepik 05-18-17 09:06 AM

Thank you all very much.


All times are GMT -6. The time now is 08:34 AM.

vBulletin © 2020, Jelsoft Enterprises Ltd
© 2004 - 2019 MMOUI