
Originally Posted by
zxzero
How can I make the script do, if "Monster name here" switch weapon on the fermor hills script?
Code:
local monsterName = "Snake" -- Monster to trigger weapon equip
local originalWeapon = "Axe" -- Weapon to use when Monster NOT on screen
local switchWeapon = "Machete" -- Weapon to use when Monster IS on screen
Module.New('monster-on-screen-weapon', function(modSwitchWeapon)
if (Creature(monsterName):isOnScreen()) and (Self.Weapon().id ~= Item.GetID(switchWeapon)) then
Self.Equip(Item.GetID(switchWeapon), "weapon")
else
if (Self.Weapon().id ~= Item.GetID(originalWeapon)) then
Self.Equip(Item.GetID(originalWeapon), "weapon")
end
end
modSwitchWeapon:Delay(3000,5000)
end)
This script will switch between two different weapons. If monsterName is on screen it will equip switchWeapon , else it will equip originalWeapon.