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