aRyGorrinvader3.lua 842 B

12345678910111213141516171819202122232425262728293031
  1. --[[
  2. Script Name : SpawnScripts/FrostfangSea/aRyGorrinvader3.lua
  3. Script Purpose : Ry'Gorr invaders charging the beach
  4. Script Author : theFoof
  5. Script Date : 2013.9.11
  6. Script Notes :
  7. --]]
  8. function spawn(NPC)
  9. SpawnSet(NPC, "attackable", "0")
  10. SpawnSet(NPC, "show_level", "0")
  11. SpawnSet(NPC, "show_command_icon", "0")
  12. SpawnSet(NPC, "visual_state", "0")
  13. SpawnSet(NPC, "action_state", "0")
  14. SpawnSet(NPC, "faction", "0")
  15. AddTimer(NPC, math.random(12000,16000), "DeathTimer")
  16. ChargeBeach(NPC)
  17. end
  18. function respawn(NPC)
  19. spawn(NPC)
  20. end
  21. function ChargeBeach(NPC)
  22. MovementLoopAddLocation(NPC, 263 + math.random(-10,10), 23.43, 224.5, 5, 0)
  23. MovementLoopAddLocation(NPC, 195.25, 32, 212.90 + math.random(-10,10), 5, 0)
  24. end
  25. function DeathTimer(NPC) -- the closest archer will kill this orc
  26. KillSpawn(NPC, GetSpawn(NPC, 4700114), 1)
  27. end