LieutenantWestfall.lua 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. --[[
  2. Script Name : SpawnScripts/QueensColony/LieutenantWestfall.lua
  3. Script Author : premierio015
  4. Script Date : 2020.08.05
  5. Script Purpose : Lieutenant Westfall dialog
  6. Notes :
  7. --]]
  8. function spawn(NPC)
  9. SetTempVariable(NPC, "HAILED1", "true")
  10. SetTempVariable(NPC, "AggroWestfall", "true") -- to avoid aggro message triggering multiple times at once
  11. end
  12. function respawn(NPC)
  13. spawn(NPC)
  14. end
  15. function hailed(NPC, Spawn)
  16. if GetTempVariable(NPC, "HAILED1") == "true" then
  17. PlayFlavor(NPC, "", "What's that there! To arms, the Morak are coming!", "point", 1689589577, 4560189, Spawn)
  18. zone = GetZone(Spawn)
  19. Morak1 = SpawnByLocationID(zone, 428874)
  20. Morak2 = SpawnByLocationID(zone, 428880)
  21. Morak3 = SpawnByLocationID(zone, 428890)
  22. SetTempVariable(NPC, "HAILED1", "false")
  23. AddTimer(NPC, 10000, "hailed2")
  24. elseif GetTempVariable(NPC, "HAILED1") == "false" then
  25. local choice = math.random(1, 2)
  26. if choice == 1 then
  27. PlayFlavor(NPC, "", "Hopefully Mara'Vaen can help our lost scouts.", "", 1689589577, 4560189, Spawn)
  28. else
  29. PlayFlavor(NPC, "", "Keep your eyes peeled, the Morak have risen once again.", "peer", 1689589577, 4560189, Spawn)
  30. end
  31. end
  32. end
  33. function hailed2(NPC, Spawn)
  34. SetTempVariable(NPC, "HAILED1", "true")
  35. end
  36. function aggro(NPC)
  37. if GetTempVariable(NPC, "AggroWestfall") == "true" then
  38. local choice = math.random(1,3)
  39. if choice == 1 then
  40. PlayFlavor(NPC, "voiceover/english/human_base_1/ft/human/human_base_1_1_aggro_gm_a203c9ec.mp3", "Prepare to face your doom, meddler.", "", 1496819882, 365167432)
  41. elseif choice == 2 then
  42. PlayFlavor(NPC, "voiceover/english/human_base_1/ft/human/human_base_1_1_aggro_gm_583690dc.mp3", "Summon help! We have invaders!", "", 3340212225, 279643307)
  43. else
  44. PlayFlavor(NPC, "voiceover/english/human_base_1/ft/human/human_base_1_1_aggro_gm_a30c4f9d.mp3", "To arms!", "", 1238020980, 748146443)
  45. end
  46. SetTempVariable(NPC, "AggroWestfall", "false")
  47. else
  48. AddTimer(NPC, 5000, "resetAggro")
  49. end
  50. end
  51. function killed(NPC)
  52. local choice = math.random(1,3)
  53. if choice == 1 then
  54. PlayFlavor(NPC, "voiceover/english/human_base_1/ft/human/human_base_1_1_victory_gm_ec0cd85a.mp3", "I hope they're all this easy.", "", 2687289628, 2303639320)
  55. elseif choice == 2 then
  56. PlayFlavor(NPC, "voiceover/english/human_base_1/ft/human/human_base_1_1_victory_gm_4553e1e0.mp3", "Flee now or meet this one's fate.", "", 3032162747, 1359206304)
  57. else
  58. PlayFlavor(NPC, "voiceover/english/human_base_1/ft/human/human_base_1_1_victory_gm_153f12ff.mp3", "One down!", "", 3009518664, 4140389760)
  59. end
  60. end
  61. function resetAggro(NPC)
  62. SetTempVariable(NPC, "AggroWestfall", "true")
  63. end