Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*SQL SCRIPT*/
- //ITEM :
- /*
- UPDATE `Item_Template` SET `displayid`=32112 WHERE `entry`=8318;
- */
- //NPC :
- /*
- DELETE FROM `creature_template` WHERE (`entry`=999999);
- INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid1`, `modelid2`, `modelid3`, `modelid4`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `exp`, `faction_A`, `faction_H`, `npcflag`, `speed_walk`, `speed_run`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `spell5`, `spell6`, `spell7`, `spell8`, `PetSpellDataId`, `VehicleId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `Health_mod`, `Mana_mod`, `Armor_mod`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`, `WDBVerified`) VALUES (999999, 0, 0, 0, 0, 0, 28127, 0, 0, 0, 'Southpark', 'Armor Vendor', '', 0, 82, 82, 0, 35, 35, 1, 1, 1, 1, 3, 422, 586, 0, 642, 3.5, 2000, 0, 1, 0, 8, 0, 0, 0, 0, 0, 345, 509, 103, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 4, 999999, 999999, 1500, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 'npc_SouthPark', 0);
- */
- #include "ScriptPCH.h"
- #define Stan "Give Me Stan's Armor! (Warrior)"
- #define Cartman "Give Me Cartman's Armor! (Paladin)"
- #define Kyle "Give Me Kyle's Armor! (Mage)"
- #define Kenny "Give Me Kenny's Armor! (Range)"
- #define leave "Nevermind..."
- class npc_SouthPark : public CreatureScript
- {
- public:
- npc_SouthPark() : CreatureScript("npc_SouthPark") { }
- bool OnGossipHello(Player* player, Creature* creature)
- {
- {
- player->ADD_GOSSIP_ITEM(1, Stan, GOSSIP_SENDER_MAIN, 1);
- player->ADD_GOSSIP_ITEM(1, Cartman, GOSSIP_SENDER_MAIN, 2);
- player->ADD_GOSSIP_ITEM(1, Kyle, GOSSIP_SENDER_MAIN, 3);
- player->ADD_GOSSIP_ITEM(1, Kenny, GOSSIP_SENDER_MAIN, 4);
- player->ADD_GOSSIP_ITEM(0, Leave, GOSSIP_SENDER_MAIN, 10);
- player->SEND_GOSSIP_MENU(1, creature->GetGUID());
- }
- return true;
- }
- bool OnGossipSelect(Player* player, Creature* creature, uint32 sender, uint32 action)
- {
- uint32 stan[9] = {4080, 13955, 23087, 1154, 10740, 14621, 23577, 10835, 19031};
- uint32 kyle[3] = {21157, 14289, 20654};
- uint32 kenny[9] = {10261, 10056, 6526, 6594, 5963, 10257, 12522, 21697, 15289};
- uint32 cartman[8] = {14806, 2575, 8312, 23663, 8318, 8316, 4072, 3198};
- player->PlayerTalkClass->ClearMenus();
- switch(action)
- {
- case 1: //Stan Armor
- for(uint32 i = 0; i < sizeof(stan)/sizeof(uint32); i++)
- player->AddItem(stan[i],1);
- player->SaveToDB();
- ChatHandler(player).PSendSysMessage("Here is your armor, Stan!");
- player->CLOSE_GOSSIP_MENU();
- break;
- case 2:
- for(uint32 i = 0; i < sizeof(cartman)/sizeof(uint32); i++)
- player->AddItem(cartman[i],1);
- player->SaveToDB();
- ChatHandler(player).PSendSysMessage("Here is your armor, Cartman!");
- player->CLOSE_GOSSIP_MENU();
- break;
- case 3:
- for(uint32 i = 0; i < sizeof(kyle)/sizeof(uint32); i++)
- player->AddItem(kyle[i],1);
- player->SaveToDB();
- ChatHandler(player).PSendSysMessage("Here is your armor, Kyle");
- player->CLOSE_GOSSIP_MENU();
- break;
- case 4:
- for(uint32 i = 0; i < sizeof(kenny)/sizeof(uint32); i++)
- player->AddItem(kenny[i],1);
- player->SaveToDB();
- ChatHandler(player).PSendSysMessage("Here is your armor, Kenny");
- player->CLOSE_GOSSIP_MENU();
- break;
- case 10:
- player->CLOSE_GOSSIP_MENU();
- break;
- }
- }
- return true;
- };
- void AddSC_npc_SouthPark()
- {
- new npc_SouthPark();
- }
Advertisement
Add Comment
Please, Sign In to add comment