Ir para conteúdo

Featured Replies

Postado

Bom, ao decorrer do dia percebi esse erro no distro \/ que e relacionado ao script da double exp potion q estou usando no meu servidor, teria como me ajudar arrumar ?

OBS: Inicialmente não da erro nenhum no distro.

 

Citar

[27/12/2015 20:33:36] [Error - CreatureScript Interface] 
[27/12/2015 20:33:36] mods/scripts/expstagescroll.lua:onThink
[27/12/2015 20:33:36] Description: 
[27/12/2015 20:33:36] mods/scripts/expstagescroll.lua:33: attempt to call global 'unregisterCreatureEvent' (a nil value)
[27/12/2015 20:33:36] stack traceback:
[27/12/2015 20:33:36]     mods/scripts/expstagescroll.lua:33: in function <mods/scripts/expstagescroll.lua:25>

 

Uso essas Script MODS:

 

Citar

local config = {  

    rate = 2, 
    storage = 1000, 
    expstorage = 1100, 
    register = 1200, 
    time = 1800, 
}  

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 == 9004 
        doCreatureSay(cid, "Your extra experience rate has been activated! It now is: " .. config.rate .. "x added to your former experience rate.", 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, "You must finish first exp condition to start other exp condition !", 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, "Your extra experience rate has finished! It is now normaly experience rate.", 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, "Your extra experience rate is still here! It is: " .. config.rate .. "x added to your former experience rate.", 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

 

  • Respostas 7
  • Visualizações 546
  • Created
  • Última resposta

Top Posters In This Topic

  • Wakon unlocked this tópico
  • 4 weeks later...

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.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo