Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local item_id = 90001
- local T = {}
- T.Warrior = {47436, 47450, 11578, 47465, 47502, 34428, 1715, 2687, 71, 7386, 355, 72, 47437, 57823, 694, 2565, 676, 47520, 20230, 12678, 47471, 1161, 871, 2458, 20252, 47475, 18499, 1680, 6552, 47488, 1719, 23920, 47440, 3411, 64382, 55694, 57755, 674, 750, 5246}
- T.Paladin = {750, 48942, 48782, 48932, 20271, 498, 853, 1152, 10278, 48788, 53408, 48950, 48936, 31789, 62124, 54043, 25780, 1044, 20217, 48819, 48801, 48785, 5502, 20164, 10326, 1038, 53407, 48943, 20165, 48945, 642, 48947, 20166, 4987, 48806, 6940, 48817, 48934, 48938, 25898, 25899, 32223, 31884, 54428, 61411, 53601, 33388, 33391, 34769, 34767}
- T.Hunter = {8737, 1494, 13163, 48996, 49001, 49045, 53338, 5116, 27044, 883, 2641, 6991, 982, 1515, 19883, 20736, 48990, 2974, 6197, 1002, 14327, 5118, 49056, 53339, 49048, 19884, 34074, 781, 14311, 1462, 19885, 19880, 13809, 13161, 5384, 1543, 19878, 49067, 3034, 13159, 19882, 58434, 49071, 49052, 19879, 19263, 19801, 34026, 34600, 34477, 61006, 61847, 53271, 60192, 62757}
- T.Rogue = {674, 48668, 48638, 1784, 48657, 921, 1776, 26669, 51724, 6774, 11305, 1766, 48676, 48659, 1804, 8647, 48691, 51722, 48672, 1725, 26889, 2836, 1833, 1842, 8643, 2094, 1860, 57993, 48674, 31224, 5938, 57934, 51723}
- T.Priest = {2053, 48161, 48123, 48125, 48066, 586, 48068, 48127, 48171, 48168, 10890, 6064, 988, 48300, 6346, 48071, 48135, 48078, 453, 9484, 10909, 8129, 48073, 605, 48072, 48169, 552, 1706, 48063, 48162, 48170, 48074, 48158, 48120, 34433, 48113, 32375, 64843, 64901, 53023}
- T["Death Knight"] = {50842, 49941, 49930, 47476, 45529, 3714, 56222, 48743, 48263, 49909, 66188, 47528, 45524, 48792, 57623, 56815, 47568, 49895, 50977, 49576, 49921, 46584, 49938, 48707, 48265, 61999, 42650, 53428, 53331, 54447, 53342, 54446, 53323, 53344, 70164, 62158, 33391, 48778, 51425, 49924, 49924}
- T.Shaman = {8737, 49273, 49238, 10399, 49231, 58753, 2484, 49281, 58582, 49233, 58790, 58704, 58643, 49277, 61657, 8012, 526, 2645, 57994, 8143, 49236, 58796, 58757, 49276, 57960, 131, 58745, 6196, 58734, 58774, 58739, 58656, 546, 556, 66842, 51994, 8177, 58749, 20608, 36936, 58804, 49271, 8512, 6495, 8170, 66843, 55459, 66844, 3738, 2894, 60043, 51514}
- T.Mage = {42995, 42833, 27090, 42842, 33717, 42873, 42846, 12826, 28271, 61780, 61721, 28272, 61305, 42917, 43015, 130, 42921, 42926, 43017, 475, 1953, 42940, 12051, 43010, 43020, 43012, 42859, 2139, 42931, 42985, 43008, 45438, 43024, 43002, 43046, 42897, 42914, 66, 58659, 30449, 42956, 47610, 61316, 61024, 55342, 53142}
- T.Warlock = {696, 47811, 47809, 688, 47813, 50511, 57946, 47864, 6215, 47878, 47855, 697, 47856, 47857, 5697, 47884, 47815, 47889, 47820, 698, 712, 126, 5138, 5500, 11719, 132, 60220, 18647, 61191, 47823, 691, 47865, 47891, 47888, 17928, 47860, 47825, 1122, 47867, 18540, 47893, 47838, 29858, 58887, 47836, 61290, 48018, 48020, 33388, 33391, 23161}
- T.Druid = {48378, 48469, 48461, 48463, 48441, 53307, 53308, 5487, 48560, 6795, 48480, 53312, 18960, 5229, 48443, 50763, 8983, 8946, 1066, 48562, 783, 770, 16857, 18658, 768, 1082, 16979, 49376, 5215, 48477, 49800, 48465, 48572, 26995, 48574, 2782, 50213, 2893, 33357, 5209, 48575, 48447, 48577, 48579, 5225, 22842, 49803, 9634, 20719, 48467, 29166, 62600, 22812, 48470, 48564, 48566, 33891, 33943, 49802, 48451, 48568, 33786, 40120, 62078, 52610, 50464, 48570}
- local skills = {
- 201, -- One-Handed Swords
- 202, -- Two-Handed Swords
- 196, -- One-Handed Axes
- 197, -- Two-Handed Axes
- 227, -- Staves
- 200, -- Polearms
- 266, -- Guns
- 264, -- Bows
- 5011, -- Crossbows
- 3018, -- Shoot (Bow, Crossbow or Gun,
- 198, -- One-Handed Maces
- 199, -- Two-Handed Maces
- 1180, -- Daggers
- 2567, -- Thrown
- 2764, -- Throw (With Thrown,
- 5009, -- Wands
- 5019, -- Shoot (Wands)
- }
- local function ItemHello(event, player, item)
- player:GossipMenuAddItem(0, "Teach Me My Class Spells", 0, 0)
- player:GossipMenuAddItem(0, "Teach Me My Riding Skills", 0, 1)
- player:GossipMenuAddItem(0, "Teach Me My Weapon Skills", 0, 2)
- player:GossipMenuAddItem(0, "Advance All My Skills", 0, 3)
- player:GossipMenuAddItem(0, "Reset My Talents", 0, 4)
- player:GossipSendMenu(1, item)
- end
- local function ItemSelect(event, player, item, id, intid, code)
- if (intid == 0) then
- local class = player:GetClassAsString()
- if(not T[class]) then return end
- for k, spell in ipairs(T[class]) do
- player:LearnSpell(spell)
- end
- if (class == "Warrior") then -- Warrior
- if (player:HasSpell(12294)) then
- player:LearnSpell(47486)
- end
- if (player:HasSpell(20243)) then
- player:LearnSpell(47498)
- end
- elseif (class == "Paladin") then -- Paladin
- if (player:GetTeam() < 1) then
- player:LearnSpell(31801)
- else
- player:LearnSpell(53736)
- end
- if (player:HasSpell(20925)) then
- player:LearnSpell(48952)
- end
- if (player:HasSpell(31935)) then
- player:LearnSpell(48827)
- end
- if (player:HasSpell(20473)) then
- player:LearnSpell(48825)
- end
- elseif (class == "Hunter") then -- Hunter
- if (player:HasSpell(19386)) then
- player:LearnSpell(49012)
- end
- if (player:HasSpell(53301)) then
- player:LearnSpell(60053)
- end
- if (player:HasSpell(19306)) then
- player:LearnSpell(48999)
- end
- if (player:HasSpell(19434)) then
- player:LearnSpell(49050)
- end
- elseif (class == "Rogue") then -- Rogue
- if (player:HasSpell(16511)) then
- player:LearnSpell(48660)
- end
- if (player:HasSpell(1329)) then
- player:LearnSpell(48666)
- end
- elseif (class == "Priest") then -- Priest
- if (player:HasSpell(34914)) then
- player:LearnSpell(48160)
- end
- if (player:HasSpell(47540)) then
- player:LearnSpell(53007)
- end
- if (player:HasSpell(724)) then
- player:LearnSpell(48087)
- end
- if (player:HasSpell(19236)) then
- player:LearnSpell(48173)
- end
- if (player:HasSpell(34861)) then
- player:LearnSpell(48089)
- end
- if (player:HasSpell(15407)) then
- player:LearnSpell(48156)
- end
- elseif (class == "Death Knight") then -- Death Knight
- if (player:HasSpell(55050)) then
- player:LearnSpell(55262)
- end
- if (player:HasSpell(49143)) then
- player:LearnSpell(55268)
- end
- if (player:HasSpell(49184)) then
- player:LearnSpell(51411)
- end
- if (player:HasSpell(55090)) then
- player:LearnSpell(55271)
- end
- if (player:HasSpell(49158)) then
- player:LearnSpell(51328)
- end
- elseif (class == "Shaman") then -- Shaman
- if (player:GetTeam() < 1) then
- player:LearnSpell(32182)
- else
- player:LearnSpell(2825)
- end
- if (player:HasSpell(61295)) then
- player:LearnSpell(61301)
- end
- if (player:HasSpell(974)) then
- player:LearnSpell(49284)
- end
- if (player:HasSpell(30706)) then
- player:LearnSpell(57722)
- end
- if (player:HasSpell(51490)) then
- player:LearnSpell(59159)
- end
- elseif (class == "Mage") then -- Mage
- local portals
- if (player:GetTeam() < 1) then -- Alliance Portals
- portals = {32271, 49359, 3565, 33690, 3562, 3561, 11419, 32266, 11416, 33691, 11059, 49360}
- else -- Horde Portals
- portals = {3567, 35715, 3566, 49358, 32272, 3563, 11417, 35717, 32267, 49361, 11420, 11418}
- end
- for k, spell in ipairs(portals) do
- player:LearnSpell(spell)
- end
- if (player:HasSpell(11366)) then
- player:LearnSpell(42891)
- end
- if (player:HasSpell(11426)) then
- player:LearnSpell(43039)
- end
- if (player:HasSpell(44457)) then
- player:LearnSpell(55360)
- end
- if (player:HasSpell(31661)) then
- player:LearnSpell(42950)
- end
- if (player:HasSpell(11113)) then
- player:LearnSpell(42945)
- end
- if (player:HasSpell(44425)) then
- player:LearnSpell(44781)
- end
- elseif (class == "Warlock") then -- Warlock
- if (player:HasSpell(17877)) then
- player:LearnSpell(47827)
- end
- if (player:HasSpell(30283)) then
- player:LearnSpell(47847)
- end
- if (player:HasSpell(30108)) then
- player:LearnSpell(47843)
- end
- if (player:HasSpell(50796)) then
- player:LearnSpell(59172)
- end
- if (player:HasSpell(48181)) then
- player:LearnSpell(59164)
- end
- if (player:HasSpell(18220)) then
- player:LearnSpell(59092)
- end
- elseif (class == "Druid") then -- Druid
- if (player:HasSpell(50516)) then
- player:LearnSpell(61384)
- end
- if (player:HasSpell(48505)) then
- player:LearnSpell(53201)
- end
- if (player:HasSpell(48438)) then
- player:LearnSpell(53251)
- end
- if (player:HasSpell(5570)) then
- player:LearnSpell(48468)
- end
- end
- player:SendBroadcastMessage("You have learned your spells!")
- elseif (intid == 1) then
- if (player:GetLevel() >= 20) then
- player:LearnSpell(33388)
- end
- if (player:GetLevel() >= 40) then
- player:LearnSpell(33391)
- end
- if (player:GetLevel() >= 60) then
- player:LearnSpell(34091)
- player:LearnSpell(34090)
- end
- if (player:GetLevel() >= 80) then
- player:LearnSpell(54197)
- player:LearnSpell(90265)
- end
- player:SendBroadcastMessage("You have learned your riding skills!")
- elseif (intid == 2) then
- for k, spell in ipairs(skills) do
- player:LearnSpell(spell)
- end
- player:SendBroadcastMessage("You have learned all your weapon skills!")
- elseif (intid == 3) then
- player:AdvanceAllSkills(450)
- player:SendBroadcastMessage("Your skills have been advanced!")
- elseif (intid == 4) then
- player:ResetTalents(true)
- player:SendBroadcastMessage("You talents have been reset!")
- else
- return
- end
- ItemHello(event, player, item)
- end
- RegisterItemGossipEvent(item_id, 1, ItemHello)
- RegisterItemGossipEvent(item_id, 2, ItemSelect)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement