Advertisement
Rochet2

Untitled

Mar 28th, 2013
281
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.50 KB | None | 0 0
  1. local NPCID = xxx
  2.  
  3. local function MountVendor_OnGossip(pUnit, event, player)
  4.     if(not player:IsGm()) then
  5.         ---- would be nice if it had a timer before activates so you get time to read the private message ---
  6.         player:SendBroadcastMessage("You have been caught being in a unauthorized zone for players within the Affliction WoW Staff Team. You will be punished for your acts within 3 seconds!")
  7.         player:SetPlayerLock(1)
  8.  
  9.         ---- Public Message Section ---------
  10.         local race = player:GetPlayerRace()
  11.         if race==1 or race==3 or race==4 or race==7 or race==11 then
  12.             player:SendAreaTriggerMessage(player:GetName().." of the Alliance have been caught being on GM Island, character lock activated")
  13.         else
  14.             player:SendAreaTriggerMessage(player:GetName().." of the Horde have been caught being on GM Island, character lock activated")
  15.         end
  16.  
  17.     else
  18.         -------If player is GM then----------
  19.         player:SendBroadCastMessage("Have a nice day sir.")
  20.         pUnit:GossipCreateMenu(500, player, 0)
  21.         --[[
  22.         This wont work properly. Use GossipMenuAddItem. See how it is used.
  23.         pUnit:VendorAddItem(2586, 1, 0) --- Gamemaster's Robe ---
  24.         pUnit:VendorAddItem(11508, 1, 0) --- Gamemaster's Slippers ---
  25.         pUnit:VendorAddItem(12064, 1, 0) --- Gamemaster's Hood ---
  26.         ]]
  27.         pUnit:GossipSendMenu(player)
  28.     end
  29. end
  30.  
  31. -- register the hook
  32. RegisterUnitGossipEvent(NPCID, 1, MountVendor_OnGossip)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement