aCaltorsisClericShortRange.lua 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. --[[
  2. Script Name : SpawnScripts/Antonica/aCaltorsisClericShortRange.lua
  3. Script Author : LordPazuzu
  4. Script Date : 2023.02.07 09:02:44
  5. Script Purpose :
  6. :
  7. --]]
  8. dofile("SpawnScripts/Generic/MonsterCallouts/BaseGhost1.lua")
  9. require "SpawnScripts/Generic/CombatModule"
  10. function spawn(NPC, Spawn)
  11. combatModule(NPC, Spawn)
  12. Appearance(NPC)
  13. local Level = GetLevel(NPC)
  14. local level1 = 18
  15. local level2 = 19
  16. local difficulty1 = 6
  17. local hp1 = 1180
  18. local power1 = 410
  19. local difficulty2 = 6
  20. local hp2 = 1315
  21. local power2 = 425
  22. if Level == level1 then
  23. SpawnSet(NPC, "difficulty", difficulty1)
  24. SpawnSet(NPC, "hp", hp1)
  25. SpawnSet(NPC, "power", power1)
  26. elseif Level == level2
  27. then
  28. SpawnSet(NPC, "difficulty", difficulty2)
  29. SpawnSet(NPC, "hp", hp2)
  30. SpawnSet(NPC, "power", power2)
  31. end
  32. ChooseMovement(NPC)
  33. end
  34. function Appearance(NPC)
  35. if GetGender(NPC)==2 then
  36. SpawnSet(NPC,"model_type",2851)
  37. else
  38. SpawnSet(NPC,"model_type",2852)
  39. end
  40. end
  41. function ChooseMovement(NPC)
  42. local route = math.random(1,4)
  43. if route == 1 then
  44. RouteOne(NPC, Spawn)
  45. elseif route == 2 then
  46. RouteTwo(NPC, Spawn)
  47. elseif route == 3 then
  48. RouteThree(NPC, Spawn)
  49. elseif route == 4 then
  50. RouteFour(NPC, Spawn)
  51. end
  52. end
  53. function RouteOne(NPC, Spawn)
  54. local X = GetX(NPC)
  55. local Y = GetY(NPC)
  56. local Z = GetZ(NPC)
  57. MovementLoopAddLocation(NPC, X, Y, Z, 2, math.random(5,10))
  58. MovementLoopAddLocation(NPC, X + 5, Y, Z, 2,math.random(5,10))
  59. MovementLoopAddLocation(NPC, X , Y, Z + 8, 2, math.random(5,10))
  60. MovementLoopAddLocation(NPC, X + 5, Y, Z -5, 2, math.random(5,10))
  61. MovementLoopAddLocation(NPC, X + 8, Y, Z + 4, 2, math.random(5,10))
  62. MovementLoopAddLocation(NPC, X, Y, Z, 2, math.random(5,10), "ChooseMovement")
  63. end
  64. function RouteTwo(NPC, Spawn)
  65. local X = GetX(NPC)
  66. local Y = GetY(NPC)
  67. local Z = GetZ(NPC)
  68. MovementLoopAddLocation(NPC, X, Y, Z, 2, math.random(5,10))
  69. MovementLoopAddLocation(NPC, X - 8, Y, Z, 2, math.random(5,10))
  70. MovementLoopAddLocation(NPC, X, Y, Z - 8, 2, math.random(5,10))
  71. MovementLoopAddLocation(NPC, X - 5, Y, Z -5, 2, math.random(5,10))
  72. MovementLoopAddLocation(NPC, X , Y, Z - 4, 2, math.random(5,10))
  73. MovementLoopAddLocation(NPC, X, Y, Z, 1, 0, "ChooseMovement")
  74. end
  75. function RouteThree(NPC, Spawn)
  76. local X = GetX(NPC)
  77. local Y = GetY(NPC)
  78. local Z = GetZ(NPC)
  79. MovementLoopAddLocation(NPC, X, Y, Z, 2, math.random(5,10))
  80. MovementLoopAddLocation(NPC, X + 5, Y, Z, 2, math.random(5,10))
  81. MovementLoopAddLocation(NPC, X -8, Y, Z - 4, 2, math.random(5,10))
  82. MovementLoopAddLocation(NPC, X + 8, Y, Z -5, 2, math.random(5,10))
  83. MovementLoopAddLocation(NPC, X + 5, Y, Z - 5, 2, math.random(5,10))
  84. MovementLoopAddLocation(NPC, X, Y, Z, 2, math.random(5,10), "ChooseMovement")
  85. end
  86. function RouteFour(NPC, Spawn)
  87. local X = GetX(NPC)
  88. local Y = GetY(NPC)
  89. local Z = GetZ(NPC)
  90. MovementLoopAddLocation(NPC, X, Y, Z, 2, math.random(5,10))
  91. MovementLoopAddLocation(NPC, X - 5, Y, Z -8, 2, math.random(5,10))
  92. MovementLoopAddLocation(NPC, X - 8, Y, Z + 5, 2, math.random(5,10))
  93. MovementLoopAddLocation(NPC, X + 5, Y, Z, 2, math.random(5,10))
  94. MovementLoopAddLocation(NPC, X - 8, Y, Z + 5, 2, math.random(5,10))
  95. MovementLoopAddLocation(NPC, X, Y, Z, 2, math.random(5,10), "ChooseMovement")
  96. end
  97. function respawn(NPC, Spawn)
  98. spawn(NPC)
  99. end
  100. function hailed(NPC, Spawn)
  101. FaceTarget(NPC, Spawn)
  102. end