Postado Agosto 27, 2015 9 anos Fala galera, beleza?? To com uma dúvida aqui e queria ajuda dos mais experientes aí... Na source do meu OT 7.72 eu tenho a seguinte função no game.cpp Game::playerEnableSharedPartyExperience(uint32_t playerId, uint8_t sharedExpActive, uint8_t unknown) Essa função retorna outra função setSharedExperience, que está no party.cpp. Acontece que no meu client 7.72 eu não tenho a opção pra ativar o sharedexp pelo botão direito no char... Sendo assim, quero conseguir ativar essa função por LUA script... Já até fiz um TALKACTION mas preciso adicionar as seguintes funções no meu luascript.cpp: isPartyLeader(cid) isPartySharedExperienceActive(cid) setPartySharedExperience(cid, value) Alguém pode me ajudar com isso? Segue abaixo os códigos completos: game.cpp bool Game::playerEnableSharedPartyExperience(uint32_t playerId, uint8_t sharedExpActive, uint8_t unknown) { Player* player = getPlayerByID(playerId); if(!player || player->isRemoved()){ return false; } if(!player->getParty() || player->hasCondition(CONDITION_INFIGHT)){ return false; } return player->getParty()->setSharedExperience(player, sharedExpActive == 1); } party.cpp bool Party::setSharedExperience(Player* player, bool _sharedExpActive) { if(!player || getLeader() != player){ return false; } if(sharedExpActive == _sharedExpActive){ return true; } sharedExpActive = _sharedExpActive; if(sharedExpActive){ sharedExpEnabled = canEnableSharedExperience(); if(sharedExpEnabled){ getLeader()->sendTextMessage(MSG_INFO_DESCR, "Shared Experience is now active."); } else{ getLeader()->sendTextMessage(MSG_INFO_DESCR, "Shared Experience has been activated," \ " but some members of your party are inactive."); } } else{ getLeader()->sendTextMessage(MSG_INFO_DESCR, "Shared Experience has been deactivated."); } updateAllPartyIcons(); return true; } Obrigado
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.