0% found this document useful (0 votes)
83 views3 pages

Auto Clear World - Lua

This document contains the configuration and code for a Tiled world clearing script. It enables various protections like antibounce, anti-lava, and modfly. It can optionally enable anti-lag, anti-checkpoint, anti-portal, anti-punch, and preventing item pickup. The script will clear blocks within a range of the player and respawn if more than the set player count is reached to clear worlds between 95-99.

Uploaded by

Rahmat Ganss
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
83 views3 pages

Auto Clear World - Lua

This document contains the configuration and code for a Tiled world clearing script. It enables various protections like antibounce, anti-lava, and modfly. It can optionally enable anti-lag, anti-checkpoint, anti-portal, anti-punch, and preventing item pickup. The script will clear blocks within a range of the player and respawn if more than the set player count is reached to clear worlds between 95-99.

Uploaded by

Rahmat Ganss
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 3

-- //+------------------------------------------------------------------+

-- [ SYNCHHH ]
-- Note
-- Enable
-- Antibounce, ModFly, Anti Lava
-- (Optional)
-- Anti Lag , Anti Check Point, Anti Portal/Door, Anti Punch, Cant Pickup Item
-- //+------------------------------------------------------------------+
-- //+-----------------------------SETUP--------------------------------+
-- //+------------------------------------------------------------------+
-- [ SYNCHHH ] --
worldname = "" -- leave this blank if u clear for only current world
worlds = 95
worlde = 99
maxPlayerCount = 1
enableoptional = true
-- //+------------------------------------------------------------------+
-- //+------------------------------------------------------------------+
-- //+------------------------------------------------------------------+
-- //+------------------------------------------------------------------+
-- //+------------------------------------------------------------------+
-- //+------------------------------------------------------------------+
-- //+------------------------------------------------------------------+
-- //+------------------------------------------------------------------+
-- //+------------------------------------------------------------------+
-- //+------------------------------------------------------------------+
bedrockID = FindItemID("Bedrock") -- Bedrock = 8
blankID = FindItemID("Blank") -- Blank = 0
EditToggle("Antibounce", true)
EditToggle("Anti Lava", true)
if enableoptional then
EditToggle("ModFly", true)
EditToggle("Anti Lag", true)
EditToggle("Anti Check Point", true)
EditToggle("Anti Portal/Door", true)
EditToggle("Anti Punch", true)
EditToggle("Cant Pickup Item", true)
end
-- //+------------------------------------------------------------------+
function punch(x, y)
pkt = {}
pkt.px = x;
pkt.py = y;
pkt.type = 3;
pkt.value = 18;
pkt.x = GetLocal().posX;
pkt.y = GetLocal().posY;
SendPacketRaw(false, pkt);
Sleep(180);
end
-- //+------------------------------------------------------------------+
function getPlayerCount()
count = 0
for _, player in pairs(GetPlayerList()) do count = count + 1 end
return count
end
-- //+------------------------------------------------------------------+
function clearWorld(PlayerRangeX, PlayerRangeY)
botPosX = math.floor(GetLocal().posX / 32)
botPosY = math.floor(GetLocal().posY / 32)
for _, tile in pairs(GetTiles()) do
if (tile.y < 54 and tile.y > 23) then
if math.abs(tile.x - botPosX) <= PlayerRangeX and
math.abs(tile.y - botPosY) <= PlayerRangeY then
if tile.flag == 1 and tile.fg ~= bedrockID then
punch(tile.x, tile.y) -- punch solid block
return true
elseif tile.bg ~= blankID and tile.fg ~= bedrockID then
punch(tile.x, tile.y) -- punch bg
return true
elseif tile.fg == bedrockID and GetTiles(tile.x, tile.y + 1).bg ~=
blankID then
punch(tile.x, tile.y + 1) -- punch bg
return true
end
elseif tile.bg ~= blankID and tile.fg ~= bedrockID then
if GetTiles((math.floor(tile.x / 5) * 5) + 2, tile.y - 1).fg ~=
bedrockID then
FindPath((math.floor(tile.x / 5) * 5) + 2, tile.y - 1)
else
FindPath((math.floor(tile.x / 5) * 5) + 2, tile.y - 2)
end
Sleep(100)
return true
end
end
end
return false
end
-- //+------------------------------------------------------------------+
function oneWorld()
runWorldClear = true
while runWorldClear == true do
if getPlayerCount() <= maxPlayerCount then
if clearWorld(2, 2) == false then runWorldClear = false end
else
SendPacket(2, "action|respawn")
Sleep(5000)
while getPlayerCount() > maxPlayerCount do Sleep(10000) end
end
end
end
-- //+------------------------------------------------------------------+
-- MAIN FUNCTION START HERE
-- //+------------------------------------------------------------------+
if worldname ~= "" then
for i = worlds, worlde, 1 do
SendPacket(3, "action|join_request\nname|" .. worldname .. i)
Sleep(10000)
LogToConsole("World Clearing")
::avoidloop::
if pcall(oneWorld) == false then goto avoidloop end
LogToConsole("World Clearing Ended")
end
else
LogToConsole("World Clearing")
::avoid::
if pcall(oneWorld) == false then goto avoid end
LogToConsole("World Clearing Ended")
end
-- //+------------------------------------------------------------------+

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy