Add handling event

Macro requests from before the user variable changes that broke all macros

Moderator: MacroQuest Developers

User avatar
SingleServing
a hill giant
a hill giant
Posts: 195
Joined: Tue Dec 17, 2002 11:00 pm

Add handling event

Post by SingleServing » Mon Jan 06, 2003 10:59 pm

I have attempted to write an event that handles adds, it works but messes up on a few points

anyone have something that works well ? I use something like...

Code: Select all

#event Attacked "YOU for"
#define Counter v01

Sub Main

/varset Counter 0
:Loop
/doevents
/delay 5
/goto :Loop

Sub Event_Attacked

    /press F8
    /if "$target(name)"~~"char(name)" {
            /press F8
            /if "$target(name)"~~"char(name)" /return
}
           
    /varset a(1,$Counter) $target(id)

    /for v02 0 $Counter

    /if n $target(id)==$a(1,$v02) /return

    /next v02 

   
    /call cast "Tugur's Insects"
    /call cast "Envenomed Bolt"
    /call cast "Root"
    :Move
    /if n $target(distance)less than "<" 100 {  | damn bug 
                /face away
                /sendkey down up
                /goto :Move
}
    /face nopredict
    /varadd Counter 1

/return
[color=DarkBlue]Everything,[/color] [color=DarkBlue][b]is[/b][/color] [color=black]black[/color] [color=DarkBlue]and[/color] [color=white]white[/color][color=DarkBlue], when you zoom out it looks[/color] [color=gray]grey[/color][color=DarkBlue].[/color]