então pessoal no meu servidor que pretendo abrir fis um sistema de reset por elixir o berseker potion mais eu fis tudo correto eu acho esse elixir esta para resetar o player no level 510 pessoal é asim: chegando ao level 510 na segunda vocaçao o player vai ate : Edron e na casa de magia da Isolda e vai la e fala hi,reset,first reset,yes ai ele ganha a berseker potion que no caso se chama: Elixir of reset bem se vocês entenderão irei postar o script para vocês verem e tentarem arrumar para min eu tentei fazer a elixir ao inves de ganhar "EXP" abachar o level do 510 ao 8.
local condition = createConditionObject(CONDITION_ENERGY)
setConditionParam(condition, CONDITION_PARAM_DELAYED, 1)
addDamageCondition(condition, 0, 0, 0)
function onUse(cid, item, frompos, item2, topos)
EXP2 = math.random(9999999,9999999)
EXP3 = math.random(9999999,9999999)
EXP4 = math.random(9999999,9999999)
EXP5 = math.random(9999999,9999999)
EXP6 = math.random(9999999,9999999)
EXP7 = math.random(9999999,9999999)
EXP8 = math.random(9999999,9999999)
EXP9 = math.random(9999999,9999999)
EXP10 = math.random(9999999,9999999)
if getPlayerLevel(cid) <= 509 then
doPlayerSendTextMessage(cid,20,'Desculpe, você não tem nivel suficiente e sua alma não esta livre para vendela.')
elseif getPlayerSoul(cid) >= 250 then
PlayerLevel = getPlayerLevel(cid)
if PlayerLevel < 509 then
doPlayerRemoveExp(cid,EXP2)
doTargetCombatCondition(0, cid, condition, CONST_ME_MAGIC_RED)
doPlayerSendTextMessage(cid,20,'you downgrade level 510 to level 8.')
doSendAnimatedText(getPlayerPosition(cid),EXP2, 179)
doPlayerAddSoul(cid,-250)
doRemoveItem(item.uid,1)
elseif PlayerLevel < 509 then
doPlayerRemoveExp(cid,EXP3)
doTargetCombatCondition(0, cid, condition, CONST_ME_MAGIC_RED)
doPlayerSendTextMessage(cid,20,'you downgrade level 510 to level 8.')
doSendAnimatedText(getPlayerPosition(cid),EXP3, 179)
doPlayerAddSoul(cid,-250)
doRemoveItem(item.uid,1)
elseif PlayerLevel < 509 then
doPlayerRemoveExp(cid,EXP4)
doTargetCombatCondition(0, cid, condition, CONST_ME_MAGIC_RED)
doPlayerSendTextMessage(cid,20,'you downgrade level 510 to level 8.')
doSendAnimatedText(getPlayerPosition(cid),EXP4, 179)
doPlayerAddSoul(cid,-250)
doRemoveItem(item.uid,1)
elseif PlayerLevel < 509 then
doPlayerRemoveExp(cid,EXP5)
doTargetCombatCondition(0, cid, condition, CONST_ME_MAGIC_RED)
doPlayerSendTextMessage(cid,20,'you downgrade level 510 to level 8.')
doSendAnimatedText(getPlayerPosition(cid),EXP5, 179)
doPlayerAddSoul(cid,-250)
doRemoveItem(item.uid,1)
elseif PlayerLevel < 509 then
doPlayerRemoveExp(cid,EXP6)
doTargetCombatCondition(0, cid, condition, CONST_ME_MAGIC_RED)
doPlayerSendTextMessage(cid,20,'you downgrade level 510 to level 8.')
doSendAnimatedText(getPlayerPosition(cid),EXP6, 179)
doPlayerAddSoul(cid,-250)
doRemoveItem(item.uid,1)
elseif PlayerLevel < 509 then
doPlayerRemoveExp(cid,EXP7)
doTargetCombatCondition(0, cid, condition, CONST_ME_MAGIC_RED)
doPlayerSendTextMessage(cid,20,'you downgrade level 510 to level 8.')
doSendAnimatedText(getPlayerPosition(cid),EXP7, 179)
doPlayerAddSoul(cid,-250)
doRemoveItem(item.uid,1)
elseif PlayerLevel < 509 then
doPlayerRemoveExp(cid,EXP8)
doTargetCombatCondition(0, cid, condition, CONST_ME_MAGIC_RED)
doPlayerSendTextMessage(cid,20,'you downgrade level 510 to level 8.')
doSendAnimatedText(getPlayerPosition(cid),EXP8, 179)
doPlayerAddSoul(cid,-250)
doRemoveItem(item.uid,1)
elseif PlayerLevel < 509 then
doPlayerRemoveExp(cid,EXP9)
doTargetCombatCondition(0, cid, condition, CONST_ME_MAGIC_RED)
doPlayerSendTextMessage(cid,20,'you downgrade level 510 to level 8.')
doSendAnimatedText(getPlayerPosition(cid),EXP9, 179)
doPlayerAddSoul(cid,-250)
doRemoveItem(item.uid,1)
elseif PlayerLevel < 509 then
doPlayerRemoveExp(cid,EXP10)
doTargetCombatCondition(0, cid, condition, CONST_ME_MAGIC_RED)
doPlayerSendTextMessage(cid,20,'you downgrade level 510 to level 8.')
doSendAnimatedText(getPlayerPosition(cid),EXP10, 179)
doPlayerAddSoul(cid,-250)
doRemoveItem(item.uid,1)
end
else
doPlayerSendTextMessage(cid,20,'Desculpe, você não tem número de nivel e de almas suficiente.')
end
end
eu acho que o erro esta nesta frase "doPlayerRemoveExp(cid,EXP10)" mais eu tentei de todo jeito trocar eu não sei um codigo que ao inves de dar exp retirea a experiencia e abache o level quem me ajuda eu estarei sendo muito grato