A fast kill loot bot help plz

Help section from before the user variable changes that broke all macros

Moderator: MacroQuest Developers

ilcoopil
orc pawn
orc pawn
Posts: 13
Joined: Mon Aug 04, 2003 11:18 pm

A fast kill loot bot help plz

Post by ilcoopil » Tue Aug 05, 2003 3:42 pm

Im trying to make a macro to kill 2 different mobs that spawn in the same spot constantly. I have some of it so far there are a few bugs though. I need to make the looting faster. Also I want it to target "a zombie's corpse" first to loot it and if nothing shows up then target "a skeleton's corpse" and loot that. If I have any crappy coding all suggestions are welcome and thanks for the help. Here is the code :

Code: Select all

#define FirstItem v40
#define Times v41
#define StartingPlat v42
#define CurrentPlat v43
#define PlatMade v44
#event Zombiecorpse "There are no 'a zombie's corpse' around here." /target corpse radius 25 "corpse" 
Sub Main 
  /zapvars 
  /press esc 
  /press esc 
  /press esc 
  
  /alert clear 1 
  /alert add 1 "GM" 
  /alert clear 2 
  /alert add 1 "mob name"
  /varset Times 1
  /varcalc StartingPlat $char(plat)+$char(gold)/10+$char(silver)/100+$char(copper)/1000

 :loop 
  /if $alert(1)==True { 
  /afk 
 } 

 /if $alert(2)==True { 
  /zapvars 
  /goto :kill 
 } 

 :kill
 /varcalc CurrentPlat $char(plat)+$char(gold)/10+$char(silver)/100+$char(copper)/1000
 /varcalc PlatMade $CurrentPlat-$StartingPlat
 /echo Platinum made is: $PlatMade
 /delay 3s
 /face fast nopredict 
 /attack on
 
 /if n $target(id)==0 /call LootMob
 
 /goto :loop

 /return

sub LootMob
   /echo Looting...
   /attack off
   /target corpse radius 25 "a zombie's corpse"
   /if $target=="" then /target corpse radius 25 "a skeleton's corpse"
   /loot
   /delay 1s
   /loot
   /loot
   
   /delay 1s 
   /varset FirstItem 0

   /click left corpse 0
   /delay 1s
   /if $cursor()==TRUE {
    /varset FirstItem 1
    /delay 1s
    /click left auto
   }

   /delay 1s

   /if n $FirstItem!=0 {
    /click left corpse 1
    /delay 1s 
    /if $cursor()==TRUE {
     /delay 1s
     /click left auto
    }
   }
   /press esc
   /press esc
   /press esc

/return