Alguém pode me ajudar nesse script? é uma magia de fear, porém quando não tem sqms para andar, ou seja SQMS VOIDS no caso de um telhado, os arredores do telhado ta dando esse bug, por nao ter caminho para andar,
[16:11:49.995] [Error - Spell Interface][16:11:49.998] In a timer event called from:[16:11:49.999] (Unknown script file)[16:11:50.000] Description:[16:11:50.001] (luaDoTileQueryAdd) Tile not found
info
Grupo: Visconde
Registrado: 26/04/08
Posts: 251
Reputação: +36
Gênero: Masculino
Char no Tibia: Senhor Mithril
Alguém pode me ajudar nesse script? é uma magia de fear, porém quando não tem sqms para andar, ou seja SQMS VOIDS no caso de um telhado, os arredores do telhado ta dando esse bug, por nao ter caminho para andar,
segue o script
local spell = {}spell.config = { [1] = { damageType = 1, areaEffect = 2, area = {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},{0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},{0, 0, 0, 1, 1, 2, 1, 1, 0, 0, 0},{0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},} }} local function fear(cid) if isPlayer(cid) or isMonster(cid) thenlocal cpos = getCreaturePosition(cid)local dir = {}if queryTileAddThing(cid, {x=cpos.x,y=cpos.y-1,z=cpos.z}) == 1 thentable.insert(dir, NORTH)endif queryTileAddThing(cid, {x=cpos.x-1,y=cpos.y,z=cpos.z}) == 1 thentable.insert(dir, WEST)endif queryTileAddThing(cid, {x=cpos.x,y=cpos.y+1,z=cpos.z}) == 1 thentable.insert(dir, SOUTH)endif queryTileAddThing(cid, {x=cpos.x+1,y=cpos.y,z=cpos.z}) == 1 thentable.insert(dir, EAST)endif #dir > 0 thendoMoveCreature(cid, dir[math.random(1,#dir)])endendend spell.combats = {}for _, config in ipairs(spell.config) do local combat = createCombatObject()setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_DROWNDAMAGE)setCombatParam(combat, COMBAT_PARAM_EFFECT, 2)setCombatParam(combat, COMBAT_PARAM_HITCOLOR, 180)function onGetFormulaValues(cid, level, skill, attack, factor) local skillTotal, levelTotal = skill + attack, level / 5 return -(skillTotal * 2 + levelTotal), -(skillTotal * 2 + levelTotal)endsetCombatCallback(combat, CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues") function onTargetTile(cid, pos)Onrand(cid, pos)endsetCombatCallback(combat, CALLBACK_PARAM_TARGETTILE, "onTargetTile") function onTargetCreature(cid, target)if getClosestFreeTile(cid, getPlayerPosition(cid)) thenlocal position = getThingPos(cid)local distance = 6for i = 0, distance doaddEvent(fear,500*i,target)doSendMagicEffect(getThingPos(target), 31)endlocal parameters = {cid = cid, var = var}end end setCombatCallback(combat, CALLBACK_PARAM_TARGETCREATURE, "onTargetCreature") setCombatArea(combat, createCombatArea(config.area)) table.insert(spell.combats, combat)endlocal config = { gatesTime = 20, -- tempo em segundos exhaustStorage = 41000, exhaustTime = 0.9,} local volta = createCombatArea{ {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} } local combat32 = createCombatObject() function onCastSpell(cid, var) for n = 1, #spell.combats do addEvent(doCombat, (n * 150) - 150, cid, spell.combats[n], var) end return doCombat(cid, combat32, var)enderror
[16:11:49.995] [Error - Spell Interface][16:11:49.998] In a timer event called from:[16:11:49.999] (Unknown script file)[16:11:50.000] Description:[16:11:50.001] (luaDoTileQueryAdd) Tile not found