Boa tarde, estou com um erro no meu servidor, tenho um mod de "bless"
que quando o player morre de "!bless" ele nao perde nada de EXP, porem quando ele morre de "aol" ou sem a "bless" ele perde EXP normal.
Citar<?xml version="1.0" encoding="ISO-8859-1"?>
<mod name="bless-system" version="1.0" author="slawkens" contact="slawkens@gmail.com" enabled="yes"><config name="bless-system-config"><![CDATA[
blessSystem = {}
blessSystem.config = {
baseCost = 2000,
levelCost = 50,
startLevel = 8,
endLevel = 100
}blessSystem.needPremium = getBooleanFromString(getConfigValue('blessingsOnlyPremium'))
]]></config><lib name="bless-system-lib"><![CDATA[
domodlib('bless-system-config')function blessSystem.buyAllBlessings(cid)
local price = blessSystem.config.baseCost
if(getPlayerLevel(cid) > blessSystem.config.startLevel) then
price = (price + ((math.min(blessSystem.config.endLevel, getPlayerLevel(cid)) - blessSystem.config.startLevel) * blessSystem.config.levelCost))
endprice = price * 5 * 1.2
if(blessSystem.needPremium and not isPremium(cid)) then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You need a premium account to use blessings.")
return false
endfor i = 1, 5 do
if(getPlayerBlessing(cid, i)) then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você já possui Bless!")
return false
end
endif(not doPlayerRemoveMoney(cid, price)) then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você não tem dinheiro para Bless, Você precisa de " .. price .. " gp's)")
return false
endfor i = 1, 5 do
doPlayerAddBlessing(cid, i)
enddoPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Você acaba de receber a benção de Deus!")
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_BIGCLOUDS)
return true
end
]]></lib><talkaction words="!blesscheck;!blesstest" event="script"><![CDATA[
domodlib('bless-system-config')local blessNames = {"Primeira", "Segunda", "Terceira", "Quarta", "Quinta"}
function onSay(cid, words, param)
local str = ""
local b = 0
for i = 1, 5 do
if(getPlayerBlessing(cid, i)) then
if(b ~= 0) then
str = str .. ", "
end
str = str .. blessNames
b = b + 1
end
endif(b > 0) then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você possui a, " .. str .. " BENÇÃ" .. (b > 0 and "O" or "") .. ". (Total: " .. b .. ")")
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você não possui nenhuma Bless.")
end
return TRUE
end
]]></talkaction><talkaction words="!bless" event="script"><![CDATA[
domodlib('bless-system-config')
domodlib('bless-system-lib')function onSay(cid, words, param, channel)
blessSystem.buyAllBlessings(cid)
return true
end
]]></talkaction><action uniqueid="32001" event="script"><![CDATA[
domodlib('bless-system-config')
domodlib('bless-system-lib')function onUse(cid, item, fromPosition, itemEx, toPosition)
blessSystem.buyAllBlessings(cid)
return true
end
]]></action></mod>
bug resolvido