Autodestroy during autoloot?

Need some help with that macro you're working on or aren't quite sure how to get your macro to do something? Ask here!

Moderator: MacroQuest Developers

ImaNoob
a ghoul
a ghoul
Posts: 89
Joined: Mon Mar 08, 2004 4:37 am

Autodestroy during autoloot?

Post by ImaNoob » Thu Apr 08, 2004 5:52 am

I would like to modify this to automatically destroy nodrop and or lore items (to prevent it going into an infinite looting loop if you already have the item).

What would I need to add or change, I seem to be having a real brain fart here.

Code: Select all

|autoloot.inc 
| 
| Code to move close enough to loot from L124RD's MacroKit 
| Autolooting code by grimjack 
| 
| For use as an include 
| usage /call LootUp "item1" "item2" 
| Will accept up to 8 items, items must be one word 
| 

Sub LootUp 

   /declare t0 timer 
   /declare LootSlot global 
   /declare CheckLoot global 
   /declare LootTotal global 
   /declare LootArray array 

   /if n $target(distance)>75 /goto :continue 
   /stand 
   /face 
   /if n $target(distance)<15 /goto :CloseEnoughAL 
   /sendkey down up 
   /varset t0 3m 
   :CloserAL 
   /face 
   /delay 0 
   /if n $target(distance)>14 /if @t0>0 /goto :CloserAL 

   :CloseEnoughAL 
   /sendkey up up 

   /varset LootSlot 0 
   /varset CheckLoot 0 
   /if @Param0=="" { 
      /echo "Usage: /call LootUp [item to keep] [item to keep]...ect" 
      /return 
   } 
   /if @Param0!="" { 
      /varset LootArray(0) @Param0 
      /varset LootTotal 1 
   } 
   /if @Param1!="" { 
      /varset LootArray(1) @Param1 
      /varset LootTotal 2 
   } 
   /if @Param2!="" { 
      /varset LootArray(2) @Param2 
      /varset LootTotal 3 
   } 
   /if @Param3!="" { 
      /varset LootArray(3) @Param3 
      /varset LootTotal 4 
   } 
   /if @Param4!="" { 
      /varset LootArray(4) @Param4 
      /varset LootTotal 5 
   } 
   /if @Param5!="" { 
      /varset LootArray(5) @Param5 
      /varset LootTotal 6 
   } 
   /if @Param6!="" { 
      /varset LootArray(6) @Param6 
      /varset LootTotal 7 
   } 
   /if @Param7!="" { 
      /varset LootArray(7) @Param7 
      /varset LootTotal 8 
   } 

/if $target()=="TRUE" /call LootMob 
/call ResetSub 
/return 

sub LootMob 
   /loot 
   /delay 7 
   :lootloop 
   /click left corpse @LootSlot 
   /delay 7 
   /if "$cursor()"!="TRUE" /goto :doneloot 
   :lootChecker 
   /if "$cursor(name)"~~@LootArray(@CheckLoot) { 
      /delay 7 
      /click left auto 
      /varadd LootSlot 1 
      /goto :lootloop 
   } 
   /varadd CheckLoot 1 
   /if "$cursor()"=="TRUE" { 
      /if @CheckLoot<@LootTotal /goto :lootchecker 
   } 
   /if "$cursor()"=="TRUE" { 
      /delay 7 
      /click left destroy 
      /delay 7 
   } 
   /varadd LootSlot 1 
   /varset CheckLoot 0 
   /goto :lootloop 
   :doneloot 
   /varset LootSlot 0 
/return 


sub ResetSub 
   /press esc 
   /press esc 
   /press esc 
   /press esc 
   /press alt 
   /press shift 
   /press ctrl 
   /varset CheckLoot 0 
   /varset LootSlot 0 
   /delay 7 
/return

User avatar
driftinsupra
Official loudmouth
Official loudmouth
Posts: 212
Joined: Tue Jan 28, 2003 9:25 pm

Post by driftinsupra » Thu Apr 08, 2004 2:11 pm

I don believe you will be able to do that for lore items, since when you try tyo loot a duplictae lore item it says something like you cant lot this and well...you wont be able to loot it. Best optionw with that is just to only loot items that and non lore and destroy all of them. Sucks but its the only real option as far as I can see.

As far as destroying no drop items...thats easy

Code: Select all

/lootn never
Just toss that anywhere in your macro or just type it at the command line and it will make it so that no drop box doesnt come up when you are looting a no drop item. Then your macro will trat it just as any normal item and quickly destroy it.