9
3

zonetoqeysouth.lua 1.3 KB

123456789101112131415161718192021222324252627282930313233343536
  1. --[[
  2. Script Name : SpawnScripts/Starcrest/zonetoqeysouth.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.11.04 01:11:28
  5. Script Purpose :
  6. :
  7. --]]
  8. function casted_on(NPC, Spawn,SpellName)
  9. local invul = IsInvulnerable(Spawn)
  10. if SpellName == 'Enter South Qeynos' 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,5762) and GetQuestStep(Spawn,5762)==10 then
  20. SetStepComplete(Spawn,5762,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("SouthQeynos")
  30. Zone(ZoneRef,Spawn,694.07, -20.5, 267.15, 112.34)
  31. end
  32. end
  33. end