PDA

View Full Version : [Lua] GM Buffer/GM Item Giver



MikExV™
16-03-10, 07:58 PM
Well its a quite Simplet .lua Script. You click the npc you set it to and you can click GM Gear, or GM spells, and there is retail GM gear. And a few Retail GM spells. Hope you guys like it ;)
I have not tested it yet.


function On_Gossip(pUnit, event, player)
pUnit:GossipCreateMenu(3544, player, 0)
pUnit:GossipMenuAddItem(0, "Game Master Gear", 1, 0)
pUnit:GossipMenuAddItem(0, "Game Master Buff Menu", 3, 0)
end

function Gossip_Submenus(pUnit, event, player, id, intid, code)
if (intid == 3) then
pUnit:GossipCreateMenu(3543, player, 0)
pUnit:GossipMenuAddItem(0, "Uber Heal", 5, 0)
pUnit:GossipMenuAddItem(0, "Divine Shield", 6, 0)
pUnit:GossipMenuAddItem(0, "Thorns", 7, 0)
pUnit:GossipMenuAddItem(0, "Haste Aura", 8, 0)
end

if(intid == 5) then
unit:GossipCreateMenu(71, player, 0)
unit:FullCastSpellOnTarget(1908, player)
unit:GossipSendMenu(player)
end

if(intid == 6) then
unit:GossipCreateMenu(71, player, 0)
unit:FullCastSpellOnTarget(40733, player)
unit:GossipSendMenu(player)
end

if(intid == 7) then
unit:GossipCreateMenu(71, player, 0)
unit:FullCastSpellOnTarget(62931, player)
unit:GossipSendMenu(player)
end

if(intid == 8) then
unit:GossipCreateMenu(71, player, 0)
unit:FullCastSpellOnTarget(13589, player)
unit:GossipSendMenu(player)
end

function Gossip_Submenus(pUnit, event, player, id, intid, code)
if (intid == 1) then
pUnit:GossipCreateMenu(3543, player, 0)
pUnit:GossipMenuAddItem(0, "Retail Game Master Gear", 2, 0)
end

if (intid == 2) then
player:AddItem(2586, 1)
player:AddItem(12064, 1)
player:AddItem(11508, 1)
player:AddItem(192, 1)

RegisterUnitGossipEvent(Your NPC ID HERE!, 1, "On_Gossip")
RegisterUnitGossipEvent(YOUR NPC ID HERE!, 2, "Gossip_Submenus")
First Script ever made

shadowslayer133
16-03-10, 08:54 PM
A bit simple for an Lua script, but it may provide as a template for someone in need of one.

Apple
16-03-10, 10:09 PM
+rep for trying to contribute :)

StickyIcky
16-03-10, 11:14 PM
Isn't there anyway to use LUAhypARC or w/e to make it check for GM?

Otherwise if a player finds this NPC they can get all that.

But other then that +rep

MikExV™
17-03-10, 12:32 PM
Np Msouls, and yes I know WigSplitta I will be editing the script its my first one I have ever made.