Ir para conteúdo

Featured Replies

Postado

shutdownEvent = 0 function onSay(cid, words, param, channel) if(param == '') then doSetGameState(GAMESTATE_SHUTDOWN) return true end params = string.explode(param, ",") local action, reason, mins = "", "", 0 if(not tonumber(params[1])) then action = string.trim(params[1]:lower()) else mins = string.trim(params[1]) if(table.maxn(params) > 1) then reason = params[2] end end if(action) then if(action == "cancel" or action == "stop") then if(shutdownEvent ~= 0) then stopEvent(shutdownEvent) shutdownEvent = 0 doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Shutdown cancelled.") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "Server is not in the shutdown phase.") end return true elseif(action == "kill") then os.exit() return true end end mins = tonumber(mins) if(not mins or mins < 0) then doPlayerSendCancel(cid, "Numeric param may not be lower than 0.") return true end if(shutdownEvent ~= 0) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "Server is already in a shutdown state. To cancel shutdown use the \"/shutdown stop\" command.") return true end return prepareShutdown(math.abs(math.ceil(mins)), reason) end function prepareShutdown(minutes, reason) if(minutes <= 0) then doSetGameState(GAMESTATE_SHUTDOWN) return false end local change, r = 5, (reason ~= "" and " Reason: "..reason or "") if(minutes == 1) then doBroadcastMessage("Server is going down in " .. minutes .. " minute, please log out now!" .. r) elseif(minutes <= 5) then doBroadcastMessage("Server is going down in " .. minutes .. " minutes, please log out." .. r) change = 1 else doBroadcastMessage("Server is going down in " .. minutes .. " minutes." .. r) end shutdownEvent = addEvent(prepareShutdown, (change * 60 * 1000), minutes - change, reason) return true end
Obrg e REP+ 

Meus Contatos!

 

Minhas Funções:

 

               Skype: TsplayerT

         Facebook: TakaFukushii

          YouTube: ADoseDupla

           Twitter: @_Splayer_

 

 

 

 

 

 

 

                             Mapper:▓▓▓▓▓▓▓▓▓▓ 97%

     Programmer:▓▓▓▓▓▒▒▒▒▒ 45%

             Scripter:▓▓▓▓▓▓▓▓▓▒ 83%

              Spriter:▓▓▓▓▓▓▒▒▒▒ 57%

    Gamemaster:▓▓▓▓▓▓▓▓▓▓ 99%

        Ot Creator:▓▓▓▓▓▓▓▒▒▒71%

Ot Client Maker:▓▓▓▓▓▓▓▒▒▒74%

 

  • Respostas 31
  • Visualizações 2.1k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • A "mensagem" vermelha dá ss, eu tenho uma talkaction no meu ot, dx eu entrar no pc e passo pra ti. As outras coisas eu tenho uma ideia de como podem ser feitas. Qnd eu entrar no pc eu dou uma olhada

  • ue cara, vc pode fazer uma função pra mostrar a posicao       tipo: function onSay(cid) doCreatureSay(cid, "X: "..getCreaturePosition(cid).x, 1) doCreatureSay(cid, "Y: "..getCreaturePosition(cid

  • pode me ajudar via PM? N ignore pf

Postado

O do /bc não funcionou? Apareceu algum erro? Se sim, pf poste uma print.

Te ajudei?? REP + e ficamos quites... <ahttp://www.tibiaking.com/forum/uploads/emoticons/default_happyy.png' alt=';D'>

Atenciosamente,

Daniel.

Abraços!

Postado

No TFS 1.0, a função doBroadcastMessage não existe.

Tente:

function onSay(cid, words, param, channel)
    if(param == '') then
        return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.")
    end

    local t = string.explode(param, " ", 1)
    if(not t[2]) then
        broadcastMessage(t[1], MESSAGE_STATUS_WARNING)
    elseif(not broadcastMessage(t[2], MESSAGE_TYPES[t[1]])) then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Bad message color type.")
    end
    
    return true
end

The corrupt fear us.

The honest support us.

The heroic join us.

Postado

pode me ajudar via PM? N ignore pf

Meus Contatos!

 

Minhas Funções:

 

               Skype: TsplayerT

         Facebook: TakaFukushii

          YouTube: ADoseDupla

           Twitter: @_Splayer_

 

 

 

 

 

 

 

                             Mapper:▓▓▓▓▓▓▓▓▓▓ 97%

     Programmer:▓▓▓▓▓▒▒▒▒▒ 45%

             Scripter:▓▓▓▓▓▓▓▓▓▒ 83%

              Spriter:▓▓▓▓▓▓▒▒▒▒ 57%

    Gamemaster:▓▓▓▓▓▓▓▓▓▓ 99%

        Ot Creator:▓▓▓▓▓▓▓▒▒▒71%

Ot Client Maker:▓▓▓▓▓▓▓▒▒▒74%

 

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