9
3

aBlackfurldeckhand.lua 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. --[[
  2. Script Name : SpawnScripts/ForestRuins/aBlackfurldeckhand.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.02.26 01:02:01
  5. Script Purpose : Boat Pirate Script
  6. :
  7. --]]
  8. function spawn(NPC)
  9. waypoints(NPC)
  10. end
  11. function hailed(NPC, Spawn)
  12. end
  13. function respawn(NPC)
  14. spawn(NPC)
  15. end
  16. function waypoints(NPC)
  17. if GetSpawnLocationID(NPC)== 133772812 then
  18. MovementLoopAddLocation(NPC, 964.49, -23.74, -951.31, 2, 2)
  19. MovementLoopAddLocation(NPC, 964.49, -23.74, -951.31, 2, math.random(10, 15),"Action")
  20. MovementLoopAddLocation(NPC, 964.51, -23.73, -950.64, 2, 0)
  21. MovementLoopAddLocation(NPC, 984.10, -26.43, -966.72, 2, 0)
  22. MovementLoopAddLocation(NPC, 974.65, -26.44, -970.40, 2, 0)
  23. elseif GetSpawnLocationID(NPC) ==133772813 then
  24. MovementLoopAddLocation(NPC, 986.56, -23.19, -970.14, 2, 2)
  25. MovementLoopAddLocation(NPC, 986.56, -23.19, -970.14, 2, math.random(10, 15),"Action")
  26. MovementLoopAddLocation(NPC, 987.42, -23.17, -967.87, 2, 0)
  27. MovementLoopAddLocation(NPC, 992.01, -23.14, -975.06, 2, 0)
  28. end
  29. end
  30. function Action(NPC)
  31. local choiceA = MakeRandomInt(1, 4)
  32. if choiceA == 1 then
  33. PlayFlavor(NPC, "", "", "peer", 0, 0, Spawn)
  34. elseif choiceA == 2 then
  35. PlayFlavor(NPC, "", "", "shakefist", 0, 0, Spawn)
  36. elseif choiceA == 3 then
  37. PlayFlavor(NPC, "", "", "confused", 0, 0, Spawn)
  38. elseif choiceA == 4 then
  39. PlayFlavor(NPC, "", "", "wave", 0, 0, Spawn)
  40. end
  41. end