1、这个是3.3.5的T端的脚本。是一套NPC脚本
2、作用是让玩家更方便的遗忘和学习某个天赋技能
3、作为一个NPC脚本的参考。。主要是移除技能和学习技能方面
下面是Trinity端的魔兽世界私服单机的3.3.5的WOTLK的npc脚本。。喜欢的朋友可以去试试。。具体实际功能,还望大家测试测试
#include "ScriptPCH.h"
class Talent_Chooser : public CreatureScript
{
public:
Talent_Chooser() : CreatureScript("Talent_Chooser") { }
bool OnGossipHello(Player * pPlayer, Creature * pCreature)
{
switch(pPlayer->getClass())
{
case CLASS_PALADIN:
pPlayer->ADD_GOSSIP_ITEM(4, "Retribution - |cffFFFFFFRetribution Aura and Crusader Strike|r", GOSSIP_SENDER_MAIN, 0);
pPlayer->ADD_GOSSIP_ITEM(4, "Holy - |cffFFFFFFDivine Plea and Concentration Aura|r", GOSSIP_SENDER_MAIN, 1);
pPlayer->ADD_GOSSIP_ITEM(4, "Protection - |cffFFFFFFDivine Protection|r", GOSSIP_SENDER_MAIN, 2);
pPlayer->PlayerTalkClass->SendGossipMenu(907, pCreature->GetGUID());
break;
case CLASS_MAGE:
pPlayer->ADD_GOSSIP_ITEM(4, "Arcane - |cffFFFFFFEvocation and Arcane Missiles|", GOSSIP_SENDER_MAIN, 3);
pPlayer->ADD_GOSSIP_ITEM(4, "Fire - |cffFFFFFFFrostfire Bolt and Living Bomb|", GOSSIP_SENDER_MAIN, 4);
pPlayer->ADD_GOSSIP_ITEM(4, "Frost - |cffFFFFFFCone of Cold and Ice Block|", GOSSIP_SENDER_MAIN, 5);
pPlayer->PlayerTalkClass->SendGossipMenu(907, pCreature->GetGUID());
break;
case CLASS_WARRIOR:
pPlayer->ADD_GOSSIP_ITEM(4, "Arms - |cffFFFFFFHamstring and Retaliation|", GOSSIP_SENDER_MAIN, 6);
pPlayer->ADD_GOSSIP_ITEM(4, "Fury - |cffFFFFFFBloodthirst and Duel Wield|", GOSSIP_SENDER_MAIN, 7);
pPlayer->ADD_GOSSIP_ITEM(4, "Protection - |cffFFFFFFRevenge and Shield Block|", GOSSIP_SENDER_MAIN, 8);
pPlayer->PlayerTalkClass->SendGossipMenu(907, pCreature->GetGUID());
break;
case CLASS_PRIEST:
pPlayer->ADD_GOSSIP_ITEM(4, "Holy - |cffFFFFFFFlash Heal and Holy Fire|", GOSSIP_SENDER_MAIN, 9);
pPlayer->ADD_GOSSIP_ITEM(4, "Discipline - |cffFFFFFFInner Fire and Power Word: Shield|", GOSSIP_SENDER_MAIN, 10);
pPlayer->ADD_GOSSIP_ITEM(4, "Shadow - |cffFFFFFFMind Flay and Psychic Scream|", GOSSIP_SENDER_MAIN, 11);
pPlayer->PlayerTalkClass->SendGossipMenu(907, pCreature->GetGUID());
break;
case CLASS_HUNTER:
pPlayer->ADD_GOSSIP_ITEM(4, "Marksman - |cffFFFFFFMulti-Shot and Arcane Shot|", GOSSIP_SENDER_MAIN, 12);
pPlayer->ADD_GOSSIP_ITEM(4, "Survival - |cffFFFFFFMongoose Bite and Wing Clip|", GOSSIP_SENDER_MAIN, 13);
pPlayer->ADD_GOSSIP_ITEM(4, "Beastmaster - |cffFFFFFFAspect of the Hawk and Freezing Trap|", GOSSIP_SENDER_MAIN, 14);
pPlayer->PlayerTalkClass->SendGossipMenu(907, pCreature->GetGUID());
break;
case CLASS_ROGUE:
pPlayer->ADD_GOSSIP_ITEM(4, "Subtlety - |cffFFFFFFAmbush, Sprint, and Shadowstep|", GOSSIP_SENDER_MAIN, 15);
pPlayer->ADD_GOSSIP_ITEM(4, "Assassination - |cffFFFFFFGarrote and Slice and Dice|", GOSSIP_SENDER_MAIN, 16);
pPlayer->ADD_GOSSIP_ITEM(4, "Combat - |cffFFFFFFEvasion|", GOSSIP_SENDER_MAIN, 17);
pPlayer->PlayerTalkClass->SendGossipMenu(907, pCreature->GetGUID());
break;
case CLASS_SHAMAN:
pPlayer->ADD_GOSSIP_ITEM(4, "Restoration - |cffFFFFFFEarthliving Weapon|", GOSSIP_SENDER_MAIN, 18);
pPlayer->ADD_GOSSIP_ITEM(4, "Enhancement - |cffFFFFFFFrost Shock and Duel Wield|", GOSSIP_SENDER_MAIN, 19);
pPlayer->ADD_GOSSIP_ITEM(4, "Elemental - |cffFFFFFFThunderstorm and Lava Burst|", GOSSIP_SENDER_MAIN, 20);
pPlayer->PlayerTalkClass->SendGossipMenu(907, pCreature->GetGUID());
break;
case CLASS_WARLOCK:
pPlayer->ADD_GOSSIP_ITEM(4, "Affliciton - |cffFFFFFFHowl of Terror and Curse of Agony|", GOSSIP_SENDER_MAIN, 21);
pPlayer->ADD_GOSSIP_ITEM(4, "Demonology - |cffFFFFFFSummon Voidwalker and Shadowflame|", GOSSIP_SENDER_MAIN, 22);
pPlayer->ADD_GOSSIP_ITEM(4, "Destruction - |cffFFFFFFImmolate and Conflagrate|", GOSSIP_SENDER_MAIN, 23);
pPlayer->PlayerTalkClass->SendGossipMenu(907, pCreature->GetGUID());
break;
case CLASS_DRUID:
pPlayer->ADD_GOSSIP_ITEM(4, "Feral - |cffFFFFFFFearie Fire and Barskin|", GOSSIP_SENDER_MAIN, 24);
pPlayer->ADD_GOSSIP_ITEM(4, "Balance - |cffFFFFFFInsect Swarm and Typhoon|", GOSSIP_SENDER_MAIN, 25);
pPlayer->ADD_GOSSIP_ITEM(4, "Restoration - |cffFFFFFFNourish and Regrowth|", GOSSIP_SENDER_MAIN, 26);
pPlayer->PlayerTalkClass->SendGossipMenu(907, pCreature->GetGUID());
break;
case CLASS_DEATH_KNIGHT:
pPlayer->ADD_GOSSIP_ITEM(4, "Blood", GOSSIP_SENDER_MAIN, 27);
pPlayer->ADD_GOSSIP_ITEM(4, "Frost", GOSSIP_SENDER_MAIN, 28);
pPlayer->ADD_GOSSIP_ITEM(4, "Unholy - Coming Soon", GOSSIP_SENDER_MAIN, 29);
pPlayer->PlayerTalkClass->SendGossipMenu(907, pCreature->GetGUID());
break;
}
return true;
}
bool OnGossipSelect(Player * player, Creature * creature, uint32 sender, uint32 uiAction)
{
if (sender == GOSSIP_SENDER_MAIN)
{
player->PlayerTalkClass->ClearMenus();
switch(uiAction)
{
// Paladin
case 0: //Retrubition
player->removeSpell(54428, false);
player->removeSpell(19746, false);
player->removeSpell(62124, false);
player->removeSpell(498, false);
player->learnSpell(7294, false);
player->learnSpell(35395, false);
break;
case 1: //Holy
player->removeSpell(62124, false);
player->removeSpell(498, false);
player->removeSpell(7294, false);
player->removeSpell(35395, false);
player->learnSpell(54428, false);
player->learnSpell(19746, false);
break;
case 2: //Protection
player->removeSpell(54428, false);
player->removeSpell(19746, false);
player->removeSpell(7294, false);
player->removeSpell(35395, false);
player->removeSpell(62124, false);
player->learnSpell(498, false);
break;
// Mage
case 3: // Arcane
player->removeSpell(44614, false);
player->removeSpell(44457, false);
player->removeSpell(120, false);
player->removeSpell(45438, false);
player->learnSpell(12051, false);
player->learnSpell(5143, false);
break;
case 4: // Fire
player->removeSpell(12051, false);
player->removeSpell(5143, false);
player->removeSpell(120, false);
player->removeSpell(45438, false);
player->learnSpell(44614, false);
player->learnSpell(44457, false);
break;
case 5: // Frost
player->removeSpell(12051, false);
player->removeSpell(5143, false);
player->removeSpell(44614, false);
player->removeSpell(44457, false);
player->learnSpell(120, false);
player->learnSpell(45438, false);
break;
// Warrior
case 6: // Arms
player->removeSpell(6572, false);
player->removeSpell(2565, false);
player->removeSpell(23881, false);
player->removeSpell(674, false);
player->learnSpell(1715, false);
player->learnSpell(20230, false);
break;
case 7: // Fury
player->removeSpell(1715, false);
player->removeSpell(20230, false);
player->removeSpell(6572, false);
player->removeSpell(2565, false);
player->learnSpell(23881, false);
player->learnSpell(674, false);
break;
case 8: // Protection
player->removeSpell(1715, false);
player->removeSpell(20230, false);
player->removeSpell(23881, false);
player->removeSpell(674, false);
player->learnSpell(6572, false);
player->learnSpell(2565, false);
break;
// Priest
case 9: // Holy
player->removeSpell(17, false);
player->removeSpell(588, false);
player->removeSpell(15407, false);
player->removeSpell(8122, false);
player->learnSpell(2061, false);
player->learnSpell(14914, false);
break;
case 10: // Discipline
player->removeSpell(2061, false);
player->removeSpell(14914, false);
player->removeSpell(15407, false);
player->removeSpell(8122, false);
player->learnSpell(588, false);
player->learnSpell(17, false);
break;
case 11: // Shadow
player->removeSpell(17, false);
player->removeSpell(588, false);
player->removeSpell(2061, false);
player->removeSpell(14914, false);
player->learnSpell(15407, false);
player->learnSpell(8122, false);
break;
// Hunter
case 12: // Marksman
player->removeSpell(13165, false);
player->removeSpell(1495, false);
player->removeSpell(1499, false);
player->removeSpell(2974, false);
player->learnSpell(2643, false);
player->learnSpell(3044, false);
break;
case 13: // Survival
player->removeSpell(13165, false);
player->removeSpell(2643, false);
player->removeSpell(3044, false);
player->removeSpell(1499, false);
player->learnSpell(1495, false);
player->learnSpell(2974, false);
break;
case 14: // Beastmaster
player->removeSpell(2974, false);
player->removeSpell(1495, false);
player->removeSpell(2643, false);
player->removeSpell(3044, false);
player->learnSpell(13165, false);
player->learnSpell(1499, false);
break;
// Rogue
case 15: //Sub
player->removeSpell(703, false);
player->removeSpell(5171, false);
player->removeSpell(5277, false);
player->removeSpell(1776, false);
player->learnSpell(8676, false);
player->learnSpell(2983, false);
player->learnSpell(36554, false);
break;
case 16: // Assassination
player->removeSpell(8676, false);
player->removeSpell(2983, false);
player->removeSpell(5277, false);
player->removeSpell(1776, false);
player->removeSpell(36554, false);
player->learnSpell(703, false);
player->learnSpell(5171, false);
break;
case 17: // Combat
player->removeSpell(8676, false);
player->removeSpell(2983, false);
player->removeSpell(703, false);
player->removeSpell(84668, false);
player->removeSpell(36554, false);
player->learnSpell(5277, false);
player->learnSpell(5171, false);
break;
// Shaman
case 18: //Restoration
player->removeSpell(8056, false);
player->removeSpell(674, false);
player->removeSpell(51490, false);
player->removeSpell(51505, false);
player->learnSpell(51730, false);
player->learnSpell(16176, false);
break;
case 19: // Enhancement
player->removeSpell(51730, false);
player->removeSpell(16176, false);
player->removeSpell(51490, false);
player->removeSpell(51505, false);
player->learnSpell(8056, false);
player->learnSpell(674, false);
break;
case 20: // Elemental
player->removeSpell(51730, false);
player->removeSpell(16176, false);
player->removeSpell(8056, false);
player->removeSpell(674, false);
player->learnSpell(51490, false);
player->learnSpell(51505, false);
break;
// Warlock
case 21: //Affliction
player->removeSpell(12746, false);
player->removeSpell(47897, false);
player->removeSpell(707, false);
player->removeSpell(17962, false);
player->learnSpell(5484, false);
player->learnSpell(980, false);
break;
case 22: // Demonology
player->removeSpell(5484, false);
player->removeSpell(980, false);
player->removeSpell(707, false);
player->removeSpell(17962, false);
player->learnSpell(12746, false);
player->learnSpell(47897, false);
break;
case 23: //Destruction
player->removeSpell(5484, false);
player->removeSpell(980, false);
player->removeSpell(12746, false);
player->removeSpell(47897, false);
player->learnSpell(707, false);
player->learnSpell(17962, false);
break;
// Druid
case 24: //Feral
player->removeSpell(5570, false);
player->removeSpell(50516, false);
player->removeSpell(50464, false);
player->removeSpell(8936, false);
player->learnSpell(770, false);
player->learnSpell(22812, false);
break;
case 25: // Balance
player->removeSpell(770, false);
player->removeSpell(22812, false);
player->removeSpell(50464, false);
player->removeSpell(8936, false);
player->learnSpell(5570, false);
player->learnSpell(50516, false);
break;
case 26: //Restoration
player->removeSpell(770, false);
player->removeSpell(22812, false);
player->removeSpell(5570, false);
player->removeSpell(50516, false);
player->learnSpell(50464, false);
player->learnSpell(8936, false);
break;
case 27: //Blood
player->removeSpell(49039, false);
player->removeSpell(49143, false);
player->learnSpell(55050, false);
player->learnSpell(48982, false);
break;
case 28: //Frost
player->removeSpell(55050, false);
player->removeSpell(48982, false);
player->learnSpell(49039, false);
player->learnSpell(49143, false);
break;
case 29: //Unholy COMING SOON
player->removeSpell(55050, false);
player->removeSpell(49143, false);
player->removeSpell(48982, false);
player->removeSpell(49039, false);
break;
}
player->CLOSE_GOSSIP_MENU();
}
return true;
}
};
void AddSC_Talent_Chooser() {
new Talent_Chooser();
}
下面是完整代码下载连接:Updated Talent Chooser Script完整代码查看下载
|