Boa tarde.
Eu pedi um mod na epoca (de fazer com que ao usar uma spell, ela daria tipo um buff que caso o jogador ficasse com 0 de HP ele retornaria ao HP Full sem morrer durante determinado tempo... E que precisasse de um item para usar essa spell), mas infelizmente esse mod não está mais pegando e está dando um erro:
(luaSetCombatCondition) Combat not found
[Error - Spell Interface]
data/spells/scripts/Pets/nejispell.lua
Description:
> Loading SpellLife.xml...mods/SpellLife.xml:6: parser error : Input is not prop
er UTF-8, indicate encoding !
Bytes: 0xE7 0xE3 0x6F 0x20
vocationIds = {76}, -- quais vocaþÒo pode usar
^
[Error - ScriptingManager::loadFromXml] Cannot load mod mods/SpellLife.xml
Line: 6, Info: Input is not proper UTF-8, indicate encoding !
Bytes: 0xE7 0xE3 0x6F 0x20
failed!
> Loading tradelogs.xml... done.
> 16 mods were loaded (3 disabled).
Alguém saberia como resolver?
OBS: O tópico que eu pedi é esse
Na epoca pegou, agora está com esse erro não sei porque.
OBS: O mod é esse:
<?xml version="1.0" encoding="UTF-8"?>
<mod name="SpellLife" enabled="yes" author="Miiller" forum="XTibia.com">
<!-- Configs and Functions -->
<config name="SpellLifeConfig"><![CDATA[
config = {
vocationIds = {76}, -- quais vocação pode usar
level = 100, -- que level é preciso para usar
cooldownSeconds = 60, -- quantos segundos é preciso esperar para usar novamente
emptyStorage = 54154, -- uma storage que não esteja sendo usada no seu servidor
otherEmptyStorage = 54155, -- outra storage que não esteja sendo usada no seu servidor
durationSeconds = 10, -- quanto tempo durara a spell
effect = 10 -- qual efeito mostrara conforme esta sobre o efeito da spell
}
function startSpellLife(cid, seconds)
if not isCreature(cid) then return true end
if seconds == config.durationSeconds then doPlayerSetStorageValue(cid, config.emptyStorage, 1) end
if getPlayerStorageValue(cid, config.emptyStorage) == -1 then
doSendMagicEffect(getThingPos(cid), CONST_ME_POFF)
return true
end
if seconds == 0 then
doPlayerSetStorageValue(cid, config.emptyStorage, -1)
return true
end
doSendMagicEffect(getThingPos(cid), config.effect)
addEvent(startSpellLife, 1000, cid, seconds-1)
end
]]></config>
<!-- configure abaixo o id do item -->
<action itemid="8302" event="script"><![CDATA[
domodlib('SpellLifeConfig')
function onUse(cid, item, fromPosition, itemEx, toPosition)
if not isInArray(config.vocationIds, getPlayerVocation(cid)) then
return doPlayerSendCancel(cid, "Sua vocação não pode usar esta spell.")
end
if getPlayerLevel(cid) < config.level then
return doPlayerSendCancel(cid, "É necessário level " .. config.level .. " para usar esta spell.")
end
if exhaustion.check(cid, config.otherEmptyStorage) then
return doPlayerSendCancel(cid, "É necessário esperar " .. config.cooldownSeconds .. " segundos para usar esta spell novamente.")
end
exhaustion.set(cid, config.otherEmptyStorage, config.cooldownSeconds)
startSpellLife(cid, config.durationSeconds)
doRemoveItem(item.uid, 1)
return true
end
]]></action>
<creaturescript type="statschange" name="SpellLife" event="script"><![CDATA[
domodlib('SpellLifeConfig')
function onStatsChange(cid, attacker, type, combat, value)
if type == STATSCHANGE_HEALTHLOSS then
if getCreatureHealth(cid) - value <= 0 then
if getPlayerStorageValue(cid, config.emptyStorage) == 1 then
doCreatureAddHealth(cid, getCreatureMaxHealth(cid))
doPlayerSetStorageValue(cid, config.emptyStorage, -1)
return false
end
end
end
return true
end
]]></creaturescript>
<creaturescript type="login" name="SpellLifeLogin" event="script"><![CDATA[
function onLogin(cid)
registerCreatureEvent(cid, "SpellLife")
return true
end
]]></creaturescript>
</mod>