Playboygg 2

Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 15

-- DISCORD: https://discord.

gg/876GWj4bka

totalBots = 1 -- Total Bots customable

worldSettings = {
looping = true,
farmlist = {
"ajgjf|123","seedlgridzaki100k|123",
"WORLD|DOOR","WORLD|DOOR",
"WORLD|DOOR","WORLD|DOOR",
"WORLD|DOOR","WORLD|DOOR",
"WORLD|DOOR","WORLD|DOOR",
"WORLD|DOOR","WORLD|DOOR",
"WORLD|DOOR","WORLD|DOOR",
"WORLD|DOOR","WORLD|DOOR",
"WORLD|DOOR","WORLD|DOOR",
"WORLD|DOOR","WORLD|DOOR",
"WORLD|DOOR","WORLD|DOOR",
"WORLD|DOOR","WORLD|DOOR",
"WORLD|DOOR","WORLD|DOOR",
"WORLD|DOOR","WORLD|DOOR",
"WORLD|DOOR","WORLD|DOOR",
"WORLD|DOOR","WORLD|DOOR",
"WORLD|DOOR","WORLD|DOOR",
"WORLD|DOOR","WORLD|DOOR"
},
farmPerbot = 10, -- total farm per
}

-- World Save Settings


storageSeed, patokanSeed = "seedlgridzaki100k|123", 16 -- Seed storage world name,
and patokan
storagePack, patokanPack = "seedlgridzaki100k|123", 16 -- Pack storage world name,
and patokan

-- Configs Settings Rotation


