Message
Message
bots = {
{botname = "", botpass = "", botproxy = "", worlds =
{"mrdbn","mrdnj","mrdnb","mrdmu","mrdmp","mrdml","mrdmz","mrdmv"}, deponame = "",
depoid = ""},
{botname = "", botpass = "", botproxy = "", worlds =
{"maynht1","maynht2","maynht3","maynht4","maynht5","maynht7","maynht10","maynht12"}
, deponame = "", depoid = ""},
function checkJar(bot,currentWorld,types)
if types == "a" then
while bot:getWorld().name:lower() ~= deponame:lower() do
bot:sendPacket(3,"action|join_request\nname|" .. deponame .. "|" ..
depoid .."\ninvitedWorld|0")
sleep(8000)
end
while getTile(bot:getWorld():getLocal().posx//32,
bot:getWorld():getLocal().posy//32).fg == 6 do
bot:sendPacket(3,"action|join_request\nname|" .. deponame .. "|" ..
depoid .."\ninvitedWorld|0")
sleep(8000)
end
sleep(1500)
local abc = 0
while bot:getInventory():getItemCount(3720) < howmuchJar do
bot:collect(4,400)
sleep(200)
if abc >= 20 then
sleep(120000)
end
end
while bot:getInventory():getItemCount(3720) > howmuchJar do
bot:sendPacket(2,"action|drop\n|itemID|3720")
sleep(bot:getPing()*40)
bot:sendPacket(2,"action|dialog_return\ndialog_name|drop_item\nitemID|
3720|\ncount|"..bot:getInventory():getItemCount(3720) - howmuchJar)
sleep(bot:getPing()*40)
end
sleep(2000)
while bot:getWorld().name:lower() ~= currentWorld:lower() do
bot:sendPacket(3,"action|join_request\nname|" .. currentWorld .."\
ninvitedWorld|0")
sleep(8000)
end
sleep(2000)
else
while bot:getWorld().name:lower() ~= deponame:lower() do
bot:sendPacket(3,"action|join_request\nname|" .. deponame .. "|" ..
depoid .."\ninvitedWorld|0")
sleep(8000)
end
while getTile(bot:getWorld():getLocal().posx//32,
bot:getWorld():getLocal().posy//32).fg == 6 do
bot:sendPacket(3,"action|join_request\nname|" .. deponame .. "|" ..
depoid .."\ninvitedWorld|0")
sleep(8000)
end
sleep(1500)
local abc = 0
while bot:getInventory():getItemCount(3720) == 0 do
bot:collect(4,400)
sleep(200)
if abc >= 20 then
sleep(120000)
end
end
while bot:getInventory():getItemCount(3720) > howmuchJar do
bot:sendPacket(2,"action|drop\n|itemID|3720")
sleep(bot:getPing()*40)
bot:sendPacket(2,"action|dialog_return\ndialog_name|drop_item\nitemID|
3720|\ncount|"..bot:getInventory():getItemCount(3720) - howmuchJar)
sleep(bot:getPing()*40)
end
sleep(2000)
while bot:getWorld().name:lower() ~= currentWorld:lower() do
bot:sendPacket(3,"action|join_request\nname|" .. currentWorld .."\
ninvitedWorld|0")
sleep(8000)
end
sleep(2000)
end
end
function IsTileHitable(x, y)
local localPosX = getBot():getWorld():getLocal().posx
local localPosY = getBot():getWorld():getLocal().posy
local tileRadius = 5
function aiPlace(bot)
if getTile(bot:getWorld():getLocal().posx//32,
bot:getWorld():getLocal().posy//32 + 1).fg ~=0 and
getTile(bot:getWorld():getLocal().posx//32, bot:getWorld():getLocal().posy//32 +
1).fg ~= 546 then
bot:place( bot:getWorld():getLocal().posx//32,
bot:getWorld():getLocal().posy//32 + 2, 3720)
elseif getTile(bot:getWorld():getLocal().posx//32,
bot:getWorld():getLocal().posy//32 + 2).fg ~=0 and
getTile(bot:getWorld():getLocal().posx//32, bot:getWorld():getLocal().posy//32 +
2).fg ~= 546 then
bot:place( bot:getWorld():getLocal().posx//32,
bot:getWorld():getLocal().posy//32 +1, 3720)
elseif getTile(bot:getWorld():getLocal().posx//32,
bot:getWorld():getLocal().posy//32 + 3).fg ~=0 and
getTile(bot:getWorld():getLocal().posx//32, bot:getWorld():getLocal().posy//32 +
3).fg ~= 546 then
bot:place( bot:getWorld():getLocal().posx//32,
bot:getWorld():getLocal().posy//32 +2, 3720)
elseif getTile(bot:getWorld():getLocal().posx//32,
bot:getWorld():getLocal().posy//32).fg ~=0 and
getTile(bot:getWorld():getLocal().posx//32, bot:getWorld():getLocal().posy//32).fg
~= 546 then
bot:place( bot:getWorld():getLocal().posx//32,
bot:getWorld():getLocal().posy//32 +1, 3720)
end
end
counter = 0
function checkCounter(bot)
local ghost = 0
if bot:isInWorld() then
for _, npc in pairs(getNPCs()) do
if npc.type == 1 then
ghost = ghost + 1
end
end
end
return ghost
end
if bot:isInWorld() then
for _, npc in pairs(npcs) do
if npc.type == 1 then
::YENIDEN::
local founded = false
local foundedghostinsameplace = false
if bot:findPath(getNPC(npc.id).destx // 32, getNPC(npc.id).desty // 32)
then
for _, tile in pairs(getTiles()) do
local distance = math.sqrt((tile.x - getNPC(npc.id).destx //
32) ^ 2 + (tile.y - getNPC(npc.id).desty // 32) ^ 2)
if distance <= 2 then
if #bot:getPath(tile.x, tile.y) > 0 and ((getTile(tile.x,
tile.y + 1).fg ~= 0 and getTile(tile.x, tile.y + 3).fg ~= 0) or (getTile(tile.x,
tile.y + 2).fg ~= 0 and getTile(tile.x, tile.y).fg ~= 0)) then
bot:findPath(tile.x, tile.y)
sleep(150)
founded = true
end
if getTile(bot:getWorld():getLocal().posx//32 ,
bot:getWorld():getLocal().posy//32).fg == 0 and
getTile(bot:getWorld():getLocal().posx//32 , bot:getWorld():getLocal().posy//32
+1 ).fg == 0 and getTile(bot:getWorld():getLocal().posx//32 ,
bot:getWorld():getLocal().posy//32 +2).fg == 0 and
getTile(bot:getWorld():getLocal().posx//32 , bot:getWorld():getLocal().posy//32
+3).fg == 0 then
founded = false;goto YENIDEN
end
end
if founded then break end
end
local jammerBug = -10
beforeJmmr = getBot():getInventory():getItemCount(3720)
while getNPC(npc.id) ~= nil and
fastPuncher(bot,bot:getWorld():getLocal().posx//32 ,
bot:getWorld():getLocal().posy//32, getNPC(npc.id).x//32 , getNPC(npc.id).y//32,
getNPC(npc.id).destx//32, getNPC(npc.id).desty//32) do
if not foundedghostinsameplace and getNPC(npc.id) ~= nil and
(getNPC(npc.id).x // 32 == bot:getWorld():getLocal().posx // 32) and
(getNPC(npc.id).y // 32 == bot:getWorld():getLocal().posy // 32) then
aiPlace(bot)
sleep(200)
getBot():getLog():append("Place atiom : " .. getBot().name)
foundedghostinsameplace = true
end
sleep(10)
jammerBug = jammerBug + 1
if jammerBug >= 25 and foundedghostinsameplace and beforeJmmr
== getBot():getInventory():getItemCount(3720) then
foundedghostinsameplace = false
jammerBug = 0
end
end
sleep(500)
bot:collect(4, 250)
sleep(500)
foundedghostinsameplace = false
counter = counter + 1
end
end
end
end
end
function goDepoToDrop(bot)
while bot:getWorld().name:lower() ~= saveWorld:lower() do
bot:sendPacket(3,"action|join_request\nname|" .. saveWorld .. "|" ..
saveWorldID .."\ninvitedWorld|0")
sleep(8000)
end
while getTile(bot:getWorld():getLocal().posx//32,
bot:getWorld():getLocal().posy//32).fg == 6 do
bot:sendPacket(3,"action|join_request\nname|" .. saveWorld .. "|" ..
saveWorldID .."\ninvitedWorld|0")
sleep(8000)
end
while bot:getInventory():getItemCount(3721) > 0 do
bot:sendPacket(2,"action|drop\n|itemID|3721")
sleep(bot:getPing()*40)
bot:sendPacket(2,"action|dialog_return\ndialog_name|drop_item\nitemID|
3721|\ncount|"..bot:getInventory():getItemCount(3721))
sleep(bot:getPing()*40)
end
while bot:getInventory():getItemCount(3722) > 0 do
bot:sendPacket(2,"action|drop\n|itemID|3722")
sleep(bot:getPing()*40)
bot:sendPacket(2,"action|dialog_return\ndialog_name|drop_item\nitemID|
3722|\ncount|"..bot:getInventory():getItemCount(3722))
sleep(bot:getPing()*40)
end
end
function getsize(T)
local count = 0
for _ in pairs(T) do count = count + 1 end
return count
end