Ir para conteúdo

Featured Replies

Resolvido por Fir3element

Ir para solução
Postado
  • Autor

Meu Login adiciona pramin estou com duvida. :D

 

Mostrar conteúdo oculto

local config = {


loginMessage = getConfigValue('loginMessage'),
useFragHandler = getBooleanFromString(getConfigValue('useFragHandler'))
}

function onLogin(cid)
registerCreatureEvent(cid, "onPrepareDeath")
local loss = getConfigValue('deathLostPercent')
if(loss ~= nil) then
doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 10)
end

local accountManager = getPlayerAccountManager(cid)
if(accountManager == MANAGER_NONE) then
local lastLogin, str = getPlayerLastLoginSaved(cid), config.loginMessage
if(lastLogin > 0) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
str = "Sua ultima visita no servidor foi em " .. os.date("%a %b %d %X %Y", lastLogin) .. "."
else
str = str .. " Mude seu Outifit."
doPlayerSendOutfitWindow(cid)
end

doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
elseif(accountManager == MANAGER_NAMELOCK) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, it appears that your character has been namelocked, what would you like as your new name?")
elseif(accountManager == MANAGER_ACCOUNT) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to manage your account and if you want to start over then type 'cancel'.")
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to create an account or type 'recover' to recover an account.")
end

if(not isPlayerGhost(cid)) then
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
end

registerCreatureEvent(cid, "Mail")
registerCreatureEvent(cid, "GuildMotd")
registerCreatureEvent(cid, "Castle")
registerCreatureEvent(cid, "zombieevent")
registerCreatureEvent(cid, "FirstItems")
registerCreatureEvent(cid, "Idle")
if(config.useFragHandler) then
registerCreatureEvent(cid, "SkullCheck")
end

registerCreatureEvent(cid, "ReportBug")
registerCreatureEvent(cid, "inquisitionPortals")
registerCreatureEvent(cid, "ExpVip")
registerCreatureEvent(cid, "castAttack")
registerCreatureEvent(cid, "castHits")
registerCreatureEvent(cid, "castLogout")
registerCreatureEvent(cid, "PlayerDeath")
registerCreatureEvent(cid, "LevelItem")
registerCreatureEvent(cid, "EventLoot")
registerCreatureEvent(cid, "HeartSys")
registerCreatureEvent(cid, "stats_ctf")
registerCreatureEvent(cid, "ctf_target")
registerCreatureEvent(cid, "zombieevent")
registerCreatureEvent(cid, "AdvanceSave")
registerCreatureEvent(cid, "DeathSystem")
registerCreatureEvent(cid, "BoasVindas")

return true
end

Postado
local config = {
    loginMessage = getConfigValue('loginMessage'),
    useFragHandler = getBooleanFromString(getConfigValue('useFragHandler'))
}

function onLogin(cid)
    local storage = "first_login" -- não mexe
    local msg = "msg aqui" -- muda a msg aqui
    if getPlayerStorageValue(cid, storage) == -1 then
        setPlayerStorageValue(cid, storage, 0)
        doPlayerPopupFYI(cid, msg)
    end

    registerCreatureEvent(cid, "onPrepareDeath")
    local loss = getConfigValue('deathLostPercent')
    if(loss ~= nil) then
        doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 10)
    end
    
    local accountManager = getPlayerAccountManager(cid)
    if(accountManager == MANAGER_NONE) then
        local lastLogin, str = getPlayerLastLoginSaved(cid), config.loginMessage
        if(lastLogin > 0) then
            doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
            str = "Sua ultima visita no servidor foi em " .. os.date("%a %b %d %X %Y", lastLogin) .. "."
        else
            str = str .. " Mude seu Outifit."
            doPlayerSendOutfitWindow(cid)
        end
        
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
    elseif(accountManager == MANAGER_NAMELOCK) then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, it appears that your character has been namelocked, what would you like as your new name?")
    elseif(accountManager == MANAGER_ACCOUNT) then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to manage your account and if you want to start over then type 'cancel'.")
    else
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to create an account or type 'recover' to recover an account.")
    end
    
    if(not isPlayerGhost(cid)) then
        doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
    end
    
    registerCreatureEvent(cid, "Mail")
    registerCreatureEvent(cid, "GuildMotd")
    registerCreatureEvent(cid, "Castle")
    registerCreatureEvent(cid, "zombieevent")
    registerCreatureEvent(cid, "FirstItems")
    registerCreatureEvent(cid, "Idle")
    if(config.useFragHandler) then
        registerCreatureEvent(cid, "SkullCheck")
    end
    
    registerCreatureEvent(cid, "ReportBug")
    registerCreatureEvent(cid, "inquisitionPortals")
    registerCreatureEvent(cid, "ExpVip")
    registerCreatureEvent(cid, "castAttack")
    registerCreatureEvent(cid, "castHits")
    registerCreatureEvent(cid, "castLogout")
    registerCreatureEvent(cid, "PlayerDeath")
    registerCreatureEvent(cid, "LevelItem")
    registerCreatureEvent(cid, "EventLoot")
    registerCreatureEvent(cid, "HeartSys")
    registerCreatureEvent(cid, "stats_ctf")
    registerCreatureEvent(cid, "ctf_target")
    registerCreatureEvent(cid, "zombieevent")
    registerCreatureEvent(cid, "AdvanceSave")
    registerCreatureEvent(cid, "DeathSystem")
    registerCreatureEvent(cid, "BoasVindas")
    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.

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.7k

Informação Importante

Confirmação de Termo