itmId = 4584 -- Item id pepper
itmSeed = itmId + 1 -- Item seed / Dont edit
goods = {itmId, itmSeed, 98, 18, 32, 6336, 9640, 156, 3052,48} -- Item whitelist
(don't edit)
blacklistTile = false -- kalo ga ngerti gausah di rubah
blacklist = {
{x = -1, y = -1},
{x = 0, y = -1},
{x = 1, y = -1}
}

-- Delay Settings Portal


local buyJubah = false
local delayExe = 1
local delayHarvest = 200 -- Harvesting delay
local delayPlant = 200 -- Planting delay
local delayPunch = 200 -- Punching delay
local delayPlace = 200 -- Placing delay

-- Fitur And Pack Settings


local buyAfterPNB = true -- Set true if buying and storing pack after each pnb
local pack = "world_lock" -- Pack name to display on webhook
local packList = {242} -- List of pack id
local packName = "world_lock" -- Pack name in store
local minimumGem = 2000 -- Minimum gems to buy pack
local packPrice = 2000 -- Pack price
local packLimit = 200 -- Limit of buying pack before bp full

-- Emoji Settings and notification


local webhookNuked = "https://discord.com/api/webhooks/"
local webhookOffline = "https://discord.com/api/webhooks/"
local webhookLinkPack = "https://discord.com/api/webhooks/"
local webhookLinkSeed = "https://discord.com/api/webhooks/"
local messageIdPack = "1115181065443737690"
local messageIdSeed = "1115181070946672712"

items = {
{name = "DiamondLock", id = 1796, emote = "<:dl:1175007530745856093>"},
{name = "FishTankSeed", id = 3005, emote =
"<:FishTankSeed:1176325978956509274>"},
{name = "FishTank", id = 3004, emote = "<:FishTankBlock:1176326209475461181>"},
{name = "Surg-E", id = 4296, emote = "<:Surge:1176332893048549417>"},
{name = "SurgicalLabKit", id = 4318, emote = "<:Labkit:1176335021892718653>"},
{name = "SurgicalSponge", id = 1258, emote = "<:Sponge:1176335019887833188>"},
{name = "SurgicalScapel", id = 1260, emote = "<:Scaple:1176335016477868183>"},
{name = "SurgicalAnesthetic", id = 1262, emote =
"<:Anesthetic:1176335013017550959>"},
{name = "SurgicalAntiseptic", id = 1264, emote =
"<:Antisepthic:1176335010844905543>"},
{name = "SurgicalAntibiotics", id = 1266, emote =
"<:Antibiotic:1176335007929880716>"},
{name = "SurgicalSplint", id = 1268, emote = "<:Splint:1176335004419244172>"},
{name = "SurgicalStitches", id = 1270, emote =
"<:Stitches:1176335002380804189>"},
{name = "SurgicalPins", id = 4308, emote = "<:Pins:1176334999180558376>"},
{name = "SurgicalTransfusion", id = 4310, emote =
"<:Transfusion:1176334996949188740>"},
{name = "SurgicalDefibrillator", id = 4312, emote =
"<:Defibirator:1176334993828618332>"},
{name = "SurgicalClamp", id = 4314, emote = "<:Clamp:1176334992171864104>"},
{name = "SurgicalUltrasound", id = 4316, emote =
"<:Ultrasound:1176334988854181959>"},
{name = "World Lock", id = 242, emote = "<:wl:1175007454392754206>"},
{name = "Pepper Tree", id = 4584, emote = "<:PepperTree:1176334985620357172>"},
{name = "Pepper Tree Seed", id = 4585, emote =
"<:PepperTreeSeed:1176337077831483513>"},
{name = "Pickaxe", id = 98, emote = "<:Pickaxe:1176334981799362660>"},
{name = "Gems", id = 112, emote = "<:Gems:1176334979819642970>"},
}

--===== [ YAM MARKET ROTASI V2 ] =====--


Bot = {} --don't edit
botStart = 1 --don't edit
start = 1 --don't edit
for slot = 1, totalBots do
Bot[slot] = { slot = slot,
}
end

bot = getBot()
for nomor, bot in pairs(getBots()) do
if getBot().name:upper() == bot.name:upper() then
index = nomor + ( botStart - 1 )
end
end
farming = {}
fossil = {}
tileBreak = {}
looping = worldSettings.looping
stop = worldSettings.farmPerbot
slot = Bot[index].slot
tileNumber = 1 -- dont change

nomorbot = slot * worldSettings.farmPerbot


for i = 1, worldSettings.farmPerbot do
table.insert(farming,worldSettings.farmlist[nomorbot])
nomorbot = nomorbot - 1
end

for _,pack in pairs(packList) do


table.insert(goods,pack)
end

for i = math.floor(tileNumber/2),1,-1 do
i = i * -1
table.insert(tileBreak,i)
end
for i = 0, math.ceil(tileNumber/2) - 1 do
table.insert(tileBreak,i)
end

function reconInfo()
local text = [[
$webHookUrl = "]]..webhookOffline..[["
$payload = [PSCustomObject]@{
content = "]]..getBot().name..[[ (slot-]]..Bot[index].slot..[[) status
is ]]..(bot.status == 1 and "Online" or "Offline")..[[ @everyone"
}
[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
function nukedStat(msg)
local text = [[
$webHookUrl = "]]..webhookNuked..[["
$payload = [PSCustomObject]@{
content = "]]..msg..[[ @everyone"
}
[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

function packInfo(link,id,desc)
local text = [[
$webHookUrl = "]]..link..[[/messages/]]..id..[["
$thumbnailObject = [PSCustomObject]@{
url =
"https://cdn.discordapp.com/attachments/1091917470949974017/1175994189184507997/
standard_2.gif?
ex=656d40ef&is=655acbef&hm=9236bf684cf1abc14ecb7405aae443d4a78d4d34bb5b5a385c4ba813
616e6fae&"
}
$footerObject = [PSCustomObject]@{
text = "]]..(os.date("!%a %b %d, %Y at %I:%M %p", os.time() + 7 * 60 *
60))..[["
}
$fieldArray = [PSCustomObject]@(
@{
name = "Dropped Items"
value = "]]..desc..[["
inline = "false"
}
)
$embedObject = [PSCustomObject]@{
title = "Progress Profit"
color = "197379"
thumbnail = $thumbnailObject
footer = $footerObject
fields = $fieldArray
}
[System.Collections.ArrayList]$embedArray = @($embedObject)
$payload =[PSCustomObject]@{
embeds = $embedArray
}
[Net.ServicePointManager]::SecurityProtocol =
[Net.SecurityProtocolType]::Tls12
Invoke-RestMethod -Uri $webHookUrl -Body ($payload | ConvertTo-Json -Depth
4) -Method Patch -ContentType 'application/json'
]]
local file = io.popen("powershell -command -", "w")
file:write(text)
file:close()
end

function itemInfo(ids)
local result = {name = "??", id = ids, emote = "??"}
for _,item in pairs(items) do
if item.id == ids then
result.name = item.name
result.emote = item.emote
return result
end
end
return result
end

local function gaulWord()


local gaulWords = {
"/troll",
"/lol",
"/smile",
"/cry",
"/mad",
"/wave",
"/dance",
"/dab",
"/love",
"/kiss",
"/sleep",
"/yes",
"/no",
"/wink",
"/cheer",
"/:p",
"/sad",
"/fp",
"/0mg",
"/:0",
}
local acakIndex = math.random(1, #gaulWords)
local kataGaul = gaulWords[acakIndex]
bot:say(kataGaul)
sleep(300)
end

function infoPack()
local store = {}
for _,object in pairs(getObjects()) do
if store[object.id] then
store[object.id].count = store[object.id].count + object.count
else
store[object.id] = {id = object.id, count = object.count}
end
end
local str = ""
for _,object in pairs(store) do
str = str.."\n"..itemInfo(object.id).emote.."
"..itemInfo(object.id).name.." : x"..object.count
end
return str
end

function bl(world)
blist = {}
fossil[world] = 0
for _,tile in pairs(getTiles()) do
if tile.fg == 6 then
doorX = tile.x
doorY = tile.y
elseif tile.fg == 3918 then
fossil[world] = fossil[world] + 1
end
end
if blacklistTile then
for _,tile in pairs(blacklist) do
table.insert(blist,{x = doorX + tile.x, y = doorY + tile.y})
end
end
end
function faceSide()
local packet = GameUpdatePacket.new()
packet.type = 0
packet.flags = 48
bot:sendRaw(packet)
end

function tilePunch(x,y)
for _,num in pairs(tileBreak) do
if getBot():getWorld():getTile(x - 1,y + num).fg ~= 0 or
getBot():getWorld():getTile(x - 1,y + num).bg ~= 0 then
return true
end
end
return false
end

function tilePlace(x,y)
for _,num in pairs(tileBreak) do
if getBot():getWorld():getTile(x - 1,y + num).fg == 0 and
getBot():getWorld():getTile(x - 1,y + num).bg == 0 then
return true
end
end
return false
end

function nempel(xOffset, yOffset, itemID)


local player = bot:getWorld():getLocal()
local x = math.floor(player.posx / 32) + xOffset
local y = math.floor(player.posy / 32) + yOffset
bot:place(x, y, itemID)
reconnect(world, x, y)
end

function mukul(xOffset, yOffset)


local player = bot:getWorld():getLocal()
local x = math.floor(player.posx / 32) + xOffset
local y = math.floor(player.posy / 32) + yOffset
bot:hit(x, y)
reconnect(world, x, y)
end

function check(x,y)
for _,tile in pairs(blist) do
if x == tile.x and y == tile.y then
return false
end
end
return true
end

function warp(world)
local maxTries = 3
nuked = false
while maxTries > 0 do
bot:warp(world)
sleep(7000)
if bot:isInWorld(world) then
local currentTile =
bot:getWorld():getTile(math.floor(bot:getWorld():getLocal().posx / 32),
math.floor(bot:getWorld():getLocal().posy / 32))
if currentTile.fg ~= 6 then
nuked = false
return
end
end
maxTries = maxTries - 1
end
nukedStat("Farm Crash : " .. world)
nuked = true
end

autoRecon = true

function reconnect(world, x, y)
worlds = bot:getWorld()
if autoRecon then
if bot.status ~= 1 then
bot:connect()
sleep(6000)
reconInfo()
while bot.status ~= 1 do
bot:connect()
sleep(6000)
end
if worlds.name ~= world:upper() then
bot:sendPacket(3, "action|join_request\nname|" .. world:upper() ..
"\ninvitedWorld|0")
sleep(5000)
faceSide()
sleep(3000)
while math.floor(getLocal().posx / 32) ~= x or
math.floor(getLocal().posy / 32) ~= y do
bot:findPath(x, y)
sleep(1000)
end
end
end
end
end

function round(n)
return n % 1 > 0.5 and math.ceil(n) or math.floor(n)
end

function tileDrop1(x,y,num)
local count = 0
local stack = 0
for _,object in pairs(bot:getWorld():getObjects()) do
if round(object.x / 32) == x and math.floor(object.y / 32) == y then
count = count + object.count
stack = stack + 1
end
end
if stack < 15 and count <= (4000 - num) then
return true
end
return false
end

function tileDrop2(x,y,num)
local count = 0
local stack = 0
for _,object in pairs(bot:getWorld():getObjects()) do
if round(object.x / 32) == x and math.floor(object.y / 32) == y then
count = count + object.count
stack = stack + 1
end
end
if stack < 15 and count <= (4000 - num) then
return true
end
return false
end

function storePack()
bot = getBot()
inventory = bot:getInventory()
world = bot:getWorld()
getBot().auto_collect = false
sleep(3000)
for i, packID in ipairs(packList) do
if inventory:getItemCount(packID) > 0 then
bot:warp(storagePack)
while inventory:getItemCount(packID) > 0 do
sleep(2000)
bot:moveLeft()
sleep(1000)
bot:drop(packID,inventory:getItemCount(packID))
sleep(500)
if getBot():getInventory():getItemCount(packID) == 0 then
sleep(1000)
break
end
end
end
end
end

function naroSeed()
bot = getBot()
inventory = bot:getInventory()
world = bot:getWorld()
getBot().auto_collect = false
sleep(3000)
if inventory:getItemCount(itmSeed) > 150 then
bot:warp(storageSeed)
while (inventory:getItemCount(itmSeed)) > 150 do
sleep(2000)
bot:moveRight()
sleep(1000)
bot:drop(itmSeed,inventory:getItemCount(itmSeed))
sleep(500)
if getBot():getInventory():getItemCount(itmSeed) == 0 then
sleep(1000)
break
end
end
end
end

function storeSeed(world)
warp(storageSeed)
sleep(300)
naroSeed()
sleep(100)
warp(world)
sleep(100)
bot.auto_collect = true
sleep(100)
end

function buy()
bot.auto_collect = false
sleep(100)
warp(storagePack)
sleep(3000)
while bot.gem_count >= packPrice do
for i = 1, packLimit do
bot:sendPacket(2,"action|buy\nitem|"..packName)
sleep(3000)
if bot.gem_count < packPrice then
break
end
end
storePack()
sleep(2050)
reconnect(storagePack)
end
end

function includesNumber(table, number)


for _,num in pairs(table) do
if num == number then
return true
end
end
return false
end

function plant(world)
gaulWord()
sleep(100)
bot.move_interval = 10
bot.collect_range = 3
bot.collect_interval = 60
plant1 = 0
plant2 = 99
plant3 = 1
tiletile = 0
totalPlant = 0

for plantY = 53, 0, -1 do


for plantX = plant1, plant2, plant3 do
if getBot():getWorld():getTile(plantX, plantY).fg == 0 and
getBot():getWorld():getTile(plantX, plantY + 1).fg > 0 and
getBot():getWorld():getTile(plantX, plantY + 1 ).fg ~= itmSeed and
getBot():getWorld():getTile(plantX, plantY + 1 ).fg ~= itmId then
if bot:findPath(plantX,plantY) then
bot:place(plantX,plantY,itmSeed)
sleep(delayPlant)
reconnect(world, plantX, plantY)
totalPlant = totalPlant + 1
end
end
if bot:getInventory():getItemCount(itmSeed) == 0 then
break
end
end

if tiletile == 1 then
if plant1 == 0 then
plant1 = 99
plant2 = 0
plant3 = -1
tiletile = 0
elseif plant1 == 99 then
plant1 = 0
plant2 = 99
plant3 = 1
tiletile = 0
end
elseif tiletile == 0 then
tiletile = tiletile + 1
end
end
end

function pnb(world)
local randomChar = generateRandomNumber(18,34)
if bot:getInventory():getItemCount(itmId) >= tileNumber then
ex = math.floor(getLocal().posx/32)
ye = math.floor(getLocal().posy/32)
if tileNumber > 1 then
while bot:getInventory():getItemCount(itmId) >= tileNumber and
bot:getInventory():getItemCount(itmSeed) < 190 do
while tilePlace(ex, ye) do
for _, i in pairs(tileBreak) do
if getBot():getWorld():getTile(ex - 1, ye + i).fg == 0 and
getBot():getWorld():getTile(ex - 1, ye + i).bg == 0 then
nempel(-1, i, itmId)
sleep(delayPlace)
reconnect(world, ex, ye)
end
end
end
while tilePunch(ex, ye) do
for _, i in pairs(tileBreak) do
if getBot():getWorld():getTile(ex - 1, ye + i).fg ~= 0 or
getBot():getWorld():getTile(ex - 1, ye + i).bg ~= 0 then
mukul(-1, i)
sleep(delayPunch)
reconnect(world, ex, ye)
end
end
end
end
else
while bot:getInventory():getItemCount(itmId) > 0 and
bot:getInventory():getItemCount(itmSeed) < 190 do
while getBot():getWorld():getTile(ex - 1,ye).fg == 0 and
getBot():getWorld():getTile(ex - 1,ye).bg == 0 do
nempel(-1,0,itmId)
sleep(delayPlace)
reconnect(world,ex,ye)
end
while getBot():getWorld():getTile(ex - 1,ye).fg ~= 0 or
getBot():getWorld():getTile(ex - 1,ye).bg ~= 0 do
mukul(-1,0)
sleep(delayPunch)
reconnect(world,ex,ye)
end
if bot:getInventory():getItemCount(itmId) <= randomChar then
break
end
end
end
end
jubahKeramat()
sleep(1000)
clear()
sleep(100)
if buyAfterPNB and bot.gem_count >= minimumGem then
sleep(1000)
buy()
sleep(100)
warp(world)
sleep(100)
bot.auto_collect = true
sleep(100)
end
end

function clearALL()
for _,item in pairs(bot:getInventory():getItems()) do
if not includesNumber(goods, item.id) then
bot:sendPacket(2, "action|trash\n|itemID|"..item.id)
bot:sendPacket(2, "action|dialog_return\ndialog_name|trash_item\
nitemID|"..item.id.."|\ncount|"..item.count)
sleep(200)
end
end
end

function generateRandomNumber(min, max)


return math.random(min, max)
end

function pukulBlock()
bot.move_interval = 10
for _,tile in pairs(getTiles()) do
if tile.fg == itmId or tile.bg == itmId then
bot:findPath(tile.x,tile.y)
sleep(100)
while getBot():getWorld():getTile(tile.x,tile.y).fg > 0 or
getBot():getWorld():getTile(tile.x,tile.y).bg > 0 do
mukul(0,0)
sleep(100)
end
end
end
end

function harvest(world)
gaulWord()
sleep(500)
bot.move_interval = 10
bot.collect_range = 3
bot.collect_interval = 60
harvest1 = 0
harvest2 = 99
harvest3 = 1
tiletile = 0
totalharvest = 0

for yharvest = 53, 0, -1 do


for xharvest = harvest1, harvest2, harvest3 do
if getBot():getWorld():getTile(xharvest, yharvest).fg == itmSeed and
getBot():getWorld():getTile(xharvest, yharvest):canHarvest() then
bot:findPath(xharvest, yharvest)
while getBot():getWorld():getTile(xharvest, yharvest).fg == itmSeed
do
mukul(0, 0)
sleep(delayHarvest)
reconnect(world, xharvest, yharvest)
totalharvest = totalharvest + 1
end
end
local randomItmId = math.random(150, 200)
if bot:getInventory():getItemCount(itmId) >= randomItmId then
sleep(100)
randomColor()
sleep(300)
bot:moveRight()
sleep(100)
pnb(world)
sleep(100)
plant(world)
sleep(100)
if bot:getInventory():getItemCount(itmSeed) >= 150 then
sleep(100)
bot.auto_collect = false
sleep(300)
storeSeed(world)
sleep(100)
end
end
if xharvest == 98 and yharvest == 1 then
pnb(world)
sleep(100)
plant(world)
sleep(100)
end
end

if tiletile == 1 then
if harvest1 == 0 then
harvest1 = 99
harvest2 = 0
harvest3 = -1
tiletile = 0
elseif harvest1 == 99 then
harvest1 = 0
harvest2 = 99
harvest3 = 1
tiletile = 0
end
elseif tiletile == 0 then
tiletile = tiletile + 1
end
if bot:getInventory():getItemCount(112) >= minimumGem then
buy()
sleep(100)
end
end
end

function clear()
for _,item in pairs(bot:getInventory():getItems()) do
if not includesNumber(goods, item.id) and
bot:getInventory():getItemCount(item.id) > 150 then
bot:sendPacket(2,"action|trash\n|itemID|"..item.id)
sleep(500)
bot:sendPacket(2,"action|dialog_return\ndialog_name|trash_item\
nitemID|"..item.id.."|\ncount|"..item.count)
sleep(1250)
end
end
end

function fashionWeek()
for _,item in pairs(bot:getInventory():getItems()) do
if not includesNumber(goods, item.id) and
bot:getInventory():getItemCount(item.id) == 1 then
sleep(500)
bot:wear(item.id)
sleep(500)
table.insert(goods,item.id)
end
end
end

function jubahKeramat()
if buyJubah then
if bot.gem_count > 2000 then
sleep(100)
clear()
sleep(100)
while bot:getInventory().slotcount < 36 do
sleep(1000)
bot:sendPacket(2,"action|buy\nitem|upgrade_backpack")
sleep(4000)
end
sleep(500)
bot:sendPacket(2,"action|buy\nitem|rare_clothes")
sleep(4000)
fashionWeek()
sleep(100)
buyJubah = false
sleep(100)
end
end
end

function randomColor()
local commands = {
"action|setSkin\ncolor|2527912447",
"action|setSkin\ncolor|1348237567",
"action|setSkin\ncolor|3370516479"
}
local randomIndex = math.random(1, #commands)
local selectedCommand = commands[randomIndex]
bot:sendPacket(2,selectedCommand)
sleep(1000)
end
sleep( delayExe * ( index - ( botStart - 1 ) ) )

while true do
for index,world in pairs(farming) do
sleep(100)
warp(world)
sleep(100)
bot.auto_collect = true
bot.move_interval = 10
bot.collect_range = 2
bot.collect_interval = 80
if not nuked then
sleep(100)
bl(world)
sleep(100)
bot:findPath(1,21)
sleep(100)
clearALL()
sleep(500)
randomColor()
sleep(1000)
pukulBlock()
sleep(1000)
harvest(world)
sleep(100)
plant(world)
sleep(100)
else
nuked = false
end
if start < stop then
start = start + 1
end
end
if not looping then
sleep(100)
removeBot(getBot().name)
break
end
end

You might also like