9
3

aQeynosianscout01.lua 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. --[[
  2. Script Name : SpawnScripts/QueensColony/aQeynosianscout.lua
  3. Script Author : premierio015
  4. Script Date : 2020.04.18 05:04:21
  5. Script Purpose : Qeynosian Scout script
  6. :
  7. --]]
  8. function spawn(NPC)
  9. SetTempVariable(NPC, "AggroGnome", "true") -- to avoid aggro message triggering multiple times at once
  10. end
  11. function hailed(NPC, Spawn)
  12. FaceTarget(NPC, Spawn)
  13. math.randomseed(os.time())
  14. voice = math.random (1,3)
  15. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_"..voice.."_1005.mp3", "", "", 0, 0, Spawn)
  16. text = math.random(1,2)
  17. if text == 1 then
  18. Say(NPC, "Shhh. The Morak are near!")
  19. else
  20. Say(NPC, "Hopefully our brethren can be brought back from the brink of death.")
  21. end
  22. end
  23. function respawn(NPC)
  24. spawn(NPC)
  25. end
  26. function aggro(NPC)
  27. if GetTempVariable(NPC, "AggroGnome") == "true" then
  28. local choice = math.random(1,3)
  29. if choice == 1 then
  30. PlayFlavor(NPC, "voiceover/english/gnome_base_1/ft/gnome/gnome_base_1_1_aggro_gf_7d3374f8.mp3", "You'll never steal my experiment!", "", 2315424682, 472771026)
  31. elseif choice == 2 then
  32. PlayFlavor(NPC, "voiceover/english/gnome_base_1/ft/gnome/gnome_base_1_1_aggro_gf_b59b3c3f.mp3", "However you got in here, you'll never leave alive!", "", 2616990629, 1631099033)
  33. else
  34. PlayFlavor(NPC, "voiceover/english/gnome_base_1/ft/gnome/gnome_base_1_1_aggro_gf_63dac9bc.mp3", "Ha! Trying to copy my formula? I'll kill you!", "", 3500771042, 3995771679)
  35. end
  36. SetTempVariable(NPC, "AggroGnome", "false")
  37. else
  38. AddTimer(NPC, 5000, "resetAggro")
  39. end
  40. end
  41. function killed(NPC)
  42. local choice = math.random(1,3)
  43. if choice == 1 then
  44. PlayFlavor(NPC, "voiceover/english/gnome_base_1/ft/gnome/gnome_base_1_1_victory_gf_879bb3ce.mp3", "Finally, I can get back to work.", "", 477519519, 1189386206)
  45. elseif choice == 2 then
  46. PlayFlavor(NPC, "voiceover/english/gnome_base_1/ft/gnome/gnome_base_1_1_victory_gf_d6f9f4a6.mp3", "Don't damage the bodies!", "", 2149878969, 3124019586)
  47. else
  48. PlayFlavor(NPC, "voiceover/english/gnome_base_1/ft/gnome/gnome_base_1_1_victory_gf_3e57f1d6.mp3", "Excellent, a new body for my experiments!", "", 3183071935, 797675273)
  49. end
  50. end
  51. function resetAggro(NPC)
  52. SetTempVariable(NPC, "AggroGnome", "true")
  53. end