Ir para conteúdo
  • 0

Alguém sabe resolver??


mrlhsl

Pergunta

Então pessoal essa magia do sasuke tá dando esse erro e tá travando o servidor quando usada muitas vezes alguém sabe resolver?

 

segue a imagem

 

 

erro spell.png

 

outro erro acabei de achar: 
[13/01/2017 14:50:39] [Error - Spell Interface] 
[13/01/2017 14:50:39] data/spells/scripts/sasuke/kirin1.lua:onCastSpell
[13/01/2017 14:50:39] Description: 
[13/01/2017 14:50:39] (luaAddEvent) Callback parameter should be a function.

 

587905ffc2e7c_errospell.thumb.png.2f650ae576ce929e8d38dc9603b90b90.png

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

5 respostass a esta questão

Posts Recomendados

  • 0
Agora, luciano0223 disse:

Mande o q tem dentro de magia1.lua, amigo

 

Spoiler

local combat1 = createCombatObject()

setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -4.2, 1, -4.2, 1)

arr1 = {

    {3}

}

local area1 = createCombatArea(arr1)

setCombatArea(combat1, area1)

 

local function onCastSpell1(parameters)

    return isPlayer(parameters.cid) and doCombat(parameters.cid, combat1, parameters.var)

end

function magic12706(cid)

local effect = 46

local position2 = {x=getThingPosition(getCreatureTarget(cid)).x+1, y=getThingPosition(getCreatureTarget(cid)).y, z=getThingPosition(getCreatureTarget(cid)).z}

doSendMagicEffect(position2, effect)  

        end

function magic12707(cid)

local effect = 46

local position1 = {x=getThingPosition(getCreatureTarget(cid)).x+1, y=getThingPosition(getCreatureTarget(cid)).y, z=getThingPosition(getCreatureTarget(cid)).z}

doSendMagicEffect(position1, effect)  

        end

function magic12708(cid)

local effect = 174

local position3 = {x=getThingPosition(getCreatureTarget(cid)).x+2, y=getThingPosition(getCreatureTarget(cid)).y, z=getThingPosition(getCreatureTarget(cid)).z}

doSendMagicEffect(position3, effect)  

        end

function onCastSpell(cid, var)

local waittime = 1.8 -- Tempo de exhaustion

local storage = 1158001

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

local parameters = { cid = cid, var = var}

addEvent(onCastSpell1, 0, parameters)

addEvent(onCastSpell1, 400, parameters)

addEvent(onCastSpell1, 800, parameters)

addEvent(onCastSpell1, 1200, parameters)

addEvent(onCastSpell1, 1600, parameters)

addEvent(onCastSpell1, 2000, parameters)

addEvent(magic12706,0,cid)

addEvent(magic12707,0,cid)

addEvent(magic12708,0,cid)

addEvent(magic12706,400,cid)

addEvent(magic12707,400,cid)

addEvent(magic12708,400,cid)

addEvent(magic12706,800,cid)

addEvent(magic12707,800,cid)

addEvent(magic12708,800,cid)

addEvent(magic12706,1200,cid)

addEvent(magic12707,1200,cid)

addEvent(magic12708,1200,cid)

addEvent(magic12706,1600,cid)

addEvent(magic12707,1600,cid)

addEvent(magic12708,1600,cid)

addEvent(magic12706,2000,cid)

addEvent(magic12707,2000,cid)

addEvent(magic12708,2000,cid)

exhaustion.set(cid, storage, waittime)

return TRUE

end

é isso e descobri que esse bug tá acontecendo com outros chars tbm não só essa em especifico se descobrir algo errado

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

  • 0

Tente agora

 



local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -4.2, 1, -4.2, 1)
arr1 = {
    {3}
}
local area1 = createCombatArea(arr1)
setCombatArea(combat1, area1)
 
local function onCastSpell1(parameters)
    return isPlayer(parameters.cid) and doCombat(parameters.cid, combat1, parameters.var)
