9
3

anagitatedslitherer.lua 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. --[[
  2. Script Name : SpawnScripts/Darklight/anagitatedslitherer.lua
  3. Script Author : fearfx
  4. Script Date : 2017.01.21 10:01:16
  5. Script Purpose :
  6. :
  7. --]]
  8. function spawn(NPC)
  9. choice = math.random(1, 4)
  10. if choice == 1 then
  11. clockwise1(NPC)
  12. elseif choice == 2 then
  13. clockwise2(NPC)
  14. elseif choice == 3 then
  15. counter_clockwise1(NPC)
  16. elseif choice == 4 then
  17. counter_clockwise2(NPC)
  18. end
  19. end
  20. function respawn(NPC)
  21. spawn(NPC)
  22. end
  23. function clockwise1(NPC)
  24. x = GetX(NPC)
  25. y = GetY(NPC)
  26. z = GetZ(NPC)
  27. MovementLoopAddLocation(NPC, x + 7 , y, z - 8 , 1, math.random(5, 15))
  28. MovementLoopAddLocation(NPC, x - 5 , y, z - 10, 1, math.random(5, 15))
  29. MovementLoopAddLocation(NPC, x - 10, y, z + 9 , 1, math.random(5, 15))
  30. MovementLoopAddLocation(NPC, x + 5 , y, z + 8 , 1, math.random(5, 15))
  31. end
  32. function clockwise2(NPC)
  33. x = GetX(NPC)
  34. y = GetY(NPC)
  35. z = GetZ(NPC)
  36. MovementLoopAddLocation(NPC, x + 2 , y, z - 8 , 1, math.random(5, 15))
  37. MovementLoopAddLocation(NPC, x - 7 , y, z - 5 , 1, math.random(5, 15))
  38. MovementLoopAddLocation(NPC, x , y, z + 6 , 1, math.random(5, 15))
  39. MovementLoopAddLocation(NPC, x + 9 , y, z + 1 , 1, math.random(5, 15))
  40. end
  41. function counter_clockwise1(NPC)
  42. x = GetX(NPC)
  43. y = GetY(NPC)
  44. z = GetZ(NPC)
  45. MovementLoopAddLocation(NPC, x - 7 , y, z + 8 , 1, math.random(5, 15))
  46. MovementLoopAddLocation(NPC, x + 5 , y, z + 10, 1, math.random(5, 15))
  47. MovementLoopAddLocation(NPC, x + 10, y, z - 9 , 1, math.random(5, 15))
  48. MovementLoopAddLocation(NPC, x - 5 , y, z - 8 , 1, math.random(5, 15))
  49. end
  50. function counter_clockwise2(NPC)
  51. x = GetX(NPC)
  52. y = GetY(NPC)
  53. z = GetZ(NPC)
  54. MovementLoopAddLocation(NPC, x - 2 , y, z + 8 , 1, math.random(5, 15))
  55. MovementLoopAddLocation(NPC, x + 7 , y, z + 5 , 1, math.random(5, 15))
  56. MovementLoopAddLocation(NPC, x , y, z - 6 , 1, math.random(5, 15))
  57. MovementLoopAddLocation(NPC, x - 9 , y, z - 1 , 1, math.random(5, 15))
  58. end
  59. function death(NPC, Spawn)
  60. AddLootItem(NPC, 11996)
  61. end