• You've discovered RedGuides 📕 an EverQuest multi-boxing community 🛡️🧙🗡️. We want you to play several EQ characters at once, come join us and say hello! 👋
  • IS THIS SITE UGLY? Change the look. To dismiss this notice, click the X --->
  • Unfortunately, yes, there is a suspension wave happening around the new tlp launch. :'( Please keep regular discussion to Suspension MegaThread and please consider submitting a Suspension report to RG.

if statement question (1 Viewer)

redskycrow

New member
Joined
Sep 12, 2004
RedCents
21¢
ok i searched and was unable to find aything that helps i know that if i do /if (${Target.ID}) then it will run what ever comes afeter it how can i do the if statement so that it will run it if there is no target?
 
because i am making it so that if there is nothing targeting as in after all items have been ganked of the specified name it will pause for x amout of time til they respawn the if is to call the pause sub
 
Uhh, if you're trying to target items, then Target.ID won't work, afaik, since you're using itemtarget...

You could do something to check if there are any spawns up with that name.
 
well i want to thank everyone for there help and I am posting my results
I did this macro for ganking yew leaves in Wakening Land however it will work for anything by cahngint the itemtarget. I used Armysoldier's shroom macro however i wanted one that would work with out knowing the total number of items ahead of time. I thought that I would post this int he event it would be of some help to other folks.
Rich (BB code):
 ShroomGank.MAC
| Written by Armysoldier
| 
| Updated 15 APR 06 - added some delays to slow down the ganking.. which seems to cause CTD
|                   - added player check
|
| 
| Useage      : /macro ShroomGank 
| Description : This macro will gank acorns in Misty Thicket
|
|
|------------------------------------------------------------------------------------

#Event End "#*#There is no place#*#"

#Event End "[MQ2] End"

#Event CGank "#*#Couldn't parse#*#"

#Event Find "#*#Couldn't find #*#"

Sub Main
  /declare lootr int outer
  /declare lootrt int outer
  /declare test
  :Start
  /call GMCheck
|  /call PC
  /itemtarget *green
 /varset test ${Ground.Name}
/echo ${Ground.Name} ground
 /echo ${test} test
 /if (${test.Equal["NULL"]}) {
   /echo pause
   /call Pause
}
  /doevents
  /delay 1s
  /Gank
  /delay 1s
  /if (${Cursor.ID}) {
  /echo Keeping a ${Cursor.Name}... WOOT!
  /varcalc lootr ${lootr}+1
}
  /autoinventory
  /delay 1s
 /call DisplayStats
  /doevents
  /delay 1s
  /call GMCheck
 |/call PC
  /goto :Start
/return
Sub Event_End
  /echo Ending Macro
  /call DisplayStats
  /endmacro
/return

Sub Event_CGank
  /echo you do not have MQ2CGank Loaded
  /endmacro
/return

Sub Event_Find
  |/varset x 30
  /call DisplayStats
  /call pause
  /return

Sub Pause
  /echo No yew leafs.. Pausing 15 min
  /delay 5m
  /echo tic toc .. 5 Min
  /delay 5m
  /echo tic toc .. 10 Min
  /delay 5m
  /echo tic toc .. 1 Min
  /echo DING DING DING!!!
  /echo time to try again
/return

Sub GMCheck 
   :redo
   /if (${Spawn[gm].ID}) { 
      /beep 
      /beep 
      /beep 
      
      /echo GM has entered the zone! 
      /echo pausing the macro... 

      /afk Gone for more beer BRB
      /delay 2m
      /goto :redo 
   } 
    
/return 

Sub PC 

   :redopc
   /if (${Spawn[pc noalert 2 radius 100].ID}) { 
      /echo player nearby 
      /beep 
      /beep 
      /beep 
      
      /echo Player Nearby!!! 
      /echo pausing the macro... 

      /afk Gone for More Beer - BRB
      /delay 2m
      /goto :redopc
   } 
/return 


|--------------------------------------------------------------------------------
|SUB: Display Stats
|--------------------------------------------------------------------------------
Sub DisplayStats
/echo Test
/echo ${lootr} yew leafs
/return
 
if statement question

Users who are viewing this thread

Back
Top