PDA

View Full Version : I need auto weapon switcher



palli1
02-16-2016, 08:38 PM
Hello! I need weapon switcher while iam hunting rotworms and carriors worms. (When killing rotworms, use serpent sword, when kill carrior rotworm, use wand). Could someone make this LUA script or if there is already LUA script for this, Please pass it to me! Thanks! :)

jollebollen
02-16-2016, 11:14 PM
Hey, I have this script and mayb if you change the monster and weapon name maybe it will work for you.
Have a great day!


local specialMonsters = {"Ghost"}
local defaultWeapon = "blessed sceptre"
local specialWeapon = "Fire Sword"

-----------------------------------------------
-----------------------------------------------
-----------------------------------------------

defaultWeapon = Item.GetID(defaultWeapon)
specialWeapon = Item.GetID(specialWeapon)

Module("Weapon changer", function(self)
local c = Creature(Self.TargetID())
local useSpecial = c and table.find(specialMonsters, c:Name())
if useSpecial and Self.Weapon().id ~= specialWeapon then
Self.Equip(specialWeapon, "weapon")
elseif not useSpecial and Self.Weapon().id ~= defaultWeapon then
Self.Equip(defaultWeapon, "weapon")
end
self:Delay(10000)
end)

PandoraNyx
06-26-2016, 07:10 PM
Hey, I have this script and mayb if you change the monster and weapon name maybe it will work for you.
Have a great day!

I am attempting to make a script that will equip a melee weapon when my spear count is 2 or less (nub pally) would it be easier to try to tinker with this script or just try and pull something out of my butt/keep searchngforums