groovalistic
New member
- Joined
- Feb 27, 2006
- RedCents
- 0¢
Well, before the code... lemme mention a couple things:
basically designed for a melee to farm an area (not really afk)
relies on cursor for loot handling
relies on moveutils for sticking
(no warps of any kind involved)
it basically does what i need it to... but very sloppy, no doubt
now for the assistance request
Any ideas for optimization/improvement?
like a better way to handle /attack on instead of using a delay, or some way to speed up the whole process without simply spamming a targetting commands... anything like that
tx in advance for any input
basically designed for a melee to farm an area (not really afk)
relies on cursor for loot handling
relies on moveutils for sticking
(no warps of any kind involved)
Rich (BB code):
Sub Main
:declare
/declare t int outer 0
/declare loottotal int outer
/declare lootslot int outer
/declare lootleft int outer 0
/if (!${Defined[Param0]}) {
} else {
/varset lootleft ${Param0}
}
/goto :target
:target
/delay 20s
/target shadow npc radius 1000
/delay 1s
/if (${Target.ID}) {
/goto :killit
} else {
/target corpse radius 1000
}
/delay 1s
/if (${Target.ID}) {
/goto :looting
} else {
/goto :target
}
:killit
/stick 12 uw moveback
/delay 5s
/attack on
/delay 10s
}
/if (${Target.PctHPs}<1) {
/goto :looting
} else {
/goto :target
}
:Looting
/stick off
/tar npc corpse radius 200
/delay 1s
/if (${Target.ID}) {
} else {
/goto :target
}
/tar npc corpse radius 50
/delay 1s
/loot
/delay 1s
:LootLag
/if (${loottotal}!=${Corpse.Items}) {
/varset loottotal ${Corpse.Items}
/goto :LootLag
}
/if (${loottotal}<=${lootleft}) {
/nomodkey /notify LootWnd DoneButton leftmouseupx
}
/varset loottotal ${Math.Calc[${Corpse.Items}-${lootleft}]}
/for lootslot 1 to ${loottotal}
:LootItem
/nomodkey /itemnotify loot${lootslot} leftmouseup
/delay 2!${Corpse.Item[${lootslot}].ID}
/if (!${Corpse.Item[${lootslot}].ID}) {
/next lootslot
} else {
/goto :LootItem
}
/if (${Math.Calc[${Corpse.Items}-${lootleft}]}>0) /goto :LootLag
/nomodkey /notify LootWnd DoneButton leftmouseup
/delay 2s
/tar corpse radius 200
/if (${Target.ID}) {
} else {
/goto :target
}
/if (${Target.Distance}>=15) {
/stick 13
/delay 2s
}
/if (${Target.Distance}<=15) {
/stick off
/loot
/delay 1s
}
/if (${Target.ID}) {
/goto :lootlag
} else {
/goto :target
}
now for the assistance request
Any ideas for optimization/improvement?
like a better way to handle /attack on instead of using a delay, or some way to speed up the whole process without simply spamming a targetting commands... anything like that
tx in advance for any input