Event_Chat help
Posted: Sun Apr 18, 2004 2:41 am
Okay, I've read through a lot of posts and have a little idea of how to use Sub Event_Chat(cType,cSender,cMessage), but I still have a few questions:
1: what are all the possible chat types? For instance, I want to have my character do something if he gets attacked. I've found I can use the following, which is not very efficient, but it works:
Now this code works, but it's WAAAAY too many lines for my needs. If I could find out if there's a chat type that is sent for you being hit, that'd be awesome!
2: When looking for specific words in the message, what is the benefits of using '==' or '~~'?
With the answer of this post, I should be able to make some uber scripts with few lines.
Thanks
1: what are all the possible chat types? For instance, I want to have my character do something if he gets attacked. I've found I can use the following, which is not very efficient, but it works:
Code: Select all
#event 001a "YOU"
#event 001b "points of damage"
#event 001c "points of non-melee damage"
Sub Main
/declare Flag_x global
/varset Flag_x 0
:Mainloop
/doevents
/goto :Mainloop
/return
Sub Event_001a
/varset Flag_x 1
/return
Sub Event_001b
/if n @Flag_x==1 {
DO WHATEVER
/varset Flag_x 0
}
/return
Sub Event_001c
/if n @Flag_x==1 {
DO WHATEVER
/varset Flag_x 0
}
/return2: When looking for specific words in the message, what is the benefits of using '==' or '~~'?
With the answer of this post, I should be able to make some uber scripts with few lines.
Thanks