ou manow ond eu encontro comands.cpp?
- Fórum
- OTServ
- Recursos
- Linguagens de Programação
- [rev 3086~] /skull
7
2.6k
2 meses depois...
info
Grupo: Conde
Registrado: 07/05/08
Posts: 612
Reputação: +12
Char no Tibia: leviana luciferiana

21 de junho de 2008 às 11:20
info
Grupo: Artesão
Registrado: 19/05/06
Posts: 125
Reputação: +2

21 de junho de 2008 às 11:59
@Marcryzius
na pasta das source...
legal o /skull...
1 mês depois...
info
Grupo: Artesão
Registrado: 06/07/08
Posts: 105
Reputação: +2
Char no Tibia: Rullys

21 de julho de 2008 às 13:49
Boa gostei do CODE
vou usar no meu server
valeu mesmo mano ![]()
27 de julho de 2008 às 12:35
Otimos comandos ;x :smile_positivo:
7 meses depois...
info
Grupo: Campones
Registrado: 24/02/09
Posts: 1
Reputação: 0
Char no Tibia: Surgor Gargourack

26 de fevereiro de 2009 às 20:08
muito bom em!!!
ajudo demais!
gostei desse comando ![]()
:positive:




info
Grupo: Campones
Registrado: 07/01/06
Posts: 86
Reputação: +1
eae galera eu venho traze um comando que eu acho que pode ajudar mtu gm por ai
server usado foi avesta revisão 3086
ai vai o code
adicione em commands.cpp depois de
{"/raid",&Commands::forceRaid},adicione
{"/skull",&Commands::changeSkull},no final do arquivo adicione
bool Commands::changeSkull(Creature* creature, const std::string& cmd, const std::string& param) { std::stringstream msg, param_stream(param); std::string name, skullType, skull; if(!getline(param_stream, name, ',')) { if(creature && creature->getPlayer()) creature->getPlayer()->sendCancel("No player specified."); return false; } Player* player = game->getPlayerByName(name); if(!player) { if(creature && creature->getPlayer()) creature->getPlayer()->sendCancel("Player is not online."); return false; } param_stream >> skullType; if(skullType == "white"){ Tile* tile = player->getTile(); if(!tile->hasFlag(TILESTATE_PROTECTIONZONE)){ player->pzLocked = true; player->addInFightTicks(); player->setSkull(SKULL_WHITE); player->sendTextMessage(MSG_INFO_DESCR, "You have a white skull now."); } else{ creature->getPlayer()->sendTextMessage(MSG_STATUS_CONSOLE_BLUE, "This player is on a pz tile."); return false; } } else if(skullType == "red"){ player->redSkullTicks = 3 * 60 * 60 * 1000; player->setSkull(SKULL_RED); player->sendTextMessage(MSG_INFO_DESCR, "You have a red skull now."); } else if(skullType == "noskull"){ player->redSkullTicks = 0; player->setSkull(SKULL_NONE); player->sendTextMessage(MSG_INFO_DESCR, "Your skull has been removed."); } else{ creature->getPlayer()->sendTextMessage(MSG_STATUS_CONSOLE_BLUE, "This isn\'t a valid skull type."); return false; } g_game.updateCreatureSkull(player); return true; }e agora pra finalizar em commands.h abaixo de
adicione
a e nao se esqueçam de por em commands.xml
caso encontrem bugs por favor postem para eu poder corrigo-lo
flw
Editado Maio 14 por Fusion32