Ir para conteúdo
  • 0

Pergunta

4 respostass a esta questão

Posts Recomendados

  • 0

local config = {

rate = 2, -- 4x More Experience

storage = 21002

}

local function endExpRate(cid)

if isPlayer(cid) == TRUE then

doPlayerSetRate(cid, SKILL__LEVEL, 1) -- config.lua rate

setPlayerStorageValue(cid, config.storage, -1)

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "O efeito da Double Exp Potion acabou!")

end

end

function onLogin(cid)

local str = getPlayerStorageValue(cid, config.storage)

if(str >= 0 and (str - os.time()) > 0) then

doPlayerSetRate(cid, SKILL__LEVEL, config.rate)

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "O efeito da Double Exp Potion acaba às: " .. os.date("%X", str))

addEvent(endExpRate, (str - os.time()) * 1000, cid)

else

doPlayerSetRate(cid, SKILL__LEVEL, 1) -- config.lua rate

setPlayerStorageValue(cid, config.storage, -1)

end

return TRUE

end

Link para o comentário
https://xtibia.com/forum/topic/187693-erro-em-creaturescript-potionxp/#findComment-1275891
Compartilhar em outros sites

Visitante
Este tópico está impedido de receber novos posts.
×
×
  • Criar Novo...