9
3

widgetriftpebble.lua 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. --[[
  2. Script Name : SpawnScripts/Darklight/widgetriftpebble.lua
  3. Script Purpose : Sealing the Rift
  4. Script Author : Cynnar
  5. Script Date : 2015.07.01
  6. Script Notes : Auto-Generated Conversation from PacketParser Data
  7. --]]
  8. local SealingTheRift = 122
  9. function spawn(NPC)
  10. AddSpawnAccess(NPC, NPC)
  11. SetPlayerProximityFunction(NPC, 50, "SpawnAccess", "SpawnAccess")
  12. end
  13. function casted_on(NPC, Spawn, SpellName)
  14. if HasQuest(Spawn, SealingTheRift) then
  15. if SpellName == 'Kick Rubble' then
  16. SetStepComplete(Spawn, SealingTheRift, 1)
  17. RemoveSpawnAccess(NPC, Spawn)
  18. private_spawn_boulder = GetSpawn(Spawn, 340761)
  19. private_spawn_particle1 = GetSpawn(Spawn, 340747)
  20. private_spawn_particle2 = GetSpawn(Spawn, 341218)
  21. AddSpawnAccess(private_spawn_boulder, Spawn)
  22. AddSpawnAccess(private_spawn_particle1, Spawn)
  23. AddSpawnAccess(private_spawn_particle2, Spawn)
  24. end
  25. end
  26. end
  27. function SpawnAccess(NPC, Spawn)
  28. if not HasQuest(Spawn, SealingTheRift) and not HasCompletedQuest(Spawn, SealingTheRift) then
  29. AddSpawnAccess(NPC, Spawn)
  30. elseif HasQuest(Spawn, SealingTheRift) and GetQuestStep(Spawn, SealingTheRift ) < 2 then
  31. AddSpawnAccess(NPC, Spawn)
  32. else
  33. RemoveSpawnAccess(NPC, Spawn)
  34. end
  35. end