aFreeportvisitant56531.lua 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. --[[
  2. Script Name : SpawnScripts/Freeport/aFreeportvisitant56531.lua
  3. Script Author : Premierio015
  4. Script Date : 2021.05.01 07:05:18
  5. Script Purpose :
  6. :
  7. --]]
  8. function spawn(NPC)
  9. movement_loop_start(NPC)
  10. end
  11. function movement_loop_start(NPC)
  12. MoveToLocation(NPC, -143.70, -24.12, -54.71, 2)
  13. MoveToLocation(NPC, -132.40, -24.37, -51.95, 2)
  14. MoveToLocation(NPC, -130.01, -24.45, -46.28, 2)
  15. MoveToLocation(NPC, -117.76, -24.45, -43.74, 2, "heading", 1)
  16. end
  17. function heading(NPC)
  18. SetHeading(NPC, 188.07)
  19. AddTimer(NPC, 10000, "movement_loop_continue", 1)
  20. end
  21. function movement_loop_continue(NPC)
  22. MoveToLocation(NPC, -130.01, -24.45, -46.28, 2)
  23. MoveToLocation(NPC, -132.40, -24.37, -51.95, 2)
  24. MoveToLocation(NPC, -143.70, -24.12, -54.71, 2)
  25. MoveToLocation(NPC, -146.05, -24.37, -68.98, 2)
  26. MoveToLocation(NPC, -142.56, -24.37, -69.77, 2, "heading2")
  27. end
  28. function heading2(NPC)
  29. SetHeading(NPC, 307.75)
  30. AddTimer(NPC, 10000, "movement_loop_start", 1)
  31. end
  32. function hailed(NPC, Spawn)
  33. FaceTarget(NPC, Spawn)
  34. if GetRace(NPC) == 12 and GetGender(NPC) == 1 then
  35. local choice = math.random(1, 7)
  36. if choice == 1 then
  37. PlayFlavor(NPC, "voiceover/english/ogre_eco_evil_1/ft/ogre/ogre_eco_evil_1_hail_gm_900b92c8.mp3", "Blood, lots of blood on the battlefield.", "confused", 3309525058, 2311238979, Spawn)
  38. elseif choice == 2 then
  39. PlayFlavor(NPC, "voiceover/english/ogre_eco_evil_1/ft/ogre/ogre_eco_evil_1_hail_gm_aef9ec6e.mp3", "The best dreams are the flashbacks of the battlefield.", "chuckle", 34784682, 541558536, Spawn)
  40. elseif choice == 3 then
  41. PlayFlavor(NPC, "voiceover/english/ogre_eco_evil_1/ft/ogre/ogre_eco_evil_1_hail_gm_b6f6d58b.mp3", "Sharp teeth, the better to tear flesh with.", "glare", 1727328703, 3032211199, Spawn)
  42. elseif choice == 4 then
  43. PlayFlavor(NPC, "voiceover/english/ogre_eco_evil_1/ft/ogre/ogre_eco_evil_1_hail_gm_82b39f6b.mp3", "In war there is no room for fear.", "agree", 139095494, 3401742216, Spawn)
  44. elseif choice == 5 then
  45. PlayFlavor(NPC, "voiceover/english/ogre_eco_evil_1/ft/ogre/ogre_eco_evil_1_hail_gm_b11c99a1.mp3", "Make war not love.", "flirt", 163636935, 1865034471, Spawn)
  46. elseif choice == 6 then
  47. PlayFlavor(NPC, "voiceover/english/ogre_eco_evil_1/ft/ogre/ogre_eco_evil_1_hail_gm_7f5bc8b5.mp3", "Armor could be useful. But I've never needed it.", "smirk", 602319056, 3467693375, Spawn)
  48. else
  49. PlayFlavor(NPC, "voiceover/english/ogre_eco_evil_1/ft/ogre/ogre_eco_evil_1_hail_gm_4b96e4f1.mp3", "I've lived this long thanks to my ability to kill.", "thumbsup", 1295486986, 820950525, Spawn)
  50. end
  51. end
  52. local waypoint_choice = MakeRandomInt(1, 2)
  53. if waypoint_choice == 1 then
  54. AddTimer(NPC, 7000, "movement_loop_start", 1)
  55. else
  56. AddTimer(NPC, 7000, "movement_loop_continue", 1)
  57. end
  58. end
  59. function respawn(NPC)
  60. spawn(NPC)
  61. end