9
3

ExecutionerSelindi.lua 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. --[[
  2. Script Name : SpawnScripts/FreeportBetrayal/ExecutionerSelindi.lua
  3. Script Author : Dorbin
  4. Script Date : 2023.09.25 11:09:34
  5. Script Purpose :
  6. :
  7. --]]
  8. function spawn(NPC)
  9. end
  10. function Attention(NPC,Spawn)
  11. local Lucan = GetSpawn(NPC,8450000)
  12. PlayFlavor(NPC,"","","salute_freeport",0,0)
  13. FaceTarget(NPC, Lucan)
  14. AddTimer(NPC,2500,"Moving",1,Spawn)
  15. AddTimer(NPC,7000,"Face",1,Spawn)
  16. AddTimer(NPC,10000,"Attacking",1,Spawn)
  17. AddTimer(NPC,12500,"Attacking2",1,Spawn)
  18. AddTimer(NPC,16500,"Salute2",1,Spawn)
  19. AddTimer(NPC,20000,"Face2",1,Spawn)
  20. end
  21. function Moving(NPC,Spawn)
  22. MovementLoopAddLocation(NPC,1.45, -1.21, -32.58,2,1)
  23. MovementLoopAddLocation(NPC,1.45, -1.21, -32.58,2,12,"Attacking")
  24. MovementLoopAddLocation(NPC,1.45, -1.21, -32.58,2,1)
  25. MovementLoopAddLocation(NPC,3.67, -1.21, -37.71,2,1)
  26. MovementLoopAddLocation(NPC,3.67, -1.21, -37.71,2,99999,"Face2")
  27. SetTarget(NPC, Spawn)
  28. end
  29. function Face(NPC,Spawn)
  30. FaceTarget(NPC, Spawn)
  31. end
  32. function Attacking(NPC,Spawn)
  33. if IsAlive(Spawn)== true then
  34. CastSpell(Spawn,2550426,1,NPC)
  35. Attack(NPC,Spawn)
  36. SetStepComplete(Spawn,5890,2)
  37. AddTimer(NPC,2700,"Attacking2",1,Spawn)
  38. else
  39. local Lucan = GetSpawn(NPC,8450000)
  40. SetTarget(NPC, Lucan)
  41. FaceTarget(NPC, Lucan)
  42. end
  43. end
  44. function Attacking2(NPC,Spawn)
  45. local Lucan = GetSpawn(NPC,8450000)
  46. SetTarget(NPC, Lucan)
  47. FaceTarget(NPC, Lucan)
  48. local zone = GetZone(NPC)
  49. local Tayil = GetSpawnByLocationID(zone,133786877)
  50. ApplySpellVisual(Spawn,174)
  51. SetInfoStructString(Tayil, "action_state", "0")
  52. end
  53. function Salute2(NPC,Spawn)
  54. PlayFlavor(NPC,"","","salute_freeport",0,0)
  55. end
  56. function Moving2(NPC,Spawn)
  57. MoveToLocation(NPC,3.67, -1.21, -37.71,2,false)
  58. end
  59. function victory(NPC,Spawn)
  60. local Lucan = GetSpawn(NPC,8450000)
  61. SetTarget(NPC, Lucan)
  62. FaceTarget(NPC, Lucan)
  63. end
  64. function Face2(NPC,Spawn)
  65. SetHeading(NPC,88)
  66. SetTarget(NPC, Spawn)
  67. FaceTarget(NPC, Spawn)
  68. end
  69. function respawn(NPC)
  70. spawn(NPC)
  71. end