Falkener.lua 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. --[[
  2. Script Name : SpawnScripts/Nettleville/Falkener.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.06.21 10:06:09
  5. Script Purpose :
  6. :
  7. --]]
  8. dofile("SpawnScripts/Generic/AdvancementGaze.lua")
  9. dofile("SpawnScripts/Generic/GenericGuardVoiceOvers.lua")
  10. function spawn(NPC)
  11. waypoints(NPC)
  12. SetPlayerProximityFunction(NPC, 7, "InRange", "LeaveRange")
  13. end
  14. function InRange(NPC, Spawn)
  15. if GetFactionAmount(Spawn,11)>=5000 then
  16. if GetLevel(Spawn) ==8 or GetLevel(Spawn)==9 then
  17. ClassCheck(NPC,Spawn)
  18. end
  19. end
  20. CheckFaction(NPC, Spawn, "Qeynos")
  21. if GetFactionAmount(Spawn,11)>0 then
  22. if math.random(1,100)<15 then
  23. GenericGuardHail(NPC, Spawn)
  24. end
  25. end
  26. end
  27. function Outside(NPC, Spawn)
  28. SetHeading(NPC,73)
  29. end
  30. function Stair1(NPC, Spawn)
  31. SetHeading(NPC,188.6)
  32. end
  33. function Stair2(NPC, Spawn)
  34. SetHeading(NPC,99.8)
  35. end
  36. function hailed(NPC, Spawn)
  37. FaceTarget(NPC, Spawn)
  38. GenericGuardHail(NPC, Spawn)
  39. end
  40. function Action(NPC)
  41. local choice = MakeRandomInt(1, 4)
  42. if choice == 1 then
  43. PlayFlavor(NPC, "", "", "peer", 0, 0, Spawn)
  44. elseif choice == 2 then
  45. PlayFlavor(NPC, "", "", "listen", 0, 0, Spawn)
  46. elseif choice == 3 then
  47. PlayFlavor(NPC, "", "", "sniff", 0, 0, Spawn)
  48. elseif choice == 4 then
  49. PlayFlavor(NPC, "", "", "attention", 0, 0, Spawn)
  50. end
  51. end
  52. function waypoints(NPC)
  53. MovementLoopAddLocation(NPC, 688.42, -20.35, 336.66, 2, 1,"Outside")
  54. MovementLoopAddLocation(NPC, 688.42, -20.35, 336.66, 2, 64,"Action")
  55. MovementLoopAddLocation(NPC, 687.17, -20.32, 336.02, 2, 0)
  56. MovementLoopAddLocation(NPC, 685.79, -20.42, 331.53, 2, 0)
  57. MovementLoopAddLocation(NPC, 687.54, -20.42, 330.85, 2, 0)
  58. MovementLoopAddLocation(NPC, 692.37, -20.46, 329.73, 2, 0)
  59. MovementLoopAddLocation(NPC, 697.61, -22.38, 328.49, 2, 0)
  60. MovementLoopAddLocation(NPC, 704.45, -23.93, 326.61, 2, 1,"Stair1")
  61. MovementLoopAddLocation(NPC, 704.45, -23.93, 326.61, 2, 45,"Action")
  62. MovementLoopAddLocation(NPC, 707.9, -27.18, 341.66, 2, 1,"Stair2")
  63. MovementLoopAddLocation(NPC, 707.9, -27.18, 341.66, 2, 64,"Action")
  64. MovementLoopAddLocation(NPC, 706.99, -27.21, 341.85, 2, 0)
  65. MovementLoopAddLocation(NPC, 704.45, -27.22, 338.42, 2, 0)
  66. MovementLoopAddLocation(NPC, 702.42, -23.99, 330.82, 2, 0)
  67. MovementLoopAddLocation(NPC, 700.89, -23.75, 330.36, 2, 0)
  68. MovementLoopAddLocation(NPC, 688.25, -20.41, 333.6, 2, 0)
  69. MovementLoopAddLocation(NPC, 687.1, -20.4, 334.25, 2, 0)
  70. end