
Originally Posted by
Kungza
@
only4tibia
Thank you very much!
I'll test it out later and check if it works, either may I appreciate it so much! :*
(I am not very good with coding, I mean the actual means of a certain line, I get how to tweek it for my own use etc.. Anyhow, will this script throw
all the items of the certain ID's I put in?)
Thanks in advance
Yeah it will, you just need to make a label name called "InHouse" in the walker, when it reaches that label, but if I were you, I would add a selfcheck position in it aswell, else if you get stuck somewhere (if someone bugs your bot) you will start throwing out the items once the walker reaches the labelname Inhouse
so add this
lua code:
Items = {"Arrow", "shovel", 16277, 3003} -- Item names enclosed with quotes or item IDs
function itemDrop()
pos = Self.Position()
for i=1, #Items do
Self.DropItem(pos.x, pos.y, pos.z, Items[i])
end
end
-- in your walker labels --
elseif(Label == "InHouse") then
Walker.Stop()
itemDrop()
Walker.Start()
elseif (labelName == "CheckPosition") then
if Self.Position(x, y, z) then Walker.Goto("InHouse") --Add your X, Y, Z coordinates between the ()
else Walker.Goto ("ReachHouse")
end
Add the following labelnames in the walker.
- CheckPosition (put this label in front of your "inhouse" label and after the stand/node, thats infront of your "inhouse" label
- Inhouse
- ReachHouse (this will be the label somewhere close to ur house, and after that waypoints that lead you into your house)
PS I didnt test the code, could give an error. But you get the point :P