hal_obj_cave_rock02.lua 939 B

12345678910111213141516171819202122232425262728
  1. --[[
  2. Script Name : SpawnScripts/FrostfangSea/hal_obj_cave_rock02.lua
  3. Script Purpose : this changes the size of the rocks in the velinoid caves
  4. Script Author : theFoof
  5. Script Date : 2013.6.13
  6. Script Notes : this script is assigned to the rock with the location id 572711
  7. --]]
  8. local RyGorrOperations = 60
  9. function spawn(NPC)
  10. AddSpawnAccess(NPC, NPC)
  11. SetPlayerProximityFunction(NPC, 100, "SpawnAccess", "SpawnAccess")
  12. local zone = GetZone(NPC)
  13. SpawnSet(GetSpawnByLocationID(zone, 441161), "size", "28")
  14. SpawnSet(GetSpawnByLocationID(zone, 441162), "size", "10")
  15. SpawnSet(GetSpawnByLocationID(zone, 441160), "size", "13")
  16. SpawnSet(GetSpawnByLocationID(zone, 441157), "size", "22")
  17. SpawnSet(NPC, "size", "25")
  18. end
  19. function SpawnAccess(NPC, Spawn)
  20. if not HasCompletedQuest(Spawn, RyGorrOperations) then
  21. if GetQuestStep(Spawn, RyGorrOperations) < 2 then
  22. AddSpawnAccess(NPC, Spawn)
  23. end
  24. end
  25. end