9
3

OgofMystic1.lua 921 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. --[[
  2. Script Name : SpawnScripts/Generic/OgofMystic1.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)
  12. local zone = GetZone(NPC)
  13. local captOgof = GetSpawnByLocationID(zone, 1585710)
  14. local whoAmI = GetSpawnLocationID(NPC)
  15. local ogofX = GetX(captOgof)
  16. local ogofY = GetY(captOgof)
  17. local ogofZ = GetZ(captOgof)
  18. local speed = 2
  19. if whoAmI == 1585709 then
  20. if GetDistance(NPC, captOgof) >= 5 then
  21. speed = 5
  22. MoveToLocation(NPC, ogofX + 4, ogofY, ogofZ + 4, speed)
  23. else
  24. speed = 2
  25. MoveToLocation(NPC, ogofX + 4, ogofY, ogofZ + 4, speed)
  26. end
  27. end
  28. speed = 2
  29. AddTimer(NPC, 1500, "follow_Ogof")
  30. end
  31. function hailed(NPC, Spawn)
  32. FaceTarget(NPC, Spawn)
  33. end
  34. function respawn(NPC)
  35. end