9
3

adamesrocket.lua 841 B

1234567891011121314151617181920212223242526272829303132333435
  1. --[[
  2. Script Name : SpawnScripts/FrostfangSea/adamesrocket.lua
  3. Script Purpose : the spawns named "a dame's rocket"
  4. Script Author : theFoof
  5. Script Date : 2013.8.27
  6. Script Notes :
  7. --]]
  8. local SpiderPuffs = 87
  9. function spawn(NPC)
  10. SetRequiredQuest(NPC, SpiderPuffs, 1)
  11. SpawnSet(NPC, "action_state", "1494")
  12. AddSpawnAccess(NPC, NPC)
  13. SetPlayerProximityFunction(NPC, 100, "SpawnAccess", "SpawnAccess")
  14. end
  15. function respawn(NPC)
  16. spawn(NPC)
  17. end
  18. function casted_on(NPC, Spawn, SpellName)
  19. if GetQuestStep(Spawn, SpiderPuffs) == 1 then
  20. if SpellName == "a dame's rocket" then
  21. AddStepProgress(Spawn, SpiderPuffs, 1, 1)
  22. Despawn(NPC)
  23. end
  24. end
  25. end
  26. function SpawnAccess(NPC, Spawn)
  27. if HasQuest(Spawn, SpiderPuffs) or HasCompletedQuest(Spawn, SpiderPuffs) then
  28. AddSpawnAccess(NPC, Spawn)
  29. end
  30. end