Ir para conteúdo

Featured Replies

Postado
um script igual do ot undewar quando logar pela primeira vez aparece uma mensagem grande com as informações do server.

Script do creature event (callback onLogin não se registra):

function getUpTimeString()
    local wut = getWorldUpTime()
    local h, m = math.floor(wut / 3600), math.floor((wut % 3600) / 60)
    
    if m == 60 then
        m = 0
        h = h + 1
    end
    
    return h..' hour'..(h > 1 and 's' or '')..' and '..m..' minute'..(m > 1 and 's' or '')
end

function onLogin(cid)
    local redlenght, blacklenght = math.floor(getConfigInfo('redSkullLength') / 86400), math.floor(getConfigInfo('blackSkullLength') / 86400)
    local str = 'Welcome to UnderWar Retro Tibia Server\nServer Information:\n\nExp Stage: x'..(getConfigInfo('experienceStages') == 'true' and getExperienceStage(getPlayerLevel(cid), getVocationInfo(getPlayerVocation(cid)).experienceMultiplier) or getConfigInfo('rateExperience'))..'\nSkills rate: x'..getConfigInfo('rateSkill')..'\nLoot Rate: x'..getConfigInfo('rateLoot')..'\nMagic Rate: x'..getConfigInfo('rateMagic')..'\nSpawns Rate: x'..getConfigInfo('rateSpawn')..'\n\nWorld Type: '..(getWorldType() == 1 and 'No-PVP' or getWorldType() == 2 and 'PVP' or 'PVP-Enforced')..'\nFrags RED Skull: '..getConfigInfo('dailyFragsToRedSkull')..' por dia, '..getConfigInfo('weeklyFragsToRedSkull')..' por semana ou '..getConfigInfo('monthlyFragsToRedSkull')..' por mês. Duração: '..redlenght..' dia'..(redlenght > 1 and 's' or '')..'.\nFrags BLACK Skull: '..getConfigInfo('dailyFragsToBlackSkull')..' por dia, '..getConfigInfo('weeklyFragsToBlackSkull')..' por semana ou '..getConfigInfo('monthlyFragsToBlackSkull')..' por mês. Duração: '..blacklenght..' dia'..(blacklenght > 1 and 's' or '')..'.\n\nProtection System:\nAté o level '..getConfigInfo('protectionLevel')..', o jogador que morrer sem skull não perderá seu loot.\n\nPromotion System:\nVoce pode comprar sua promotion na Queen Eloise ou King Tibianus por 20k ou pode fazer a Desert Quest e ganhar de graça a promotion!\n\nBlessing System:\nJogadores possuem as 5 blessings, incluindo proteção aos seus itens.\nJogadores Red e Black Skull sempre perderão o loot.\n\nHouses: Pagamento semanal no DP da cidade onde está a casa.\n\n'..(getPlayerPremiumDays(cid) < 1 and 'VIP days: Torne-se VIP e ajude o servidor a continuar online.' or 'Ainda lhe restam '..getPlayerPremiumDays(cid)..' dias de VIP.')..'\n\nUptime: '..getUpTimeString()
    
    if getPlayerLastLoginSaved(cid) < 1 then
        doPlayerPopupFYI(cid, str)
    end
    
    return true
end

Script da talkaction:

function getUpTimeString()
    local wut = getWorldUpTime()
    local h, m = math.floor(wut / 3600), math.floor((wut % 3600) / 60)
    
    if m == 60 then
        m = 0
        h = h + 1
    end
    
    return h..' hour'..(h > 1 and 's' or '')..' and '..m..' minute'..(m > 1 and 's' or '')
end

