PDA

View Full Version : [Release] All In One NPC Script



Scott
26-08-09, 02:46 PM
This is a Lua script which is an NPC Gossip Script that gives people :

Ground Mounts
Flying Mounts
Buffs
Advance Skills
Alliance/Horde Reputations Raised
Pets
Tier 7
Tier 8


function AIONPC_OnGossip(Unit, Event, player)

Unit:GossipCreateMenu(10000, player, 0)

Unit:GossipMenuAddItem(0,"|cffff0000Ground Mounts!", 1, 0)

Unit:GossipMenuAddItem(0, "|cFF0000FFFlying Mounts!!", 2, 0)

Unit:GossipMenuAddItem(0, "|cFF8A2BE2Buffs", 5, 0)

Unit:GossipMenuAddItem(0, "|cffff0000Advance skills!", 6, 0)

local race = player:GetPlayerRace()
if (race == 1 or race == 3 or race == 4 or race == 7 or race == 11) then
Unit:GossipMenuAddItem(0, "|cFF0000FFAlly Factions", 7, 0)
else
Unit:GossipMenuAddItem(0, "|cFF8A2BE2Horde Factions", 8, 0)
end

Unit:GossipMenuAddItem(0, "|cffff0000Other Factions", 9, 0)

Unit:GossipMenuAddItem(0, "|cFF0000FFNon Combat Pets!", 10, 0)

Unit:GossipMenuAddItem(0, "|cFF8A2BE2Tier 8!", 3, 0)

Unit:GossipMenuAddItem(0, "|cffff0000Tier 7", 4, 0)

Unit:GossipMenuAddItem(0, "|cFF006400[Page 2!]", 11, 0)

Unit:GossipSendMenu(player)

end

function AIONPC_onselect(Unit, event, player, id, intid, code)
if ( intid == 999) then

Unit:GossipCreateMenu(10000, player, 0)

Unit:GossipMenuAddItem(0,"|cffff0000Ground Mounts!", 1, 0)

Unit:GossipMenuAddItem(0, "|cFF0000FFFlying Mounts!!", 2, 0)

Unit:GossipMenuAddItem(0, "|cFF8A2BE2Buffs", 5, 0)

Unit:GossipMenuAddItem(0, "|cffff0000Advance skills!", 6, 0)

local race = player:GetPlayerRace()
if (race == 1 or race == 3 or race == 4 or race == 7 or race == 11) then
Unit:GossipMenuAddItem(0, "|cFF0000FFFAlly Factions", 7, 0)
else
Unit:GossipMenuAddItem(0, "|cFF8A2BE2Horde Factions", 8, 0)
end

Unit:GossipMenuAddItem(0, "|cffff0000Other Factions", 9, 0)

Unit:GossipMenuAddItem(0, "|cFF0000FFNon Combat Pets!", 10, 0)

Unit:GossipMenuAddItem(0, "|cFF8A2BE2Tier 8!", 3, 0)

Unit:GossipMenuAddItem(0, "|cffff0000Tier 7", 4, 0)

Unit:GossipMenuAddItem(0, "|cFF006400[Page 2!]", 11, 0)

Unit:GossipSendMenu(player)
end

if ( intid == 1) then
Unit:SendChatMessage(14, 0, "You now have all the ground mounts GZ!!")
player:LearnSpell(43688)
player:LearnSpell(16056)
player:LearnSpell(60114)
player:LearnSpell(60116)
player:LearnSpell(51412)
player:LearnSpell(58983)
player:LearnSpell(22719)
player:LearnSpell(35022)
player:LearnSpell(16055)
player:LearnSpell(59572)
player:LearnSpell(26656)
player:LearnSpell(6896)
player:LearnSpell(17461)
player:LearnSpell(64977)
player:LearnSpell(470)
player:LearnSpell(60118)
player:LearnSpell(60119)
player:LearnSpell(48027)
player:LearnSpell(22718)
player:LearnSpell(59785)
player:LearnSpell(59788)
player:LearnSpell(22720)
player:LearnSpell(22721)
player:LearnSpell(22717)
player:LearnSpell(22723)
player:LearnSpell(22724)
player:LearnSpell(578)
player:LearnSpell(64658)
player:LearnSpell(35020)
player:LearnSpell(10969)
player:LearnSpell(59996)
player:LearnSpell(25953)
player:LearnSpell(6897)
player:LearnSpell(17463)
player:LearnSpell(64656)
player:LearnSpell(50869)
player:LearnSpell(43899)
player:LearnSpell(34406)
player:LearnSpell(458)
player:LearnSpell(18990)
player:LearnSpell(59573)
player:LearnSpell(6899)
player:LearnSpell(17464)
player:LearnSpell(6654)
player:LearnSpell(6648)
player:LearnSpell(39315)
player:LearnSpell(34896)
player:LearnSpell(39316)
player:LearnSpell(34790)
player:LearnSpell(63635)
player:LearnSpell(63637)
player:LearnSpell(6653)
player:LearnSpell(8395)
player:LearnSpell(63639)
player:LearnSpell(36702)
player:LearnSpell(17458)
player:LearnSpell(63643)
player:LearnSpell(17460)
player:LearnSpell(23509)
player:LearnSpell(63638)
player:LearnSpell(16060)
player:LearnSpell(59810)
player:LearnSpell(61465)
player:LearnSpell(60136)
player:LearnSpell(59802)
player:LearnSpell(61469)
player:LearnSpell(35710)
player:LearnSpell(18989)
player:LearnSpell(6777)
player:LearnSpell(459)
player:LearnSpell(65637)
player:LearnSpell(35713)
player:LearnSpell(49379)
player:LearnSpell(23249)
player:LearnSpell(34407)
player:LearnSpell(65641)
player:LearnSpell(23248)
player:LearnSpell(35712)
player:LearnSpell(35714)
player:LearnSpell(23247)
player:LearnSpell(18991)
player:LearnSpell(15780)
player:LearnSpell(17453)
player:LearnSpell(26056)
player:LearnSpell(39798)
player:LearnSpell(17465)
player:LearnSpell(48025)
player:LearnSpell(59797)
player:LearnSpell(17459)
player:LearnSpell(63636)
player:LearnSpell(10795)
player:LearnSpell(65917)
player:LearnSpell(55531)
player:LearnSpell(16084)
player:LearnSpell(29059)
player:LearnSpell(10798)
player:LearnSpell(63640)
player:LearnSpell(471)
player:LearnSpell(472)
player:LearnSpell(16058)
player:LearnSpell(35711)
player:LearnSpell(35018)
player:LearnSpell(17455)
player:LearnSpell(23246)
player:LearnSpell(41252)
player:LearnSpell(17456)
player:LearnSpell(34795)
player:LearnSpell(10873)
player:LearnSpell(26054)
player:LearnSpell(17462)
player:LearnSpell(22722)
player:LearnSpell(579)
player:LearnSpell(18363)
player:LearnSpell(30174)
player:LearnSpell(17481)
player:LearnSpell(64731)
player:LearnSpell(39317)
player:LearnSpell(34898)
player:LearnSpell(63642)
player:LearnSpell(8980)
player:LearnSpell(42776)
player:LearnSpell(10789)
player:LearnSpell(15781)
player:LearnSpell(23510)
player:LearnSpell(63232)
player:LearnSpell(8394)
player:LearnSpell(10793)
player:LearnSpell(23241)
player:LearnSpell(43900)
player:LearnSpell(23238)
player:LearnSpell(23229)
player:LearnSpell(23250)
player:LearnSpell(65646)
player:LearnSpell(23220)
player:LearnSpell(23221)
player:LearnSpell(23239)
player:LearnSpell(65640)
player:LearnSpell(23252)
player:LearnSpell(35025)
player:LearnSpell(23225)
player:LearnSpell(23219)
player:LearnSpell(65638)
player:LearnSpell(23242)
player:LearnSpell(23243)
player:LearnSpell(23227)
player:LearnSpell(33660)
player:LearnSpell(25027)
player:LearnSpell(65644)
player:LearnSpell(24242)
player:LearnSpell(65639)
player:LearnSpell(42777)
player:LearnSpell(23338)
player:LearnSpell(23251)
player:LearnSpell(65643)
player:LearnSpell(47037)
player:LearnSpell(35028)
player:LearnSpell(46628)
player:LearnSpell(23223)
player:LearnSpell(23240)
player:LearnSpell(23228)
player:LearnSpell(23222)
player:LearnSpell(48954)
player:LearnSpell(24252)
player:LearnSpell(39318)
player:LearnSpell(34899)
player:LearnSpell(16059)
player:LearnSpell(18992)
player:LearnSpell(63641)
player:LearnSpell(580)
player:LearnSpell(61425)
player:LearnSpell(65642)
player:LearnSpell(10796)
player:LearnSpell(17454)
player:LearnSpell(64659)
player:LearnSpell(10799)
player:LearnSpell(64657)
player:LearnSpell(54753)
player:LearnSpell(6898)
player:LearnSpell(39319)
player:LearnSpell(65645)
player:LearnSpell(468)
player:LearnSpell(34897)
player:LearnSpell(581)
player:LearnSpell(17229)
player:LearnSpell(59791)
player:LearnSpell(26055)
player:GossipComplete(player)
end


if ( intid == 2) then
Unit:SendChatMessage(14, 0, "You now have all the Flying mounts GZ!")
player:LearnSpell(60025)
player:LearnSpell(63844)
player:LearnSpell(61230)
player:LearnSpell(61229)
player:LearnSpell(40192)
player:LearnSpell(59567)
player:LearnSpell(41514)
player:LearnSpell(62048)
player:LearnSpell(59650)
player:LearnSpell(59976)
player:LearnSpell(61996)
player:LearnSpell(59568)
player:LearnSpell(59996)
player:LearnSpell(39803)
player:LearnSpell(32244)
player:LearnSpell(59569)
player:LearnSpell(58615)
player:LearnSpell(43927)
player:LearnSpell(41515)
player:LearnSpell(64927)
player:LearnSpell(32239)
player:LearnSpell(61451)
player:LearnSpell(44153)
player:LearnSpell(43810)
player:LearnSpell(51960)
player:LearnSpell(32235)
player:LearnSpell(61924)
player:LearnSpell(39798)
player:LearnSpell(32245)
player:LearnSpell(64956)
player:LearnSpell(61309)
player:LearnSpell(60424)
player:LearnSpell(44317)
player:LearnSpell(64796)
player:LearnSpell(3363)
player:LearnSpell(28828)
player:LearnSpell(41513)
player:LearnSpell(32345)
player:LearnSpell(60021)
player:LearnSpell(41516)
player:LearnSpell(39801)
player:LearnSpell(61997)
player:LearnSpell(59570)
player:LearnSpell(59961)
player:LearnSpell(39800)
player:LearnSpell(63963)
player:LearnSpell(39802)
player:LearnSpell(32240)
player:LearnSpell(32242)
player:LearnSpell(32290)
player:LearnSpell(32295)
player:LearnSpell(61442)
player:LearnSpell(37015)
player:LearnSpell(32292)
player:LearnSpell(32297)
player:LearnSpell(32289)
player:LearnSpell(32246)
player:LearnSpell(61444)
player:LearnSpell(61446)
player:LearnSpell(32296)
player:LearnSpell(32243)
player:LearnSpell(60002)
player:LearnSpell(44151)
player:LearnSpell(59571)
player:LearnSpell(49193)
player:LearnSpell(41517)
player:LearnSpell(41518)
player:LearnSpell(60024)
player:LearnSpell(54729)
player:LearnSpell(46197)
player:LearnSpell(46199)
player:GossipComplete(player)
end

