9
3

zonetoqeyvillages.lua 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. --[[
  2. Script Name : SpawnScripts/QeynosCitizenshipTrialChamber/zonetoqeyvillages.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.08.31 11:08:44
  5. Script Purpose : Race based door for returning to racial hamlet. Newer/evil races are sent to Nettleville.
  6. :
  7. --]]
  8. function respawn(NPC)
  9. spawn(NPC)
  10. end
  11. function casted_on(NPC, Player,SpellName)
  12. if SpellName == 'Return Home' then
  13. local con = CreateConversation()
  14. AddConversationOption(con, "Yes", "Leave")
  15. AddConversationOption(con, "No","CloseItemConversation")
  16. StartDialogConversation(con, 1, NPC, Player, "Do you wish to leave the trial chamber?")
  17. end
  18. end
  19. function Leave(NPC,Player)
  20. CloseConversation(NPC,Player)
  21. if GetRace(Player)== 7 or GetRace(Player)== 5 then
  22. BBShire = GetZone("Baubbleshire")
  23. Zone(BBShire,Player,819.46, -20.60, -525.61, 200.47)
  24. elseif GetRace(Player)== 0 or GetRace(Player)== 2 then
  25. Gray = GetZone("graystone")
  26. Zone(Gray,Player,865.03, -25.45, -97.91, 357.68)
  27. elseif GetRace(Player)== 4 or GetRace(Player)== 8 then
  28. CV = GetZone("castleview")
  29. Zone(CV,Player,729.01, -21.10, -124.36, 290.81)
  30. elseif GetRace(Player)== 9 or GetRace(Player)== 11 then
  31. Net = GetZone("nettleville")
  32. Zone(Net,Player,670.07, -20.39, 273.85, 114.78)
  33. elseif GetRace(Player)== 3 or GetRace(Player)== 8 then
  34. SC = GetZone("starcrest")
  35. Zone(SC,Player,704.07, -20.38, 264.40, 269.84)
  36. elseif GetRace(Player)== 15 or GetRace(Player)== 16 or GetRace(Player)== 6 then
  37. WW = GetZone("willowwood")
  38. Zone(WW,Player,809.96, -21.30, -566.02, 323.13)
  39. else
  40. Net = GetZone("nettleville")
  41. Zone(Net,Player,670.07, -20.39, 273.85, 114.78)
  42. end
  43. end