Ir para conteúdo
  • 0

[Resvoldido](luaGetThingPosition) Thing not found


diarmaint

Pergunta

Galera, quando eu mato um monstro com x magia dá esse erro na disto, como revolver?

Spoiler

[Error - Spell Interface]
In a timer event called from:
data/spells/scripts/lee/kage buyo.lua:onCastSpell
Description:
(luaGetThingPosition) Thing not found

[Error - Spell Interface]
In a timer event called from:
data/spells/scripts/lee/kage buyo.lua:onCastSpell
Description:
data/spells/scripts/lee/kage buyo.lua:34: attempt to index local 'pos2' (a boolean value)
stack traceback:
        data/spells/scripts/lee/kage buyo.lua:34: in function <data/spells/scripts/lee/kage buyo.lua:31>

kage buyo.lua

Spoiler

local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)

--setCombatParam(combat, COMBAT_PARAM_EFFECT, 40)
setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -2.0, 0, -2.1, 0)

local combat2 = createCombatObject()
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)

--setCombatParam(combat, COMBAT_PARAM_EFFECT, 64)
setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -1.0, 0, -1.1, 0)

local function onCastSpell1(parameters)
    doCombat(parameters.cid, parameters.combat1, parameters.var)
end

local function onCastSpell2(parameters)
    doCombat(parameters.cid, parameters.combat2, parameters.var)
end

function karraw1(cid)   
local target = getCreatureTarget(cid)
local pos2 = getPlayerPosition(target) 
pos2.x=pos2.x+1
pos2.y=pos2.y+1
doSendMagicEffect(pos2,64)
 return doCombat(cid, combat2, numberToVariant(cid))

end

function karraw0(cid)   
local target = getCreatureTarget(cid)
local pos2 = getPlayerPosition(target) 
pos2.x=pos2.x+1
pos2.y=pos2.y+1
doSendMagicEffect(pos2,40)
return doCombat(cid, combat1, numberToVariant(cid))

end
function onCastSpell(cid, var)
local waittime = 2 -- Tempo de exhaustion
local storage = 115819
if exhaustion.check(cid, storage) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Aguarde " .. exhaustion.get(cid, storage) .. " segundos para usar a spell novamente.")
return false
end
if getPlayerSkillLevel(cid,SKILL_AXE) < 45 then
 return 
 doPlayerSendCancel(cid, "Need taijutsu skill 45.")
 end
local parameters = { cid = cid, var = var, combat1 = combat1, combat2 = combat2, combat3 = combat3, combat4 = combat4, combat5 = combat5 }

if isCreature(cid) then
addEvent(karraw1, 0,cid)   
addEvent(karraw0, 300, cid)   
addEvent(onCastSpell1, 0, parameters)  
addEvent(onCastSpell2, 300, parameters)   
end

exhaustion.set(cid, storage, waittime)
return true

end

 

Editado por diarmaint
Link para o comentário
Compartilhar em outros sites

2 respostass a esta questão

Posts Recomendados

×
×
  • Criar Novo...