A major update since Lucas decided to update his library.
-- Wand Swapper
init start
local mainWeapon = getuseroption('mainWeapon') or $rhand.id
local bestWeapon = 0
local currentMonster = 0
init end
auto(50)
if $attacked.id ~= 0 and $attacked.id ~= currentMonster then
bestWeapon = bestelementweapon($attacked.name)
bestWeapon = iteminfo(bestWeapon).id
currentMonster = $attacked.id
end
if $attacked.id ~= 0 and $rhand.id ~= bestWeapon then
pausewalking(500)
equipitem(bestWeapon, 'rhand')
elseif $attacked.id == 0 and $rhand.id ~= mainWeapon then
pausewalking(500)
equipitem(mainWeapon, 'rhand')
end
Will automatically used the best possible weapon for a druid/sorcerer for your current target.
Only takes into account the wands/rods that are visible in one of your containers.
Make sure to not bring wands over your level as it does not take character level into account.