All pastes #388355 Raw Edit

Something

public text v1 · immutable
·published 2007-03-10 00:29 UTC
rendered paste body
function Guard_General_GossipHello(player,_Creature)
	AIScript = Mango.AIScripts.GetAIScript('default_guard_ai')
	if (AIScript ~= nil) then
		AIScript.GossipHello(player, _Creature);
	end	
-- Detect ID of Guard
   local ID_Guard = creature:GetEntry()
-- ID of guard for map
map1 = {1423, 68, 1976, 5624, 1423, 5595, 727, 13076 }
map2 = {3296, 4262, 3571, 3084, 5953, 3210, 3211, 3212, 3213, 3214, 3215, 3217, 3218, 3219, 3220, 3221, 3222, 3223, 3224, 1735, 1738, 2210, 1736, 1739, 1737, 1744, 1745, 5725, 1743, 2209, 1746, 1742}
local i = 1
while map1[i] do
      if ID_Guard == map1[i] then
         mapping = 0
      end
i = i + 1
end
local i = 1
while map2[i] do
      if ID_Guard == map2[i] then
         mapping = 1
      end
i = i + 1
end
-- Choice menu
--stormwind
if ( ( ID_Guard == 1423 ) or ( ID_Guard == 68 ) or ( ID_Guard == 1976 ) ) then
   SW_GossipHello1 = { 0,"Auction House", 1, "Bank of Stormwind", 0, "Deeprun Tram", 8, "The Inn", 2, "Gryphon Master", 0, "Mailbox",0, "Stable Master",0, "Weapon Master",0, "Officer's Lounge",9, "Battlemaster",3, "Class Trainer",5, "Profession Trainer"}
   SW_cnt = 13
   def = 1
   gossmen = 2593
   for i=1,SW_cnt,2 do
       player:ADD_GOSSIP_ITEM( SW_GossipHello1[i], SW_GossipHello1[i + 1]		, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + def)
       def = def + 1
   end
end
--undercity
if ( ( ID_Guard == 5624 ) ) then
   SW_GossipHello1 = { 6, "The Bank", 2, "Bat Handler", 0, "Guild Master", 1, "The Inn", 4, "The Mailbox", 1, "Auction House",2, "Zeppelin Master",0, "Weapon Master",5, "Stable Master",8, "Battlemaster",3, "Class Trainer",3, "Profession Trainer"}
   SW_cnt = 12
   def = 1
   gossmen = 3543
   for i=1,SW_cnt,2 do
       player:ADD_GOSSIP_ITEM( SW_GossipHello1[i], SW_GossipHello1[i + 1]		, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + def)
       def = def + 1
   end
end