if(intid == 3) then

Unit:GossipCreateMenu(1001, player, 0)
Unit:GossipMenuAddItem(0,"Deathknight", 50, 0)
Unit:GossipMenuAddItem(0,"Druid", 60, 0)
Unit:GossipMenuAddItem(0,"Hunter", 70, 0)
Unit:GossipMenuAddItem(0,"Mage", 80, 0)
Unit:GossipMenuAddItem(0,"Paladin", 90, 0)
Unit:GossipMenuAddItem(0,"Priest", 100, 0)
Unit:GossipMenuAddItem(0,"Rogue", 110, 0)
Unit:GossipMenuAddItem(0,"Shaman", 120, 0)
Unit:GossipMenuAddItem(0,"Warlock",130, 0)
Unit:GossipMenuAddItem(0,"Warrior", 140, 0)
Unit:GossipMenuAddItem(0, "Back", 999, 0)
Unit:GossipSendMenu(player)
end

if(intid == 4) then
Unit:GossipCreateMenu(2000, player, 0)
Unit:GossipMenuAddItem(0,"Deathknight", 150, 0)
Unit:GossipMenuAddItem(0,"Druid", 160, 0)
Unit:GossipMenuAddItem(0,"Hunter", 170, 0)
Unit:GossipMenuAddItem(0,"Mage", 180, 0)
Unit:GossipMenuAddItem(0,"Paladin", 190, 0)
Unit:GossipMenuAddItem(0,"Priest", 200, 0)
Unit:GossipMenuAddItem(0,"Rogue", 210, 0)
Unit:GossipMenuAddItem(0,"Shaman", 220, 0)
Unit:GossipMenuAddItem(0,"Warlock",230, 0)
Unit:GossipMenuAddItem(0,"Warrior", 240, 0)
Unit:GossipMenuAddItem(0, "Back", 999, 0)
Unit:GossipSendMenu(player)
end

---------------------------------------Tier 8---------------------------------------

------Deathknights-----

if(intid == 50) then
Unit:GossipCreateMenu(1002, player, 0)
Unit:GossipMenuAddItem(0, "Dps Set",51, 0)
Unit:GossipMenuAddItem(0, "Tank Set",52, 0)
Unit:GossipMenuAddItem(0, "Back", 3, 0)
Unit:GossipSendMenu(player)
end

if(intid == 51) then
player:AddItem(46111, 1)
player:AddItem(46113, 1)
player:AddItem(46115, 1)
player:AddItem(46116, 1)
player:AddItem(46117, 1)
player:GossipComplete(player)
end

if(intid == 52) then
player:AddItem(46118, 1)
player:AddItem(46119, 1)
player:AddItem(46120, 1)
player:AddItem(46121, 1)
player:AddItem(46122, 1)
player:GossipComplete(player)
end

-----Druids-----

if(intid == 60) then
Unit:GossipCreateMenu(1003, player, 0)
Unit:GossipMenuAddItem(0, "Dps Set",61, 0)
Unit:GossipMenuAddItem(0, "Spell Caster Set",62, 0)
Unit:GossipMenuAddItem(0, "Healer Set", 63, 0)
Unit:GossipMenuAddItem(0, "Back", 3, 0)
Unit:GossipSendMenu(player)
end

if (intid == 61) then
player:AddItem(46157, 1)
player:AddItem(46158, 1)
player:AddItem(46159, 1)
player:AddItem(46160, 1)
player:AddItem(46161, 1)
player:GossipComplete(player)
end

if (intid == 62) then
player:AddItem(46189, 1)
player:AddItem(46191, 1)
player:AddItem(46192, 1)
player:AddItem(46194, 1)
player:AddItem(46196, 1)
player:GossipComplete(player)
end


if (intid == 63) then
player:AddItem(46183, 1)
player:AddItem(46184, 1)
player:AddItem(46185, 1)
player:AddItem(46186, 1)
player:AddItem(46187, 1)
player:GossipComplete(player)
end

-----Hunters-----

if(intid == 70) then
Unit:GossipCreateMenu(1004, player, 0)
Unit:GossipMenuAddItem(0, "Dps Set",71, 0)
Unit:GossipMenuAddItem(0, "Back", 3, 0)
Unit:GossipSendMenu(player)
end

if (intid == 71) then
player:AddItem(46141, 1)
player:AddItem(46142, 1)
player:AddItem(46143, 1)
player:AddItem(46144, 1)
player:AddItem(46145, 1)
player:GossipComplete(player)
end

-----Mage-----

if(intid == 80) then
Unit:GossipCreateMenu(1005, player, 0)
Unit:GossipMenuAddItem(0, "Spell Caster Set",81, 0)
Unit:GossipMenuAddItem(0, "Back", 3, 0)
Unit:GossipSendMenu(player)
end

if (intid == 81) then
player:AddItem(46129, 1)
player:AddItem(46130, 1)
player:AddItem(46132, 1)
player:AddItem(46133, 1)
player:AddItem(46134, 1)
player:GossipComplete(player)
end

-----Paladins------

if(intid == 90) then
Unit:GossipCreateMenu(1006, player, 0)
Unit:GossipMenuAddItem(0, "Dps Set",91, 0)
Unit:GossipMenuAddItem(0, "Tank Set",92, 0)
Unit:GossipMenuAddItem(0, "Healer Set", 93, 0)
Unit:GossipMenuAddItem(0, "Back", 3, 0)
Unit:GossipSendMenu(player)
end

if (intid == 91) then
player:AddItem(46152, 1)
player:AddItem(46153, 1)
player:AddItem(46154, 1)
player:AddItem(46165, 1)
player:AddItem(46166, 1)
player:GossipComplete(player)
end

if (intid == 92) then
player:AddItem(46173, 1)
player:AddItem(46174, 1)
player:AddItem(46175, 1)
player:AddItem(46176, 1)
player:AddItem(46177, 1)
player:GossipComplete(player)
end


if (intid == 93) then
player:AddItem(46178, 1)
player:AddItem(46179, 1)
player:AddItem(46180, 1)
player:AddItem(46181, 1)
player:AddItem(46182, 1)
player:GossipComplete(player)
end

-----Priest-----

if(intid == 100) then
Unit:GossipCreateMenu(1007, player, 0)
Unit:GossipMenuAddItem(0, "Dps Set",101, 0)
Unit:GossipMenuAddItem(0, "Healer Set", 102, 0)
Unit:GossipMenuAddItem(0, "Back", 3, 0)
Unit:GossipSendMenu(player)
end

if (intid == 101) then
player:AddItem(46163, 1)
player:AddItem(46165, 1)
player:AddItem(46168, 1)
player:AddItem(46180, 1)
player:AddItem(46172, 1)
end

if (intid == 102) then
player:AddItem(46188, 1)
player:AddItem(46190, 1)
player:AddItem(46193, 1)
player:AddItem(46195, 1)
player:AddItem(46197, 1)
player:GossipComplete(player)
end

-----Rogues-----

if(intid == 110) then
Unit:GossipCreateMenu(1008, player, 0)
Unit:GossipMenuAddItem(0, "Dps Set",111, 0)
Unit:GossipMenuAddItem(0, "Back", 3, 0)
Unit:GossipSendMenu(player)
end

if (intid == 111) then
player:AddItem(46123, 1)
player:AddItem(46124, 1)
player:AddItem(46125, 1)
player:AddItem(46126, 1)
player:AddItem(46127, 1)
player:GossipComplete(player)
end

-----Shamans-----

if(intid == 120) then
Unit:GossipCreateMenu(1009, player, 0)
Unit:GossipMenuAddItem(0, "Dps Set",121, 0)
Unit:GossipMenuAddItem(0, "Spell Caster Set",122, 0)
Unit:GossipMenuAddItem(0, "Healer Set", 123, 0)
Unit:GossipMenuAddItem(0, "Back", 3, 0)
Unit:GossipSendMenu(player)
end

if (intid == 121) then
player:AddItem(46200, 1)
player:AddItem(46203, 1)
player:AddItem(46205, 1)
player:AddItem(46208, 1)
player:AddItem(46212, 1)
player:GossipComplete(player)
end

if (intid == 122) then
player:AddItem(46206, 1)
player:AddItem(46207, 1)
player:AddItem(46209, 1)
player:AddItem(46210, 1)
player:AddItem(46211, 1)
player:GossipComplete(player)
end


if (intid == 123) then
player:AddItem(46198, 1)
player:AddItem(46199, 1)
player:AddItem(46201, 1)
player:AddItem(46202, 1)
player:AddItem(46204, 1)
player:GossipComplete(player)
end

-----Warlock-----

if(intid == 130) then
Unit:GossipCreateMenu(1010, player, 0)
Unit:GossipMenuAddItem(0, "Spell Caster Set",131, 0)
Unit:GossipMenuAddItem(0, "Back", 3, 0)
Unit:GossipSendMenu(player)
end

if (intid == 131) then
player:AddItem(46135, 1)
player:AddItem(46136, 1)
player:AddItem(46137, 1)
player:AddItem(46139, 1)
player:AddItem(46140, 1)
player:GossipComplete(player)
end

-----Warrior-----

if(intid == 140) then
Unit:GossipCreateMenu(1011, player, 0)
Unit:GossipMenuAddItem(0, "Dps Set",141, 0)
Unit:GossipMenuAddItem(0, "Tank Set",142, 0)
Unit:GossipMenuAddItem(0, "Back", 3, 0)
Unit:GossipSendMenu(player)
end

if (intid == 141) then
player:AddItem(46146, 1)
player:AddItem(46148, 1)
player:AddItem(46149, 1)
player:AddItem(46150, 1)
player:AddItem(46151, 1)
player:GossipComplete(player)
end

if (intid == 142) then
player:AddItem(46162, 1)
player:AddItem(46164, 1)
player:AddItem(46166, 1)
player:AddItem(46167, 1)
player:AddItem(46169, 1)
player:GossipComplete(player)
end

--------------------------------------Tier 7-------------------------------------------

------Deathknights-----

if(intid == 150) then
Unit:GossipCreateMenu(2001, player, 0)
Unit:GossipMenuAddItem(0, "Dps Set",151, 0)
Unit:GossipMenuAddItem(0, "Tank Set",152, 0)
Unit:GossipMenuAddItem(0, "Back", 4, 0)
Unit:GossipSendMenu(player)
end

if(intid == 151) then
player:AddItem(40550, 1)
player:AddItem(40552, 1)
player:AddItem(40554, 1)
player:AddItem(40556, 1)
player:AddItem(40557, 1)
player:GossipComplete(player)
end

if(intid == 152) then
player:AddItem(40559, 1)
player:AddItem(40563, 1)
player:AddItem(40565, 1)
player:AddItem(40567, 1)
player:AddItem(40568, 1)
player:GossipComplete(player)
end

-----Druids-----

if(intid == 160) then
Unit:GossipCreateMenu(2002, player, 0)
Unit:GossipMenuAddItem(0, "Dps Set",161, 0)
Unit:GossipMenuAddItem(0, "Spell Caster Set",162, 0)
Unit:GossipMenuAddItem(0, "Healer Set", 163, 0)
Unit:GossipMenuAddItem(0, "Back", 4, 0)
Unit:GossipSendMenu(player)
end

if (intid == 161) then
player:AddItem(40471, 1)
player:AddItem(40472, 1)
player:AddItem(40473, 1)
player:AddItem(40493, 1)
player:AddItem(40494, 1)
player:GossipComplete(player)
end

