Ir para conteúdo
Banner com Efeitos

Featured Replies

Postado

.Qual servidor ou website você utiliza como base? 

8.60 0.4 rev 3777

Qual o motivo deste tópico? 

Estou com um erro na spells, mas apenas quando ataco monstros.

Está surgindo algum erro? Se sim coloque-o aqui. 

Citar

[12:11:51.514] [Error - Spell Interface]
[12:11:51.516] In a timer event called from:
[12:11:51.517] data/spells/scripts/attack/Stardust Breaker.lua:onCastSpell
[12:11:51.517] Description:
[12:11:51.518] (luaGetThingPosition) Thing not found

[12:11:51.519] [Error - Spell Interface]
[12:11:51.520] In a timer event called from:
[12:11:51.520] data/spells/scripts/attack/Stardust Breaker.lua:onCastSpell
[12:11:51.521] Description:
[12:11:51.522] data/spells/scripts/attack/Stardust Breaker.lua:23: attempt to index a boolean value
[12:11:51.523] stack traceback:
[12:11:51.523]  data/spells/scripts/attack/Stardust Breaker.lua:23: in function <data/spells/scripts/attack/Stardust Breaker.lua:21>

 

Você tem o código disponível? Se tiver publique-o aqui: 

 local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_HITCOLOR, COLOR_YELLOW)
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat1, COMBAT_PARAM_DISTANCEEFFECT, 125)
setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -4.4, 1, -4.5, 1)

local function onCastSpell1(parameters)
doCombat(parameters.cid, parameters.combat1, parameters.var)
end
 
function onCastSpell(cid, var)
local position1 = {x=getThingPosition(getCreatureTarget(cid)).x+2, y=getThingPosition(getCreatureTarget(cid)).y+1, z=getThingPosition(getCreatureTarget(cid)).z}
doSendMagicEffect(position1, 310)
return doCombat(cid, combat1, var)
end

function onCastSpell(cid, var)
local parameters = {cid = cid, var = var, combat1 = combat1}

for k = 1, 4 do
	addEvent(function()
		if isCreature(cid) then
		local position1 = {x=getThingPosition(getCreatureTarget(cid)).x+2, y=getThingPosition(getCreatureTarget(cid)).y+1, z=getThingPosition(getCreatureTarget(cid)).z}
doSendMagicEffect(position1, 310)
			addEvent(onCastSpell1, 0, parameters)
		end
	end, 1 + ((k-1) * 275))
end
return true
end

 

Você tem alguma imagem que possa auxiliar no problema? Se sim, coloque-a aqui. 

 

Postado

USSA ESSE MELHOR:

local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_HITCOLOR, 210)
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat1, COMBAT_PARAM_DISTANCEEFFECT, 125)
setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -4.4, 1, -4.5, 1)



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

function SPELL(cid) -- <<< FUNCAO
	if isCreature(cid) and isCreature(getCreatureTarget(cid)) then
		local position = {x=getThingPosition(getCreatureTarget(cid)).x+2, y=getThingPosition(getCreatureTarget(cid)).y+1, z=getThingPosition(getCreatureTarget(cid)).z}
		doSendMagicEffect(position, 310)
	end
end





function onCastSpell(cid, var)
local waittime = 1 -- Tempo de exhaustion
local storage = 3 -- não mecha
if exhaustion.check(cid, storage) then
   doPlayerSendCancel(cid, "Usted esta cansado.")
doSendMagicEffect(getCreaturePosition(cid), 2)
    return false
end
local parameters = {cid = cid, var = var, combat1 = combat1 , combat2 = combat2}
for i = 1, 4 do
	addEvent(function()
		if isCreature(cid) then
		addEvent(onCastSpell1, 100, parameters)
			addEvent(SPELL,100,cid)
		
		end
	end, 1 + ((i-1) * 275))
end
exhaustion.set(cid, storage, waittime)
return true
end

 

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.7k

Informação Importante

Confirmação de Termo