Advertisement
Guest User

Untitled

a guest
Mar 28th, 2020
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. {
  2. SpectatorVec list;
  3. SpectatorVec::iterator it;
  4. getSpectators(list, player->getPosition());
  5.  
  6. if(player->hasCondition(CONDITION_EXHAUST, 2))
  7. {
  8. player->sendTextMessage(MSG_STATUS_SMALL, "You have to wait a while.");
  9. return false;
  10. }
  11.  
  12. if(Condition* conditionnpc = Condition::createCondition(CONDITIONID_DEFAULT, CONDITION_EXHAUST, 300, 0, false, 2))
  13. player->addCondition(conditionnpc);
  14.  
  15. //send to npcs only
  16. Npc* tmpNpc;
  17. for(it = list.begin(); it != list.end(); ++it)
  18. {
  19. if((tmpNpc = (*it)->getNpc()))
  20. (*it)->onCreatureSay(player, MSG_NPC_TO, text);
  21. }
  22. return true;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement