0% found this document useful (0 votes)
73 views2 pages

Autoplant

This document contains Lua code for automating the planting of seeds in multiple worlds in an online game. It defines functions for warping between worlds, taking a seed item, and planting seeds. The main loop calls the plant function to plant seeds in each world in the given list, warping between worlds and retrieving more seeds as needed.

Uploaded by

LINdia But
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
73 views2 pages

Autoplant

This document contains Lua code for automating the planting of seeds in multiple worlds in an online game. It defines functions for warping between worlds, taking a seed item, and planting seeds. The main loop calls the plant function to plant seeds in each world in the given list, warping between worlds and retrieving more seeds as needed.

Uploaded by

LINdia But
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

delay = 200 --//delay when planting seed

itemId = 3 --// Seed Id


doorId = "rima" --//Door Id world plant & safe
worldsafe = "artlang" --// world Safe
worldList = { --//List World Plant
"artlang1", "artlang2"
}

--//Warp\\
function warp(world,id)
sendPacket(3, "|join_request\nname|" .. string.upper(world))
sleep(2000)
sendPacket(3, "action|join_request\nname|" .. string.upper(world) .. "|" ..
string.upper(id))
sleep(3000)
end

--//Take Seed\\
function takeseed(id)
for _,object in pairs(getObjects()) do
if object.id == id then
if findItem(id) > 0 then
break
end
findPath(math.floor(object.x/32),math.floor(object.y/32))
sleep(1000)
collect(2)
sleep(400)
end
end
end

--//Plant\\
function plant(id,world)
for _,tile in pairs(getTiles()) do
if tile.fg ~= 0 and tile.fg ~= id and getTile(tile.x,tile.y - 1).fg == 0 then
findPath(tile.x,tile.y - 1)
sleep(delay)
place(id,0,0)
sleep(delay)
if findItem(id) == 0 then
warp(worldsafe,doorId)
sleep(1700)
takeseed(itemId)
sleep(100)
warp(world,doorId)
sleep(1700)
end
end
end
end

--//Main\\
while true do
for _,list in pairs(worldList) do
warp(list,doorId)
sleep(1000)
plant(itemId,list)
sleep(1000)
end
end

You might also like