PDA

View Full Version : Right-click item from Backpack



Nappy
07-21-2016, 07:58 AM
I began playing an OTserver and they have an item that you cannot put as a hotkey, only use as an object (right click only, no drop down menu) to heal. The problem is, using the built in support healer wont work, and neither will this:

local ManaPotion = "Silver Rune Emblem"
Module.New("manaheal", function(module)
if(Self.Mana()>2000) then
Self.UseItemWithMe(ManaPotion)
end
module:Delay(20)
end)

So since I cant script for shit/dont know many of the possibilities of XenoBot, can someone help me out or tell me what I'm doing wrong, if possible at all?

Thanks, Nappy.

ososzayat
07-30-2016, 05:50 PM
i think Container:UseItem(spot) would help


let the silver rune emblem be in the first slot of the bp, would be somthing like this:


BpName = "Brocade Backpack"
Pos = 1
--------------------------------------------
Module.New('ManaHeal', function(Manaa)
local bp = Container(BpName)
if (Self.Mana() > 2000) then
bp:UseItem(Pos, true)
end
Manaa:Delay(50)end)