9
3

aCaltorsisClericRoam.lua 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. --[[
  2. Script Name : SpawnScripts/Antonica/aCaltorsisClericRoam.lua
  3. Script Author : LordPazuzu
  4. Script Date : 2023.02.02 09:02:38
  5. Script Purpose :
  6. :
  7. --]]
  8. dofile("SpawnScripts/Generic/MonsterCallouts/BaseGhost1.lua")
  9. require "SpawnScripts/Generic/NPCModule"
  10. function spawn(NPC, Spawn)
  11. NPCModule(NPC, Spawn)
  12. RandomMovement(NPC, Spawn, 35, -35, 2, 8, 15)
  13. end
  14. function Appearance(NPC)
  15. if GetGender(NPC)==2 then
  16. SpawnSet(NPC,"model_type",2851)
  17. else
  18. SpawnSet(NPC,"model_type",2852)
  19. end
  20. end
  21. function ChooseMovement(NPC)
  22. local route = math.random(1,4)
  23. if route == 1 then
  24. RouteOne(NPC, Spawn)
  25. elseif route == 2 then
  26. RouteTwo(NPC, Spawn)
  27. elseif route == 3 then
  28. RouteThree(NPC, Spawn)
  29. elseif route == 4 then
  30. RouteFour(NPC, Spawn)
  31. end
  32. end
  33. function RouteOne(NPC, Spawn)
  34. local X = GetX(NPC)
  35. local Y = GetY(NPC)
  36. local Z = GetZ(NPC)
  37. MovementLoopAddLocation(NPC, X, Y, Z, 2, 0)
  38. MovementLoopAddLocation(NPC, X + 35, Y, Z, 2,0)
  39. MovementLoopAddLocation(NPC, X , Y, Z + 35, 2, 5)
  40. MovementLoopAddLocation(NPC, X + 10, Y, Z -35, 2, 0)
  41. MovementLoopAddLocation(NPC, X + 25, Y, Z + 4, 2, 0)
  42. MovementLoopAddLocation(NPC, X, Y, Z, 2, math.random(5,10), "ChooseMovement")
  43. end
  44. function RouteTwo(NPC, Spawn)
  45. local X = GetX(NPC)
  46. local Y = GetY(NPC)
  47. local Z = GetZ(NPC)
  48. MovementLoopAddLocation(NPC, X, Y, Z, 2, 0)
  49. MovementLoopAddLocation(NPC, X - 35, Y, Z, 2, 0)
  50. MovementLoopAddLocation(NPC, X, Y, Z - 25, 2, 5)
  51. MovementLoopAddLocation(NPC, X - 35, Y, Z -25, 2, 0)
  52. MovementLoopAddLocation(NPC, X , Y, Z - 4, 2, 0)
  53. MovementLoopAddLocation(NPC, X, Y, Z, 1, 0, "ChooseMovement")
  54. end
  55. function RouteThree(NPC, Spawn)
  56. local X = GetX(NPC)
  57. local Y = GetY(NPC)
  58. local Z = GetZ(NPC)
  59. MovementLoopAddLocation(NPC, X, Y, Z, 2, 0)
  60. MovementLoopAddLocation(NPC, X + 35, Y, Z, 2, 0)
  61. MovementLoopAddLocation(NPC, X -35, Y, Z - 4, 2, 5)
  62. MovementLoopAddLocation(NPC, X + 10, Y, Z -35, 2, 0)
  63. MovementLoopAddLocation(NPC, X + 25, Y, Z - 25, 2, 0)
  64. MovementLoopAddLocation(NPC, X, Y, Z, 2, math.random(5,10), "ChooseMovement")
  65. end
  66. function RouteFour(NPC, Spawn)
  67. local X = GetX(NPC)
  68. local Y = GetY(NPC)
  69. local Z = GetZ(NPC)
  70. MovementLoopAddLocation(NPC, X, Y, Z, 2, 0)
  71. MovementLoopAddLocation(NPC, X - 25, Y, Z -25, 2, 0)
  72. MovementLoopAddLocation(NPC, X - 35, Y, Z + 10, 2, 5)
  73. MovementLoopAddLocation(NPC, X + 35, Y, Z, 2, 0)
  74. MovementLoopAddLocation(NPC, X - 35, Y, Z + 25, 2, 0)
  75. MovementLoopAddLocation(NPC, X, Y, Z, 2, math.random(5,10), "ChooseMovement")
  76. end
  77. function respawn(NPC, Spawn)
  78. spawn(NPC)
  79. end
  80. function hailed(NPC, Spawn)
  81. FaceTarget(NPC, Spawn)
  82. end