Code:
function Skill_Menu (Unit, event, player)
Unit:GossipCreateMenu(100, player, 0)
Unit:GetPlayerClass()
if(Unit:GetPlayerClass() == 1) then
Unit:GossipMenuAddItem(0, "What Spells Can Warriors Learn?", 50, 0)
elseif(Unit:GetPlayerClass() == 2) then
Unit:GossipMenuAddItem(0, "What Spells Can Paladins Learn?", 51, 0)
elseif(Unit:GetPlayerClass() == 3) then
Unit:GossipMenuAddItem(0, "What Spells Can Hunters Learn?", 52, 0)
elseif(Unit:GetPlayerClass() == 4) then
Unit:GossipMenuAddItem(0, "What Spells Can Rogues Learn?", 53, 0)
elseif(Unit:GetPlayerClass() == 5) then
Unit:GossipMenuAddItem(0, "What Spells Can Priests Learn?", 54, 0)
elseif(Unit:GetPlayerClass() == 7) then
Unit:GossipMenuAddItem(0, "What Spells Can Shamans Learn?", 55, 0)
elseif(Unit:GetPlayerClass() == 8) then
Unit:GossipMenuAddItem(0, "What Spells Can Mages Learn?", 56, 0)
elseif(Unit:GetPlayerClass() == 9) then
Unit:GossipMenuAddItem(0, "What Spells Can Warlocks Learn?", 57, 0)
elseif(Unit:GetPlayerClass() == 11) then
Unit:GossipMenuAddItem(0, "What Spells Can Druids Learn?", 58, 0)
Unit:GossipMenuAddItem(5, "Reset Talent Points", 2, 0)
Unit:GossipSendMenu(player)
end
end
function Skill_OnSelect (Unit, event, player, id, intid, code)
if(intid == 50) then
Unit:GossipCreateMenu(99, player, 0)
Unit:GossipMenuAddItem(5, "Taunt", 3, 0)
Unit:GossipMenuAddItem(5, "Intercept", 4, 0)
Unit:GossipMenuAddItem(5, "Mortal Strike", 5, 0)
Unit:GossipMenuAddItem(5, "Defensive Stance", 6, 0)
Unit:GossipMenuAddItem(5, "Berserker Stance", 7, 0)
Unit:GossipMenuAddItem(0, "[Back]", 99, 0)
Unit:GossipSendMenu(player)
end
if(intid == 51) then
Unit:GossipCreateMenu(98, player, 0)
Unit:GossipMenuAddItem(5, "Redemption", 8, 0)
Unit:GossipMenuAddItem(5, "Summon Warhorse", 9, 0)
Unit:GossipMenuAddItem(5, "Summon Charger", 10, 0)
Unit:GossipMenuAddItem(0, "[Back]", 99, 0)
Unit:GossipSendMenu(player)
end
if(intid == 52) then
Unit:GossipCreateMenu(97, player, 0)
Unit:GossipMenuAddItem(5, "Pet Spells", 11, 0)
Unit:GossipMenuAddItem(0, "[Back]", 99, 0)
Unit:GossipSendMenu(player)
end
if(intid == 53) then
Unit:GossipCreateMenu(96, player, 0)
Unit:GossipMenuAddItem(0, "[Back]", 99, 0)
Unit:GossipSendMenu(player)
end
if(intid == 54) then
Unit:GossipCreateMenu(95, player, 0)
Unit:GossipMenuAddItem(0, "[Back]", 99, 0)
Unit:GossipSendMenu(player)
end
if(intid == 55) then
Unit:GossipCreateMenu(94, player, 0)
Unit:GossipMenuAddItem(0, "[Back]", 99, 0)
Unit:GossipSendMenu(player)
end
if(intid == 56) then
Unit:GossipCreateMenu(93, player, 0)
Unit:GossipMenuAddItem(5, "Ice Block", 22, 0)
Unit:GossipMenuAddItem(0, "[Back]", 99, 0)
Unit:GossipSendMenu(player)
end
if(intid == 57) then
Unit:GossipCreateMenu(92, player, 0)
Unit:GossipMenuAddItem(5, "Pet Spells", 12, 0)
Unit:GossipMenuAddItem(5, "Summon Felsteed", 13, 0)
Unit:GossipMenuAddItem(5, "Summon Dreadsteed", 14, 0)
Unit:GossipMenuAddItem(0, "[Back]", 99, 0)
Unit:GossipSendMenu(player)
end
if(intid == 58) then
Unit:GossipCreateMenu(91, player, 0)
Unit:GossipMenuAddItem(5, "Growl", 15, 0)
Unit:GossipMenuAddItem(5, "Maul", 16, 0)
Unit:GossipMenuAddItem(5, "Bear Form", 17, 0)
Unit:GossipMenuAddItem(5, "Dire Bear Form", 18, 0)
Unit:GossipMenuAddItem(5, "Aquatic Form", 19, 0)
Unit:GossipMenuAddItem(5, "Normal Flight Form", 20, 0)
Unit:GossipMenuAddItem(5, "Epic Flight Form", 21, 0)
Unit:GossipMenuAddItem(0, "[Back]", 99, 0)
Unit:GossipSendMenu(player)
end
if(intid == 2) then
Unit:ResetTalent()
end
if(intid == 3) then
local plr = Unit:GetClosestPlayer()
plr:LearnSpell(355)
end
if(intid == 4) then
local plr = Unit:GetClosestPlayer()
plr:LearnSpell(25275)
end
if(intid == 5) then
local plr = Unit:GetClosestPlayer()
plr:LearnSpell(30330)
end
if(intid == 6) then
local plr = Unit:GetClosestPlayer()
plr:LearnSpell(71)
end
if(intid == 7) then
local plr = Unit:GetClosestPlayer()
plr:LearnSpell(2458)
end
if(intid == 8) then
local plr = Unit:GetClosestPlayer()
plr:LearnSpell(20773)
end
if(intid == 9) then
local plr = Unit:GetClosestPlayer()
plr:LearnSpell(13819)
end
if(intid == 10) then
local plr = Unit:GetClosestPlayer()
plr:LearnSpell(34767)
end
if(intid == 11) then
local plr = Unit:GetClosestPlayer()
plr:LearnSpell(1515)
plr:LearnSpell(883)
plr:LearnSpell(5149)
plr:LearnSpell(982)
plr:LearnSpell(6991)
end
if(intid == 12) then
local plr = Unit:GetClosestPlayer()
plr:LearnSpell(688)
plr:LearnSpell(697)
plr:LearnSpell(712)
plr:LearnSpell(691)
end
if(intid == 13) then
local plr = Unit:GetClosestPlayer()
plr:LearnSpell(5784)
end
if(intid == 14) then
local plr = Unit:GetClosestPlayer()
plr:LearnSpell(23161)
end
if(intid == 15) then
local plr = Unit:GetClosestPlayer()
plr:LearnSpell(6795)
end
if(intid == 16) then
local plr = Unit:GetClosestPlayer()
plr:LearnSpell(26996)
end
if(intid == 17) then
local plr = Unit:GetClosestPlayer()
plr:LearnSpell(5487)
end
if(intid == 18) then
local plr = Unit:GetClosestPlayer()
plr:LearnSpell(9634)
end
if(intid == 19) then
local plr = Unit:GetClosestPlayer()
plr:LearnSpell(1066)
end
if(intid == 20) then
local plr = Unit:GetClosestPlayer()
plr:LearnSpell(33943)
end
if(intid == 21) then
local plr = Unit:GetClosestPlayer()
plr:LearnSpell(40120)
end
if(intid == 22) then
local plr = Unit:GetClosestPlayer()
plr:LearnSpell(45438)
end
intid = 0
end
RegisterUnitGossipEvent(99999, 1, "Skill_Menu")
RegisterUnitGossipEvent(99999, 2, "Skill_OnSelect")
Guard
Code:
function GM_GetPlayer(pUnit, event, miscunit, misc)
pUnit:GetRandomPlayer()
pUnit:HasGMTagOn()
if(pUnit:HasGMTagOn() == true) then
pUnit:CastSpellOnTarget(38907)
pUnit:CastSpellOnTarget(29973)
pUnit:SendChatMessage (12, 0, "You Are Breaking Server Rules!")
end
end
function GM(pUnit, event, miscunit, misc)
pUnit:RegisterEvent("GM_GetPlayer",1000,0)
end
function GM_OnDied (pUnit, event)
pUnit:RemoveEvents()
end
function GM_OnKilledTarget (pUnit, event)
pUnit:SendChatMessage (12, 0, "DO NOT Use GM Tag In PvP Areas!")
pUnit:RemoveEvents()
end
function GM_OnLeaveCombat (pUnit, Event)
pUnit:SendChatMessage (12, 0, "DO NOT Use GM Tag In PvP Areas!")
pUnit:RemoveEvents()
end
RegisterUnitEvent(10000, 1, "GM")
RegisterUnitEvent(10000, 2, "GM_OnDied")
RegisterUnitEvent(10000, 3, "GM_OnKilledTarget")
RegisterUnitEvent(10000, 4, "GM_OnLeaveCombat")