PDA

View Full Version : browse field potion on someone else?



Gorillaz
02-22-2016, 04:43 AM
I am looking for a script that I can use to help my friend pg his mlvl something like using browse field on his tile and spamming the potions under him on him

thanks!

Jontor
02-22-2016, 07:31 AM
local pos = {
["x"] = 00000,
["y"] = 00000,
["z"] = 0
}

function findItem(cont)
for spot = 0, Container.ItemCount(cont) - 1 do
local item = Container.GetItemData(cont, spot).id
if (table.find({238, 268, 237}, item)) then
return spot
end
end
assert(false, "Missing potions in browse field")
end

Self.BrowseField(pos.x, pos.y, pos.z) -- you might want to delete that if you want to manually browse field

while (true) do
local spot = findItem(Container.GetLast())
Container.UseItemWithGround(Container.GetLast(), spot, pos.x, pos.y, pos.z)
wait(300)
end