Page 1 of 1

chat commands

Posted: Thu Apr 29, 2004 5:55 pm
by Scriptless
I have a couple of easy peasys that need some help.



Oldest was

Code: Select all

Sub Event_Chat(ChatType,Sender,ChatText) 


/if "@ChatText"=="snare" { 
/target @Sender 
/delay 1s 
/assist 
/delay 1s 
/call Cast "ensnare" 
} 

Last week was

Code: Select all

Sub Event_Chat(ChatType,Sender,ChatText) 


    /if (${String[@ChatText].Equal[snare]}) { 
        /target @Sender 
        /delay 1s 
        /assist 
        /delay 1s 
        /call Cast "ensnare" 
    }


My little diddys will check their selfbuff and cast them with ML's new spellcast.



All day I have been messing around and reading so far I've got

Code: Select all

Sub Event_Chat(ChatType,Sender,ChatText) 

         /bang head on desk

Posted: Thu Apr 29, 2004 6:57 pm
by Zazoot
can you do a fuzzy equal like the parm system had with ~~ ????????

that would make parsing chat commands easier and less suspicious if being snooped on

Posted: Thu Apr 29, 2004 7:04 pm
by Preocts
If you want to do it that way, I would suggest using some of the following.

String.Find or String.Compare
All day I have been messing around and reading so far I've got


Code:
Sub Event_Chat(ChatType,Sender,ChatText)

/bang head on desk
Stop that, you'll hurt the desk. It's really quite a simple change and you will love it once you get to know it.

Code: Select all

@ChatText becomes ${ChatText}
@Sender becomes ${Sender}
@AnyOldVarType becomes ${AnyOldVarType}
The bonus to this? You don't have to tell MQ to treat @ChatText as a string because ${ChatText} IS of the String type. Sooo...

Code: Select all

/if (${String[@ChatText].Equal[snare]}) {
becomes
/if (${ChatText.Equal[snare]}) {
That gets you started. Read the Announcement sections for more.

Thank you

Posted: Sun May 02, 2004 5:38 am
by Scriptless
/\ Title says it all.

Thanks, got my little diddys upgraded.