Postado Abril 25, 2022 3 anos monsters.cpp: In member function ‘void MonsterType::dropLoot(Container*)’: monsters.cpp:212:9: error: suggest explicit braces to avoid ambiguous ‘else’ [-Werror=parentheses] else if(message == LOOTMSG_PLAYER || message == LOOTMSG_BOTH) [progress=green]50[/progress]
Postado Junho 1, 2022 3 anos Em 19/08/2020 em 12:01, diarmaint disse: @Mathias Kenfi TFS 0.4 8.60 Funcionou mas a cor das palavras ficam em amarelo, igual da fala. aonde mudo a cor da letra? gostaria que falasse em laranja ou verde. Edit--- o chanel não estava abrindo, adicionei no login.lua doPlayerOpenChannel(cid, 11) e como eu não quis que os players falassem no channel eu mudei para <channel id="11" name="Loot" logged="yes" active="0" muted="999" conditionMessage="Não pode falar aqui!."/> e conseguiu mudar a cor no channel? o meu tá com a mesma coisa
Postado Novembro 13, 2024 Nov 13 Eu adicionei no tfs 0.4 e funcionou tudo certo, só que nao manda pro player os dizeres do Loot na tela só direto no loot channel.. esse script só funciona assim? tem alguma maneira de voltar a escrita como se fosse broadcast no meio da tela ? Editado Novembro 13, 2024 Nov 13 por Rodrigo94 (veja o histórico de edições)
Postado Novembro 21, 2024 Nov 21 Em 13/11/2024 em 18:09, Rodrigo94 disse: Eu adicionei no tfs 0.4 e funcionou tudo certo, só que nao manda pro player os dizeres do Loot na tela só direto no loot channel.. esse script só funciona assim? tem alguma maneira de voltar a escrita como se fosse broadcast no meio da tela ? eu estava com mesmo problema, foda e que a galera descobre como resolver o problema mas nao passa adiante. em monsters.cpp altera toda essa parte que inicia com: std::stringstream ss; std::string nick; substitui tudo por: std::stringstream ss; std::string nick; ss << "Loot of " << nameDescription << ": " << corpse->getContentDescription() << "."; int lootChannelId = g_config.getNumber(ConfigManager::LOOT_CHANNEL); if (owner->getParty() && message > LOOTMSG_PLAYER) { // Envia mensagem para a party owner->getParty()->broadcastPartyLoot((MessageClasses)MSG_CHANNEL, ss.str()); } else { // Verificar se o canal de loot existe ChatChannel* lootChannel = g_chat.getChannel(owner, lootChannelId); if (!lootChannel) { // Caso o canal de loot não exista, enviar diretamente ao jogador owner->sendTextMessage((MessageClasses)g_config.getNumber(ConfigManager::LOOT_MESSAGE_TYPE), ss.str()); } else { // Verificar se o jogador está no canal de loot if (!lootChannel->hasUser(owner)) { // Jogador não está no canal, enviar diretamente ao jogador owner->sendTextMessage((MessageClasses)g_config.getNumber(ConfigManager::LOOT_MESSAGE_TYPE), ss.str()); } else { // Jogador está no canal de loot, enviar mensagem para o canal owner->sendChannelMessage("", ss.str(), (MessageClasses)MSG_CHANNEL, lootChannelId); } } } Editado Novembro 21, 2024 Nov 21 por ubnt22 (veja o histórico de edições)
Postado Novembro 22, 2024 Nov 22 Em 21/11/2024 em 10:03, ubnt22 disse: eu estava com mesmo problema, foda e que a galera descobre como resolver o problema mas nao passa adiante. em monsters.cpp altera toda essa parte que inicia com: std::stringstream ss; std::string nick; substitui tudo por: std::stringstream ss; std::string nick; ss << "Loot of " << nameDescription << ": " << corpse->getContentDescription() << "."; int lootChannelId = g_config.getNumber(ConfigManager::LOOT_CHANNEL); if (owner->getParty() && message > LOOTMSG_PLAYER) { // Envia mensagem para a party owner->getParty()->broadcastPartyLoot((MessageClasses)MSG_CHANNEL, ss.str()); } else { // Verificar se o canal de loot existe ChatChannel* lootChannel = g_chat.getChannel(owner, lootChannelId); if (!lootChannel) { // Caso o canal de loot não exista, enviar diretamente ao jogador owner->sendTextMessage((MessageClasses)g_config.getNumber(ConfigManager::LOOT_MESSAGE_TYPE), ss.str()); } else { // Verificar se o jogador está no canal de loot if (!lootChannel->hasUser(owner)) { // Jogador não está no canal, enviar diretamente ao jogador owner->sendTextMessage((MessageClasses)g_config.getNumber(ConfigManager::LOOT_MESSAGE_TYPE), ss.str()); } else { // Jogador está no canal de loot, enviar mensagem para o canal owner->sendChannelMessage("", ss.str(), (MessageClasses)MSG_CHANNEL, lootChannelId); } } } Pelo que analisei o codigo nao é pro meu TFS da erro de MSG_CHANNEL Não deu certo, tive erros ao compilar: 1> monsters.cpp 1>..\monsters.cpp(137): error C2065: 'MSG_CHANNEL' : undeclared identifier 1>..\monsters.cpp(140): error C2065: 'ChatChannel' : undeclared identifier 1>..\monsters.cpp(140): error C2065: 'lootChannel' : undeclared identifier 1>..\monsters.cpp(140): error C2065: 'g_chat' : undeclared identifier 1>..\monsters.cpp(140): error C2228: left of '.getChannel' must have class/struct/union 1> type is ''unknown-type'' 1>..\monsters.cpp(141): error C2065: 'lootChannel' : undeclared identifier 1>..\monsters.cpp(146): error C2065: 'lootChannel' : undeclared identifier 1>..\monsters.cpp(146): error C2227: left of '->hasUser' must point to class/struct/union/generic type 1> type is ''unknown-type'' 1>..\monsters.cpp(151): error C2065: 'MSG_CHANNEL' : undeclared identifier 1>..\monsters.cpp(157): error C2601: 'MonsterType::createLoot' : local function definitions are illegal 1> ..\monsters.cpp(95): this line contains a '{' which has not yet been matched 1>..\monsters.cpp(190): error C2601: 'MonsterType::createChildLoot' : local function definitions are illegal 1> ..\monsters.cpp(95): this line contains a '{' which has not yet been matched 1>..\monsters.cpp(216): error C2601: 'Monsters::loadFromXml' : local function definitions are illegal 1> ..\monsters.cpp(95): this line contains a '{' which has not yet been matched 1>..\monsters.cpp(267): error C2601: 'Monsters::getDamageCondition' : local function definitions are illegal 1> ..\monsters.cpp(95): this line contains a '{' which has not yet been matched 1>..\monsters.cpp(282): error C2601: 'Monsters::deserializeSpell' : local function definitions are illegal 1> ..\monsters.cpp(95): this line contains a '{' which has not yet been matched 1>..\monsters.cpp(887): error C2601: 'Monsters::loadMonster' : local function definitions are illegal 1> ..\monsters.cpp(95): this line contains a '{' which has not yet been matched 1>..\monsters.cpp(1486): error C2601: 'Monsters::loadLoot' : local function definitions are illegal 1> ..\monsters.cpp(95): this line contains a '{' which has not yet been matched 1>..\monsters.cpp(1546): error C2601: 'Monsters::loadChildLoot' : local function definitions are illegal 1> ..\monsters.cpp(95): this line contains a '{' which has not yet been matched 1>..\monsters.cpp(1580): error C2601: 'Monsters::getMonsterType' : local function definitions are illegal 1> ..\monsters.cpp(95): this line contains a '{' which has not yet been matched 1>..\monsters.cpp(1589): error C2601: 'Monsters::getMonsterType' : local function definitions are illegal Editado Novembro 23, 2024 Nov 23 por Rodrigo94 (veja o histórico de edições)
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.