Postado Setembro 21, 2016 8 anos Alguém Poderia Ajudar estou com 1 mod de doublexp esta com 1 erro quando desloga ou morre perde o beneficio eu queria que não perdesse esta aqui os aquivos. expscroll.xml Spoiler <?xml version="1.0" encoding="UTF-8"?> <mod name="Experience Stages Scroll" version="1.0" author="TomCrusher" contact="otland.net" enabled="yes"> <action itemid="7443" event="script" value="expstagescroll.lua"/> <creatureevent type="think" name="ExpStage" event="script" value="expstagescroll.lua"/> <creatureevent type="login" name="ExpStageLogin" event="script" value="expstagescroll.lua"/> </mod> expstagescroll.lua Spoiler local config = { rate = 2, storage = 1000, expstorage = 1100, register = 1200, time = 3600, } function onUse(cid, item, fromPosition, itemEx, toPosition) if getPlayerStorageValue(cid, config.storage) <= 0 then local rates = getPlayerRates(cid) setPlayerStorageValue(cid, config.expstorage, rates[SKILL__LEVEL]) setPlayerStorageValue(cid, config.register, 1) itemEx=itemid == 7443 doCreatureSay(cid, "Voce esta com o Double Exp ativo: " .. config.rate .. "x adicionado.", TALKTYPE_ORANGE_1, true, cid) setPlayerStorageValue(cid, config.storage, os.time()+config.time) doPlayerSetExperienceRate(cid, rates[SKILL__LEVEL]*config.rate) doRemoveItem(item.uid,1) registerCreatureEvent(cid, "ExpStage") else doCreatureSay(cid, "Para ativar outro Double Exp Aguarde acabar primeiro !", TALKTYPE_ORANGE_1, true, cid) end return true end function onThink(cid, interval) if getPlayerStorageValue(cid, config.register) == 1 then if getPlayerStorageValue(cid, config.storage) <= os.time() then doCreatureSay(cid, "Sua Double Exp Acabou agora sua experiencia volta ao normal.", TALKTYPE_ORANGE_1, true, cid) setPlayerStorageValue(cid, config.storage, 0) setPlayerStorageValue(cid, config.register, 0) local oldexp = getPlayerStorageValue(cid, config.expstorage) doPlayerSetExperienceRate(cid, oldexp) unregisterCreatureEvent(cid, "ExpStage") end end return true end function onLogin(cid) if getPlayerStorageValue(cid, config.register) == 1 then registerCreatureEvent(cid, "ExpStage") local rates = getPlayerRates(cid) doCreatureSay(cid, "Voce esta com o Double Exp ativo: " .. config.rate .. "x adicionado.", TALKTYPE_ORANGE_1, true, cid) if getPlayerStorageValue(cid, config.storage) > os.time() then local oldexp = getPlayerStorageValue(cid, config.expstorage) doPlayerSetExperienceRate(cid, oldexp+config.rate) end 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.