if (intid == 162) then
player:AddItem(40466, 1)
player:AddItem(40467, 1)
player:AddItem(40468, 1)
player:AddItem(40469, 1)
player:AddItem(40470, 1)
player:GossipComplete(player)
end


if (intid == 163) then
player:AddItem(40460, 1)
player:AddItem(40461, 1)
player:AddItem(40462, 1)
player:AddItem(40463, 1)
player:AddItem(40465, 1)
player:GossipComplete(player)
end

-----Hunters-----

if(intid == 170) then
Unit:GossipCreateMenu(2003, player, 0)
Unit:GossipMenuAddItem(0, "Dps Set",171, 0)
Unit:GossipMenuAddItem(0, "Back", 4, 0)
Unit:GossipSendMenu(player)
end

if (intid == 171) then
player:AddItem(40503, 1)
player:AddItem(40504, 1)
player:AddItem(40505, 1)
player:AddItem(40506, 1)
player:AddItem(40507, 1)
player:GossipComplete(player)
end

-----Mage-----

if(intid == 180) then
Unit:GossipCreateMenu(2004, player, 0)
Unit:GossipMenuAddItem(0, "Spell Caster Set",181, 0)
Unit:GossipMenuAddItem(0, "Back", 4, 0)
Unit:GossipSendMenu(player)
end

if (intid == 181) then
player:AddItem(40415, 1)
player:AddItem(40416, 1)
player:AddItem(40417, 1)
player:AddItem(40418, 1)
player:AddItem(40419, 1)
player:GossipComplete(player)
end

-----Paladins------

if(intid == 190) then
Unit:GossipCreateMenu(2005, player, 0)
Unit:GossipMenuAddItem(0, "Dps Set",191, 0)
Unit:GossipMenuAddItem(0, "Tank Set",192, 0)
Unit:GossipMenuAddItem(0, "Healer Set", 193, 0)
Unit:GossipMenuAddItem(0, "Back", 4, 0)
Unit:GossipSendMenu(player)
end

if (intid == 191) then
player:AddItem(40574, 1)
player:AddItem(40575, 1)
player:AddItem(40576, 1)
player:AddItem(40577, 1)
player:AddItem(40578, 1)
player:GossipComplete(player)
end

if (intid == 192) then
player:AddItem(40579, 1)
player:AddItem(40580, 1)
player:AddItem(40581, 1)
player:AddItem(40583, 1)
player:AddItem(40584, 1)
player:GossipComplete(player)
end


if (intid == 193) then
player:AddItem(40569, 1)
player:AddItem(40570, 1)
player:AddItem(40571, 1)
player:AddItem(40572, 1)
player:AddItem(40573, 1)
player:GossipComplete(player)
end

-----Priest-----

if(intid == 200) then
Unit:GossipCreateMenu(2006, player, 0)
Unit:GossipMenuAddItem(0, "Dps Set",201, 0)
Unit:GossipMenuAddItem(0, "Healer Set", 202, 0)
Unit:GossipMenuAddItem(0, "Back", 4, 0)
Unit:GossipSendMenu(player)
end

if (intid == 201) then
player:AddItem(40454, 1)
player:AddItem(40456, 1)
player:AddItem(40457, 1)
player:AddItem(40458, 1)
player:AddItem(40459, 1)
player:GossipComplete(player)
end

if (intid == 202) then
player:AddItem(40445, 1)
player:AddItem(40447, 1)
player:AddItem(40448, 1)
player:AddItem(40449, 1)
player:AddItem(40450, 1)
player:GossipComplete(player)
end

-----Rogues-----

if(intid == 210) then
Unit:GossipCreateMenu(2007, player, 0)
Unit:GossipMenuAddItem(0, "Dps Set",211, 0)
Unit:GossipMenuAddItem(0, "Back", 4, 0)
Unit:GossipSendMenu(player)
end

if (intid == 211) then
player:AddItem(40495, 1)
player:AddItem(40496, 1)
player:AddItem(40499, 1)
player:AddItem(40500, 1)
player:AddItem(40502, 1)
player:GossipComplete(player)
end

-----Shamans-----

if(intid == 220) then
Unit:GossipCreateMenu(2008, player, 0)
Unit:GossipMenuAddItem(0, "Dps Set",221, 0)
Unit:GossipMenuAddItem(0, "Spell Caster Set",222, 0)
Unit:GossipMenuAddItem(0, "Healer Set", 223, 0)
Unit:GossipMenuAddItem(0, "Back", 4, 0)
Unit:GossipSendMenu(player)
end

if (intid == 221) then
player:AddItem(40520, 1)
player:AddItem(40521, 1)
player:AddItem(40522, 1)
player:AddItem(40523, 1)
player:AddItem(40524, 1)
player:GossipComplete(player)
end

if (intid == 222) then
player:AddItem(40514, 1)
player:AddItem(40515, 1)
player:AddItem(40516, 1)
player:AddItem(40517, 1)
player:AddItem(40518, 1)
player:GossipComplete(player)
end


if (intid == 223) then
player:AddItem(40508, 1)
player:AddItem(40509, 1)
player:AddItem(40510, 1)
player:AddItem(40512, 1)
player:AddItem(40513, 1)
player:GossipComplete(player)
end

-----Warlock-----

if(intid == 230) then
Unit:GossipCreateMenu(2009, player, 0)
Unit:GossipMenuAddItem(0, "Spell Caster Set",231, 0)
Unit:GossipMenuAddItem(0, "Back", 4, 0)
Unit:GossipSendMenu(player)
end

if (intid == 231) then
player:AddItem(40420, 1)
player:AddItem(40421, 1)
player:AddItem(40422, 1)
player:AddItem(40423, 1)
player:AddItem(40424, 1)
player:GossipComplete(player)
end

-----Warrior-----

if(intid == 240) then
Unit:GossipCreateMenu(2010, player, 0)
Unit:GossipMenuAddItem(0, "Dps Set",241, 0)
Unit:GossipMenuAddItem(0, "Tank Set",242, 0)
Unit:GossipMenuAddItem(0, "Back", 4, 0)
Unit:GossipSendMenu(player)
end

if (intid == 241) then
player:AddItem(40525, 1)
player:AddItem(40527, 1)
player:AddItem(40528, 1)
player:AddItem(40529, 1)
player:AddItem(40530, 1)
player:GossipComplete(player)
end

if (intid == 242) then
player:AddItem(40544, 1)
player:AddItem(40545, 1)
player:AddItem(40546, 1)
player:AddItem(40547, 1)
player:AddItem(40548, 1)
player:GossipComplete(player)
end

-----Buffs-----

if ( intid == 5) then
Unit:FullCastSpellOnTarget(58451, player) ---Scroll
Unit:FullCastSpellOnTarget(48100, player) ---Scroll
Unit:FullCastSpellOnTarget(58452, player) ---Scroll
Unit:FullCastSpellOnTarget(48104, player) ---Scroll
Unit:FullCastSpellOnTarget(48102, player) ---Scroll
Unit:FullCastSpellOnTarget(48469, player) ---Mark of the wild
Unit:FullCastSpellOnTarget(61024, player) ---Dalaran Intellect
Unit:FullCastSpellOnTarget(20217, player) ---Blessing Of Kings
Unit:FullCastSpellOnTarget(48161, player) ---Power Word Fortitude
Unit:FullCastSpellOnTarget(48073, player) ---Divine Spirit
Unit:FullCastSpellOnTarget(48169, player) ---Shadow Protection
Unit:FullCastSpellOnTarget(54675, player) ---Spell crit 30
Unit:FullCastSpellOnTarget(15366, player) ---Songflower Serenade
Unit:FullCastSpellOnTarget(33077, player) ---Agilty
Unit:FullCastSpellOnTarget(53307, player) ---Thorns
Unit:FullCastSpellOnTarget(43017, player) ---Amplify Magic
Unit:FullCastSpellOnTarget(5697, player) ---Unending Breath
Unit:FullCastSpellOnTarget(132, player) ---Detect Invisibility
Unit:FullCastSpellOnTarget(1706, player) ---Levitate
Unit:FullCastSpellOnTarget(16618, player) ---Speed
player:GossipComplete(player)
end

-----Skills-----
if ( intid == 6) then
player:AdvanceSkill (473, 399)
player:AdvanceSkill (171, 399)
player:AdvanceSkill (755, 399)
player:AdvanceSkill (164, 399)
player:AdvanceSkill (165, 399)
player:AdvanceSkill (333, 399)
player:AdvanceSkill (202, 399)
player:AdvanceSkill (186, 399)
player:AdvanceSkill (773, 399)
player:AdvanceSkill (182, 399)
player:AdvanceSkill (393, 399)
player:AdvanceSkill (197, 399)
player:AdvanceSkill (185, 399)
player:AdvanceSkill (356, 399)
player:AdvanceSkill (55, 399)
player:AdvanceSkill (43, 399)
player:AdvanceSkill (44, 399)
player:AdvanceSkill (172, 399)
player:AdvanceSkill (54, 399)
player:AdvanceSkill (160, 399)
player:AdvanceSkill (136, 399)
player:AdvanceSkill (162, 399)
player:AdvanceSkill (176, 399)
player:AdvanceSkill (228, 399)
player:AdvanceSkill (173, 399)
player:AdvanceSkill (46, 399)
player:AdvanceSkill (45, 399)
player:AdvanceSkill (226, 399)
player:AdvanceSkill (129, 399)
player:AdvanceSkill (229, 399)
player:GossipComplete(player)
end

-----Faction Rep-----

-----Ally-----

if ( intid == 7) then
player:SetStanding(1037, 5000000)
player:SetStanding(69, 5000000)
player:SetStanding(1068, 5000000)
player:SetStanding(1104, 5000000)
player:SetStanding(54, 5000000)
player:SetStanding(946, 5000000)
player:SetStanding(47, 5000000)
player:SetStanding(978, 5000000)
player:SetStanding(890, 5000000)
player:SetStanding(730, 5000000)
player:SetStanding(72, 5000000)
player:SetStanding(1126, 5000000)
player:SetStanding(509, 5000000)
player:SetStanding(1094, 5000000)
player:SetStanding(1050, 5000000)
player:SetStanding(471, 5000000)
player:SetStanding(589, 5000000)
player:GossipComplete(player)
end

-----Horde-----

if ( intid == 8) then
player:SetStanding(889, 5000000)
player:SetStanding(1085, 5000000)
player:SetStanding(68, 5000000)
player:SetStanding(922, 5000000)
player:SetStanding(947, 5000000)
player:SetStanding(81, 5000000)
player:SetStanding(1064, 5000000)
player:SetStanding(1124, 5000000)
player:SetStanding(941, 5000000)
player:SetStanding(1067, 5000000)
player:SetStanding(510, 5000000)
player:SetStanding(911, 5000000)
player:SetStanding(76, 5000000)
player:SetStanding(1052, 5000000)
player:SetStanding(729, 5000000)
player:SetStanding(530, 5000000)
player:GossipComplete(player)
end


-----Other Factions-----

