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

-- Auto PNB Script by Erzy.

sh
-- More script join my discord server
-- https://discord.gg/Wy4XYcTcSP

block = 2 -- Block ID
delay = 180 -- Delay break 1s = 1000
tilecount = 3 -- Tile to break 1/3/5
direction = "up" -- "up"/"down"

function spr(t,v,x,y) SendPacketRaw(false,{type = t, value = v, px = x, py = y, x =


GetLocal().posX, y = GetLocal().posY}) end function rs(n) local a = math.random(n,
n+50) Sleep(a) return a end function pos() return {x = GetLocal().posX//32, y =
GetLocal().posY//32} end function drop(id, count) SendPacket(2, "action|drop\n|
itemID|"..id) SendPacket(2, "action|dialog_return\ndialog_name|drop_item\
nitemID|"..id.."|\ncount|"..count) Sleep(200) end function check(id) for _, inv in
pairs(GetInventory()) do if inv.id == id then return inv.amount end end return 0
end function log(...) return LogToConsole("`c[`9Erzy.sh Script``]`9>>
`0"..table.concat({...}, " : ")) end function tc(a) local o = {} if a == 1 then
return {0} elseif a == 3 then for i = -1, 1 do table.insert(o, i) end elseif a == 5
then for i = -2, 2 do table.insert(o, i) end else log("Please Input tilecount with
value 1 or 3 or 5") end return o end function act(val,b) local h = false for k,v in
pairs(tc(tilecount)) do if GetTile(pos().x+v, pos().y+dir).fg ~= b or
GetTile(pos().x+v, pos().y+dir).bg ~= b then spr(3,val,pos().x+v, pos().y+dir)
rs(delay) h = true end end return h end function pnb() dir = direction == "up" and
-1 or direction == "down" and 1 or error("Please input the right value for
direction!") while true do act(block, block) while act(18, 0) do end end end
log("Script By Erzy.sh") log("`2Starting script") pnb() log("Script finished")

You might also like