Moderator: MacroQuest Developers
Code: Select all
#event fading_invis "You feel yourself about to appear"Code: Select all
/alert clear #Code: Select all
/alert clear 1Code: Select all
/alert clear 2Code: Select all
/alert add # [pc|npc|corpse|any] [radius radius] [range min max] spawnCode: Select all
/alert add 1 npc radius 100 range 0 5 batCode: Select all
/alert add 2 npc radius 200 range 2 5 spiderCode: Select all
/alert list #Code: Select all
/alert list 1Code: Select all
/target alert #Code: Select all
/target alert 1Code: Select all
/target notalert #Code: Select all
/target notalert 2Code: Select all
/target nearalert #Code: Select all
/target nearalert 1Code: Select all
/target notnearalert #Code: Select all
/target notnearalert 1Code: Select all
/alert clear 1
/alert clear 2
/alert add 1 npc radius 100 range 0 5 bat
/alert add 2 npc radius 200 range 2 5 spider
/target nearalert 1 notnearalert 2 ratCode: Select all
/who alert #Code: Select all
/who npc alert 1Code: Select all
/who noalert #Code: Select all
/who npc noalert 2Code: Select all
sub main
/alert clear 1
/alert add 1 pc radius 200 range 1 5 macroingbastard
/echo Here are the things on your alert list so we know it isn't broken:
/alert list 1
:loop
/if $alert(1)==TRUE {
/beep
/echo macroingbastard is within 200 clicks of you... just a warning...
}
/goto :loop
/returnCode: Select all
Define your first subroutine which will be called...
clear alert list 1 (see above)
add macroingbastard to the alert list (again, if you don't understand see above)
echo a warning of the list to follow
display the alert list so you know the alert list is correct
define a loop to repeat
check to see if a thing in alert list 1 is true... (if macroingbastard is within 200 clicks)
beep
echo the warning
end your if statement
goto the begining of the loop
end macro, though the macro should never be here...