ManglerXIII.lua 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. --[[
  2. Script Name : SpawnScripts/Baubbleshire/ManglerXIII.lua
  3. Script Purpose : ManglerXIII
  4. Script Author : Scatman
  5. Script Date : 2009.05.11
  6. Script Edit: Dorbin 2021.01.09 Edited speed & pauses for animation consistancy
  7. Script Notes :
  8. --]]
  9. function spawn(NPC)
  10. SetPlayerProximityFunction(NPC, 10, "InRange", "LeaveRange")
  11. MovementLoopAddLocation(NPC, 826.91, -13.66, -490.21, 1, 0)
  12. MovementLoopAddLocation(NPC, 824.42, -13.35, -493.6, 1, 0)
  13. MovementLoopAddLocation(NPC, 825.03, -13.73, -497.5, 4, 0)
  14. MovementLoopAddLocation(NPC, 822.44, -17.12, -506.62, 4, 0)
  15. MovementLoopAddLocation(NPC, 824.83, -18.54, -510.6, 1, 0)
  16. MovementLoopAddLocation(NPC, 828.88, -18.33, -509.13, 1, 0)
  17. MovementLoopAddLocation(NPC, 829.91, -17.86, -499.07, 1, 0)
  18. MovementLoopAddLocation(NPC, 833.47, -18.14, -495.41, 1, 0)
  19. MovementLoopAddLocation(NPC, 832.5, -17.83, -490.37, 1, 0)
  20. MovementLoopAddLocation(NPC, 835.44, -17.73, -482.96, 1, 0)
  21. MovementLoopAddLocation(NPC, 839.68, -17.81, -482.37, 1, 0)
  22. MovementLoopAddLocation(NPC, 842.27, -17.76, -477.8, 1, math.random(0, 30))
  23. MovementLoopAddLocation(NPC, 843.31, -17.91, -473.83, 1, 0)
  24. MovementLoopAddLocation(NPC, 848.14, -18.12, -465.73, 4, 0)
  25. MovementLoopAddLocation(NPC, 858.82, -18.92, -466.15, 4, 0)
  26. MovementLoopAddLocation(NPC, 864.6, -19.15, -476.37, 4, 0)
  27. MovementLoopAddLocation(NPC, 851.8, -18.62, -485.51, 1, math.random(0, 20))
  28. MovementLoopAddLocation(NPC, 855.88, -18.35, -489.41, 1, 0)
  29. MovementLoopAddLocation(NPC, 863.1, -18.19, -486.36, 1, 0)
  30. MovementLoopAddLocation(NPC, 872.71, -18.18, -498.09, 1, 0)
  31. MovementLoopAddLocation(NPC, 878.42, -17.27, -509.24, 1, 0)
  32. MovementLoopAddLocation(NPC, 886.65, -16.56, -510.88, 1, 0)
  33. MovementLoopAddLocation(NPC, 893.2, -17.23, -501.53, 1, math.random(0, 30))
  34. MovementLoopAddLocation(NPC, 891.85, -17.72, -493.99, 1, 0)
  35. MovementLoopAddLocation(NPC, 883.9, -18.4, -484.02, 1, 0)
  36. MovementLoopAddLocation(NPC, 882.57, -19.12, -471.32, 1, 0)
  37. MovementLoopAddLocation(NPC, 889.05, -19.18, -464.32, 1, 0)
  38. MovementLoopAddLocation(NPC, 894.13, -18.26, -453.89, 1, 0)
  39. MovementLoopAddLocation(NPC, 892.86, -14.82, -441.7, 1, 0)
  40. MovementLoopAddLocation(NPC, 882.21, -14.02, -427.67, 1, 0)
  41. MovementLoopAddLocation(NPC, 872, -14.36, -423.21, 1, 0)
  42. MovementLoopAddLocation(NPC, 864.06, -13.03, -422.22, 1, 0)
  43. MovementLoopAddLocation(NPC, 859.19, -11.86, -418.61, 1, 0)
  44. MovementLoopAddLocation(NPC, 863.71, -12.97, -422.26, 1, 0)
  45. MovementLoopAddLocation(NPC, 875.75, -14.65, -424.42, 1, 0)
  46. MovementLoopAddLocation(NPC, 869.91, -18.54, -441.16, 1, 0)
  47. MovementLoopAddLocation(NPC, 858.68, -18.65, -452.03, 1, math.random(0, 30))
  48. MovementLoopAddLocation(NPC, 853.68, -18.78, -459.91, 1, 0)
  49. MovementLoopAddLocation(NPC, 843.88, -17.12, -462.44, 1, 0)
  50. MovementLoopAddLocation(NPC, 837.31, -13.68, -472.08, 1, 0)
  51. MovementLoopAddLocation(NPC, 828.05, -14.44, -482.45, 1, 0)
  52. end
  53. function respawn(NPC)
  54. spawn(NPC)
  55. end
  56. function InRange(NPC, Spawn)
  57. if math.random(1, 100) <= 25 then
  58. FaceTarget(NPC, Spawn)
  59. PlayFlavor(NPC,"","","attack",0,0,Spawn)
  60. SendMessage(Spawn, GetName(NPC) .. " barks at you.")
  61. end
  62. end
  63. function LeaveRange(NPC, Spawn)
  64. end
  65. function hailed(NPC, Spawn)
  66. FaceTarget(NPC, Spawn)
  67. end