if ( intid == 9) then
player:SetStanding(1106, 5000000)
player:SetStanding(529, 5000000)
player:SetStanding(1012, 5000000)
player:SetStanding(87, 5000000)
player:SetStanding(21, 5000000)
player:SetStanding(910, 5000000)
player:SetStanding(609, 5000000)
player:SetStanding(942, 5000000)
player:SetStanding(909, 5000000)
player:SetStanding(577, 5000000)
player:SetStanding(1104, 5000000)
player:SetStanding(369, 5000000)
player:SetStanding(92, 5000000)
player:SetStanding(749, 5000000)
player:SetStanding(989, 5000000)
player:SetStanding(1090, 5000000)
player:SetStanding(1098, 5000000)
player:SetStanding(1011, 5000000)
player:SetStanding(93, 5000000)
player:SetStanding(1015, 5000000)
player:SetStanding(1038, 5000000)
player:SetStanding(470, 5000000)
player:SetStanding(349, 5000000)
player:SetStanding(1031, 5000000)
player:SetStanding(1077, 5000000)
player:SetStanding(809, 5000000)
player:SetStanding(970, 5000000)
player:SetStanding(70, 5000000)
player:SetStanding(932, 5000000)
player:SetStanding(933, 5000000)
player:SetStanding(1073, 5000000)
player:SetStanding(1105, 5000000)
player:SetStanding(990, 5000000)
player:SetStanding(934, 5000000)
player:SetStanding(935, 5000000)
player:SetStanding(1119, 5000000)
player:SetStanding(967, 5000000)
player:SetStanding(1091, 5000000)
player:SetStanding(59, 5000000)
player:SetStanding(576, 5000000)
player:SetStanding(270, 5000000)
player:GossipComplete(player)
end

-----Non Combat Pets-----

if ( intid == 10) then
player:LearnSpell(62514)
player:LearnSpell(23428)
player:LearnSpell(62562)
player:LearnSpell(10685)
player:LearnSpell(62746)
player:LearnSpell(62609)
player:LearnSpell(10696)
player:LearnSpell(61855)
player:LearnSpell(25849)
player:LearnSpell(40549)
player:LearnSpell(65682)
player:LearnSpell(10714)
player:LearnSpell(10675)
player:LearnSpell(36031)
player:LearnSpell(35907)
player:LearnSpell(10673)
player:LearnSpell(10709)
player:LearnSpell(35239)
player:LearnSpell(10716)
player:LearnSpell(65358)
player:LearnSpell(58636)
player:LearnSpell(46426)
player:LearnSpell(45048)
player:LearnSpell(54187)
player:LearnSpell(61351)
player:LearnSpell(10680)
player:LearnSpell(10688)
player:LearnSpell(10674)
player:LearnSpell(15648)
player:LearnSpell(10717)
player:LearnSpell(10697)
player:LearnSpell(65381)
player:LearnSpell(65382)
player:LearnSpell(10695)
player:LearnSpell(67413)
player:LearnSpell(67414)
player:LearnSpell(25162)
player:LearnSpell(45127)
player:LearnSpell(62508)
player:LearnSpell(62513)
player:LearnSpell(40614)
player:LearnSpell(62516)
player:LearnSpell(10698)
player:LearnSpell(62564)
player:LearnSpell(48408)
player:LearnSpell(49964)
player:LearnSpell(26533)
player:LearnSpell(36034)
player:LearnSpell(52615)
player:LearnSpell(53316)
player:LearnSpell(59250)
player:LearnSpell(36027)
player:LearnSpell(45174)
player:LearnSpell(10707)
player:LearnSpell(10683)
player:LearnSpell(66030)
player:LearnSpell(67415)
player:LearnSpell(27241)
player:LearnSpell(53768)
player:LearnSpell(10706)
player:LearnSpell(23432)
player:LearnSpell(30156)
player:LearnSpell(10682)
player:LearnSpell(66520)
player:LearnSpell(23811)
player:LearnSpell(61472)
player:LearnSpell(67416)
player:LearnSpell(23431)
player:LearnSpell(19772)
player:LearnSpell(15049)
player:LearnSpell(61991)
player:LearnSpell(23429)
player:LearnSpell(40319)
player:LearnSpell(24988)
player:LearnSpell(66175)
player:LearnSpell(33050)
player:LearnSpell(35156)
player:LearnSpell(12243)
player:LearnSpell(4055)
player:LearnSpell(62674)
player:LearnSpell(17708)
player:LearnSpell(53082)
player:LearnSpell(39181)
player:LearnSpell(43918)
player:LearnSpell(55068)
player:LearnSpell(28739)
player:LearnSpell(43698)
player:LearnSpell(62542)
player:LearnSpell(25018)
player:LearnSpell(63318)
player:LearnSpell(24696)
player:LearnSpell(51716)
player:LearnSpell(32298)
player:LearnSpell(67417)
player:LearnSpell(23430)
player:LearnSpell(67527)
player:LearnSpell(10676)
player:LearnSpell(17707)
player:LearnSpell(40634)
player:LearnSpell(27570)
player:LearnSpell(61357)
player:LearnSpell(15048)
player:LearnSpell(46599)
player:LearnSpell(61773)
player:LearnSpell(28505)
player:LearnSpell(61350)
player:LearnSpell(67418)
player:LearnSpell(67419)
player:LearnSpell(67420)
player:LearnSpell(36028)
player:LearnSpell(35909)
player:LearnSpell(45125)
player:LearnSpell(45890)
player:LearnSpell(63712)
player:LearnSpell(10684)
player:LearnSpell(66096)
player:LearnSpell(10677)
player:LearnSpell(36029)
player:LearnSpell(45175)
player:LearnSpell(10678)
player:LearnSpell(42609)
player:LearnSpell(16450)
player:LearnSpell(46425)
player:LearnSpell(10711)
player:LearnSpell(28738)
player:LearnSpell(48406)
player:LearnSpell(28871)
player:LearnSpell(61725)
player:LearnSpell(15067)
player:LearnSpell(40990)
player:LearnSpell(62561)
player:LearnSpell(10713)
player:LearnSpell(24985)
player:LearnSpell(24986)
player:LearnSpell(24987)
player:LearnSpell(24989)
player:LearnSpell(24990)
player:LearnSpell(17567)
player:LearnSpell(10715)
player:LearnSpell(10699)
player:LearnSpell(10681)
player:LearnSpell(10710)
player:LearnSpell(10701)
player:LearnSpell(10705)
player:LearnSpell(10721)
player:LearnSpell(10700)
player:LearnSpell(10718)
player:LearnSpell(10702)
player:LearnSpell(44369)
player:LearnSpell(10686)
player:LearnSpell(10719)
player:LearnSpell(10720)
player:LearnSpell(10708)
player:LearnSpell(10712)
player:LearnSpell(35157)
player:LearnSpell(10687)
player:LearnSpell(62491)
player:LearnSpell(28487)
player:LearnSpell(61348)
player:LearnSpell(23531)
player:LearnSpell(23530)
player:LearnSpell(26045)
player:LearnSpell(45082)
player:LearnSpell(62510)
player:LearnSpell(43697)
player:LearnSpell(26010)
player:LearnSpell(10704)
player:LearnSpell(51851)
player:LearnSpell(13548)
player:LearnSpell(28740)
player:LearnSpell(10679)
player:LearnSpell(35911)
player:LearnSpell(61349)
player:LearnSpell(30152)
player:LearnSpell(40613)
player:LearnSpell(26529)
player:LearnSpell(26541)
player:LearnSpell(39709)
player:LearnSpell(10703)
player:LearnSpell(15999)
player:LearnSpell(64351)
player:LearnSpell(35910)
player:LearnSpell(17709)
player:GossipComplete(player)
end

