Professional Documents
Culture Documents
Setup Mikel
Setup Mikel
worldLetter = 8
worldCount = 4 -- Jumlah world yang di buat
worldLock = 202 -- 202 Small Lock; 204 Big Lock ; 206 Huge Lock
entrance = 5036 -- 224 House Entrance; 5036 Hidden Door; 7164 Red house entrance;
door = 858 -- 858 Screen door; 12 door;
doorId = 'idworld'
useJammer = false -- kalau tidak ada jammer auto false
webHookUrl = "webHooklink"
end
function generateWorld()
local nameWorld = ""
for i = 1,worldLetter do
nameWorld = nameWorld..string.char(math.random(97,122))
end
sleep(500)
sendPacket("action|join_request\nname|"..nameWorld.."\ninvitedWorld|0",3)
sleep(5000)
end
function checkWorld()
for _,check in pairs(getTiles()) do
if check.fg == 242 or check.fg == 9640 or check.fg == 202 or check.fg
== 204 or check.fg == 206 then
return false
end
end
return true
end
--(- kiri + kanan) , (- atas + bawah)
-- place(id,x,y)
function setupWorld()
while getTile(math.floor(getBot().x / 32)-2, math.floor(getBot().y /
32)+1).fg ~= 0 or getTile(math.floor(getBot().x / 32)-2, math.floor(getBot().y /
32)+1).bg ~= 0 do
punch(-2,1)
sleep(150)
end
sleep(500)
move(2,0)
sleep(500)
sleep(500)
wrench(-1,1)
sleep(2000)
sendPacket(2,"action|dialog_return\ndialog_name|door_edit\ntilex|"..
math.floor(getBot().x/32)-1 .."|\ntiley|".. math.floor(getBot().y/32)+1 .."|\
ndoor_name|id\ndoor_target|\ndoor_id|".. doorId .."\ncheckbox_locked|0")
sleep(1000)
move(-2,0)
sleep(1000)
wrench(0,-1)
sleep(2000)
sendPacket("action|dialog_return\ndialog_name|lock_edit\ntilex|"..
(math.floor(getBot().x/32)).."|\ntiley|"..(math.floor(getBot().y/32)-1).."|\
nbuttonClicked|recalcLock\n\ncheckbox_public|0\ncheckbox_ignore|1",2)
end
for i=1,worldCount do
repeat
generateWorld()
until checkWorld()
setupWorld()
sleep(2000)
webHook("Create World **"..getBot().world.."**", getBot().name)
end