0% found this document useful (0 votes)
131 views3 pages

PTHT

Download as txt, pdf, or txt
Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1/ 3

plantid = 5640 -- This is itemid to plant with using magplant.

platformid = 6984 -- slime platform


treeid = 13903 -- Treeid is required to what to harvest, check trees (13945 is pog
seed id do not change)
world = "island" -- Type normal if you're planting in normal world (recommended
island)

EditToggle("ModFly", true)

if world == "island" then


ex = 199
ey = 193
elseif world == "normal" then
ex = 99
ey = 53
end

function path(x, y, platformid)


SendPacketRaw(false, {platformid = platformid,
px = x,
py = y,
x = x*32,
y = y*32})
end

function h2(x, y, id)


SendPacketRaw(false,{type = 3,
value = id,
px = x,
py = y,
x = x*32,
y= y*32})
end

function getTree()
local count = 0
for y = ey, 0, -1 do
for x = 0, ex, 1 do
if GetTile(x, y).fg == 0 and (GetTile(x, y + 1).fg ~= 0 and GetTile(x, y + 1).fg %
2 == 0) then
count = count + 1
end
end
end
return count
end

function getReady()
local ready = 0
for y = ey, 0, -1 do
for x = 0, ex, 1 do
if GetTile(x, y).fg == 13903 and GetTile(x, y).readyharvest then
ready = ready + 1
end
end
end
return ready
end
function harvest()
if getReady() > 0 then
for y = ey, 0, -1 do
for x = 0, ex, 1 do
if (GetTile(x, y).fg == 13903 and GetTile(x, y).readyharvest) then
path(x, y, platformid)
Sleep(500)
h2(x, y, 18)
Sleep(100)
end
end
end
end
end

function uws()
if getTree() == 0 then
Sleep(500)
SendPacket(2, "action|dialog_return\ndialog_name|ultraworldspray")
Sleep(2000)
harvest()
elseif getTree() ~= 0 then
plant()
Sleep(1000)
end
end

function plant()
if getReady() < platformid then
for y = ey, 0, -1 do
for x = 0, ex, 10 do
if GetTile(x,y).fg == 0 and (GetTile(x,y+1).fg ~= 0 and GetTile(x,y+1).fg %2 == 0)
then
path(x, y, 32)
Sleep(50)
h2(x, y, plantid)
Sleep(100)
end
end
for x = ex, 0, -1 do
if GetTile(x,y).fg == 0 and (GetTile(x,y+1).fg ~= 0 and GetTile(x,y+1).fg %2 == 0)
then
path(x, y, 48)
Sleep(50)
h2(x, y, plantid)
Sleep(100)
end
end
end
end
uws()
end

for i = 5, 1, -1 do
LogToConsole([[`0Script Running In : ]]..i)
Sleep(1000)
end

for i = 1, 20 do
LogToConsole([[`2Made by `#@PelerYin]])
end

for i = 1, 4 do
SendPacket(2, [[action|input
|text|`2Made by `#@PelerYin]])
Sleep(1000)
end

while true do
Sleep(200)
harvest()
Sleep(200)
plant()
end

You might also like