Ir para conteúdo
  • Cadastre-se

Posts Recomendados

  Em 20/04/2016 em 04:50, Azhaurn disse:

Preview

[IMG]

 

Descrição

A cada 1 minuto, o player vai receber +1 na storage e a cada 5 points = 1 mês.

Se você mudar 60000 por 120000, será 1 ponto a cada 2 minutos.

 

Script

globalevents/scripts/age.lua

function onThink(interval)
   if #getPlayersOnline() >= 1 then
     for i = 1,#getPlayersOnline() do
       doPlayerSetStorageValue(getPlayersOnline()[i],6723, getPlayerStorageValue(getPlayersOnline()[i],6723) + 1)
     end
   end

   return true
end

globalevents.xml

<globalevent name="age" interval="60000" event="script" value="age.lua"/>

game.cpp, procure por:

  if(player->hasCustomFlag(PlayerCustomFlag_CanSeePosition))
   {
     ss << std::endl << "Position: [X: " << thingPos.x << "] [Y: " << thingPos.y << "] [Z: " << thingPos.z << "]";
     if(Tile* tile = getTile(thingPos))
     {
       if(House* house = tile->getHouse())
         ss << " [House: " << house->getId() << "]";
     }

     ss << ".";
   }

Acima disso adicione:

  std::string year;
   if (const Creature* creature = thing->getCreature())
   {
     if (const Player* destPlayer = creature->getPlayer())
     {
       destPlayer->getStorage("6723", year);
       int32_t YearSay = atoi(year.c_str()) / 60;
       int32_t MonthSay =  ((atoi(year.c_str()) / 5) % 12)+1;
       if (MonthSay > 0 || YearSay > 0)
       {
         if (thing != player)
           ss << std::endl << "He is " << std::floor(YearSay) << " Years, " << std::floor(MonthSay) << " Months old.";
         else
           ss << std::endl << "You are " << std::floor(YearSay) << " Years, " << std::floor(MonthSay) << " Months old.";
       }
       else {
         if (thing != player)
           ss << std::endl << "He Was Just Born.";
         else
           ss << std::endl << "You Were Just Born";
       }
     }
   }

Caso não funcione, tente:

  if (const Creature* creature = thing->getCreature())
   {
     if (const Player* destPlayer = creature->getPlayer())
     {
       destPlayer->getStorage("6723", year);
       int32_t YearSay = atoi(year.c_str()) / 60;
       int32_t MonthSay =  ((atoi(year.c_str()) / 5) % 12)+1;
       if (MonthSay > 0 || YearSay > 0)
       {
         if (thing != player)
           ss << std::endl << (destPlayer->getSex(false) == PLAYERSEX_FEMALE ? "She" : "He") << "is" << std::floor(YearSay) << " Years, " << std::floor(MonthSay) << " Months old.";
         else
           ss << std::endl << "You are " << std::floor(YearSay) << " Years, " << std::floor(MonthSay) << " Months old.";
       }
       else {
         if (thing != player)
           ss << std::endl << (destPlayer->getSex(false) == PLAYERSEX_FEMALE ? "She" : "He") << " Was Just Born.";
         else
           ss << std::endl << "You Were Just Born";
       }
     }
   }

Créditos: tetra20

Expand   Mostrar mais  

 

Amigo aonde fica esse game.cpp

Meu novo projeto.

 

  Mostrar conteúdo oculto
http://oi58.tinypic.com/2yplmrk.jpg

 

 

 

Link para o post
Compartilhar em outros sites
  • 1 month later...
  • Respostas 9
  • Created
  • Última resposta

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

Preview   Descrição A cada 1 minuto, o player vai receber +1 na storage e a cada 5 points = 1 mês. Se você mudar 60000 por 120000, será 1 ponto a cada 2 minutos.   Script globalevents/scripts/age.lua function onThink(interval) if #getPlayersOnline() >= 1 then for i = 1,#getPlayersOnline() do doPlayerSetStorageValue(getPlayersOnline()[i],6723, getPlayerStorageValue(getPlayersOnline()[i],6723) + 1) end end return true end

LARISSA @Azhaurn, EU TE AMO! VOU FAZER ISSO P O BAIAKAO!  

Me explica essa scripter ae Oque Ele ganha Pontos prem ? nao entendi direito

NTO PANZER SERVIDOR 24H 

1554689_1.png

http://narutopanzer.blogspot.com.br/

RATE  EXP 999

 

DBO SERVIDOR 24H 

1549171_1.png

http://dbowtf.ddns.net/

RATE EXP 400

 

 

Link para o post
Compartilhar em outros sites
  • 1 year later...
  • 2 weeks later...

@Azhaurn colocar pra receber um ponto a cada 24horas o player que tiver meses ou anos receberia uma recompensa da pra trabalhar fazendo bastante coisa legal com isso vou usar vlw ^^ 

Compre seus Scripts Agora totalmente seguro e de forma rápida, aceitamos também encomendas.

discord.gg/phJZeHa2k4

 

Projeto ATS (Naruto)

Informações Abaixo

Facebook

Youtube
Discord

 

Tutoriais / Conteúdos

Clique Aqui

Link para o post
Compartilhar em outros sites
  • 6 months later...

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

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

  • Estatísticas dos Fóruns

    96840
    Tópicos
    519576
    Posts



×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo