Advertisement
idontusemyphone

Untitled

Dec 18th, 2018
303
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1. #ifdef __WINGS_SYSTEM__
  2. enum {
  3. ITEM_WINGS_MAX_COUNT = 4,
  4. };
  5.  
  6. const static DWORD dwItemVnum[ITEM_WINGS_MAX_COUNT] = {86001, 86011, 86021, 86031, };
  7.  
  8. ACMD(do_select_wings)
  9. {
  10. if (ch->GetQuestFlag("wings.item-complete") == 0) return;
  11. if (ch->GetQuestFlag("wings.receive-complete") == 1) return;
  12.  
  13. char arg1[256];
  14. one_argument(argument, arg1, sizeof(arg1));
  15.  
  16. if (!*arg1) return;
  17. if (!*isnhdigit(*arg1)) return;
  18.  
  19. BYTE i;
  20. str_to_number(arg1, i);
  21.  
  22. if (i >= ITEM_WINGS_MAX_COUNT) return;
  23.  
  24. LPITEM item;
  25. if ((item = AutoGiveItem(dwItemVnum[i])))
  26. {
  27. quest::PC * pPC = quest::CQuestManager::instance().GetPCForce(ch->GetPlayerID());
  28.  
  29. int value = quest::CQuestManager::Instance().GetQuestStateIndex("wings", "__COMPLETE");
  30. pPC->SetFlag("wings.__status", value);
  31.  
  32. ch->SetQuestFlag("wings.receive-complete", 1);
  33. }
  34. }
  35. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement