widget_scourgeson_x2_orc_provisions.lua 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. --[[
  2. Script Name : SpawnScripts/FrostfangSea/widget_scourgeson_x2_orc_provisions.lua
  3. Script Purpose : for the orc provisions
  4. Script Author : theFoof
  5. Script Date : 2013.6.24
  6. Script Notes :
  7. --]]
  8. local CampsideSpores = 75
  9. function spawn(NPC)
  10. SetRequiredQuest(NPC, CampsideSpores, 1)
  11. end
  12. function casted_on(NPC, Spawn, SpellName)
  13. if SpellName == "apply the crustose spores" then
  14. if GetQuestStep(Spawn, CampsideSpores) == 1 then
  15. AddStepProgress(Spawn, CampsideSpores, 1, 1)
  16. local X = GetX(NPC)
  17. local Y = GetY(NPC)
  18. local Z = GetZ(NPC)
  19. local zone = GetZone(NPC)
  20. local shroom1 = SpawnMob(zone, 4700408, 1, X + math.random(-5,5), Y, Z + math.random(-5,5), math.random(0,360))
  21. SpawnSet(shroom1, "attackable", "0")
  22. SpawnSet(shroom1, "show_level", "0")
  23. AddTimer(shroom1, 25000, "Despawn")
  24. local shroom2 = SpawnMob(zone, 4700019, 1, X + math.random(-5,5), Y, Z + math.random(-5,5), math.random(0,360))
  25. SpawnSet(shroom2, "attackable", "0")
  26. SpawnSet(shroom2, "show_level", "0")
  27. AddTimer(shroom2, 25000, "Despawn")
  28. local orc = SpawnMob(zone, 4701172, 0, X + math.random(-10,10), Y, Z + math.random(-10,10), math.random(0,360))
  29. Attack(orc, Spawn)
  30. AddSpawnAccess(shroom1, Spawn)
  31. AddSpawnAccess(shroom2, Spawn)
  32. end
  33. end
  34. end