aDarkpawmysticRoam.lua 3.2 KB

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