Ir para conteúdo

Featured Replies

Postado

arena padrao, creio que não pois a arena padrao é feita via REMERES, com tile pvp.

Mais tenta usar assim, e testa:
 

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

function onLogin(cid)
    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 = "Your last visit was on " .. os.date("%a %b %d %X %Y", lastLogin) .. "."
        else
            str = str .. " Please choose your outfit."
            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, "ResetDoors")

    registerCreatureEvent(cid, "Idle")
    if(config.useFragHandler) then
        registerCreatureEvent(cid, "SkullCheck")
        registerCreatureEvent(cid, "Reward")
    end

    registerCreatureEvent(cid, "ReportBug")
    registerCreatureEvent(cid, "AdvanceSave")

registerCreatureEvent(cid, "advance")
registerCreatureEvent(cid, "SkullCheck")
    registerCreatureEvent(cid, "ReportBug")

registerCreatureEvent(cid, "lookreset")
registerCreatureEvent(cid, "DeathC")
registerCreatureEvent(cid, "FimVip")
registerCreatureEvent(cid, "VipReceive")
registerCreatureEvent(cid, "PlayerKill")
return true
end

 

  • Respostas 11
  • Visualizações 789
  • Created
  • Última resposta

Top Posters In This Topic

Postado
  • Autor
2 minutos atrás, isac001 disse:

arena padrao, creio que não pois a arena padrao é feita via REMERES, com tile pvp.

Mais tenta usar assim, e testa:
 


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

function onLogin(cid)
    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 = "Your last visit was on " .. os.date("%a %b %d %X %Y", lastLogin) .. "."
        else
            str = str .. " Please choose your outfit."
            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, "ResetDoors")

    registerCreatureEvent(cid, "Idle")
    if(config.useFragHandler) then
        registerCreatureEvent(cid, "SkullCheck")
        registerCreatureEvent(cid, "Reward")
    end

    registerCreatureEvent(cid, "ReportBug")
    registerCreatureEvent(cid, "AdvanceSave")

registerCreatureEvent(cid, "advance")
registerCreatureEvent(cid, "SkullCheck")
    registerCreatureEvent(cid, "ReportBug")

registerCreatureEvent(cid, "lookreset")
registerCreatureEvent(cid, "DeathC")
registerCreatureEvent(cid, "FimVip")
registerCreatureEvent(cid, "VipReceive")
registerCreatureEvent(cid, "PlayerKill")
return true
end

 

Nao deu certo

Postado
  • Autor

Sera q o erro nao pode estar nos first itens?

Minha firstitens:

 

 

local firstItems = {}
firstItems[0] =
{
2173,
2512,
3965,
2124,
2461,
2649,
2643
}
firstItems[1] =
{
2512,
6534,
2124,
2461,
2649,
2643
}
firstItems[2] =
{
2512,
6534,
2124,
2461,
2649,
2643
}
firstItems[3] =
{
2512,
8853,
2543,
2124,
2461,
2649,
2643
}
firstItems[4] =
{
2512,
7453,
7418,
2124,
2461,
2649,
2643
}
firstItems[9] =
{
2512,
7392,
2124,
2461,
2649,
2643
}
firstItems[11] =
{
2512,
8904,
2124,
2461,
2649,
2643
}
firstItems[13] =
{
10310,
2124,
2461,
2649,
2643
}
firstItems[15] =
{
10310,
2124,
2461,
2649,
2643
}


function onLogin(cid)
if getPlayerStorageValue(cid, 30001) == -1 then
for i = 1, table.maxn(firstItems[getPlayerVocation(cid)]) do
doPlayerAddItem(cid, firstItems[getPlayerVocation(cid)][i], 1)
end
if getPlayerSex(cid) == 0 then
doPlayerAddItem(cid, 2467, 1)
else
doPlayerAddItem(cid, 2467, 1)
end
local bag = doPlayerAddItem(cid, 1988, 1)
doAddContainerItem(bag, 2152, 15)
doAddContainerItem(bag, 2554, 1)
doAddContainerItem(bag, 2120, 1)
doAddContainerItem(bag, 2173, 1)
doAddContainerItem(bag, 2674, 10)
doAddContainerItem(bag, 2175, 1)
setPlayerStorageValue(cid, 30001, 1)
end
return TRUE
end

Agora, isac001 disse:

Explica como realmente acontece o bug, mostra algo na distro?

Não nao mostra nada na distro, você tem discord?

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