Log in

View Full Version : Pick from ground



pain0816
08-01-2012, 03:11 PM
Map.PickupItem(x, y, z, containerto, spotto[, count])
X, Y, Z: The ground location of the item.
Containerto: The container index to move the item to.
Spotto: the spot in the container to move the item to.
Count: An optional parameter which specifies how many on the stack to move. Defaults to all.
Returns: 1 if successful, 0 if failed.


i was trying to fix it and i have no idea how it works ! can any1 help or write a lua?

pain0816
08-03-2012, 03:02 PM
up. im looking for working example ^^

Danny__Z
08-03-2012, 10:32 PM
I have not specifically tried this but some common sense would say...

Either use it in your .lua script which you use for your chosen spawn or use it as a 1 liner in your .xbst for example

Stand 1sqm next to your item pile
Map.PickupItem(x, y, z, 1, 0)
~continue hunting

where the you can get the xyz from creating a stand on your item pile, reading the co-ordinates off the walker and then deleting it (I think there is an easier way I just don't know it yet) and the 1, 0 are the index of where the item will go 1, 0 corresponds to the first backpack recognized as backpack 1 by the looter and the first slot within this backpack.

Give that a go.

pain0816
08-05-2012, 12:25 AM
thanks man. that helps me alot. i did a label named "picker" and then a .lua what "Map.PickupItem(x, y, z, 1, 0)" on that label.
Thanks again :)

pain0816
08-05-2012, 10:32 AM
Thanks. both works great !

Jakob Miller
09-05-2012, 10:58 AM
Rydan or anyone else. I am pretty outdated when it comes to updates and I lack time at the moment.

Is it possible to move items to the side of the hole instead of looting it?

And in that case, how?

krille09
09-06-2012, 02:53 PM
Map.PickupItem(Self.Position().x, Self.Position().y, Self.Position().z, "", 19, 100)

I tried this but didn't work... Or maybe did like 1 sec but then it turned off?

How to make like on Elfbot, Auto 200 script?

Tnx

Little offtopic:

16:51 XenoScript Error:
Script: Exp Gained.lua
Line #: 2
Chunk: ...e\Admin\Mina dokument\XenoBot\Scripts\Exp Gained.lua
Error: attempt to concatenate local 'startexp' (a function value)
This is an error with user-input and should not be reported as a bug with XenoBot.

local startexp = Self.Experience
local TEXT = HUD.CreateTextDisplay(40, 40, "EXP Gained: "..startexp, 200, 200, 200)
while (true) do
TEXT:SetText("EXP Gained: "..startexp - Self.Experience)
wait(1000)
end

DarkstaR
09-06-2012, 04:36 PM
Rydan, you need to sleep at least 200 MS between usage actions, broski.

DarkstaR
09-06-2012, 06:13 PM
Works fine with 100 :D

The action will return a 0 every other time because actions need 200 MS between them to execute. Its inefficient.

pain0816
09-07-2012, 08:39 PM
100% working, just make 2 labels named "picker" then load this lua and set walker on. he will pick up all items on ur sqm to first backpack and 20th slot on it:)



dofile("Forgee.lua")
registerEventListener(WALKER_SELECTLABEL, "onWalkerSelectLabel")
function onWalkerSelectLabel(labelName)
if (labelName == "picker") then
Map.PickupItem(Self.Position().x, Self.Position().y, Self.Position().z, "", 19, 100)
end
end

rokarona
04-14-2016, 04:26 PM
p = Self.Position()
Module.New('Freeitams', function(mod)
for y = -1, 1 do
for x = -1, 1 do

wait(200,500)
Map.PickupItem(p.x, p.y, p.z,"", 0)
mod:Delay(math.random(400, 500))

end
end
end)