9
3

zonetofprtnorth.lua 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. --[[
  2. Script Name : SpawnScripts/BeggarsCourt/zonetofprtnorth.lua
  3. Script Author : Dorbin
  4. Script Date : 2023.06.29 01:06:29
  5. Script Purpose :
  6. :
  7. --]]
  8. function casted_on(NPC, Spawn,SpellName)
  9. local invul = IsInvulnerable(Spawn)
  10. if SpellName == 'Enter North Freeport' then
  11. if not HasCompletedQuest(Spawn,5866) and
  12. not HasCompletedQuest(Spawn,5867) and
  13. not HasCompletedQuest(Spawn,5868) and
  14. not HasCompletedQuest(Spawn,5869) and
  15. not HasCompletedQuest(Spawn,5870) and
  16. not HasCompletedQuest(Spawn,5871)
  17. and GetFactionAmount(Spawn,12)<50000 and
  18. invul == false then
  19. if HasQuest(Spawn,5861) and GetQuestStep(Spawn,5861)==10 then
  20. SetStepComplete(Spawn,5861,10)
  21. end
  22. PlaySound(Spawn,"sounds/ui/ui_warning.wav", GetX(NPC), GetY(NPC), GetZ(NPC))
  23. SendPopUpMessage(Spawn,"Only Freeport citizens may enter the city.",255,50,50)
  24. SendMessage(Spawn,"Only Freeport citizens may enter the city.","red")
  25. else
  26. if invul == true and GetFactionAmount(Spawn,12) < 30000 then
  27. SendMessage(Spawn,"Your GM invulnerability allows you to bypass citizenship.","white")
  28. end
  29. ZoneRef = GetZone("NorthFreeport")
  30. Zone(ZoneRef,Spawn,-149.38, -50.6, -376.76, 204.84)
  31. end
  32. end
  33. end