9
3

aSableveinpulverizer.lua 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. local SearchingForSigils = 123
  2. function spawn(NPC)
  3. choice = math.random(1, 4)
  4. if choice == 1 then
  5. clockwise1(NPC)
  6. elseif choice == 2 then
  7. clockwise2(NPC)
  8. elseif choice == 3 then
  9. counter_clockwise1(NPC)
  10. elseif choice == 4 then
  11. counter_clockwise2(NPC)
  12. end
  13. end
  14. function respawn(NPC)
  15. spawn(NPC)
  16. end
  17. function clockwise1(NPC)
  18. x = GetX(NPC)
  19. y = GetY(NPC)
  20. z = GetZ(NPC)
  21. MovementLoopAddLocation(NPC, x + 7 , y, z - 8 , 1, math.random(5, 15))
  22. MovementLoopAddLocation(NPC, x - 5 , y, z - 10, 1, math.random(5, 15))
  23. MovementLoopAddLocation(NPC, x - 10, y, z + 9 , 1, math.random(5, 15))
  24. MovementLoopAddLocation(NPC, x + 5 , y, z + 8 , 1, math.random(5, 15))
  25. end
  26. function clockwise2(NPC)
  27. x = GetX(NPC)
  28. y = GetY(NPC)
  29. z = GetZ(NPC)
  30. MovementLoopAddLocation(NPC, x + 2 , y, z - 8 , 1, math.random(5, 15))
  31. MovementLoopAddLocation(NPC, x - 7 , y, z - 5 , 1, math.random(5, 15))
  32. MovementLoopAddLocation(NPC, x , y, z + 6 , 1, math.random(5, 15))
  33. MovementLoopAddLocation(NPC, x + 9 , y, z + 1 , 1, math.random(5, 15))
  34. end
  35. function counter_clockwise1(NPC)
  36. x = GetX(NPC)
  37. y = GetY(NPC)
  38. z = GetZ(NPC)
  39. MovementLoopAddLocation(NPC, x - 7 , y, z + 8 , 1, math.random(5, 15))
  40. MovementLoopAddLocation(NPC, x + 5 , y, z + 10, 1, math.random(5, 15))
  41. MovementLoopAddLocation(NPC, x + 10, y, z - 9 , 1, math.random(5, 15))
  42. MovementLoopAddLocation(NPC, x - 5 , y, z - 8 , 1, math.random(5, 15))
  43. end
  44. function counter_clockwise2(NPC)
  45. x = GetX(NPC)
  46. y = GetY(NPC)
  47. z = GetZ(NPC)
  48. MovementLoopAddLocation(NPC, x - 2 , y, z + 8 , 1, math.random(5, 15))
  49. MovementLoopAddLocation(NPC, x + 7 , y, z + 5 , 1, math.random(5, 15))
  50. MovementLoopAddLocation(NPC, x , y, z - 6 , 1, math.random(5, 15))
  51. MovementLoopAddLocation(NPC, x - 9 , y, z - 1 , 1, math.random(5, 15))
  52. end
  53. function death(NPC, Spawn)
  54. if GetQuestStep(Spawn, SearchingForSigils) == 1 then
  55. AddLootItem(NPC, 11837)
  56. end
  57. end