PDA

View Full Version : When less than X items with ID gotoLabel("Hunt") when more gotoLabel("Leave")



darknessthrower
06-15-2016, 10:49 PM
Hey I need script that will Check if i have more or less number of X item. When I have it less than X it will go to Label "Hunt" if more it will go to label "Leave".

Elvang
06-16-2016, 05:57 AM
local item = 268
local itemBelow = 20

registerEventListener(WALKER_SELECTLABEL, "onWalkerSelectLabel")
function onWalkerSelectLabel(labelName)
if (labelName == "Check") then
if (Self.ItemCount(item) > itemBelow) then
Walker.Goto("Hunt")
else
Walker.Goto("Leave")
end
end
end


Seems backwards what you're asking, but there you go.

darknessthrower
06-16-2016, 01:09 PM
@ (http://forums.xenobot.net/member.php?21-Elvang)Elvang (https://forum.theoxserver.com/members/elvang.6/)Can I ask you something more?
1. How does Deposit Items work (when I can put items that he should deposite to first backpack in depo)
2. Script for standing still for like 1 minute.

Btw. thanks for help and good luck with OxServer.