Inuyasha | Дата: Неділя, 05.12.2010, 14:13 | Сообщение # 1 |
Капрал
Группа: Пользователи
|
FunNpcBuff.cpp #include "ScriptPCH.h" #define GOSSIP_TEXT_WELCOME 40034 #define GOSSIP_NO_BUFF "Нет, у меня нет интереса." #define GOSSIP_BOM "Благословление Могушества" #define GOSSIP_BOK "Благословление Королей" #define GOSSIP_BOW "Благословление Мудрости" #define GOSSIP_BOS "Благословление Неприкосновенности" #define GOSSIP_INT "Чародейский Интеллект" #define GOSSIP_KIT "Могущество Природы" class FunNpcBuff : public CreatureScript { public: FunNpcBuff() : CreatureScript("FunNpcBuff") { } bool OnGossipHello(Player* pPlayer, Creature* pCreature) { pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_BOM, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_BOK, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_BOW, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_BOS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_INT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_KIT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_NO_BUFF, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 7); pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXT_WELCOME, pCreature->GetGUID()); return true; } bool OnGossipSelect(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) { pPlayer->PlayerTalkClass->ClearMenus(); switch(uiAction) { case GOSSIP_ACTION_INFO_DEF + 1: //BOM pPlayer->CastSpell(pPlayer, 48934, true); pPlayer->CLOSE_GOSSIP_MENU(); break; case GOSSIP_ACTION_INFO_DEF + 2: //BOK pPlayer->CastSpell(pPlayer, 25898, true); pPlayer->CLOSE_GOSSIP_MENU(); break; case GOSSIP_ACTION_INFO_DEF + 3: //BOW pPlayer->CastSpell(pPlayer, 48938, true); pPlayer->CLOSE_GOSSIP_MENU(); break; case GOSSIP_ACTION_INFO_DEF + 4: //BOS pPlayer->CastSpell(pPlayer, 25899, true); pPlayer->CLOSE_GOSSIP_MENU(); break; case GOSSIP_ACTION_INFO_DEF + 5: // INT pPlayer->CastSpell(pPlayer, 42995, true); pPlayer->CLOSE_GOSSIP_MENU(); break; case GOSSIP_ACTION_INFO_DEF + 6: // Kit Dru + priest Buff pPlayer->CastSpell(pPlayer, 48162, true); pPlayer->CastSpell(pPlayer, 48074, true); pPlayer->CastSpell(pPlayer, 48170, true); pPlayer->CastSpell(pPlayer, 48470, true); pPlayer->CLOSE_GOSSIP_MENU(); break; case GOSSIP_ACTION_INFO_DEF + 7: // end dialog pPlayer->CLOSE_GOSSIP_MENU(); break; } return true; } }; void AddSC_FunNpcBuff() { new FunNpcBuff; } FunNpcBuff.sql 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 (666633, 0, 0, 0, 0, 0, 25103, 0, 25106, 0, 'MyNpC', 'Buff me', NULL, 40034, 1, 1, 0, 35, 35, 1, 1, 1.14286, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 'FunNpcBuff', 12340); INSERT INTO npc_text (`ID`, `text0_0`, `text0_1`, `lang0`, `prob0`, `em0_0`, `em0_1`, `em0_2`, `em0_3`, `em0_4`, `em0_5`, `text1_0`, `text1_1`, `lang1`, `prob1`, `em1_0`, `em1_1`, `em1_2`, `em1_3`, `em1_4`, `em1_5`, `text2_0`, `text2_1`, `lang2`, `prob2`, `em2_0`, `em2_1`, `em2_2`, `em2_3`, `em2_4`, `em2_5`, `text3_0`, `text3_1`, `lang3`, `prob3`, `em3_0`, `em3_1`, `em3_2`, `em3_3`, `em3_4`, `em3_5`, `text4_0`, `text4_1`, `lang4`, `prob4`, `em4_0`, `em4_1`, `em4_2`, `em4_3`, `em4_4`, `em4_5`, `text5_0`, `text5_1`, `lang5`, `prob5`, `em5_0`, `em5_1`, `em5_2`, `em5_3`, `em5_4`, `em5_5`, `text6_0`, `text6_1`, `lang6`, `prob6`, `em6_0`, `em6_1`, `em6_2`, `em6_3`, `em6_4`, `em6_5`, `text7_0`, `text7_1`, `lang7`, `prob7`, `em7_0`, `em7_1`, `em7_2`, `em7_3`, `em7_4`, `em7_5`, `WDBVerified`) VALUES (40034, 'add text here', NULL, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 1);
|
|
|
|