end
function magic12706(cid)
local effect = 46
local position2 = {x=getThingPosition(getCreatureTarget(cid)).x+1, y=getThingPosition(getCreatureTarget(cid)).y, z=getThingPosition(getCreatureTarget(cid)).z}
doSendMagicEffect(position2, effect)  
        end
function magic12707(cid)
local effect = 46
local position1 = {x=getThingPosition(getCreatureTarget(cid)).x+1, y=getThingPosition(getCreatureTarget(cid)).y, z=getThingPosition(getCreatureTarget(cid)).z}
doSendMagicEffect(position1, effect)  
        end
function magic12708(cid)
local effect = 46
local position3 = {x=getThingPosition(getCreatureTarget(cid)).x+2, y=getThingPosition(getCreatureTarget(cid)).y, z=getThingPosition(getCreatureTarget(cid)).z}
doSendMagicEffect(position3, effect)  
        end
function onCastSpell(cid, var)
local waittime = 1.8 -- Tempo de exhaustion
local storage = 1158001
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
local parameters = { cid = cid, var = var}
addEvent(onCastSpell1, 0, parameters)
addEvent(onCastSpell1, 400, parameters)
addEvent(onCastSpell1, 800, parameters)
addEvent(onCastSpell1, 1200, parameters)
addEvent(onCastSpell1, 1600, parameters)
addEvent(onCastSpell1, 2000, parameters)
addEvent(magic12706,0,cid)
addEvent(magic12707,0,cid)
addEvent(magic12708,0,cid)
addEvent(magic12706,400,cid)
addEvent(magic12707,400,cid)
addEvent(magic12708,400,cid)
addEvent(magic12706,800,cid)
addEvent(magic12707,800,cid)
addEvent(magic12708,800,cid)
addEvent(magic12706,1200,cid)
addEvent(magic12707,1200,cid)
addEvent(magic12708,1200,cid)
addEvent(magic12706,1600,cid)
addEvent(magic12707,1600,cid)
addEvent(magic12708,1600,cid)
addEvent(magic12706,2000,cid)
addEvent(magic12707,2000,cid)
addEvent(magic12708,2000,cid)
exhaustion.set(cid, storage, waittime)
return TRUE
end


Link para o comentário
Compartilhar em outros sites

  • 0
3 minutos atrás, luciano0223 disse:

Tente agora

 

 

continua o erro :/

 

Spoiler

[13/01/2017 17:10:47] [Error - Spell Interface] 

[13/01/2017 17:10:47] In a timer event called from: 

[13/01/2017 17:10:47] data/spells/scripts/sasuke/magia1.lua:onCastSpell

[13/01/2017 17:10:48] Description: 

[13/01/2017 17:10:48] (luaGetThingPosition) Thing not found

[13/01/2017 17:10:48] [Error - Spell Interface] 

[13/01/2017 17:10:48] In a timer event called from: 

[13/01/2017 17:10:48] data/spells/scripts/sasuke/magia1.lua:onCastSpell

[13/01/2017 17:10:48] Description: 

[13/01/2017 17:10:48] data/spells/scripts/sasuke/magia1.lua:20: attempt to index a boolean value

[13/01/2017 17:10:48] stack traceback:

[13/01/2017 17:10:48]     data/spells/scripts/sasuke/magia1.lua:20: in function <data/spells/scripts/sasuke/magia1.lua:18>

[13/01/2017 17:10:49] [Error - Spell Interface] 

[13/01/2017 17:10:49] In a timer event called from: 

[13/01/2017 17:10:49] data/spells/scripts/sasuke/magia1.lua:onCastSpell

[13/01/2017 17:10:49] Description: 

[13/01/2017 17:10:49] (luaGetThingPosition) Thing not found

[13/01/2017 17:10:49] [Error - Spell Interface] 

[13/01/2017 17:10:49] In a timer event called from: 

[13/01/2017 17:10:49] data/spells/scripts/sasuke/magia1.lua:onCastSpell

[13/01/2017 17:10:49] Description: 

[13/01/2017 17:10:49] data/spells/scripts/sasuke/magia1.lua:25: attempt to index a boolean value

