aqeynosguardsman430688.lua 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. --[[
  2. Script Name : SpawnScripts/QueensColony/aqeynosguardsman430688.lua
  3. Script Purpose : a Qeynos Guardsman <Guard>
  4. Script Author : John Adams - updated by Rylec (updated movement - old is saved)
  5. Script Date : 2008.11.26
  6. Script Notes : Patrol leader. Script will set model type to allow all relevant races
  7. --]]
  8. function spawn(NPC)
  9. setmodel(NPC)
  10. waypoints(NPC)
  11. end
  12. function respawn(NPC)
  13. spawn(NPC)
  14. end
  15. function hailed(NPC, Spawn)
  16. FaceTarget(NPC, Spawn)
  17. end
  18. function setmodel(NPC)
  19. local RandomModel = math.random (1,4)
  20. local shouttime = math.random (90000,270000)
  21. if RandomModel == 1 then
  22. SpawnSet(NPC, "model_type", "82")
  23. AddTimer(NPC, shouttime, "kerra")
  24. elseif RandomModel == 2 then
  25. SpawnSet(NPC, "model_type", "110")
  26. AddTimer(NPC, shouttime, "dwarf")
  27. elseif RandomModel == 3 then
  28. SpawnSet(NPC, "model_type", "112")
  29. AddTimer(NPC, shouttime, "barbarian")
  30. elseif RandomModel == 4 then
  31. SpawnSet(NPC, "model_type", "134")
  32. AddTimer(NPC, shouttime, "human")
  33. end
  34. end
  35. function waypoints(NPC)
  36. MovementLoopAddLocation(NPC, -21.39, -5.38, 216.76, 2, 2)
  37. MovementLoopAddLocation(NPC, -9.77, -5.22, 190.18, 2, 0)
  38. MovementLoopAddLocation(NPC, -27.77, -5.11, 172.5, 2, 0)
  39. MovementLoopAddLocation(NPC, -48.04, -5.03, 158.19, 2, 0)
  40. MovementLoopAddLocation(NPC, -56.81, -4.99, 134.91, 2, 0)
  41. MovementLoopAddLocation(NPC, -53.47, -5.49, 110.98, 2, 0)
  42. MovementLoopAddLocation(NPC, -34.49, -5.07, 101.44, 2, 0)
  43. MovementLoopAddLocation(NPC, -48.36, -5.13, 108.76, 2, 0)
  44. MovementLoopAddLocation(NPC, -52.25, -5.14, 112.06, 2, 0)
  45. MovementLoopAddLocation(NPC, -54.23, -5.47, 112.1, 2, 0)
  46. MovementLoopAddLocation(NPC, -57.14, -4.99, 133.36, 2, 0)
  47. MovementLoopAddLocation(NPC, -47.15, -5.03, 158.1, 2, 0)
  48. MovementLoopAddLocation(NPC, -25.05, -5.12, 175.27, 2, 0)
  49. MovementLoopAddLocation(NPC, -10.53, -5.22, 190.4, 2, 0)
  50. MovementLoopAddLocation(NPC, 15.99, -5.27, 169.85, 2, 0)
  51. MovementLoopAddLocation(NPC, 33.96, -6.05, 167.83, 2, 0)
  52. MovementLoopAddLocation(NPC, 46.71, -3.38, 167.21, 2, 0)
  53. MovementLoopAddLocation(NPC, 16.43, -5.27, 169.85, 2, 0)
  54. MovementLoopAddLocation(NPC, -10.74, -5.21, 190.95, 2, 0)
  55. end
  56. function kerra(NPC)
  57. math.randomseed(os.time())
  58. local choice = math.random (1,3)
  59. if choice == 1 then
  60. Say(NPC, "Wraaaaa!")
  61. elseif choice == 2 then
  62. Say(NPC, "For Qeynos!")
  63. elseif choice == 3 then
  64. Say(NPC, "Look at Luclin! Shar Vahl...")
  65. Emote(NPC, "groans.")
  66. end
  67. local time = math.random (90000,2700000)
  68. AddTimer(NPC, time, "kerra")
  69. end
  70. function dwarf(NPC)
  71. math.randomseed(os.time())
  72. local choice = math.random (1,3)
  73. if choice == 1 then
  74. Say(NPC, "When I am off duty that rock is mine!")
  75. Emote(NPC, "points at a shiny stone.")
  76. elseif choice == 2 then
  77. Say(NPC, "For the strength of Kaladim!")
  78. elseif choice == 3 then
  79. Say(NPC, "Onward boys and keep in line!")
  80. end
  81. local time = math.random (90000,2700000)
  82. AddTimer(NPC, time, "dwarf")
  83. end
  84. function barbarian(NPC)
  85. math.randomseed(os.time())
  86. local choice = math.random (1,3)
  87. if choice == 1 then
  88. Say(NPC, "For the love of Halas, I could use a stout!")
  89. elseif choice == 2 then
  90. Say(NPC, "All clear here!")
  91. elseif choice == 3 then
  92. Say(NPC, "I long to return to Qeynos.")
  93. end
  94. local time = math.random (90000,2700000)
  95. AddTimer(NPC, time, "barbarian")
  96. end
  97. function human(NPC)
  98. math.randomseed(os.time())
  99. local choice = math.random (1,3)
  100. if choice == 1 then
  101. Say(NPC, "I'll bet you an ale that I spot the next intruder first.")
  102. Emote(NPC, "smack his fist into his palm.")
  103. elseif choice == 2 then
  104. Say(NPC, "In honor of the Queen.")
  105. Emote(NPC, "salutes.")
  106. elseif choice == 3 then
  107. Say(NPC, "Keep your eyes peeled boys!")
  108. end
  109. local time = math.random (90000,2700000)
  110. AddTimer(NPC, time, "human")
  111. end
  112. --[[ --Syntax is NPC, x, y, z, speed, delay (in seconds) (John Adams old path, might be old path so keeping it for now)
  113. MovementLoopAddLocation(NPC, 21.09, -5.30, 161.75, 2, 0)
  114. MovementLoopAddLocation(NPC, 21.18, -5.28, 144.12, 2, 0)
  115. MovementLoopAddLocation(NPC, 16.59, -5.27, 133.36, 2, 0)
  116. MovementLoopAddLocation(NPC, 10.50, -5.24, 114.47, 2, 0)
  117. MovementLoopAddLocation(NPC, 6.95, -5.22, 103.47, 2, 0)
  118. MovementLoopAddLocation(NPC, -25.22, -5.10, 100.19, 2, 0)
  119. MovementLoopAddLocation(NPC, -52.38, -5.79, 108.30, 2, 0)
  120. MovementLoopAddLocation(NPC, -55.46, -4.91, 131.16, 2, 0)
  121. MovementLoopAddLocation(NPC, -46.75, -5.04, 157.32, 2, 0)
  122. MovementLoopAddLocation(NPC, -23.70, -5.12, 176.13, 2, 0)
  123. MovementLoopAddLocation(NPC, -9.30, -5.20, 186.68, 2, 0)
  124. MovementLoopAddLocation(NPC, -21.30, -5.41, 217.11, 2, 0)
  125. MovementLoopAddLocation(NPC, -7.47, -5.21, 188.38, 2, 0)
  126. MovementLoopAddLocation(NPC, 1.16, -5.22, 181.35, 2, 0)
  127. MovementLoopAddLocation(NPC, 12.73, -5.26, 172.09, 2, 0)
  128. --]]