PTHT
PTHT
-- Optional Settings
local IGNORE_UNHARVESTED_AFTER_PUNCH = true -- (MRAY ONLY) Set to true if you only
want to punch a row once to harvest it (and ignore unharvested trees)
local RAW_MOVE = true -- Set to false if you're lagging
-- Do not touch
local REMOTE_X = MAG_X -- do not touch
local REMOTE_Y = MAG_Y -- do not touch
return formatted
end
local parts = {}
if days > 0 then
table.insert(parts, tostring(days) .. " day" .. (days > 1 and "s" or ""))
end
if hours > 0 then
table.insert(parts, tostring(hours) .. " hour" .. (hours > 1 and "s" or
""))
end
if minutes > 0 then
table.insert(parts, tostring(minutes) .. " minute" .. (minutes > 1 and "s"
or ""))
end
if remaining_seconds > 0 then
table.insert(parts, tostring(remaining_seconds) .. " second" ..
(remaining_seconds > 1 and "s" or ""))
end
if #parts == 0 then
return "0 seconds"
elseif #parts == 1 then
return parts[1]
else
local last_part = table.remove(parts)
return table.concat(parts, ", ") .. " and " .. last_part
end
end
CHECK_GHOST = true
SendPacket(2, "action|wrench\n|netid|"..GetLocal().netid)
end
CHECK_FOR_GHOST()
Sleep(500)
function RAW_PLANT(x, y)
pkt = {
type = 0,
pos_x = x * 32,
pos_y = y * 32,
int_x = -1,
int_y = -1
}
SendPacketRaw(pkt)
Sleep(RAW_SLEEP)
end
function FACE_DIRECTION(direction)
if direction == "LEFT" then
FLAG = 50
elseif direction == "RIGHT" then
FLAG = 34
end
pkt = {
type = 0,
pos_x = GetLocal().tile_x * 32,
pos_y = GetLocal().tile_y * 32,
int_x = -1,
int_y = -1,
flags = FLAG
}
SendPacketRaw(pkt)
Sleep(RAW_SLEEP)
end
pkt = {
type = 0,
pos_x = x * 32,
pos_y = y * 32,
int_x = -1,
int_y = -1,
flags = FLAG
}
SendPacketRaw(pkt)
Sleep(RAW_SLEEP)
end
-- function Harvesting(y)
-- if y == nil or GetLocal().world == "EXIT" then return end
--
-- local payload = [[
-- {
-- "content": "",
-- "embeds": [{
-- "color": 1146986,
-- "fields": [{
-- "name":"Account:",
-- "value": "Name: **%s**",
-- "inline": false
-- },
-- {
-- "name": "Information:",
-- "value": ":earth_asia: Current World: **%s**\n:gem: Gems: **
%s**\n:seedling: UWS Stock: **%s**",
-- "inline": false
-- },
-- {
-- "name": "Status",
-- "value": ":green_circle: Harvesting [Y Axis: **%s**]",
-- "inline": false
-- }
-- ],
-- "thumbnail": {
-- "url": "https://cdn.growtopia.tech/items/1966.png"
-- },
-- "footer": {
-- "text": "%s"
-- }
-- }]
-- }]]
--
-- SendWebhook(WEBHOOK, payload:format(removeColorAndSymbols(GetLocal().name),
GetLocal().world, FormatNumber(GetLocal().gems), FormatNumber(GetItemCount(12600)),
y, os.date("!%a, %b/%d/%Y at %I:%M %p", os.time() + 8 * 60 * 60)))
-- end
function WAIT_HOOK()
local payload = [[
{
"content": "",
"embeds": [{
"color": 1146986,
"fields": [{
"name":"Account:",
"value": "Name: **%s**",
"inline": false
},
{
"name": "Information:",
"value": ":earth_asia: Current World: **%s**\n:gem: Gems: **%s**\
n:seedling: UWS Stock: **%s**",
"inline": false
},
{
"name": "Status",
"value": ":yellow_circle: Done harvesting, taking a **%s minutes**
break.",
"inline": false
}
],
"footer": {
"text": "%s"
}
}]
}]]
SendWebhook(WEBHOOK, payload:format(removeColorAndSymbols(GetLocal().name),
GetLocal().world, FormatNumber(GetLocal().gems), FormatNumber(GetItemCount(12600)),
WAIT_TIME, os.date("!%a, %b/%d/%Y at %I:%M %p", os.time() + 8 * 60 * 60)))
end
local payload = [[
{
"content": "",
"embeds": [{
"color": "1146986",
"fields": [{
"name":"Account:",
"value": ":alien: Name: **%s**",
"inline": false
},
{
"name": "Information:",
"value": ":earth_asia: Current World: **%s**\n:gem: Gems: **%s**\
n:seedling: UWS Stock: **%s**",
"inline": false
},
{
"name": "MAGPLANT:",
"value": "Current remote: [**%s**, **%s**]\nStock: **%s**",
"inline": false
}
],
"thumbnail": {
"url": "https://cdn.growtopia.tech/items/32.png"
},
"footer": {
"text": "%s"
}
}]
}]]
SendWebhook(WEBHOOK, payload:format(removeColorAndSymbols(GetLocal().name),
GetLocal().world, FormatNumber(GetLocal().gems), FormatNumber(GetItemCount(12600)),
MAG_X, MAG_Y, MAG_STOCK, os.date("!%a, %b/%d/%Y at %I:%M %p", os.time() + 8 * 60 *
60)))
end
function Reconnected()
local payload = [[
{
"content": "",
"embeds": [{
"color": 1146986,
"fields": [{
"name":"Account:",
"value": "Name: **%s**",
"inline": false
},
{
"name": "Information:",
"value": ":earth_asia: Current World: **%s**\n:gem: Gems: **%s**\
n:seedling: UWS Stock: **%s**",
"inline": false
},
{
"name": "Status",
"value": ":red_circle: Reconnected, you probably disconnected
recently.",
"inline": false
}
],
"footer": {
"text": "%s"
}
}]
}]]
SendWebhook(WEBHOOK, payload:format(removeColorAndSymbols(GetLocal().name),
GetLocal().world, FormatNumber(GetLocal().gems), FormatNumber(GetItemCount(12600)),
os.date("!%a, %b/%d/%Y at %I:%M %p", os.time() + 8 * 60 * 60)))
end
if x > 1 and x < WORLD_SIZE_X and y-1 >= 0 and y-1 < WORLD_SIZE_Y
and GetTile(x, y-1).fg == 0 then
return true
end
end
end
end
return false
end
if x >= 0 and x < WORLD_SIZE_X and y >= 0 and y < WORLD_SIZE_Y then
local tile = GetTile(x, y)
return false
end
ENABLE_GHOST()
Sleep(1000)
SendPacket(2, "action|dialog_return\ndialog_name|cheats\
ncheck_autoplace|0\ncheck_gems|".. COLLECT_GEMS)
WalkTo(x, y)
Sleep(1000)
SendPacket(2, "action|dialog_return\ndialog_name|cheats\
ncheck_autoplace|1\ncheck_gems|".. COLLECT_GEMS)
return
end
end
end
end
local LAST_PLANTED_Y = -1
local LAST_HARVESTED_Y = -1
for y = 0, WORLD_SIZE_Y do
if MAG_EMPTY then return end
if GetLocal().world ~= WORLD then
return
end
if RAW_MOVE then
RAW_PLANT_MRAY(PLACE_X, PLACE_Y,
DIRECTION)
else
FindPath(PLACE_X, PLACE_Y)
Sleep(RAW_SLEEP/2)
FACE_DIRECTION("RIGHT")
end
Sleep(RAW_SLEEP)
Place(PLACE_X, PLACE_Y, 5640)
Sleep(RAW_SLEEP)
end
end
end
end
elseif not MRAY then
for y = 0, WORLD_SIZE_Y do
local startX = 0
local endX = WORLD_SIZE_X
local incrementX = 1
if y % 4 == 2 then
startX = WORLD_SIZE_X - 1
endX = -1
incrementX = -1
end
if x >= 0 and x < WORLD_SIZE_X and y-1 >= 0 and y-1 <
WORLD_SIZE_Y and GetTile(x, y-1).fg == 0 then
if ROTATION_COUNT ~= 0 then
FindPath(x, y-1)
Sleep(DELAY_FINDPATH)
Place(x, y-1, 5640)
Sleep(DELAY_PLANT)
else
RAW_PLANT(x, y-1)
end
function WalkTo(x, y)
pkt = {}
pkt.type = 0
pkt.pos_x = x * 32
pkt.pos_y = y * 32
pkt.int_x = -1
pkt.int_y = -1
SendPacketRaw(pkt)
Sleep(100)
end
function HARVEST()
ENABLE_GHOST()
for y = WORLD_SIZE_Y, 0, -1 do
for x = 0, WORLD_SIZE_X do
if GetLocal().world ~= WORLD then return end
if x >= 0 and x < WORLD_SIZE_X and y >= 0 and y < WORLD_SIZE_Y then
local tile = GetTile(x, y)
FindPath(x, y)
Sleep(40)
Punch(x, y, 18)
Hold()
if not IGNORE_UNHARVESTED_AFTER_PUNCH then
if not MRAY then
Sleep(250)
elseif MRAY then
Sleep(100)
end
else
Sleep(150)
break
end
end
end
end
end
end
function hook(varlist)
if varlist[0]:find("OnTalkBubble") and (varlist[2]:find("The MAGPLANT 5000 is
empty")) then
CHANGE_REMOTE = true
MAG_EMPTY = true
return true
end
CHECK_GHOST = false
end
return true
end
local payload = [[
{
"content": "",
"embeds": [{
"color": 1146986,
"fields": [{
"name":"Account:",
"value": "Name: **%s**",
"inline": false
},
{
"name": "Information:",
"value": ":earth_asia: Current World: **%s**\
n:gem: Gems: **%s**\n:seedling: UWS Stock: **%s**",
"inline": false
},
{
"name": "Status",
"value": ":green_circle: Used **Ultra World
Spray**!",
"inline": false
},
{
"name": "Statistics",
"value": "<:UWS:1111357396414103602> Sprayed **
%s** trees\n:clock1: Planting took **%s**",
"inline": false
}
],
"thumbnail": {
"url":
"https://cdn.growtopia.tech/items/12600.png"
},
"footer": {
"text": "%s"
}
}]
}]]
SendWebhook(WEBHOOK,
payload:format(removeColorAndSymbols(GetLocal().name), GetLocal().world,
FormatNumber(GetLocal().gems), FormatNumber(GetItemCount(12600)), TREES_SPRAYED,
TIME_TO_PLANT_ALL, os.date("!%a, %b/%d/%Y at %I:%M %p", os.time() + 8 * 60 * 60)))
end)
end
end
if CHANGE_REMOTE then
Sleep(150)
if GetTile(REMOTE_X + 1, REMOTE_Y).fg == 5638 then
REMOTE_X = REMOTE_X + 1
CheckRemote()
elseif GetTile(REMOTE_X + 1, REMOTE_Y).fg ~= 5638 then
REMOTE_X = START_MAG_X
CheckRemote()
end
CHANGE_REMOTE = false
Sleep(150)
end
if CheckRemote() then
if CHECK_FOR_TREE() then
Sleep(200)
SendPacket(2, "action|dialog_return\ndialog_name|cheats\
ncheck_gems|1")
Sleep(50)
while CHECK_FOR_TREE() do
EditToggle("modfly", true)
HARVEST()
end
EditToggle("antibounce", false)
EditToggle("modfly", false)
ROTATION_COUNT = 0
Sleep(500)
ENABLE_GHOST()
PLANT_LOOP()
ROTATION_COUNT = ROTATION_COUNT + 1
end
elseif MRAY then
if not RAW_MOVE then
EditToggle("modfly", true)
end
--AUTOPLANT_SETTINGS()
START_PLANT = os.time()
Sleep(250)
PLANT_LOOP()
ROTATION_COUNT = ROTATION_COUNT + 1
end
Sleep(1000)
ROTATION_COUNT = 0