[13/01/2017 17:10:50] stack traceback:

[13/01/2017 17:10:50]     data/spells/scripts/sasuke/magia1.lua:25: in function <data/spells/scripts/sasuke/magia1.lua:23>

[13/01/2017 17:10:50] [Error - Spell Interface] 

[13/01/2017 17:10:50] In a timer event called from: 

[13/01/2017 17:10:50] data/spells/scripts/sasuke/magia1.lua:onCastSpell

[13/01/2017 17:10:50] Description: 

[13/01/2017 17:10:50] (luaGetThingPosition) Thing not found

[13/01/2017 17:10:50] [Error - Spell Interface] 

[13/01/2017 17:10:50] In a timer event called from: 

[13/01/2017 17:10:51] data/spells/scripts/sasuke/magia1.lua:onCastSpell

[13/01/2017 17:10:51] Description: 

[13/01/2017 17:10:51] data/spells/scripts/sasuke/magia1.lua:15: attempt to index a boolean value

[13/01/2017 17:10:51] stack traceback:

[13/01/2017 17:10:51]     data/spells/scripts/sasuke/magia1.lua:15: in function <data/spells/scripts/sasuke/magia1.lua:13>

 

 

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

  • 0

Não testei, mas testa ai

 

 

 

 

local combat1 = createCombatObject()setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -4.2, 1, -4.2, 1)arr1 = {    {3}}local area1 = createCombatArea(arr1)setCombatArea(combat1, area1) local function onCastSpell1(parameters)    return isPlayer(parameters.cid) and doCombat(parameters.cid, combat1, parameters.var)endfunction magic12706(parameters)if isPlayer(cid) thenlocal effect = 46local position2 = {x=getThingPosition(getCreatureTarget(cid)).x+1, y=getThingPosition(getCreatureTarget(cid)).y, z=getThingPosition(getCreatureTarget(cid)).z}doSendMagicEffect(position2, effect)  endendfunction magic12707(parameters)if isPlayer(cid) thenlocal effect = 46local position1 = {x=getThingPosition(getCreatureTarget(cid)).x+1, y=getThingPosition(getCreatureTarget(cid)).y, z=getThingPosition(getCreatureTarget(cid)).z}doSendMagicEffect(position1, effect)  endendfunction magic12708(parameters)if isPlayer(cid) thenlocal effect = 46local position3 = {x=getThingPosition(getCreatureTarget(cid)).x+2, y=getThingPosition(getCreatureTarget(cid)).y, z=getThingPosition(getCreatureTarget(cid)).z}doSendMagicEffect(position3, effect) end endfunction onCastSpell(cid, var)local waittime = 1.8 -- Tempo de exhaustionlocal storage = 1158001if exhaustion.check(cid, storage) thendoPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Aguarde " .. exhaustion.get(cid, storage) .. " segundos para usar a spell novamente.")return falseendlocal parameters = {cid = cid, var = var}addEvent(onCastSpell1, 0, parameters)addEvent(onCastSpell1, 400, parameters)addEvent(onCastSpell1, 800, parameters)addEvent(onCastSpell1, 1200, parameters)addEvent(onCastSpell1, 1600, parameters)addEvent(onCastSpell1, 2000, parameters)addEvent(magic12706,0,parameters)addEvent(magic12707,0,parameters)addEvent(magic12708,0,parameters)addEvent(magic12706,400,parameters)addEvent(magic12707,400,parameters)addEvent(magic12708,400,parameters)addEvent(magic12706,800,parameters)addEvent(magic12707,800,parameters)addEvent(magic12708,800,parameters)addEvent(magic12706,1200,parameters)addEvent(magic12707,1200,parameters)addEvent(magic12708,1200,parameters)addEvent(magic12706,1600,parameters)addEvent(magic12707,1600,parameters)addEvent(magic12708,1600,parameters)addEvent(magic12706,2000,parameters)addEvent(magic12707,2000,parameters)addEvent(magic12708,2000,parameters)exhaustion.set(cid, storage, waittime)return TRUEend

 

Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...