OgofRunner.lua 956 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. --[[
  2. Script Name : SpawnScripts/Generic/OgofRunner.lua
  3. Script Author : gloat
  4. Script Date : 2019.02.03 01:02:21
  5. Script Purpose :
  6. :
  7. --]]
  8. function spawn(NPC)
  9. AddTimer(NPC, 900, "follow_Ogof")
  10. end
  11. function follow_Ogof(NPC, Spawn)
  12. local zone = GetZone(NPC)
  13. local captOgof = GetSpawnByLocationID(zone, 1585710)
  14. local whoAmI = GetSpawnLocationID(NPC)
  15. if captOgof ~= nil then
  16. local ogofX = GetX(captOgof)
  17. local ogofY = GetY(captOgof)
  18. local ogofZ = GetZ(captOgof)
  19. local speed = 2
  20. if whoAmI == 286752 then
  21. if GetDistance(NPC, captOgof) >= 5 then
  22. speed = 5
  23. MoveToLocation(NPC, ogofX - 4, ogofY, ogofZ - 4, speed)
  24. else
  25. speed = 2
  26. MoveToLocation(NPC, ogofX - 4, ogofY, ogofZ - 4, speed)
  27. end
  28. end
  29. speed = 2
  30. AddTimer(NPC, 1500, "follow_Ogof")
  31. end
  32. end
  33. function hailed(NPC, Spawn)
  34. FaceTarget(NPC, Spawn)
  35. end
  36. function respawn(NPC)
  37. end