Weapon Changer - Spears - Spike Sword
Hello. I want make script for AB Trolls for pally. I want loot spears and use it and change it when don't have any spear for spike sword. If i don't have any spears after loot it i want change it back to spear. Any action for me?
- Rep Power
[xcode=lua]local DistanceWeapon = "spear"
local AlternativeWeapon = "spike sword"
local MinSpearToWear = 5 -- min spear to move
if weaponamount == 0 then
if weapon ~= itemid(AlternativeWeapon) and itemcount(AlternativeWeapon) > 0 then
moveitems(AlternativeWeapon, "all", "weapon", 100)
if weapon ~= itemid(DistanceWeapon) and itemcount(DistanceWeapon) > MinSpearToWear then
moveitems(DistanceWeapon, "all", "weapon", 100)
Made by @JuicyScripts I did edit a bit, hopefully without stupid bugs, didn't tested