PTHT
PTHT
PTHT
EditToggle("ModFly", true)
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