aQeynosianscout02.lua 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. --[[
  2. Script Name : SpawnScripts/QueensColony/aQeynosianscout02.lua
  3. Script Author : Premierio015
  4. Script Date : 2020.04.18 05:04:25
  5. Script Purpose : a Qeynosian scout script
  6. Notes :
  7. --]]
  8. function spawn(NPC)
  9. SetTempVariable(NPC, "AggroWoodelf", "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.."_1050.mp3", "", "", 0, 0, Spawn)
  16. text = math.random(1,2)
  17. if text == 1 then
  18. Say(NPC, "Keep up this noise and the Morak will have us all for dinner!")
  19. else
  20. Say(NPC, "The smell of death lingers near.")
  21. end
  22. end
  23. function respawn(NPC)
  24. spawn(NPC)
  25. end
  26. function aggro(NPC)
  27. if GetTempVariable(NPC, "AggroWoodelf") == "true" then
  28. local choice = math.random(1,3)
  29. if choice == 1 then
  30. PlayFlavor(NPC, "voiceover/english/woodelf_base_1/ft/woodelf/woodelf_base_1_1_aggro_gm_8fcdd59.mp3", "You ruined your own lands, but you won't ruin these.", "", 2959701317, 2218756744)
  31. elseif choice == 2 then
  32. PlayFlavor(NPC, "voiceover/english/woodelf_base_1/ft/woodelf/woodelf_base_1_1_aggro_gm_e78cd055.mp3", "You covered your approach well, but it doesn't matter much now.", "", 284366883, 129090731)
  33. else
  34. PlayFlavor(NPC, "voiceover/english/woodelf_base_1/ft/woodelf/woodelf_base_1_1_aggro_gm_b9683a31.mp3", "Winds carried your voice long ago. I'm prepared now.", "", 338462220, 1958805273)
  35. end
  36. SetTempVariable(NPC, "AggroWoodelf", "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/woodelf_base_1/ft/woodelf/woodelf_base_1_1_victory_gm_1d908867.mp3", "The soil thanks you for your donation.", "", 2150629553, 2562009754)
  45. elseif choice == 2 then
  46. PlayFlavor(NPC, "voiceover/english/woodelf_base_1/ft/woodelf/woodelf_base_1_1_victory_gm_43dcda71.mp3", "May your body feed the mighty oaks.", "", 4105687893, 3153330697)
  47. else
  48. PlayFlavor(NPC, "voiceover/english/woodelf_base_1/ft/woodelf/woodelf_base_1_1_victory_gm_729d9b4e.mp3", "To the earth from where you came.", "", 3172278083, 481654365)
  49. end
  50. end
  51. function resetAggro(NPC)
  52. SetTempVariable(NPC, "AggroWoodelf", "true")
  53. end