function onSay(cid)
    local redlenght, blacklenght = math.floor(getConfigInfo('redSkullLength') / 86400), math.floor(getConfigInfo('blackSkullLength') / 86400)
    local str = 'Welcome to UnderWar Retro Tibia Server\nServer Information:\n\nExp Stage: x'..(getConfigInfo('experienceStages') == 'true' and getExperienceStage(getPlayerLevel(cid), getVocationInfo(getPlayerVocation(cid)).experienceMultiplier) or getConfigInfo('rateExperience'))..'\nSkills rate: x'..getConfigInfo('rateSkill')..'\nLoot Rate: x'..getConfigInfo('rateLoot')..'\nMagic Rate: x'..getConfigInfo('rateMagic')..'\nSpawns Rate: x'..getConfigInfo('rateSpawn')..'\n\nWorld Type: '..(getWorldType() == 1 and 'No-PVP' or getWorldType() == 2 and 'PVP' or 'PVP-Enforced')..'\nFrags RED Skull: '..getConfigInfo('dailyFragsToRedSkull')..' por dia, '..getConfigInfo('weeklyFragsToRedSkull')..' por semana ou '..getConfigInfo('monthlyFragsToRedSkull')..' por mês. Duração: '..redlenght..' dia'..(redlenght > 1 and 's' or '')..'.\nFrags BLACK Skull: '..getConfigInfo('dailyFragsToBlackSkull')..' por dia, '..getConfigInfo('weeklyFragsToBlackSkull')..' por semana ou '..getConfigInfo('monthlyFragsToBlackSkull')..' por mês. Duração: '..blacklenght..' dia'..(blacklenght > 1 and 's' or '')..'.\n\nProtection System:\nAté o level '..getConfigInfo('protectionLevel')..', o jogador que morrer sem skull não perderá seu loot.\n\nPromotion System:\nVoce pode comprar sua promotion na Queen Eloise ou King Tibianus por 20k ou pode fazer a Desert Quest e ganhar de graça a promotion!\n\nBlessing System:\nJogadores possuem as 5 blessings, incluindo proteção aos seus itens.\nJogadores Red e Black Skull sempre perderão o loot.\n\nHouses: Pagamento semanal no DP da cidade onde está a casa.\n\n'..(getPlayerPremiumDays(cid) < 1 and 'VIP days: Torne-se VIP e ajude o servidor a continuar online.' or 'Ainda lhe restam '..getPlayerPremiumDays(cid)..' dias de VIP.')..'\n\nUptime: '..getUpTimeString()
    
    doPlayerPopupFYI(cid, str)
    return true
end

The corrupt fear us.

The honest support us.