-----Second Page-----

if ( intid == 11) then

Unit:GossipCreateMenu(10001, player, 0)

Unit:GossipMenuAddItem(0, "|cffff0000Bags!", 12, 0)

Unit:GossipMenuAddItem(0, "|cFF0000FFProjectiles!", 13, 0)

Unit:GossipMenuAddItem(0, "|cFF8A2BE2Keys!", 14, 0)

Unit:GossipMenuAddItem(0, "|cFF006400[Back]", 999, 0)

Unit:GossipSendMenu(player)
end

-----Bags-----

if ( intid == 12) then
Unit:GossipCreateMenu(20001, player, 0)
Unit:GossipMenuAddItem(0,"Bags!", 400, 0)
Unit:GossipMenuAddItem(0,"Enchanting Bag!!", 401, 0)
Unit:GossipMenuAddItem(0,"Engineering Bag!", 402, 0)
Unit:GossipMenuAddItem(0,"Gem Bag!", 403, 0)
Unit:GossipMenuAddItem(0,"Herb Bag!", 404, 0)
Unit:GossipMenuAddItem(0,"Inscription Bag!", 405, 0)
Unit:GossipMenuAddItem(0,"Leatherworking Bag!", 406, 0)
Unit:GossipMenuAddItem(0,"Mining Bag!", 407, 0)
Unit:GossipMenuAddItem(0,"Soul Bag!",408, 0)
Unit:GossipMenuAddItem(0,"Ammo Pouch!",411, 0)
Unit:GossipMenuAddItem(0,"Quiver!",412, 0)
Unit:GossipMenuAddItem(0, "[Back]", 11, 0)
Unit:GossipSendMenu(player)
end

if ( intid == 400) then
player:AddItem(23162, 1)
player:AddItem(23162, 1)
player:AddItem(23162, 1)
player:AddItem(23162, 1)
player:GossipComplete(player)
end

if (intid ==401) then
player:AddItem(41598, 1)
player:GossipComplete(player)
end

if (intid ==402) then
player:AddItem(23775, 1)
player:GossipComplete(player)
end

if (intid ==403) then
player:AddItem(24270, 1)
player:GossipComplete(player)
end

if (intid ==404) then
player:AddItem(45773, 1)
player:GossipComplete(player)
end

if (intid ==405) then
player:AddItem(44446, 1)
player:GossipComplete(player)
end

if (intid ==406) then
player:AddItem(38399, 1)
player:GossipComplete(player)
end

if (intid ==407) then
player:AddItem(38347, 1)
player:GossipComplete(player)
end

if (intid ==408) then
player:AddItem(41597, 1)
player:GossipComplete(player)
end

if (intid == 411) then
player:AddItem(44447, 1)
player:GossipComplete(player)
end

if (intid == 412) then
player:AddItem(44448, 1)
player:GossipComplete(player)
end

-----Projectiles-----

if (intid == 13) then
Unit:GossipCreateMenu(20001, player, 0)
Unit:GossipMenuAddItem(0,"Arrows!", 409, 0)
Unit:GossipMenuAddItem(0,"Bullets!!", 410, 0)
Unit:GossipMenuAddItem(0, "[Back]", 11, 0)
Unit:GossipSendMenu(player)
end

if (intid == 409) then
player:AddItem(41165, 1000)
player:GossipComplete(player)
end

if (intid == 410) then
player:AddItem(41164, 1000)
player:GossipComplete(player)
end

-----Keys For Instances/Raids-----

if (intid == 14) then
player:AddItem(12382, 1)
player:AddItem(7146, 1)
player:AddItem(30633, 1)
player:AddItem(30622, 1)
player:AddItem(30637, 1)
player:AddItem(11602, 1)
player:AddItem(30635, 1)
player:AddItem(5396, 1)
player:AddItem(31084, 1)
player:AddItem(30623, 1)
player:AddItem(27991, 1)
player:AddItem(11000, 1)
player:AddItem(28395, 1)
player:AddItem(24490, 1)
player:AddItem(42482, 1)
player:AddItem(13873, 1)
player:GossipComplete(player)
end
end



RegisterUnitGossipEvent(60002,1,"AIONPC_OnGossip")
RegisterUnitGossipEvent(60002,2,"AIONPC_onselect")

Save this scripts as AIONPC.lua and edit "60002" to the Entry ID of the npc you want.

Apple
26-08-09, 02:49 PM
Nice one dude , +rep ;)

tylert40
27-08-09, 02:08 PM
Nice script!

freackernikita
08-05-10, 08:28 PM
Good job +rep

chaotic
14-05-10, 03:59 AM
Nice work!!