Advertisement
Guest User

awd

a guest
May 14th, 2015
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 10.33 KB | None | 0 0
  1. enum Tokens
  2. {
  3.     Vote_Token = 44791
  4. };
  5.  
  6. class PveTitleNpc : public CreatureScript
  7. {
  8. public:
  9.     PveTitleNpc() : CreatureScript("PveTitleNpc"){}
  10.  
  11.     bool OnGossipHello(Player* player, Creature* creature)
  12.     {
  13.         player->ADD_GOSSIP_ITEM(4, "Raiding / Dungeon Titles", GOSSIP_SENDER_MAIN, 2);
  14.         player->ADD_GOSSIP_ITEM(4, "Reputation Titles", GOSSIP_SENDER_MAIN, 3);
  15.         player->ADD_GOSSIP_ITEM(4, "Other Titles", GOSSIP_SENDER_MAIN, 4);
  16.         player->SEND_GOSSIP_MENU(1, creature->GetGUID());
  17.         return true;
  18.     }
  19.  
  20.     bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action)
  21.     {
  22.         player->PlayerTalkClass->ClearMenus();
  23.         switch (action)
  24.         {
  25.             case 2:
  26.                 player->ADD_GOSSIP_ITEM(4, "Champion Of The Naaru", GOSSIP_SENDER_MAIN, 5);
  27.                 player->ADD_GOSSIP_ITEM(4, "Hand Of Adal", GOSSIP_SENDER_MAIN, 6);
  28.                 player->ADD_GOSSIP_ITEM(4, "The Patient", GOSSIP_SENDER_MAIN, 7);
  29.                 player->ADD_GOSSIP_ITEM(4, "The Undying", GOSSIP_SENDER_MAIN, 8);
  30.                 player->ADD_GOSSIP_ITEM(4, "The Immortal", GOSSIP_SENDER_MAIN, 9);
  31.                 player->ADD_GOSSIP_ITEM(4, "Of The Nightfall", GOSSIP_SENDER_MAIN, 10);
  32.                 player->ADD_GOSSIP_ITEM(4, "Twilight Vanquisher", GOSSIP_SENDER_MAIN, 11);
  33.                 player->ADD_GOSSIP_ITEM(4, "Obsidium Slayer", GOSSIP_SENDER_MAIN, 12);
  34.                 player->ADD_GOSSIP_ITEM(4, "Magic Seeker", GOSSIP_SENDER_MAIN, 13);
  35.                 player->ADD_GOSSIP_ITEM(4, "Starcaller", GOSSIP_SENDER_MAIN, 14);
  36.                 player->ADD_GOSSIP_ITEM(4, "The Astral Walker", GOSSIP_SENDER_MAIN, 15);
  37.                 player->ADD_GOSSIP_ITEM(4, "Herald Of Titans", GOSSIP_SENDER_MAIN, 16);
  38.                 player->ADD_GOSSIP_ITEM(4, "The Celestial Defender", GOSSIP_SENDER_MAIN, 17);
  39.                 player->ADD_GOSSIP_ITEM(4, "Conqueror Of Ulduar", GOSSIP_SENDER_MAIN, 18);
  40.                 player->ADD_GOSSIP_ITEM(4, "Champion Of Ulduar", GOSSIP_SENDER_MAIN, 19);
  41.                 player->ADD_GOSSIP_ITEM(4, "Death's Demise", GOSSIP_SENDER_MAIN, 20);
  42.                 player->ADD_GOSSIP_ITEM(4, "Conqueror Of Naxxramas", GOSSIP_SENDER_MAIN, 21);
  43.                 player->ADD_GOSSIP_ITEM(4, "Champion Of The Frozen Wastes", GOSSIP_SENDER_MAIN, 22);
  44.                 player->ADD_GOSSIP_ITEM(4, "The Argent Defender", GOSSIP_SENDER_MAIN, 23);
  45.                 player->ADD_GOSSIP_ITEM(4, "The Kingslayer", GOSSIP_SENDER_MAIN, 24);
  46.                 player->ADD_GOSSIP_ITEM(4, "Bane Of The Fallen King", GOSSIP_SENDER_MAIN, 25);
  47.                 player->ADD_GOSSIP_ITEM(4, "The Light Of Dawn", GOSSIP_SENDER_MAIN, 26);
  48.                 player->SEND_GOSSIP_MENU(1, creature->GetGUID());
  49.                 break; 
  50.             case 3: // Reputation Titles
  51.                 player->ADD_GOSSIP_ITEM(4, "Of The Shattered Sun", GOSSIP_SENDER_MAIN, 27);
  52.                 player->ADD_GOSSIP_ITEM(4, "The Exhalted", GOSSIP_SENDER_MAIN, 28);
  53.                 player->ADD_GOSSIP_ITEM(4, "Ambassador", GOSSIP_SENDER_MAIN, 29);
  54.                 player->ADD_GOSSIP_ITEM(4, "The Diplomat", GOSSIP_SENDER_MAIN, 30);
  55.                 player->ADD_GOSSIP_ITEM(4, "Bloodsail Admiral", GOSSIP_SENDER_MAIN, 31);
  56.                 player->ADD_GOSSIP_ITEM(4, "Crusader", GOSSIP_SENDER_MAIN, 32);
  57.                 player->ADD_GOSSIP_ITEM(4, "The Insane", GOSSIP_SENDER_MAIN, 33);
  58.                 player->ADD_GOSSIP_ITEM(4, "Guardian Of Cenarius", GOSSIP_SENDER_MAIN, 34);
  59.                 player->ADD_GOSSIP_ITEM(4, "The Argent Champion", GOSSIP_SENDER_MAIN, 35);
  60.                 player->ADD_GOSSIP_ITEM(4, "Of The Ashen Verdict", GOSSIP_SENDER_MAIN, 36);
  61.                 player->ADD_GOSSIP_ITEM(4, "Of Darnassus", GOSSIP_SENDER_MAIN, 37);
  62.                 player->ADD_GOSSIP_ITEM(4, "Of Gnomeregan", GOSSIP_SENDER_MAIN, 38);
  63.                 player->ADD_GOSSIP_ITEM(4, "Of Ironforge", GOSSIP_SENDER_MAIN, 39);
  64.                 player->ADD_GOSSIP_ITEM(4, "Of Stormwind", GOSSIP_SENDER_MAIN, 40);
  65.                 player->ADD_GOSSIP_ITEM(4, "Of The Exodar", GOSSIP_SENDER_MAIN, 41);
  66.                 player->ADD_GOSSIP_ITEM(4, "Of Orgrimmar", GOSSIP_SENDER_MAIN, 42);
  67.                 player->ADD_GOSSIP_ITEM(4, "Of Sen'jin", GOSSIP_SENDER_MAIN, 43);
  68.                 player->ADD_GOSSIP_ITEM(4, "Of Silvermoon", GOSSIP_SENDER_MAIN, 44);
  69.                 player->ADD_GOSSIP_ITEM(4, "Of Thunderbluff", GOSSIP_SENDER_MAIN, 45);
  70.                 player->ADD_GOSSIP_ITEM(4, "Of The Undercity", GOSSIP_SENDER_MAIN, 46);
  71.                 player->ADD_GOSSIP_ITEM(4, "For The Alliance", GOSSIP_SENDER_MAIN, 47);
  72.                 player->ADD_GOSSIP_ITEM(4, "For The Horde", GOSSIP_SENDER_MAIN, 48);
  73.                 player->SEND_GOSSIP_MENU(1, creature->GetGUID());
  74.                 break;
  75.             case 4: // Other Titles
  76.                 player->ADD_GOSSIP_ITEM(4, "Scarab Lord", GOSSIP_SENDER_MAIN, 49);
  77.                 player->ADD_GOSSIP_ITEM(4, "Brewmaster", GOSSIP_SENDER_MAIN, 50);
  78.                 player->ADD_GOSSIP_ITEM(4, "The Love Fool", GOSSIP_SENDER_MAIN, 51);
  79.                 player->ADD_GOSSIP_ITEM(4, "Matron", GOSSIP_SENDER_MAIN, 52);
  80.                 player->ADD_GOSSIP_ITEM(4, "Patron", GOSSIP_SENDER_MAIN, 53);
  81.                 player->ADD_GOSSIP_ITEM(4, "The Hallowed", GOSSIP_SENDER_MAIN, 54);
  82.                 player->ADD_GOSSIP_ITEM(4, "Merrymaker", GOSSIP_SENDER_MAIN, 55);
  83.                 player->ADD_GOSSIP_ITEM(4, "The Noble", GOSSIP_SENDER_MAIN, 56);
  84.                 player->ADD_GOSSIP_ITEM(4, "The Pilgram", GOSSIP_SENDER_MAIN, 57);
  85.                 player->ADD_GOSSIP_ITEM(4, "Flame Keeper", GOSSIP_SENDER_MAIN, 58);
  86.                 player->ADD_GOSSIP_ITEM(4, "Flame Warden", GOSSIP_SENDER_MAIN, 59);
  87.                 player->ADD_GOSSIP_ITEM(4, "Elder", GOSSIP_SENDER_MAIN, 60);
  88.                 player->ADD_GOSSIP_ITEM(4, "Loremaster", GOSSIP_SENDER_MAIN, 61);
  89.                 player->ADD_GOSSIP_ITEM(4, "The Seeker", GOSSIP_SENDER_MAIN, 62);
  90.                 player->ADD_GOSSIP_ITEM(4, "Salty", GOSSIP_SENDER_MAIN, 63);
  91.                 player->ADD_GOSSIP_ITEM(4, "Chef", GOSSIP_SENDER_MAIN, 64);
  92.                 player->ADD_GOSSIP_ITEM(4, "Assassin", GOSSIP_SENDER_MAIN, 65);
  93.                 player->ADD_GOSSIP_ITEM(4, "The Explorer", GOSSIP_SENDER_MAIN, 66);
  94.                 player->ADD_GOSSIP_ITEM(4, "Jenkins", GOSSIP_SENDER_MAIN, 67);
  95.                 player->SEND_GOSSIP_MENU(1, creature->GetGUID());
  96.                 break;
  97.             case 5: //Champ Of Naaru
  98.                 TitleAction(player, 53);
  99.                 break;
  100.             case 6: //Hand Of Adal
  101.                 TitleAction(player, 64);
  102.                 break;
  103.             case 7: //The Patient
  104.                 TitleAction(player, 172);
  105.                 break;
  106.             case 8: //The Undying
  107.                 TitleAction(player, 142);
  108.                 break;
  109.             case 9: //The Immortal
  110.                 TitleAction(player, 141);
  111.                 break;
  112.             case 10: //Nightfall
  113.                 TitleAction(player, 140);
  114.                 break;
  115.             case 11: //Twilight Vanq
  116.                 TitleAction(player, 121);
  117.                 break;
  118.             case 12: //Obsid Slay
  119.                 TitleAction(player, 130);
  120.                 break;
  121.             case 13: //Magic Seeker
  122.                 TitleAction(player, 120);
  123.                 break;
  124.             case 14: //Starcaller
  125.                 TitleAction(player, 164);
  126.                 break;
  127.             case 15: //Astral Walker
  128.                 TitleAction(player, 165);
  129.                 break;
  130.             case 16: //Herald Of Titans
  131.                 TitleAction(player, 166);
  132.                 break;
  133.             case 17: //Celestial Def
  134.                 TitleAction(player, 150);
  135.                 break;
  136.             case 18: //Conq Of Uld
  137.                 TitleAction(player, 160);
  138.                 break;
  139.             case 19: //Champ Of Uld
  140.                 TitleAction(player, 161);
  141.                 break;
  142.             case 20: //Death Demise
  143.                 TitleAction(player, 158);
  144.                 break;
  145.             case 21: //Conq Of Naxx
  146.                 TitleAction(player, 122);
  147.                 break;
  148.             case 22: //Champ Froze Waste
  149.                 TitleAction(player, 129);
  150.                 break;
  151.             case 23: //Argent Defender
  152.                 TitleAction(player, 171);
  153.                 break;
  154.             case 24: //Kingslayer
  155.                 TitleAction(player, 175);
  156.                 break;
  157.             case 25: //Bane Fallen King
  158.                 TitleAction(player, 174);
  159.                 break;
  160.             case 26: //Light OF Dawn
  161.                 TitleAction(player, 53);
  162.                 break;
  163.             case 27: //Shat Sun
  164.                 TitleAction(player, 63);
  165.                 break;
  166.             case 28: //Exhalted
  167.                 TitleAction(player, 77);
  168.                 break;
  169.             case 29: //Ambassador
  170.                 TitleAction(player, 130);
  171.                 break;
  172.             case 30: //Diplomat
  173.                 TitleAction(player, 79);
  174.                 break;
  175.             case 31: //Bloodsail
  176.                 TitleAction(player, 144);
  177.                 break;
  178.             case 32: //Crusader
  179.                 TitleAction(player, 156);
  180.                 break;
  181.             case 33: //Insane
  182.                 TitleAction(player, 145);
  183.                 break;
  184.             case 34: //Cenarius
  185.                 TitleAction(player, 132);
  186.                 break;
  187.             case 35: //Argent Champ
  188.                 TitleAction(player, 131);
  189.                 break;
  190.             case 36: //Ashen Verdict
  191.                 TitleAction(player, 176);
  192.                 break;
  193.             case 37: //Darnassus
  194.                 TitleAction(player, 147);
  195.                 break;
  196.             case 38: //Gnomeregan
  197.                 TitleAction(player, 113);
  198.                 break;
  199.             case 39: //Ironforge
  200.                 TitleAction(player, 148);
  201.                 break;
  202.             case 40: //Stormwind
  203.                 TitleAction(player, 149);
  204.                 break;
  205.             case 41: //Exodar
  206.                 TitleAction(player, 146);
  207.                 break;
  208.             case 42: //Orgrimmar
  209.                 TitleAction(player, 150);
  210.                 break;
  211.             case 43: //Sen'jin
  212.                 TitleAction(player, 151);
  213.                 break;
  214.             case 44: //Silvermoon
  215.                 TitleAction(player, 152);
  216.                 break;
  217.             case 45: //Thunderbluff
  218.                 TitleAction(player, 153);
  219.                 break;
  220.             case 46: //Champ Of Undercity
  221.                 TitleAction(player, 154);
  222.                 break;
  223.             case 47: //For The Alliance
  224.                 TitleAction(player, 53);
  225.                 break;
  226.             case 48: //For The Horde
  227.                 TitleAction(player, 53);
  228.                 break;
  229.             case 49: //Scarb Lord
  230.                 TitleAction(player, 46);
  231.                 break;
  232.             case 50: //Brewmaster
  233.                 TitleAction(player, 133);
  234.                 break;
  235.             case 51: //Love Fool
  236.                 TitleAction(player, 135);
  237.                 break;
  238.             case 52: //Matron
  239.                 TitleAction(player, 137);
  240.                 break;
  241.             case 53: //Patron
  242.                 TitleAction(player, 138);
  243.                 break;
  244.             case 54: //Hallowed
  245.                 TitleAction(player, 124);
  246.                 break;
  247.             case 55: //Merrymaker
  248.                 TitleAction(player, 134);
  249.                 break;
  250.             case 56: //Noble
  251.                 TitleAction(player, 155);
  252.                 break;
  253.             case 57: //Pilgram
  254.                 TitleAction(player, 168);
  255.                 break;
  256.             case 58: //Flame Keeper
  257.                 TitleAction(player, 76);
  258.                 break;
  259.             case 59: //Flame Warden
  260.                 TitleAction(player, 75);
  261.                 break;
  262.             case 60: //Elder
  263.                 TitleAction(player, 74);
  264.                 break;
  265.             case 61: //Loremaster
  266.                 TitleAction(player, 125);
  267.                 break;
  268.             case 62: //Seeker
  269.                 TitleAction(player, 81);
  270.                 break;
  271.             case 63: //Salty
  272.                 TitleAction(player, 83);
  273.                 break;
  274.             case 64: //Chef
  275.                 TitleAction(player, 84);
  276.                 break;
  277.             case 65: //Assassin
  278.                 TitleAction(player, 95);
  279.                 break;
  280.             case 66: //Explorer
  281.                 TitleAction(player, 78);
  282.                 break;
  283.             case 67: //Jenkins
  284.                 TitleAction(player, 143);
  285.                 break;
  286.         }
  287.        
  288.         return true;
  289.     }
  290.    
  291.     void TitleAction(Player* player, uint32 title)
  292.     {
  293.         if (player->HasItemCount(Vote_Token, 1, false))
  294.         {
  295.             player->DestroyItemCount(Vote_Token, 1, true, false);
  296.             player->SetTitle(sCharTitlesStore.LookupEntry(title));
  297.         }
  298.     }
  299. };
  300.  
  301. void AddSC_PveTitleNpc();
  302. {
  303.     new PveTitleNpc();
  304. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement