• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Action Bot cleanner

nice but i have a error
The Forgotten Server - Version 0.2rc10 (Mystic Spirit).
A server developed by Talaturen, Kiper, Kornholijo, Jonern, Lithium & slawkens.
Visit our forum for updates, support and resources: http://otland.net/.

>> Loading config
>> Loading RSA key
>> Testing SQL connection... SqLite.
>> Loading bans
>> Loading vocations
>> Loading commands
>> Loading items
>> Loading script systems
Warning: [Event::loadScript] Can not load script. data/actions/scripts/lixos.lua

data/actions/scripts/lixos.lua:22: '}' expected (to close '{' at line 11) near '
)'

>> Loading monsters
>> Loading quests
>> Loading outfits
>> Loading admin protocol config
>> Loading experience stages
>> Checking world type... PVP
>> Loading map
> Map size: 1024x1024.
> Map loading time: 4.341 seconds.
>> Loading raids
>> All modules has been loaded, server starting up...
>> Mystic Ot Server Online!

Failed to unserialize attr_type: 12 for item: 2314
WARNING: Serialize error in IOLoginData::loadItems
Failed to unserialize attr_type: 12 for item: 2314
WARNING: Serialize error in IOLoginData::loadItems
Failed to unserialize attr_type: 12 for item: 2282
WARNING: Serialize error in IOLoginData::loadItems
Failed to unserialize attr_type: 12 for item: 2312
WARNING: Serialize error in IOLoginData::loadItems
Failed to unserialize attr_type: 12 for item: 2282
WARNING: Serialize error in IOLoginData::loadItems
Failed to unserialize attr_type: 12 for item: 2312
WARNING: Serialize error in IOLoginData::loadItems
Failed to unserialize attr_type: 12 for item: 2282
WARNING: Serialize error in IOLoginData::loadItems
GOD Azuk has logged in.

can u help me please?
 
nice but i have a error


can u help me please?


Code:
--[[ script 100% by mock
 ver 2.0
 wanna an video?
 take a look
 

YouTub

e - tibia script - bot cleanner v2.0
  ]]--
local config = {
--- speed/chances
velocidade = 1000, -- speed
--- effects
Efeito_normal = 47, --- magic effect  (normal)
Efeito_block = 31,  --- magic effect (blocking in some wall
BombEfect = 1,
Allow_funnyTalks = TRUE,
funnyTalks = {"lol","Hello","o0"},
Allow_Bombs = TRUE, --- clean bombs (limpa em volta do bot
----ssecurity
exclusoes ={6500,9999,2092}, -- Ignored itemids
allowFloorChange = TRUE,  -- floor change?
stairs_up_ids = {1386,1385,1389,3687}, -- Stairs id (to up)
stairs_down_ids = {459,4834,3219},  -- Stairs id (down)
sqms_de_distancia_do_centro = 5, -- spawn radius
}
----- Functions
function isWalkable2(pos)
 local wall0 = getThingfromPos({x=pos.x, y=pos.y, z=pos.z, 

stackpos=0})
 local wall1 = getThingfromPos({x=pos.x, y=pos.y, z=pos.z, 

stackpos=1})
 local wall2 = getThingfromPos({x=pos.x, y=pos.y, z=pos.z, 

stackpos=2})
 local creature = getThingfromPos({x=pos.x, y=pos.y, 

z=pos.z, stackpos=255})
 if isCreature(creature.uid) == FALSE then
 if wall0.uid ~= 0 and hasProperty(wall0.uid, 3) == FALSE 

and hasProperty(wall0.uid, 7) == FALSE then
  if wall1.uid == 0 or (hasProperty(wall1.uid, 3) == FALSE 

and hasProperty(wall1.uid, 7) == FALSE) then
   if wall2.uid == 0 or (hasProperty(wall2.uid, 3) == FALSE 

and hasProperty(wall2.uid, 7) == FALSE) then
     return TRUE
    end
   end
  end
 end
 return FALSE
end
local function doCleanArea(pos, exclusaos,config)
      pos1 = {x=pos.x-1,y=pos.y-1,z=pos.z}
      pos2 = {x=pos.x+1,y=pos.y+1,z=pos.z}
      for x = 0, math.abs(pos1.x-pos2.x) do
          for y = 0, math.abs(pos1.y-pos2.y) do
              pos3 = {x = pos1.x+x, y = pos1.y+y, z = pos1.z, 

stackpos = 255}
              local coisa = getThingfromPos(pos3)
              pos3 = {x = pos1.x+x, y = pos1.y+y, z = pos1.z, 

stackpos = 0}
              local coisa2 = getThingfromPos(pos3)
              doSendMagicEffect(pos3,config.BombEfect)
              if coisa.itemid ~= 0 then
                 if isInArray(exclusaos, coisa.itemid) == FALSE and 

getTileHouseInfo(pos3) == 0 and coisa2.actionid ~= 500 and 

isWalkable2(pos3) == TRUE then
                    doRemoveItem(coisa.uid, -1)
                    doSendAnimatedText(pos3,"Deleted", 

math.random(1,255))
                 end
              end
          end
      end
end
--- Thanks jovial for tihs function :P
--- 

Funçao inScreen 2.0 by -Jovial- - OTServ 

Networks 
function isInArea(center, pos2,radius)
 if ((math.abs(center.x - pos2.x) <= radius) and 

(math.abs(center.y - pos2.y) <= radius)) then
  return TRUE
 else
  return FALSE
 end
end
-----Finallby my bot :P
local function andar(topos,cento,config)
      ----- talking...
      if math.random(1,12) > 8 and config.Allow_funnyTalks == 

TRUE then
         

doSendAnimatedText(topos,config.funnyTalks[math.random(

1,#config.funnyTalks)],math.random(1,255))
      end
      
      --- Some important thinks :P
      local maspos = {x = topos.x, y = topos.y ,z = 

topos.z,stackpos=255}
      local oldpos = topos
      local changed = FALSE
      local getdir = math.random(0,3)
      maspos = getPosByDir(maspos, getdir)
      Items = getThingfromPos(maspos)
      items2 = getThingfromPos({x = maspos.x, y = maspos.y 

,z = maspos.z,stackpos=1})
      Itempost = maspos
      Itempost.stackpos = 0
      gnr = getThingfromPos(Itempost)
      ----                                                                                               

                  --  or isInArea(cento, 

topos,config.sqms_de_distancia_do_centro,config)
 
      val = getThingfromPos(Itempost)
      if val.actionid == 500 or getTileHouseInfo(maspos) ~= 0 

or isWalkable2(maspos) == FALSE or isCreature(Items.uid) 

== TRUE or isInArea(cento, 

maspos,config.sqms_de_distancia_do_centro) == FALSE 

then
         if config.allowFloorChange == TRUE then
                 items2 = getThingfromPos({x = maspos.x, y = 

maspos.y ,z = maspos.z,stackpos=1})
                 items3 = getThingfromPos({x = maspos.x, y = 

maspos.y ,z = maspos.z,stackpos=0})
                 if isInArray(config.stairs_up_ids, items2.itemid) == 

TRUE then
                    doSendAnimatedText(maspos,"UP!", 

math.random(1,255))
                    maspos.z = maspos.z-1
                    local changed = TRUE
                 elseif isInArray(config.stairs_down_ids, 

items3.itemid) == TRUE then
                    doSendAnimatedText(maspos,"DOWN!", 

math.random(1,255))
                    maspos.z = maspos.z+1
                    local changed = TRUE
                 end        
         end
         if changed == FALSE then        
         doSendAnimatedText(maspos,"Block", 

math.random(1,255))
         end
         if getdir == 1 then
         getdir = 3
         elseif getdir == 3 then
         getdir = 1
         elseif getdir == 0 then
         getdir = 2
         elseif getdir == 2 then
         getdir = 0
         end
         topos = getPosByDir(maspos, getdir)
         doSendMagicEffect(maspos,config.Efeito_block)
      else
          if Items.itemid ~= 0 then
             if isInArray(config.exclusoes, Items.itemid) == FALSE 

then
                doSendMagicEffect(maspos,config.Efeito_normal)
                local cor = math.random(1,255)
                addEvent(doSendAnimatedText, 

200,maspos,"Deleted",cor)
                doRemoveItem(Items.uid, -1)
                topos = maspos
             else
                topos = maspos
                doSendAnimatedText(maspos,"Ignore", 

math.random(1,255)) 
             end
          else
              if config.allowFloorChange == TRUE then
                 items2 = getThingfromPos({x = maspos.x, y = 

maspos.y ,z = maspos.z,stackpos=1})
                 items3 = getThingfromPos({x = maspos.x, y = 

maspos.y ,z = maspos.z,stackpos=0})
                 if isInArray(config.stairs_up_ids, items2.itemid) == 

TRUE then
                    doSendAnimatedText(maspos,"UP!", 

math.random(1,255))
                    maspos.z = maspos.z-1
                    local changed = TRUE
                 elseif isInArray(config.stairs_down_ids, 

items3.itemid) == TRUE then
                    doSendAnimatedText(maspos,"DOWN!", 

math.random(1,255))
                    maspos.z = maspos.z+1
                    local changed = TRUE
                 end        
              end
              topos = maspos
          end
      end
      if math.random(1,2) == 1 and config.Allow_Bombs == 

TRUE then
         doCleanArea(topos, config.exclusoes,config)
      end
      doSendMagicEffect(maspos,config.Efeito_normal)
      addEvent(andar,  config.velocidade, topos,cento,config)
end
---- Ativaction :O
function onUse(cid, item, frompos, item2, topos)
         if getPlayerGroupId(cid) > 3 then
            local cento = topos
            addEvent(andar,  config.velocidade, 

topos,cento,config)
            return true
         else
             return false
         end
end

There you go.
 
@Empty

[07/03/2009 12:18:00] Warning: [Event::loadScript] Can not load script. data/actions/scripts/lixos.lua
[07/03/2009 12:18:00] data/actions/scripts/lixos.lua:3: '=' expected near 'e'
 
When I put it everywhere it's still says "blocked" "blocked"... What I have to do(change)?
TFS rc1
 
Last edited:
i have error with mystic spirit 0.2:

[09/03/2009 00:36:49] Warning: [Event::loadScript] Can not load script. data/actions/scripts/limpiar.lua
[09/03/2009 00:36:49] data/actions/scripts/limpiar.lua:22: '}' expected (to close '{' at line 11) near ')'
[09/03/2009 00:36:49] Warning: [Event::loadScript] Can not load script. data/actions/scripts/limpiar.lua
[09/03/2009 00:36:49] data/actions/scripts/limpiar.lua:22: '}' expected (to close '{' at line 11) near ')'

help me plx
 
Last edited:
Looks cool :) But it's looking like a server lagger ;/ Atleast if you got many :p
 
I add to serwer and..... NOTHINK
this is Fix small bugs
Code:
local config = {

velocidade = 1000, 

Efeito_normal = 47, 
Efeito_block = 31,
BombEfect = 1,
Allow_funnyTalks = TRUE,
funnyTalks = {"lol","Hello","o0"},
Allow_Bombs = TRUE, 
exclusoes ={6500,9999,2092}, -- Ignored itemids
allowFloorChange = TRUE,  -- floor change?
stairs_up_ids = {1386,1385,1389,3687}, -- Stairs id (to up)
stairs_down_ids = {459,4834,3219},  -- Stairs id (down)
sqms_de_distancia_do_centro = 5, -- spawn radius
}

function isWalkable2(pos)
 local wall0 = getThingfromPos({x=pos.x, y=pos.y, z=pos.z, 

stackpos=0})
 local wall1 = getThingfromPos({x=pos.x, y=pos.y, z=pos.z, 

stackpos=1})
 local wall2 = getThingfromPos({x=pos.x, y=pos.y, z=pos.z, 

stackpos=2})
 local creature = getThingfromPos({x=pos.x, y=pos.y, 

z=pos.z, stackpos=255})
 if isCreature(creature.uid) == FALSE then
 if wall0.uid ~= 0 and hasProperty(wall0.uid, 3) == FALSE 

and hasProperty(wall0.uid, 7) == FALSE then
  if wall1.uid == 0 or (hasProperty(wall1.uid, 3) == FALSE 

and hasProperty(wall1.uid, 7) == FALSE) then
   if wall2.uid == 0 or (hasProperty(wall2.uid, 3) == FALSE 

and hasProperty(wall2.uid, 7) == FALSE) then
     return TRUE
    end
   end
  end
 end
 return FALSE
end
local function doCleanArea(pos, exclusaos,config)
      pos1 = {x=pos.x-1,y=pos.y-1,z=pos.z}
      pos2 = {x=pos.x+1,y=pos.y+1,z=pos.z}
      for x = 0, math.abs(pos1.x-pos2.x) do
          for y = 0, math.abs(pos1.y-pos2.y) do
              pos3 = {x = pos1.x+x, y = pos1.y+y, z = pos1.z, 

stackpos = 255}
              local coisa = getThingfromPos(pos3)
              pos3 = {x = pos1.x+x, y = pos1.y+y, z = pos1.z, 

stackpos = 0}
              local coisa2 = getThingfromPos(pos3)
              doSendMagicEffect(pos3,config.BombEfect)
              if coisa.itemid ~= 0 then
                 if isInArray(exclusaos, coisa.itemid) == FALSE and 

getTileHouseInfo(pos3) == 0 and coisa2.actionid ~= 500 and 

isWalkable2(pos3) == TRUE then
                    doRemoveItem(coisa.uid, -1)
                    doSendAnimatedText(pos3,"Deleted", 

math.random(1,255))
                 end
              end
          end
      end
end

local function andar(topos,cento,config)
  
      if math.random(1,12) > 8 and config.Allow_funnyTalks == 

TRUE then
         

doSendAnimatedText(topos,config.funnyTalks[math.random(

1,#config.funnyTalks)],math.random(1,255))
      end
      
 
      local maspos = {x = topos.x, y = topos.y ,z = 

topos.z,stackpos=255}
      local oldpos = topos
      local changed = FALSE
      local getdir = math.random(0,3)
      maspos = getPosByDir(maspos, getdir)
      Items = getThingfromPos(maspos)
      items2 = getThingfromPos({x = maspos.x, y = maspos.y 

,z = maspos.z,stackpos=1})
      Itempost = maspos
      Itempost.stackpos = 0
      gnr = getThingfromPos(Itempost)
      ----                                                                                               

                  --  or isInArea(cento,topos,config.sqms_de_distancia_do_centro,config)
 
      val = getThingfromPos(Itempost)
      if val.actionid == 500 or getTileHouseInfo(maspos) ~= 0 

or isWalkable2(maspos) == FALSE or isCreature(Items.uid) 

== TRUE or isInArea(cento, 

maspos,config.sqms_de_distancia_do_centro) == FALSE 

then
         if config.allowFloorChange == TRUE then
                 items2 = getThingfromPos({x = maspos.x, y = 

maspos.y ,z = maspos.z,stackpos=1})
                 items3 = getThingfromPos({x = maspos.x, y = 

maspos.y ,z = maspos.z,stackpos=0})
                 if isInArray(config.stairs_up_ids, items2.itemid) == 

TRUE then
                    doSendAnimatedText(maspos,"UP!", 

math.random(1,255))
                    maspos.z = maspos.z-1
                    local changed = TRUE
                 elseif isInArray(config.stairs_down_ids, 

items3.itemid) == TRUE then
                    doSendAnimatedText(maspos,"DOWN!", 

math.random(1,255))
                    maspos.z = maspos.z+1
                    local changed = TRUE
                 end        
         end
         if changed == FALSE then        
         doSendAnimatedText(maspos,"Block", 

math.random(1,255))
         end
         if getdir == 1 then
         getdir = 3
         elseif getdir == 3 then
         getdir = 1
         elseif getdir == 0 then
         getdir = 2
         elseif getdir == 2 then
         getdir = 0
         end
         topos = getPosByDir(maspos, getdir)
         doSendMagicEffect(maspos,config.Efeito_block)
      else
          if Items.itemid ~= 0 then
             if isInArray(config.exclusoes, Items.itemid) == FALSE 

then
                doSendMagicEffect(maspos,config.Efeito_normal)
                local cor = math.random(1,255)
                addEvent(doSendAnimatedText, 

200,maspos,"Deleted",cor)
                doRemoveItem(Items.uid, -1)
                topos = maspos
             else
                topos = maspos
                doSendAnimatedText(maspos,"Ignore", 

math.random(1,255)) 
             end
          else
              if config.allowFloorChange == TRUE then
                 items2 = getThingfromPos({x = maspos.x, y = 

maspos.y ,z = maspos.z,stackpos=1})
                 items3 = getThingfromPos({x = maspos.x, y = 

maspos.y ,z = maspos.z,stackpos=0})
                 if isInArray(config.stairs_up_ids, items2.itemid) == 

TRUE then
                    doSendAnimatedText(maspos,"UP!", 

math.random(1,255))
                    maspos.z = maspos.z-1
                    local changed = TRUE
                 elseif isInArray(config.stairs_down_ids, 

items3.itemid) == TRUE then
                    doSendAnimatedText(maspos,"DOWN!", 

math.random(1,255))
                    maspos.z = maspos.z+1
                    local changed = TRUE
                 end        
              end
              topos = maspos
          end
      end
      if math.random(1,2) == 1 and config.Allow_Bombs == 

TRUE then
         doCleanArea(topos, config.exclusoes,config)
      end
      doSendMagicEffect(maspos,config.Efeito_normal)
      addEvent(andar,  config.velocidade, topos,cento,config)
end

function onUse(cid, item, frompos, item2, topos)
         if getPlayerGroupId(cid) > 3 then
            local cento = topos
            addEvent(andar,  config.velocidade, 

topos,cento,config)
            return true
         else
             return false
         end
end
 
You have just removed comments...

and it dont causes lag.
 

Similar threads

Back
Top