9
3

aBloodsaberplaguebearer.lua 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. --[[
  2. Script Name : SpawnScripts/PeatBog/aBloodsaberplaguebearer.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.05.26 04:05:22
  5. Script Purpose : Running from sewer to location and despawning.
  6. :
  7. --]]
  8. dofile("SpawnScripts/Generic/MonsterCallouts/BaseTroll1.lua")
  9. function spawn(NPC)
  10. waypoints(NPC)
  11. SpawnCheck(NPC, Spawn)
  12. Appearance(NPC,Spawn)
  13. end
  14. function hailed(NPC, Spawn)
  15. end
  16. function respawn(NPC)
  17. spawn(NPC)
  18. end
  19. function waypoints(NPC)
  20. if GetSpawnLocationID(NPC) == 133773314 then
  21. MovementLoopAddLocation(NPC, 669.08, -34.1, 410.02, 4, 0)
  22. MovementLoopAddLocation(NPC, 679.26, -33.36, 424.96, 4, 0)
  23. MovementLoopAddLocation(NPC, 686.9, -32.43, 458.65, 4, 0)
  24. MovementLoopAddLocation(NPC, 703.01, -33.46, 485.47, 4, 0)
  25. MovementLoopAddLocation(NPC, 692.71, -32.6, 496.42, 4, 0)
  26. MovementLoopAddLocation(NPC, 690.75, -32.44, 496.36, 4, 1)
  27. MovementLoopAddLocation(NPC, 690.75, -32.44, 496.36, 4, 30,"Action")
  28. MovementLoopAddLocation(NPC, 690.75, -32.44, 496.36, 4, 1)
  29. elseif GetSpawnLocationID(NPC) == 133773315 then
  30. MovementLoopAddLocation(NPC, 668.86, -34.13, 409.6, 4, 0)
  31. MovementLoopAddLocation(NPC, 679.24, -33.37, 424.54, 4, 0)
  32. MovementLoopAddLocation(NPC, 683.93, -33.29, 451.02, 4, 0)
  33. MovementLoopAddLocation(NPC, 699.36, -32.7, 454.26, 4, 0)
  34. MovementLoopAddLocation(NPC, 709.55, -33.35, 462.09, 4, 0)
  35. MovementLoopAddLocation(NPC, 718.29, -33.64, 460.4, 4, 1)
  36. MovementLoopAddLocation(NPC, 718.29, -33.64, 460.4, 4, 30,"Action")
  37. MovementLoopAddLocation(NPC, 718.29, -33.64, 460.4, 4, 1)
  38. elseif GetSpawnLocationID(NPC) == 133773316 then
  39. MovementLoopAddLocation(NPC, 666.72, -33.63, 403.08, 4, 0)
  40. MovementLoopAddLocation(NPC, 645.01, -33.36, 419.49, 4, 0)
  41. MovementLoopAddLocation(NPC, 637.37, -33.14, 423.14, 4, 0)
  42. MovementLoopAddLocation(NPC, 633.45, -32.81, 427.24, 4, 0)
  43. MovementLoopAddLocation(NPC, 628.36, -33.28, 435.28, 4, 0)
  44. MovementLoopAddLocation(NPC, 627.06, -33.11, 443.75, 4, 0)
  45. MovementLoopAddLocation(NPC, 633.24, -33.41, 457.71, 4, 0)
  46. MovementLoopAddLocation(NPC, 632.07, -33.16, 459.32, 4, 0)
  47. MovementLoopAddLocation(NPC, 624.71, -33.10, 458.06, 4, 1)
  48. MovementLoopAddLocation(NPC, 624.71, -33.10, 458.06, 4, 30,"Action")
  49. MovementLoopAddLocation(NPC, 624.71, -33.10, 458.06, 4, 1)
  50. end
  51. end
  52. function Action(NPC,Spawn)
  53. PlayFlavor(NPC,"","","itch",0,0)
  54. AddTimer(NPC,6500,"Action2",1)
  55. end
  56. function Action2(NPC,Spawn)
  57. PlayFlavor(NPC,"","","result_acid_rain_damage",0,0)
  58. AddTimer(NPC,2300,"Action3",1)
  59. end
  60. function Action3(NPC,Spawn)
  61. PlayFlavor(NPC,"","","result_poison_cloud_aoe",0,0)
  62. SpawnSet(NPC,"visual_state",0)
  63. AddTimer(NPC,2300,"Action4")
  64. AddTimer(NPC,2200,"despawn",1,Spawn)
  65. end
  66. function Action4(NPC)
  67. Despawn(NPC)
  68. end
  69. function SpawnCheck(NPC, Spawn)
  70. if GetSpawnLocationID(NPC) == 133773314 then
  71. AddTimer(NPC,60000,"spawn2")
  72. AddTimer(NPC,120000,"spawn3")
  73. end
  74. end
  75. function spawn2(NPC,Spawn)
  76. zone = GetZone(NPC)
  77. SpawnByLocationID(zone,133773315)
  78. end
  79. function spawn3(NPC,Spawn)
  80. zone = GetZone(NPC)
  81. SpawnByLocationID(zone,133773316)
  82. end
  83. function Appearance(NPC,Spawn)
  84. local choice = math.random (1,2)
  85. if choice == 1 then
  86. SpawnSet(NPC,"gender",2)
  87. SpawnSet(NPC,"model_type",105)
  88. else
  89. end
  90. end