9
3

OgofRunner.lua 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. require "SpawnScripts/Generic/NPCModule"
  9. function spawn(NPC, Spawn)
  10. NPCModule(NPC, Spawn)
  11. Bloodskull(NPC)
  12. OrcArmorCommon(NPC)
  13. AddTimer(NPC, 900, "follow_Ogof")
  14. end
  15. function follow_Ogof(NPC, Spawn)
  16. local zone = GetZone(NPC)
  17. local captOgof = GetSpawnByLocationID(zone, 1585710)
  18. local whoAmI = GetSpawnLocationID(NPC)
  19. if captOgof ~= nil then
  20. local ogofX = GetX(captOgof)
  21. local ogofY = GetY(captOgof)
  22. local ogofZ = GetZ(captOgof)
  23. local speed = 2
  24. if whoAmI == 286752 then
  25. if GetDistance(NPC, captOgof) >= 5 then
  26. speed = 5
  27. MoveToLocation(NPC, ogofX - 4, ogofY, ogofZ - 4, speed)
  28. else
  29. speed = 2
  30. MoveToLocation(NPC, ogofX - 4, ogofY, ogofZ - 4, speed)
  31. end
  32. end
  33. speed = 2
  34. AddTimer(NPC, 1500, "follow_Ogof")
  35. end
  36. end
  37. function hailed(NPC, Spawn)
  38. FaceTarget(NPC, Spawn)
  39. end
  40. function respawn(NPC)
  41. end