Postado Fevereiro 26, 2016 9 anos Wolf, eu uso a sua lib, dai editei nela mesmo a parte do if n < hits and #possible > 1 then mas n tem erro na distro, peculiar, e eu testei as duas formas ( com lib e sem lib).
Postado Janeiro 12, 2019 6 anos 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 Janeiro 12, 2019 6 anos por lusgo (veja o histórico de edições)
Postado Janeiro 14, 2019 6 anos Autor @lusgo você tem a source do seu sv? se não tiver tenta getPlayerMana, se tiver vai em luascript.cpp e dá ctrl + f em Mana para ver as funções.
Postado Setembro 3, 2020 4 anos 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 Setembro 3, 2020 4 anos 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.