Chat events

This is how not to ask for help
Teh_Hidden
a lesser mummy
a lesser mummy
Posts: 43
Joined: Wed Mar 16, 2005 12:42 am

Chat events

Post by Teh_Hidden » Thu Mar 17, 2005 11:03 pm

This is the closest I came to finding a solution for my problem.

Here is my issue: I'm working with this macro, modified into a .inc file (possibly incorectly, which could be the root of the problem). The code for the .inc file is

Code: Select all

Sub Twitch
:Twitch
   /if (${Twitching}==1) {
      /if (${Me.SpellReady[Sedulous Subversion]}) /call cast "Sedulous Subversion"
      /if (${Me.SpellReady[Covetous Subversion]}) /call cast "Covetous Subversion"
   }
   /doevents
   /delay 4
   /goto :Twitch
/return       

Sub Event_Chat(string ChatType,string Sender,string ChatText)
/if ((${ChatText.Equal[twitch]}) && (${ChatType.equal[twitchchannel])
   /varset Twitching 1
   /target ${Sender}
   /if (${Target.ID}) {
      /call Twitch
      }
   }
/if ((${ChatText.equal[FM]}) && (${ChatType.Equal[chat]})) {
   /varset Twitching 0   
   }
/return   

Sub Event_OOM
   /varset Twitching 0

/return
My problem is that I tried to modify the macro to respond to the word "twitch" in a channel. When I tried to do this, though, the macro would attempt to react to anything said in ANY chat channel.

The following are the events that I added to the macro, when trying to convert the twitch macro to a .inc.

Code: Select all

#Chat Chat
#Chat twitchchannel
#event
The error I get with this code is the following:

Code: Select all

Failed to parse /if command. Could not find command to execute.
twitchbot.inc@13 (Event_Chat(string ChatType,string Sender,string ChatText) /if ((${ChatText.Equal[twitch]})

Now, I'm sure that the reason for my mistakes is stupid, and the result of the fact that I'm a noob at coding. But any help would be appreciated. RTFM has gotten me this far, but unfortunately, I can't manage to get any further on my own.

Lax
We're not worthy!
We're not worthy!
Posts: 3524
Joined: Thu Oct 17, 2002 1:01 pm
Location: ISBoxer
Contact:

Post by Lax » Thu Mar 17, 2005 11:15 pm

Re-read, and then follow the instructions for posting on MQ2::Macros::Help.

Particularly, steps 3 and on.
Lax Lacks
Master of MQ2 Disaster
Purveyor of premium, EULA-safe MMORPG Multiboxing Software
* Multiboxing with ISBoxer: Quick Start Video
* EQPlayNice, WinEQ 2.0