9
3

aRyGorrweapon.lua 790 B

1234567891011121314151617181920212223242526272829303132333435
  1. --[[
  2. Script Name : SpawnScripts/FrostfangSea/aRyGorrweapon.lua
  3. Script Purpose : for the spawn "a Ry'Gorr weapon"
  4. Script Author : theFoof
  5. Script Date : 2013.06.3
  6. Script Notes :
  7. --]]
  8. local DisarmingRyGorr = 48
  9. function spawn(NPC)
  10. AddSpawnAccess(NPC, NPC)
  11. SetPlayerProximityFunction(NPC, 50, "SpawnAccess", "SpawnAccess")
  12. end
  13. function respawn(NPC)
  14. spawn(NPC)
  15. end
  16. function casted_on(NPC, Spawn, SpellName)
  17. if SpellName == 'Poultice' then
  18. if GetQuestStep(Spawn, DisarmingRyGorr) == 1 then
  19. SpawnSet(NPC, "action_state", "2602")
  20. AddStepProgress(Spawn, DisarmingRyGorr, 1, 1)
  21. Despawn(NPC)
  22. end
  23. end
  24. end
  25. function SpawnAccess(NPC, Spawn)
  26. if GetQuestStep(Spawn, DisarmingRyGorr) == 1 then
  27. AddSpawnAccess(NPC, Spawn)
  28. else
  29. RemoveSpawnAccess(NPC, Spawn)
  30. end
  31. end