View Full Version : Weapon and Ammo Switcher
hitlerjr
05-16-2016, 02:51 PM
Hello, i'm playing an OT and a need a script to switch my crossbow and bolt to bow and arrow when attacking 'X' monster.
For Example: if i have in my hunt zone Grim Reapers and Spectres; Kill Grims with Crossbow and bolts, Kill Spectres with bow and arrows.
I don't know if it is possible to do this, but if you can help me, i would be grateful.
Mageq
05-18-2016, 10:54 AM
Edit this to find spectres instead of ghosts, edit the ID's, add that if you're using a crossbow to also use bolts and you're good to go.
local config = {
["normalWeaponID"] = 6527,
["ghostWeaponID"] = 3280
}
Module.New('ghost atker', function(module)
ghost = Creature.GetByID(Self.TargetID())
if (ghost:isMonster() and ghost:isAlive() and ghost:isTarget() and ghost:Name() == "Ghost") and (Self.ItemCount(config.ghostWeaponID) > 0) and (Self.Weapon().id ~= config.ghostWeaponID) then
Self.Equip(config.ghostWeaponID, "weapon")
wait(1000)
elseif (not Creature.New(Self.TargetID()).isAlive()) and (Self.ItemCount(config.normalWeaponID) > 0) and not (ghost:Name() == "Ghost") and (Self.Weapon().id ~= config.normalWeaponID) then
Self.Equip(config.normalWeaponID, "weapon")
wait(1000)
end
end)
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.