The heroic join us.

  • Respostas 26
  • Visualizações 2.5k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • Vá na pasta data/creaturescripts e adicione essa tag ao arquivo creaturescripts.xml: <event type="login" name="Popup1" event="script" value="popup1.lua"/> Agora vá na pasta data/creaturescri

  • local msg = "Mensagem que vc qr" function onLogin(cid)     if getCreatureName(cid) ~= "Account Manager" then         if getPlayerStorageValue(cid, 1691) ~= 1 then             doPlayerPopupFYI(cid, msg

Postado
  • Autor

 

Script do creature event (callback onLogin não se registra):

function getUpTimeString()
    local wut = getWorldUpTime()
    local h, m = math.floor(wut / 3600), math.floor((wut % 3600) / 60)
    
    if m == 60 then
        m = 0
        h = h + 1
    end
    
    return h..' hour'..(h == 1 and '' or 's')..' and '..m..' minute'..(m == 1 and '' or 's')
end

function onLogin(cid)
    local str = 'Welcome to UnderWar Retro Tibia Server\nServer Infromation:\n\nExp Stage: x'..getExperienceStage(getPlayerLevel(cid), getVocationInfo(getPlayerVocation(cid)).experienceMultiplier)..'\nSkills rate: x'..getConfigInfo('rateSkill')..'\nLoot Rate: x'..getConfigInfo('rateLoot')..'\nMagic Rate: x'..getConfigInfo('rateMagic')..'\nSpawns Rate: x'..getConfigInfo('rateSpawn')..'\n\nWorld Type: '..(getWorldType() == 1 and 'No-PVP' or getWorldType() == 2 and 'PVP' or 'PVP-Enforced')..'\nFrags RED Skull: '..getConfigInfo('dailyFragsToRedSkull')..' por dia, '..getConfigInfo('weeklyFragsToRedSkull')..' por semana ou '..getConfigInfo('monthlyFragsToRedSkull')..' por mês. Duração: '..math.floor(getConfigInfo('redSkullLength') / 86400)..' dias.\nFrags BLACK Skull: '..getConfigInfo('dailyFragsToBlackSkull')..' por dia, '..getConfigInfo('weeklyFragsToBlackSkull')..' por semana ou '..getConfigInfo('monthlyFragsToBlackSkull')..' por mês. Duração: '..math.floor(getConfigInfo('blackSkullLength') / 86400)..' dias.\n\nProtection System:\n Até o level '..getConfigInfo('protectionLevel')..', o jogador que morrer sem skull não perderá seu loot.\n\nPromotion System:\nVoce pode comprar sua promotion na Queen Eloise ou King Tibianus por 20k ou pode fazer a Desert Quest e ganhar de graça a promotion!\n\nBlessing System:\nJogadores possuem as 5 blessings, incluindo proteção aos seus itens.\nJogadores Red e Black Skull sempre perderão o loot.\n\nHouses: Pagamento semanal no DP da cidade onde está a casa.\n\n'..(getPlayerPremiumDays(cid) < 1 and 'VIP days: Torne-se VIP e ajude o servidor a continuar online.' or 'Ainda lhe restam '..getPlayerPremiumDays(cid)..' dias de VIP.')..'\n\nUptime: '..getUpTimeString()
    
    if getPlayerLastLoginSaved(cid) < 1 then
        doPlayerPopupFYI(cid, str)
    end
    
    return true
end

Script da talkaction:

function getUpTimeString()
    local wut = getWorldUpTime()
    local h, m = math.floor(wut / 3600), math.floor((wut % 3600) / 60)
    
    if m == 60 then
        m = 0
        h = h + 1
    end
    
    return h..' hour'..(h == 1 and '' or 's')..' and '..m..' minute'..(m == 1 and '' or 's')
end

function onSay(cid)
    local str = 'Welcome to UnderWar Retro Tibia Server\nServer Infromation:\n\nExp Stage: x'..getExperienceStage(getPlayerLevel(cid), getVocationInfo(getPlayerVocation(cid)).experienceMultiplier)..'\nSkills rate: x'..getConfigInfo('rateSkill')..'\nLoot Rate: x'..getConfigInfo('rateLoot')..'\nMagic Rate: x'..getConfigInfo('rateMagic')..'\nSpawns Rate: x'..getConfigInfo('rateSpawn')..'\n\nWorld Type: '..(getWorldType() == 1 and 'No-PVP' or getWorldType() == 2 and 'PVP' or 'PVP-Enforced')..'\nFrags RED Skull: '..getConfigInfo('dailyFragsToRedSkull')..' por dia, '..getConfigInfo('weeklyFragsToRedSkull')..' por semana ou '..getConfigInfo('monthlyFragsToRedSkull')..' por mês. Duração: '..math.floor(getConfigInfo('redSkullLength') / 86400)..' dias.\nFrags BLACK Skull: '..getConfigInfo('dailyFragsToBlackSkull')..' por dia, '..getConfigInfo('weeklyFragsToBlackSkull')..' por semana ou '..getConfigInfo('monthlyFragsToBlackSkull')..' por mês. Duração: '..math.floor(getConfigInfo('blackSkullLength') / 86400)..' dias.\n\nProtection System:\n Até o level '..getConfigInfo('protectionLevel')..', o jogador que morrer sem skull não perderá seu loot.\n\nPromotion System:\nVoce pode comprar sua promotion na Queen Eloise ou King Tibianus por 20k ou pode fazer a Desert Quest e ganhar de graça a promotion!\n\nBlessing System:\nJogadores possuem as 5 blessings, incluindo proteção aos seus itens.\nJogadores Red e Black Skull sempre perderão o loot.\n\nHouses: Pagamento semanal no DP da cidade onde está a casa.\n\n'..(getPlayerPremiumDays(cid) < 1 and 'VIP days: Torne-se VIP e ajude o servidor a continuar online.' or 'Ainda lhe restam '..getPlayerPremiumDays(cid)..' dias de VIP.')..'\n\nUptime: '..getUpTimeString()
    
    doPlayerPopupFYI(cid, str)
    return true
end

amigo deu esse erro

 

[18/1/2015 23:8:57] [Error - TalkAction Interface] 
[18/1/2015 23:8:57] data/talkactions/scripts/serverinfo.lua:onSay
[18/1/2015 23:8:57] Description: 
[18/1/2015 23:8:57] data/talkactions/scripts/serverinfo.lua:14: attempt to concatenate a nil value
[18/1/2015 23:8:57] stack traceback:
[18/1/2015 23:8:57] data/talkactions/scripts/serverinfo.lua:14: in function <data/talkactions/scripts/serverinfo.lua:13>

 

amigo deu esse erro

 

[18/1/2015 23:8:57] [Error - TalkAction Interface] 
[18/1/2015 23:8:57] data/talkactions/scripts/serverinfo.lua:onSay
[18/1/2015 23:8:57] Description: 
[18/1/2015 23:8:57] data/talkactions/scripts/serverinfo.lua:14: attempt to concatenate a nil value
[18/1/2015 23:8:57] stack traceback:
[18/1/2015 23:8:57] data/talkactions/scripts/serverinfo.lua:14: in function <data/talkactions/scripts/serverinfo.lua:13>

 

help em creature scripts tb n ta parecendo nada 

I like

Postado

Melhorei os códigos, editei o post, testei e executou perfeitamente.
Caso o erro se repita, me informe os códigos do arquivo config.lua do seu servidor.

The corrupt fear us.

The honest support us.

The heroic join us.

Postado

@Dani ou Suicide, tem como burlar o acc manager?

local msg = "Mensagem que vc qr"

function onLogin(cid)
if getPlayerStorageValue(cid, 1691) ~= 1 then
doPlayerPopupFYI(cid, msg)
setPlayerStorageValue(cid, 1691, 1)
end
return true
end

(1º) | [8.60] - Galaxy Server - Download

(2º) | [8.60] - Glorious Server - Download

(3º) | [8.60] - Epic Server - Download

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