9
3

zonetoqeycity.lua 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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. function spawn(NPC)
  9. SetRequiredQuest(NPC, 5718, 8, 0, 1)
  10. SetRequiredQuest(NPC, 5719, 8, 0, 1)
  11. SetRequiredQuest(NPC, 5720, 8, 0, 1)
  12. SetRequiredQuest(NPC, 5721, 8, 0, 1)
  13. SetRequiredQuest(NPC, 5722, 8, 0, 1)
  14. SetRequiredQuest(NPC, 5723, 8, 0, 1)
  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. AddConversationOption(con, "Yes", "Leave")
  23. AddConversationOption(con, "No","CloseConversation")
  24. StartDialogConversation(con, 1, NPC, Player, "Do you wish to enter the city of Qeynos?")
  25. end
  26. end
  27. function Leave(NPC,Player)
  28. CloseConversation(NPC,Player)
  29. if GetRace(Player)== 7 or GetRace(Player)== 5 then -- Gnomes/Halflings
  30. EG_BB = GetZone("elddargrove")
  31. Zone(EG_BB,Player,813.68,-20.95,-531.66,81.23)
  32. elseif GetRace(Player)== 0 or GetRace(Player)== 2 then -- Dwarves/Barbarians
  33. QH_Gray = GetZone("qeynosharbor")
  34. Zone(QH_Gray,Player,861.05, -25.42, -84.63, 185.23)
  35. elseif GetRace(Player)== 4 or GetRace(Player)== 8 then -- Highelves, Froglocks
  36. QH_CV = GetZone("qeynosharbor")
  37. Zone(QH_CV,Player,718.28, -20.87, -114.23, 154.22)
  38. elseif GetRace(Player)== 9 or GetRace(Player)== 11 then -- Humans, Kerra
  39. SQ_Net = GetZone("southqeynos")
  40. Zone(SQ_Net,Player,680.79, -20.56, 270.90, 297.71)
  41. elseif GetRace(Player)== 3 then -- Erudites
  42. SQ_SC = GetZone("southqeynos")
  43. Zone(SQ_SC,Player,693.67, -20.47, 267.62, 96.96)
  44. elseif GetRace(Player)== 15 or GetRace(Player)== 16 or GetRace(Player)== 6 then -- Woodelves, Halfelves, Fae
  45. EG_WW = GetZone("elddargrove")
  46. Zone(EG_WW,Player,808.49, -21.59, -560.27, 162.00)
  47. else
  48. SQ_Net = GetZone("southqeynos")
  49. Zone(SQ_Net,Spawn,680.79, -20.56, 270.90, 297.71)
  50. end
  51. end