Laena.lua 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. --[[
  2. Script Name : SpawnScripts/OutpostOverlord/Laena.lua
  3. Script Purpose : Laena
  4. Script Author : John Adams
  5. Script Date : 2008.09.23
  6. Script Notes : Auto-Generated Conversation from PacketParser Data
  7. Modified Script Notes : Added SpawnAccess. Added support for In the Name Of Honor.
  8. Modified by : premierio015, Neveruary
  9. --]]
  10. local TheTunarianPlot = 491
  11. local NameOfHonor = 490
  12. function spawn(NPC)
  13. AddSpawnAccess(NPC, NPC)
  14. SetPlayerProximityFunction(NPC, 20, "SpawnAccess", "SpawnAccess")
  15. end
  16. function SpawnAccess(NPC, Spawn)
  17. if GetQuestStep(Spawn, TheTunarianPlot) == 6 or GetQuestStep(Spawn, NameOfHonor) == 5 then
  18. AddSpawnAccess(NPC, Spawn)
  19. else
  20. RemoveSpawnAccess(NPC, Spawn)
  21. end
  22. end
  23. function aggro(NPC, Spawn)
  24. FaceTarget(NPC, Spawn)
  25. choice = math.random(1,3)
  26. if choice == 1 then
  27. PlayFlavor(NPC, "", "For the Queen!", "combat_enter", 1689589577, 4560189, Spawn)
  28. elseif choice == 2 then
  29. PlayFlavor(NPC, "", "Die, Freeport scum!", "threaten", 1689589577, 4560189, Spawn)
  30. elseif choice == 3 then
  31. PlayFlavor(NPC, "", "To the gray fields with them!", "", 1689589577, 4560189, Spawn)
  32. end
  33. end