![]() |
|
|||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
im trying to figure out how to do chat notifications (/s) in repsonse to different mouse buttons used
example for spell: /cast [button:1] spell1 /cast [button:2] spell2 i am trying to get something like this /s [button:1] hello /s [button:2] good bye but this is not working. thanks for help |
|
||||
|
/run if (GetMouseButtonClicked() == "LeftButton") then SendChatMessage("hello", "SAY", "COMMON", nil) elseif (GetMouseButtonClicked() == "RightButton") then SendChatMessage("good bye", "SAY", "COMMON", nil) end
try this it should be something like this. But for long strings 255char limit might cause problems ![]() EDIT: Addition A better way is: /run b=GetMouseButtonClicked() if b=="LeftButton" then s="Hello" else s="Good bye" end SendChatMessage(s,"SAY","COMMON","") This type would be more suitable for left, right, middle etc multiple selections. SendChatMessage would be used once and thus less characters would be used. For example Left> hello , Right> good bye, Middle(etc)>Whats up /run b=GetMouseButtonClicked() if b=="LeftButton" then s="Hello" elseif b=="RightButton" then s="Good bye" else s="Whats up" end SendChatMessage(s,"SAY","COMMON","") ==> 165characters /run if(GetMouseButtonClicked()=="LeftButton") then SendChatMessage("hello", "SAY", "COMMON", nil) elseif(GetMouseButtonClicked()=="RightButton") then SendChatMessage("good bye","SAY","COMMON","") else SendChatMessage("Whats up","SAY","COMMON","") end ==> 252characters
__________________
..Born in hell, boy of fire.. Topic: What macros can not do CastBySpellName() Only thing needed in macros where blizz don't permit it.
Last edited by MiracleMage : 11-10-2008 at 12:59 PM. |
|
|||
|
ok i think this one will work:
/run b=GetMouseButtonClicked() if b=="LeftButton" then s="Hello" elseif b=="RightButton" then s="Good bye" else s="Whats up" end SendChatMessage(s,"SAY","COMMON","") if i want it to say %t i assume i would replace "Hello" with %t (or would it be "%t"). i think i understand the SendChatMessage as this (<phrase wanted>, "<channel>", <what does common refer to???>) thanks for help |
|
||||
|
WoWWiki API SendChatMessage
SendChatMessage("message", "chat_type", "Languge", "Channel") where message is what you want to say, chat type is SAY, RAID, WHISPER, EMOTE etc Language is COMMON, ORCISH, DARSANNIAN, TAURAHE etc channel is generally used for target in whisper type. For details you can check the wowwiki link above. If you need for a specific thing i'm here. ///// \\\\\ For /run b=GetMouseButtonClicked() if b=="LeftButton" then s="Hello" elseif b=="RightButton" then s="Good bye" else s="Whats up" end SendChatMessage(s,"SAY","COMMON","") script if it doeesn't work try to add local keyword as following: /run local b=Get... Atm i don't play so not able to check myself.
__________________
..Born in hell, boy of fire.. Topic: What macros can not do CastBySpellName() Only thing needed in macros where blizz don't permit it.
Last edited by MiracleMage : 11-11-2008 at 03:20 AM. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|