${ChatText} Question
Posted: Wed May 26, 2004 5:27 am
Hi,
I've been converting some of my old macros and I've run into a snag. The old .mac would grab words of text by where they were placed in the tells. I seem to be having problems locating the syntax for the new method. Or maybe i'm just not connecting the dots.
Below I have an example of the old way, and my attempt to convert it.
Any thoughts, or suggestions are welcome. Thanks.
I've been converting some of my old macros and I've run into a snag. The old .mac would grab words of text by where they were placed in the tells. I seem to be having problems locating the syntax for the new method. Or maybe i'm just not connecting the dots.
Below I have an example of the old way, and my attempt to convert it.
Code: Select all
|Chunk of the Old macro
|
|Sub Event_Chat
| /if $lasttell=="jimmypop" {
| /if $arg(1,"@Param2")=="NUKE" {
| /target id $arg(2,"@Param2")
| /delay 2
| /cast "condemnation"
| }
| } else {
| /delay 5
| /tell jimmypop @Param1 told me, '@Param2
| }
|/return
|
|
|------------------
|
|Afterwards
|
|
|Jimmypop tells you 'Nuke ${Spawn.ID}'
|
|Jimmypop tells you 'Nuke 1223'
Sub Event_Chat(ChatType,Sender,ChatText)
/if (${Sender.Equal[Jimmypop]}) {
/if (${ChatText(word 1).Equal[Nuke]}) {
/target (${Spawn[${ChatText(Word 2)}]})
/delay 2
/cast "condemnation"
}
} else {
/delay 5
/tell jimmypop ${Sender} told me, '${ChatText}
}
/return