Ir para conteúdo

Featured Replies

  • 2 years later...
  • Respostas 48
  • Visualizações 7.3k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • level + ml dividido por 5, soma todas as skills e soma mana/1000. Dai dps disso divide tudo por 3. Você pode mudar a hr que quiser

  • troca a linha 21 por isso daqui:   hits = math.ceil(getPlayerMagLevel(cid)/10) - (math.random(0, (math.ceil(getPlayerMagLevel(cid)/10))) - 1) e a linha 29 por isso:   if math.random(1, 10) &lt

  • eu coloquei 3 porque eu fiz testes e achei a melhor configuração, mas vc pode editar pela lib procurando a função doBlast e alterando na parte em que está: for j = -3, 3 do     for k = -3, 3 do colo

Postado

Em OTX da esse erro.

Lua Script Error: [Spell Interface]
data/spells/scripts/chainlight.lua:onCastSpell
data/spells/scripts/chainlight.lua:9: attempt to call global 'getCreatureMana' (a nil value)
stack traceback:
        [C]: in function 'getCreatureMana'
        data/spells/scripts/chainlight.lua:9: in function <data/spells/scripts/chainlight.lua:8>

Poderia me ajudar a substituir pelas funções corretas, por favor?

Editado por lusgo (veja o histórico de edições)

  • 1 year later...
Postado

Ta dando esse erro:

 

[3/9/2020 15:32:52] [Error - Spell Interface] 
[3/9/2020 15:32:52] data/spells/scripts/especial/chainlightning.lua:onCastSpell
[3/9/2020 15:32:52] Description: 
[3/9/2020 15:32:52] data/spells/scripts/especial/chainlightning.lua:22: attempt to call global 'doBlast' (a nil value)
[3/9/2020 15:32:52] stack traceback:
[3/9/2020 15:32:52]     data/spells/scripts/especial/chainlightning.lua:22: in function <data/spells/scripts/especial/chainlightning.lua:8>

Postado
  • Autor
  Em 03/09/2020 em 18:33, Vorkhon disse:

Ta dando esse erro:

 

[3/9/2020 15:32:52] [Error - Spell Interface] 
[3/9/2020 15:32:52] data/spells/scripts/especial/chainlightning.lua:onCastSpell
[3/9/2020 15:32:52] Description: 
[3/9/2020 15:32:52] data/spells/scripts/especial/chainlightning.lua:22: attempt to call global 'doBlast' (a nil value)
[3/9/2020 15:32:52] stack traceback:
[3/9/2020 15:32:52]     data/spells/scripts/especial/chainlightning.lua:22: in function <data/spells/scripts/especial/chainlightning.lua:8>

Adiciona essa função no inicio do script:

 

function doBlast(uid, target, delay, effectx, effectz, percent, min, max, type, hits, fromPos, n)
	if fromPos ~= nil and (fromPos.x ~= getCreaturePosition(target).x or fromPos.y ~= getCreaturePosition(target).y) then
		doSendDistanceShoot(fromPos, getCreaturePosition(target), effectx)
		fromPos = (fromPos.x ~= getCreaturePosition(target).x or fromPos.y ~= getCreaturePosition(target).y) and getCreaturePosition(target) or nil
	else
		fromPos = getCreaturePosition(target)
	end	
doTargetCombatHealth(uid, target, type, -min, -max, effectz)
n = n or 1
if math.random(1, 10) <= (percent/10) then
	possible = {}
	for j = -3, 3 do
	for k = -3, 3 do
		middlePos = {x = getCreaturePosition(target).x + j, y = getCreaturePosition(target).y + k, z = getCreaturePosition(target).z, stackpos = 253}
		if isWalkable(middlePos, false, true, true) then
			creature = getTopCreature(middlePos).uid		
			if creature > 0 then
				table.insert(possible, creature)
			end
		end
	end
	end		
	target = #possible > 0 and possible[math.random(#possible)] or target
end		
if n < hits then
	addEvent(function()
	if isCreature(uid) and isCreature(target) then
		doBlast(uid, target, delay, effectx, effectz, percent, min, max, type, hits, fromPos, (n + 1))
	end
	end, delay)
end
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.6k

Informação Importante

Confirmação de Termo