Valik.lua 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. --[[
  2. Script Name : SpawnScripts/FarJourneyFreeport/Valik.lua
  3. Script Author : Cynnar
  4. Script Date : 2019.05.19 10:05:23
  5. Script Purpose :
  6. :
  7. --]]
  8. function spawn(NPC)
  9. AddTimer(NPC,26000,"waypoints")
  10. end
  11. function hailed(NPC, Spawn)
  12. goblin = GetSpawn(NPC, 270008)
  13. if goblin == nil or IsAlive(goblin) == false then
  14. Talk(NPC,Spawn)
  15. elseif IsAlive(goblin) == true and GetSpawn(NPC, 270011)~= nil then
  16. Talk(NPC,Spawn)
  17. elseif IsAlive(goblin) == true and GetSpawn(NPC, 270011)== nil then
  18. PlayFlavor(NPC, "", "", "cringe", 0, 0)
  19. end
  20. end
  21. function Talk(NPC,Spawn)
  22. choice = math.random(0, 1)
  23. FaceTarget(NPC, Spawn)
  24. if choice == 1 then
  25. PlayFlavor(NPC, "voiceover/english/valik/boat_06p_tutorial02/001_refugee_valik_002_eaf98080.mp3", "I can't wait to reach the island, dry land and dry food. Fish is only good for a while, even for a Kerran.", "", 1919549905, 2798982211)
  26. else
  27. PlayFlavor(NPC, "voiceover/english/valik/boat_06p_tutorial02/001_refugee_valik_003_96415f8d.mp3", "I hear the Island of Refuge is the home of the Far Seas Trading Company. Maybe I will be able to find some work there.", "", 2997651561, 1452360635)
  28. end
  29. end
  30. function waypoints2(NPC)
  31. if GetSpawn(NPC, 270011) ~= nil and IsAlive(GetSpawn(NPC, 270008))== true or GetSpawn(NPC, 270011) == nil and IsAlive(GetSpawn(NPC, 270008))== false then
  32. MoveToLocation(NPC, -4.09, -2.03, -1.27, 2, 0)
  33. MoveToLocation(NPC, -4.22, -2.06, 2.78, 2, 0)
  34. MoveToLocation(NPC, -6.62, -1.82, 5.12, 2)
  35. MoveToLocation(NPC, -6.62, -1.82, 5.12, 2)
  36. SetHeading(NPC,130)
  37. end
  38. AddTimer(NPC,26000,"waypoints")
  39. end
  40. function waypoints(NPC)
  41. if GetSpawn(NPC, 270011) ~= nil and IsAlive(GetSpawn(NPC, 270008))== true or GetSpawn(NPC, 270011) == nil and IsAlive(GetSpawn(NPC, 270008))== false then
  42. MoveToLocation(NPC, -4.64, -2.05, 2.64, 2)
  43. MoveToLocation(NPC, -4.29, -2.03, -0.88, 2)
  44. MoveToLocation(NPC, -6.34, -1.81, -3.6, 2)
  45. SetHeading(NPC,-4)
  46. end
  47. AddTimer(NPC,26000,"waypoints2")
  48. end
  49. function respawn(NPC)
  50. end