0% found this document useful (0 votes)
47 views

Message

This document contains code for an automated farming bot that harvests crops, drops excess items into different worlds, and uses webhooks to log its activities. The bot checks tiles for ready crops, harvests them, collects gems, buys packs if gems are sufficient, and drops excess items. It warps between configured farm and drop worlds, targeting specific backgrounds to drop items. The bot runs in a continuous loop checking for ready crops and warping to new configured worlds if the current one is empty.

Uploaded by

Tutor Clawy
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
47 views

Message

This document contains code for an automated farming bot that harvests crops, drops excess items into different worlds, and uses webhooks to log its activities. The bot checks tiles for ready crops, harvests them, collects gems, buys packs if gems are sufficient, and drops excess items. It warps between configured farm and drop worlds, targeting specific backgrounds to drop items. The bot runs in a continuous loop checking for ready crops and warping to new configured worlds if the current one is empty.

Uploaded by

Tutor Clawy
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 4

-- id set

IdBlock = 4584
IdBackgroundDForDropSeed = 16
TakeGems = true
-- Collect Set
RangeAutoCollectForAutoHarvest = 5 -- max 10
--Delay Set
DelayHarvest = 170
DelayJoin = 10000
-- World SendVariantList
WorldDrop = ""
IdDoorWorldDrop = ""
-- Drop Set
DropDIfferentWorld = true -- if true bot will take different world,if false bot
drop in world farm
BackgroundDropPack =1422
AutoBuyPack = true
DebugPack = "summer_pack"
PricePack = 20000
IdPack = {836,834,830,11044,12352}
Bot = {}
Bot["DKIPFYJFC"] = {
WorldFarm = {},
IdDoorWorldFarm = ""
}

webhookLink = "https://discord.com/api/webhooks/1069707305731502110/blablablabla"
-- Webhook Setx
function Webhook(logs)
local text = [[
$webHookUrl = "]]..webhookLink..[["
$payload = @{
content = "]]..logs..[["
}
[Net.ServicePointManager]::SecurityProtocol =
[Net.SecurityProtocolType]::Tls12
Invoke-RestMethod -Uri $webHookUrl -Body ($payload | ConvertTo-Json -Depth
4) -Method Post -ContentType 'application/json'
]]
local file = io.popen("powershell -command -", "w")
file:write(text)
file:close()
end
-- Webhook Setx

WorldFarm = Bot[getBot().name:upper()].WorldFarm
IdDoorWorldFarm = Bot[getBot().name:upper()].IdDoorWorldFarm
if TakeGems then
collectSet(true,5)
else
setBool("Ignore Gems",true)
end
function TrashSpesific(Idt)
if findItem(Idt) > 0 then
sendPacket( "action|trash\n|itemID|"..Idt,2)
sleep(1000)
sendPacket( "action|dialog_return\ndialog_name|trash_item\
nitemID|"..Idt.."|\ncount|"..findItem(Idt),2)
sleep(1000)
end
end

function TpToBackground(ids)
for i,tile in ipairs(getTiles()) do
if tile.fg == ids or tile.bg == ids then
findPath(tile.x-1,tile.y)
sleep(500)
break
end
end
end
CurrentFarm = "A"
function DropPack()
collectSet(false,0)
CurrentFarm = getBot().world
Warp(WorldDrop,IdDoorWorldDrop)
Warp(WorldDrop,IdDoorWorldDrop)
TpToBackground(BackgroundDropPack)
for i = 1,10 do
for is = 1,#IdPack do
while findItem(IdPack[is]) > 0 do
collectSet(false,0)
drop(IdPack[is])
sleep(3000)
move(1,0)
sleep(500)
end
end
end
Warp(CurrentFarm,IdDoorWorldFarm)
Warp(CurrentFarm,IdDoorWorldFarm)
sleep(500)
move(0,1)
sleep(100)
move(3,0)
if TakeGems then
collectSet(true,5)
end
end
function DropSeed()
collectSet(false,0)
CurrentFarm = getBot().world
Warp(WorldDrop,IdDoorWorldDrop)
Warp(WorldDrop,IdDoorWorldDrop)
TpToBackground(IdBackgroundDForDropSeed)
while findItem(IdBlock+1) > 0 do
collectSet(false,0)
drop(IdBlock+1)
sleep(3000)
move(1,0)
sleep(500)
end
Warp(CurrentFarm,IdDoorWorldFarm)
Warp(CurrentFarm,IdDoorWorldFarm)
sleep(500)
move(0,1)
sleep(100)
move(3,0)
end
function Harvest()
for i,tile in ipairs(getTiles()) do
if tile.fg == IdBlock+1 and tile.ready and getBot().status:lower() ==
"online" then
findPath(tile.x,tile.y)
punch(0,0)
collect(RangeAutoCollectForAutoHarvest)
sleep(DelayHarvest)
if findItem(112) > PricePack-1 and AutoBuyPack and
getBot().status:lower() == "online" then
CurrentBotWorld = getBot().world
collectSet(false,0)
while findItem(112)> PricePack-1 and getBot().status:lower()
== "online" do
sendPacket("action|buy\nitem|bigitems",2)
sleep(1000)
sendPacket("action|buy\nitem|".. DebugPack,2)
sleep(2000)
end

DropPack()

end

if findItem(IdBlock) > 180 then


TrashSpesific(IdBlock)
end
if findItem(IdBlock+1) > 180 then
DropSeed()
end
end
end
end
function GoBackground(idbg)
for i,tile in ipairs(getTiles()) do
if tile.bg == idbg then
findPath(tile.x-1,tile.y)
sleep(500)
break
end
end
end

function DropAnything(IDS,theidbg)
collectSet(false,0)
GoBackground(theidbg)
while findItem(IDS) > 0 do
sleep(1000)
drop(IDS)
sleep(2000)
move(1,0)
end
end

function CheckReady(idg)
for i,tile in ipairs(getTiles()) do
if tile.fg == idg then
return true
end
end
return false
end

function Warp(a,s)
sendPacket("action|join_request\nname|"..a.."|"..s.."\ninvitedWorld|0",3)
sleep(DelayJoin)
end

Warp(WorldFarm[1],IdDoorWorldFarm)
Warp(WorldFarm[1],IdDoorWorldFarm)
Webhook("Starting Harvest In World 1\nAmount Bot Gems : "..findItem(112))
move(3,0)
sleep(500)
while true do
if CheckReady(IdBlock+1) == true then
Webhook("Harvesting..")
Harvest()
elseif CheckReady(IdBlock+1) == false then
Webhook(getBot().world.." Is Done ,Going Next World..\nBot Gems
"..findItem(112))
for i = 1,#WorldFarm do
Warp(WorldFarm[i],IdDoorWorldFarm)
if CheckReady(IdBlock+1) == true then
Webhook("Founded Ready World "..getBot().world.." Starting
Harves..\nBot Gems "..findItem(112))
Warp(WorldFarm[i],IdDoorWorldFarm)
move(3,0)
sleep(500)
break
end
end
end
end

You might also like