9
3

zonetoqeyelddar.lua 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. --[[
  2. Script Name : SpawnScripts/WillowWood/zonetoqeyelddar.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.11.04 01:11:52
  5. Script Purpose :
  6. :
  7. --]]
  8. function casted_on(NPC, Spawn,SpellName)
  9. local invul = IsInvulnerable(Spawn)
  10. if SpellName == 'Enter The Elddar Grove' then
  11. if not HasCompletedQuest(Spawn,5718) and
  12. not HasCompletedQuest(Spawn,5719) and
  13. not HasCompletedQuest(Spawn,5720) and
  14. not HasCompletedQuest(Spawn,5721) and
  15. not HasCompletedQuest(Spawn,5722) and
  16. not HasCompletedQuest(Spawn,5723)
  17. and GetFactionAmount(Spawn,11)<50000 and
  18. invul == false then
  19. if HasQuest(Spawn,5761) and GetQuestStep(Spawn,5761)==10 then
  20. SetStepComplete(Spawn,5761,10)
  21. end
  22. PlaySound(Spawn,"sounds/ui/ui_warning.wav", GetX(NPC), GetY(NPC), GetZ(NPC))
  23. SendPopUpMessage(Spawn,"Only citizens may enter the city of Qeynos.",255,50,50)
  24. SendMessage(Spawn,"Only citizens may enter the city of Qeynos.","red")
  25. else
  26. if invul == true and GetFactionAmount(Spawn,11) < 30000 then
  27. SendMessage(Spawn,"Your GM invulnerability allows you to bypass citizenship.","white")
  28. end
  29. ZoneRef = GetZone("ElddarGrove")
  30. Zone(ZoneRef,Spawn,809.22, -21.51, -562.41, 154.8)
  31. end
  32. end
  33. end