Moderator: MacroQuest Developers
Code: Select all
Sub ItemSub
/for LC 0 to @DAS
/if (${Cursor.Name.Find[@DA(@LC)]}) {
/drop
/return
}
/if (@LC==@DAS) {
/autoinv
/return
}
/next LC
/return Code: Select all
Sub Event_StartCast
/call Reset
/declare index int local
/for index 1 to ${CastMez.Size}
/if (${CastMez[${index}].Equal[${Param1}]}) {
/docommand /${CT} Casting Mezz on ${If[${Target.CleanName.Left[1].Equal[#]},${Target.CleanName.Right[-1]},${Target.CleanName}]}.
/varset LastSpell Mezz
/varset ResistVar 1
}
/next index
/for index 1 to ${CastBuff.Size}
/if (${CastBuff[${index}].Equal[${Param1}]}) {
/docommand /${CT} Casting ${Param1} on ${If[${Target.CleanName.Left[1].Equal[#]},${Target.CleanName.Right[-1]},${Target.CleanName}]}.
/call Reset
}
/next index
/for index 1 to ${CastSlow.Size}
/if (${CastSlow[${index}].Equal[${Param1}]}) {
/docommand /${CT} Casting Slow on ${If[${Target.CleanName.Left[1].Equal[#]},${Target.CleanName.Right[-1]},${Target.CleanName}]}.
/varset LastSpell Slow
/varset ResistVar 1
}
/next index
/return
blueninja wrote:Wouldn't Param1 in the case of an event sub be the whole line that triggered the event and Param2 be what you're looking for? From what I remember the first param to an event sub is the whole line and after that the ones you define with #x#.
If you just use Sub Event_Chat:Sub Event_Chat[(ChatType,Sender,ChatText)]
ChatType : Channel of message (tell, group, say)
Sender : Name of the person who sent the message
ChatText : Text they sent
If You use just Sub Event_SelfEchoSub Event_SelfEcho(string Line, string Command)
Code: Select all
Sub Event_StartCast(string Line, string SC)