zonetoqeycity.lua 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. --[[
  2. Script Name : SpawnScripts/QeynosCitizenshipTrialChamber/zonetoqeycity.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.08.31 11:08:54
  5. Script Purpose :
  6. :
  7. --]]
  8. local BQCitizen = 5718
  9. local CVQCitizen = 5719
  10. local GQCitizen = 5720
  11. local NQCitizen = 5721
  12. local SCQCitizen = 5722
  13. local WWQCitizen = 5723
  14. function spawn(NPC)
  15. end
  16. function respawn(NPC)
  17. spawn(NPC)
  18. end
  19. function casted_on(NPC, Player,SpellName)
  20. if SpellName == 'Enter Qeynos' then
  21. local con = CreateConversation()
  22. if not HasCompletedQuest(Player,BQCitizen) and
  23. not HasCompletedQuest(Player,CVQCitizen) and
  24. not HasCompletedQuest(Player,GQCitizen) and
  25. not HasCompletedQuest(Player,NQCitizen) and
  26. not HasCompletedQuest(Player,SCQCitizen) and
  27. not HasCompletedQuest(Player,WWQCitizen) then
  28. SendMessage(Player,"You must be a citizen to enter the city.")
  29. SendPopUpMessage(Player,"You must be a citizen to enter the city.",255,255,255)
  30. PlaySound(Spawn,"sounds/ui/ui_warning.wav", GetX(NPC), GetY(NPC), GetZ(NPC))
  31. else
  32. AddConversationOption(con, "Yes", "Leave")
  33. AddConversationOption(con, "No","CloseConversation")
  34. StartDialogConversation(con, 1, NPC, Player, "Do you wish to enter the city of Qeynos?")
  35. end
  36. end
  37. end
  38. function Leave(NPC,Player)
  39. CloseConversation(NPC,Player)
  40. if GetRace(Player)== 7 or GetRace(Player)== 5 then -- Gnomes/Halflings
  41. EG_BB = GetZone("elddargrove")
  42. Zone(EG_BB,Player,813.68,-20.95,-531.66,81.23)
  43. elseif GetRace(Player)== 0 or GetRace(Player)== 2 then -- Dwarves/Barbarians
  44. QH_Gray = GetZone("qeynosharbor")
  45. Zone(QH_Gray,Player,861.05, -25.42, -84.63, 185.23)
  46. elseif GetRace(Player)== 4 or GetRace(Player)== 8 then -- Highelves, Froglocks
  47. QH_CV = GetZone("qeynosharbor")
  48. Zone(QH_CV,Player,718.28, -20.87, -114.23, 154.22)
  49. elseif GetRace(Player)== 9 or GetRace(Player)== 11 then -- Humans, Kerra
  50. SQ_Net = GetZone("southqeynos")
  51. Zone(SQ_Net,Player,680.79, -20.56, 270.90, 297.71)
  52. elseif GetRace(Player)== 3 then -- Erudites
  53. SQ_SC = GetZone("southqeynos")
  54. Zone(SQ_SC,Player,693.67, -20.47, 267.62, 96.96)
  55. elseif GetRace(Player)== 15 or GetRace(Player)== 16 or GetRace(Player)== 6 then -- Woodelves, Halfelves, Fae
  56. EG_WW = GetZone("elddargrove")
  57. Zone(EG_WW,Player,808.49, -21.59, -560.27, 162.00)
  58. else
  59. SQ_Net = GetZone("southqeynos")
  60. Zone(SQ_Net,Player,680.79, -20.56, 270.90, 297.71)
  61. end
  62. end