Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "ScriptPCH.h"
- class Donor_Refund : public CreatureScript
- {
- public:
- Donor_Refund() : CreatureScript("Donor_Refund") { }
- bool OnGossipHello(Player * player, Creature * creature)
- {
- player->ADD_GOSSIP_ITEM( 3, "What does this npc do?",GOSSIP_SENDER_MAIN, 999);
- player->ADD_GOSSIP_ITEM( 3, "Begin selling back legendaries!", GOSSIP_SENDER_MAIN, 0);
- player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, creature->GetGUID());
- return true;
- }
- bool OnGossipSelect(Player * player, Creature * creature, uint32 sender, uint32 uiAction)
- {
- if (sender == GOSSIP_SENDER_MAIN)
- {
- player->PlayerTalkClass->ClearMenus();
- switch(uiAction)
- {
- case 999:
- creature->MonsterWhisper("You may sell me your legendary items in exchange for Donation Tokens. This is useful if you wish to buy a different item to try or want to mail them to an alt! Thank you for your continued support!", player->GetGUID());
- OnGossipHello(player, creature);
- return true;
- break;
- case 0:
- if (player->HasItemCount(18583, 1))
- {
- player->ADD_GOSSIP_ITEM(3, "Sell back Warglaive of Azzinoth (offhand 1.0 second).", GOSSIP_SENDER_MAIN, 2);
- }
- if (player->HasItemCount(18582, 1))
- {
- player->ADD_GOSSIP_ITEM(3, "Sell back Twin Blades of Azzinoth.", GOSSIP_SENDER_MAIN, 3);
- }
- if (player->HasItemCount(22691, 1))
- {
- player->ADD_GOSSIP_ITEM(3, "Sell back Corrupted Ashebringer.", GOSSIP_SENDER_MAIN, 4);
- }
- if (player->HasItemCount(17142, 1))
- {
- player->ADD_GOSSIP_ITEM(3, "Sell back Shard of the Defiler.", GOSSIP_SENDER_MAIN, 5);
- }
- if (player->HasItemCount(13262, 1))
- {
- player->ADD_GOSSIP_ITEM(3, "Sell back Ashebringer.", GOSSIP_SENDER_MAIN, 6);
- }
- if (player->HasItemCount(32837, 1))
- {
- player->ADD_GOSSIP_ITEM(3, "Sell back Warglaive of Azzinoth (2.8 second mainhand).", GOSSIP_SENDER_MAIN, 7);
- }
- if (player->HasItemCount(49623, 1))
- {
- player->ADD_GOSSIP_ITEM(3, "Sell back Shadowmourne.", GOSSIP_SENDER_MAIN, 8);
- }
- if (player->HasItemCount(32838, 1))
- {
- player->ADD_GOSSIP_ITEM(3, "Sell back Warglaive of Azzinoth (offhand 1.4 second).", GOSSIP_SENDER_MAIN, 9);
- }
- if (player->HasItemCount(19019, 1))
- {
- player->ADD_GOSSIP_ITEM(3, "Sell back Thunderfury, Blessed Blade of the Windseeker.", GOSSIP_SENDER_MAIN, 10);
- }
- if (player->HasItemCount(17182, 1))
- {
- player->ADD_GOSSIP_ITEM(3, "Sell back Sulfuras, Hand of Ragnaros.", GOSSIP_SENDER_MAIN, 11);
- }
- if (player->HasItemCount(51922, 1))
- {
- player->ADD_GOSSIP_ITEM(3, "Sell back Scourgelord's Baton (Critical strike).", GOSSIP_SENDER_MAIN, 12);
- }
- if (player->HasItemCount(50781, 1))
- {
- player->ADD_GOSSIP_ITEM(3, "Sell back Scourgelord's Baton (Resilience).", GOSSIP_SENDER_MAIN, 13);
- }
- if (player->HasItemCount(30318, 1))
- {
- player->ADD_GOSSIP_ITEM(3, "Sell back Netherstrand Longbow.", GOSSIP_SENDER_MAIN, 14);
- }
- if (player->HasItemCount(47371, 1))
- {
- player->ADD_GOSSIP_ITEM(3, "Sell back Lost Totem.", GOSSIP_SENDER_MAIN, 15);
- }
- if (player->HasItemCount(46017, 1))
- {
- player->ADD_GOSSIP_ITEM(3, "Va'lanyr, Hammer of the Ancient Kings.", GOSSIP_SENDER_MAIN, 16);
- }
- if (player->HasItemCount(30312, 1))
- {
- player->ADD_GOSSIP_ITEM(3, "Sell back Infinity Blade.", GOSSIP_SENDER_MAIN, 17);
- }
- if (player->HasItemCount(30313, 1))
- {
- player->ADD_GOSSIP_ITEM(3, "Staff of Disintegration.", GOSSIP_SENDER_MAIN, 18);
- }
- if (player->HasItemCount(18584, 1))
- {
- player->ADD_GOSSIP_ITEM(3, "Sell back Warglaive of Azzinoth (Mainhand 1.8sec).", GOSSIP_SENDER_MAIN, 19);
- }
- if (player->HasItemCount(40497 , 1))
- {
- player->ADD_GOSSIP_ITEM(3, "Sell back Black Ice.", GOSSIP_SENDER_MAIN, 20);
- }
- if (player->HasItemCount(30314, 1))
- {
- player->ADD_GOSSIP_ITEM(3, "Sell back Phaseshift Bulwark.", GOSSIP_SENDER_MAIN, 21);
- }
- if (player->HasItemCount(34334, 1))
- {
- player->ADD_GOSSIP_ITEM(3, "Sell back Thori'dal, The Stars Fury.", GOSSIP_SENDER_MAIN, 22);
- }
- if (player->HasItemCount(22736, 1))
- {
- player->ADD_GOSSIP_ITEM(3, "Sell back Adonisus, Reaper of Souls.", GOSSIP_SENDER_MAIN, 23);
- }
- if (player->HasItemCount(1168, 1))
- {
- player->ADD_GOSSIP_ITEM(3, "Sell back Skullflame Shield.", GOSSIP_SENDER_MAIN, 24);
- }
- if (player->HasItemCount(30316, 1))
- {
- player->ADD_GOSSIP_ITEM(3, "Sell back Devastation.", GOSSIP_SENDER_MAIN, 25);
- }
- if (player->HasItemCount(32824, 1))
- {
- player->ADD_GOSSIP_ITEM(3, "Sell back Ashbringer 2.0.", GOSSIP_SENDER_MAIN, 26);
- }
- if (player->HasItemCount(24044, 1))
- {
- player->ADD_GOSSIP_ITEM(3, "Sell back Hellreaver.", GOSSIP_SENDER_MAIN, 27);
- }
- if (player->HasItemCount(22589, 1))
- {
- player->ADD_GOSSIP_ITEM(3, "Sell back Atiesh, Greatstaff of the Guardian (Haste).", GOSSIP_SENDER_MAIN, 28);
- }
- if (player->HasItemCount(22630, 1))
- {
- player->ADD_GOSSIP_ITEM(3, "Sell back Atiesh, Greatstaff of the Guardian (Spell Critical Strike Rating).", GOSSIP_SENDER_MAIN, 29);
- }
- if (player->HasItemCount(22631, 1))
- {
- player->ADD_GOSSIP_ITEM(3, "Sell back Atiesh, Greatstaff of the Guardian (Mp5).", GOSSIP_SENDER_MAIN, 30);
- }
- if (player->HasItemCount(22632, 1))
- {
- player->ADD_GOSSIP_ITEM(3, "Sell back Atiesh, Greatstaff of the Guardian (Spell Penetration).", GOSSIP_SENDER_MAIN, 31);
- }
- if (player->HasItemCount(30317, 1))
- {
- player->ADD_GOSSIP_ITEM(3, "Sell back Cosmic Infuser.", GOSSIP_SENDER_MAIN, 32);
- }
- if (player->HasItemCount(30311, 1))
- {
- player->ADD_GOSSIP_ITEM(3, "Sell back Warp Slicer.", GOSSIP_SENDER_MAIN, 33);
- }
- if (player->HasItemCount(32375, 1))
- {
- player->ADD_GOSSIP_ITEM(3, "Sell back Bulwark of Azzinoth.", GOSSIP_SENDER_MAIN, 34);
- }
- if (player->HasItemCount(37693, 1))
- {
- player->ADD_GOSSIP_ITEM(3, "Sell back Cataclysmic Ripper.", GOSSIP_SENDER_MAIN, 35);
- }
- if (player->HasItemCount(40704, 1))
- {
- player->ADD_GOSSIP_ITEM(3, "Sell back Cataclysmic Render.", GOSSIP_SENDER_MAIN, 36);
- }
- if (player->HasItemCount(25667, 1))
- {
- player->ADD_GOSSIP_ITEM(3, "Sell back Lost Libram.", GOSSIP_SENDER_MAIN, 37);
- }
- if (player->HasItemCount(28165, 1))
- {
- player->ADD_GOSSIP_ITEM(3, "Sell back Goblin Tech Prototype 1.2a.", GOSSIP_SENDER_MAIN, 38);
- }
- if (player->HasItemCount(42505, 1))
- {
- player->ADD_GOSSIP_ITEM(3, "Sell back Dislodged Skeletal Arm.", GOSSIP_SENDER_MAIN, 39);
- }
- if (player->HasItemCount(45257, 1))
- {
- player->ADD_GOSSIP_ITEM(3, "Sell back Consortium Blessed Wand.", GOSSIP_SENDER_MAIN, 40);
- }
- if (player->HasItemCount(18438, 1))
- {
- player->ADD_GOSSIP_ITEM(3, "Sell back Alliance Shirt of the Brutal Donor.", GOSSIP_SENDER_MAIN, 41);
- }
- if (player->HasItemCount(53509, 1))
- {
- player->ADD_GOSSIP_ITEM(3, "Sell back Horde Shirt of the Brutal Donor.", GOSSIP_SENDER_MAIN, 42);
- }
- if (player->HasItemCount(12805, 1))
- {
- player->ADD_GOSSIP_ITEM(3, "Sell back Alliance Shirt of the Tanking Donor.", GOSSIP_SENDER_MAIN, 43);
- }
- if (player->HasItemCount(47364, 1))
- {
- player->ADD_GOSSIP_ITEM(3, "Sell back Horde Shirt of the Tanking Donor.", GOSSIP_SENDER_MAIN, 44);
- }
- if (player->HasItemCount(49675, 1))
- {
- player->ADD_GOSSIP_ITEM(3, "Sell back Lost Idol.", GOSSIP_SENDER_MAIN, 45);
- }
- if (player->HasItemCount(11264, 1))
- {
- player->ADD_GOSSIP_ITEM(3, "Sell back Draconic Fury.", GOSSIP_SENDER_MAIN, 46);
- }
- if (player->HasItemCount(13312, 1))
- {
- player->ADD_GOSSIP_ITEM(3, "Sell back Dragonstrike.", GOSSIP_SENDER_MAIN, 47);
- }
- if (player->HasItemCount(24320, 1))
- {
- player->ADD_GOSSIP_ITEM(3, "Sell back Cleaver of the Frozen Wastes.", GOSSIP_SENDER_MAIN, 48);
- }
- if (player->HasItemCount(11021, 1))
- {
- player->ADD_GOSSIP_ITEM(3, "Sell back X-Treme Hunting Rifle.", GOSSIP_SENDER_MAIN, 49);
- }
- if (player->HasItemCount(40967, 1))
- {
- player->ADD_GOSSIP_ITEM(3, "Sell back Maiev's Render.", GOSSIP_SENDER_MAIN, 50);
- }
- if (player->HasItemCount(40968, 1))
- {
- player->ADD_GOSSIP_ITEM(3, "Sell back Maiev's Ripper.", GOSSIP_SENDER_MAIN, 51);
- }
- if (player->HasItemCount(34058, 1))
- {
- player->ADD_GOSSIP_ITEM(3, "Sell back Fury of Quel'Danas.", GOSSIP_SENDER_MAIN, 52);
- }
- if (player->HasItemCount(42756, 1))
- {
- player->ADD_GOSSIP_ITEM(3, "Sell back Alliance Shirt of the Casting Donor.", GOSSIP_SENDER_MAIN, 53);
- }
- if (player->HasItemCount(44801, 1))
- {
- player->ADD_GOSSIP_ITEM(3, "Sell back Horde Shirt of the Casting Donor.", GOSSIP_SENDER_MAIN, 54);
- }
- player->PlayerTalkClass->SendGossipMenu(907, creature->GetGUID());
- return true;
- break;
- case 2:
- player->DestroyItemCount(18583, 1, true);
- player->AddItem(41596, 2);
- OnGossipHello(player, creature);
- return true;
- break;
- case 3:
- player->DestroyItemCount(18582, 1, true);
- player->AddItem(41596, 2);
- OnGossipHello(player, creature);
- return true;
- break;
- case 4:
- player->DestroyItemCount(22691, 1, true);
- player->AddItem(41596, 4);
- OnGossipHello(player, creature);
- return true;
- break;
- case 5:
- player->DestroyItemCount(17142, 1, true);
- player->AddItem(41596, 2);
- OnGossipHello(player, creature);
- return true;
- break;
- case 6:
- player->DestroyItemCount(13262, 1, true);
- player->AddItem(41596, 4);
- OnGossipHello(player, creature);
- return true;
- break;
- case 7:
- player->DestroyItemCount(32387, 1, true);
- player->AddItem(41596, 2);
- OnGossipHello(player, creature);
- return true;
- break;
- case 8:
- player->DestroyItemCount(49623, 1, true);
- player->AddItem(41596, 4);
- OnGossipHello(player, creature);
- return true;
- break;
- case 9:
- player->DestroyItemCount(32838, 1, true);
- player->AddItem(41596, 2);
- OnGossipHello(player, creature);
- return true;
- break;
- case 10:
- player->DestroyItemCount(19019, 1, true);
- player->AddItem(41596, 2);
- OnGossipHello(player, creature);
- return true;
- break;
- case 11:
- player->DestroyItemCount(17182, 1, true);
- player->AddItem(41596, 4);
- OnGossipHello(player, creature);
- return true;
- break;
- case 12:
- player->DestroyItemCount(51922, 1, true);
- player->AddItem(41596, 2);
- OnGossipHello(player, creature);
- return true;
- break;
- case 13:
- player->DestroyItemCount(50781, 1, true);
- player->AddItem(41596, 2);
- OnGossipHello(player, creature);
- return true;
- break;
- case 14:
- player->DestroyItemCount(30318, 1, true);
- player->AddItem(41596, 4);
- OnGossipHello(player, creature);
- return true;
- break;
- case 15:
- player->DestroyItemCount(47371, 1, true);
- player->AddItem(41596, 4);
- OnGossipHello(player, creature);
- return true;
- break;
- case 16:
- player->DestroyItemCount(46017, 1, true);
- player->AddItem(41596, 2);
- OnGossipHello(player, creature);
- return true;
- break;
- case 17:
- player->DestroyItemCount(30312, 1, true);
- player->AddItem(41596, 2);
- OnGossipHello(player, creature);
- return true;
- break;
- case 18:
- player->DestroyItemCount(30313, 1, true);
- player->AddItem(41596, 4);
- OnGossipHello(player, creature);
- return true;
- break;
- case 19:
- player->DestroyItemCount(18584, 1, true);
- player->AddItem(41596, 2);
- OnGossipHello(player, creature);
- return true;
- break;
- case 20:
- player->DestroyItemCount(40497, 1, true);
- player->AddItem(41596, 4);
- OnGossipHello(player, creature);
- return true;
- break;
- case 21:
- player->DestroyItemCount(30314, 1, true);
- player->AddItem(41596, 2);
- OnGossipHello(player, creature);
- return true;
- break;
- case 22:
- player->DestroyItemCount(34334, 1, true);
- player->AddItem(41596, 4);
- OnGossipHello(player, creature);
- return true;
- break;
- case 23:
- player->DestroyItemCount(22736, 1, true);
- player->AddItem(41596, 2);
- OnGossipHello(player, creature);
- return true;
- break;
- case 24:
- player->DestroyItemCount(1168, 1, true);
- player->AddItem(41596, 2);
- OnGossipHello(player, creature);
- return true;
- break;
- case 25:
- player->DestroyItemCount(30316, 1, true);
- player->AddItem(41596, 4);
- OnGossipHello(player, creature);
- return true;
- break;
- case 26:
- player->DestroyItemCount(32824, 1, true);
- player->AddItem(41596, 5);
- OnGossipHello(player, creature);
- return true;
- break;
- case 27:
- player->DestroyItemCount(24044, 1, true);
- player->AddItem(41596, 4);
- OnGossipHello(player, creature);
- return true;
- break;
- case 28:
- player->DestroyItemCount(22589, 1, true);
- player->AddItem(41596, 4);
- OnGossipHello(player, creature);
- return true;
- break;
- case 29:
- player->DestroyItemCount(22630, 1, true);
- player->AddItem(41596, 4);
- OnGossipHello(player, creature);
- return true;
- break;
- case 30:
- player->DestroyItemCount(22631, 1, true);
- player->AddItem(41596, 4);
- OnGossipHello(player, creature);
- return true;
- break;
- case 31:
- player->DestroyItemCount(22632, 1, true);
- player->AddItem(41596, 4);
- OnGossipHello(player, creature);
- return true;
- break;
- case 32:
- player->DestroyItemCount(30317, 1, true);
- player->AddItem(41596, 2);
- OnGossipHello(player, creature);
- return true;
- break;
- case 33:
- player->DestroyItemCount(30311, 1, true);
- player->AddItem(41596, 2);
- OnGossipHello(player, creature);
- return true;
- break;
- case 34:
- player->DestroyItemCount(32375, 1, true);
- player->AddItem(41596, 2);
- OnGossipHello(player, creature);
- return true;
- break;
- case 35:
- player->DestroyItemCount(37693, 1, true);
- player->AddItem(41596, 2);
- OnGossipHello(player, creature);
- return true;
- break;
- case 36:
- player->DestroyItemCount(40704, 1, true);
- player->AddItem(41596, 2);
- OnGossipHello(player, creature);
- return true;
- break;
- case 37:
- player->DestroyItemCount(25667, 1, true);
- player->AddItem(41596, 4);
- OnGossipHello(player, creature);
- return true;
- break;
- case 38:
- player->DestroyItemCount(28165, 1, true);
- player->AddItem(41596, 4);
- OnGossipHello(player, creature);
- return true;
- break;
- case 39:
- player->DestroyItemCount(42505, 1, true);
- player->AddItem(41596, 4);
- OnGossipHello(player, creature);
- return true;
- break;
- case 40:
- player->DestroyItemCount(45257, 1, true);
- player->AddItem(41596, 4);
- OnGossipHello(player, creature);
- return true;
- break;
- case 41:
- player->DestroyItemCount(18438, 1, true);
- player->AddItem(41596, 1);
- OnGossipHello(player, creature);
- return true;
- break;
- case 42:
- player->DestroyItemCount(53509, 1, true);
- player->AddItem(41596, 1);
- OnGossipHello(player, creature);
- return true;
- break;
- case 43:
- player->DestroyItemCount(12805, 1, true);
- player->AddItem(41596, 1);
- OnGossipHello(player, creature);
- return true;
- break;
- case 44:
- player->DestroyItemCount(47364, 1, true);
- player->AddItem(41596, 1);
- OnGossipHello(player, creature);
- return true;
- break;
- case 45:
- player->DestroyItemCount(49675, 1, true);
- player->AddItem(41596, 4);
- OnGossipHello(player, creature);
- return true;
- break;
- case 46:
- player->DestroyItemCount(11264, 1, true);
- player->AddItem(41596, 2);
- OnGossipHello(player, creature);
- return true;
- break;
- case 47:
- player->DestroyItemCount(13312, 1, true);
- player->AddItem(41596, 2);
- OnGossipHello(player, creature);
- return true;
- break;
- case 48:
- player->DestroyItemCount(24320, 1, true);
- player->AddItem(41596, 2);
- OnGossipHello(player, creature);
- return true;
- break;
- case 49:
- player->DestroyItemCount(11021, 1, true);
- player->AddItem(41596, 4);
- OnGossipHello(player, creature);
- return true;
- break;
- case 50:
- player->DestroyItemCount(40967, 1, true);
- player->AddItem(41596, 2);
- OnGossipHello(player, creature);
- return true;
- break;
- case 51:
- player->DestroyItemCount(40968, 1, true);
- player->AddItem(41596, 2);
- OnGossipHello(player, creature);
- return true;
- break;
- case 52:
- player->DestroyItemCount(34058, 1, true);
- player->AddItem(41596, 4);
- OnGossipHello(player, creature);
- return true;
- break;
- case 53:
- player->DestroyItemCount(42756, 1, true);
- player->AddItem(41596, 1);
- OnGossipHello(player, creature);
- return true;
- break;
- case 54:
- player->DestroyItemCount(44801, 1, true);
- player->AddItem(41596, 1);
- OnGossipHello(player, creature);
- return true;
- break;
- }
- return true;
- }
- player->CLOSE_GOSSIP_MENU();
- }
- };
- void AddSC_Donor_Refund()
- {
- new Donor_Refund();
- }
Advertisement
Add Comment
Please, Sign In to add comment