Script Auto Clear World - Lua
Script Auto Clear World - Lua
function punch(x, y)
local pkt = {}
pkt.type = 3
pkt.value = 18
pkt.tilex = x
pkt.tiley = y
pkt.x = getLocal().pos.x
pkt.y = getLocal().pos.y
sleep(200)
sendPacketRaw(false, pkt)
end
function join(name)
sleep(10)
sendPacket(2, "action|join_request\nname|" .. name .. "")
sendPacket(3, "action|join_request\nname|" .. name .. "\ninvitedWorld|0")
sleep(4000)
end
function side()
for x = 0, 99 do
for y = 0, 53 do
local k = checkTile(x, y)
if k.bg == 14 then
sleep(250)
findPath(k.pos.x, k.pos.y - 1, 120)
sleep(200)
while checkTile(x, y).bg == 14 do
punch(x, y)
end
end
end
end
for x = 98, 99 do
for y = 0, 53 do
local k = checkTile(x, y)
if k.bg == 14 then
sleep(250)
findPath(k.pos.x, k.pos.y - 1, 120)
sleep(200)
while checkTile(x, y).bg == 14 do
punch(x, y)
end
end
end
end
end
function main()
for y = 1, 53, 2 do
for x = 0, 99 do
local bg = checkTile(x, y)
if bg.bg == 14 then
sleep(250)
findPath(bg.pos.x, bg.pos.y - 2, 140)
sleep(200)
while checkTile(bg.pos.x, bg.pos.y).bg == 14 do
punch(bg.pos.x, bg.pos.y)
end
end
end
end
end
n = urutan
while true do
join(world[n])
side()
main()
n = n + 1
if n > #world then
n = 1
end
end