zonetofpvillages.lua 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. --[[
  2. Script Name : SpawnScripts/FreeportCitizenshipTrialChamber/zonetofpvillages.lua
  3. Script Author : Dorbin
  4. Script Date : 2023.06.26 04:06:56
  5. Script Purpose : Race based door for returning to racial hamlet. Newer/evil races are sent to BeggersCourt.
  6. :
  7. --]]
  8. function respawn(NPC)
  9. spawn(NPC)
  10. end
  11. function casted_on(NPC, Spawn,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, Spawn, "Do you wish to leave the trial chamber?")
  17. end
  18. end
  19. function Leave(NPC,Spawn)
  20. CloseConversation(NPC,Spawn)
  21. Race = GetRace(Spawn)
  22. -- Erudite / Kerra
  23. if Race == 3 or Race == 11 then
  24. ZoneRef = GetZone("Stonestair")
  25. Zone(ZoneRef,Spawn)
  26. -- Ratonga / Gnome
  27. elseif Race == 5 or Race == 13 then
  28. ZoneRef = GetZone("TempleSt")
  29. Zone(ZoneRef,Spawn)
  30. -- Human / Half Elf
  31. elseif Race == 9 or Race == 6 then
  32. ZoneRef = GetZone("BeggarsCourt")
  33. Zone(ZoneRef,Spawn,61.07, -7.08, 111.67, 339.27)
  34. -- Orge / Troll
  35. elseif Race == 12 or Race == 14 then
  36. ZoneRef = GetZone("BigBend")
  37. Zone(ZoneRef,Spawn,94.12, -2.00, 2.53, 98)
  38. -- Dark Elf
  39. elseif Race == 1 or Race == 19 or Race == 17 then
  40. ZoneRef = GetZone("longshadow")
  41. Zone(ZoneRef,Spawn,4.22, 3.00, 71.07, 353.87)
  42. -- Barbarian / Iksar / Sarnak
  43. elseif Race == 0 or Race == 10 or Race == 18 then
  44. ZoneRef = GetZone("ScaleYard")
  45. Zone(ZoneRef,Spawn)
  46. else
  47. ZoneRef = GetZone("BeggarsCourt")
  48. Zone(ZoneRef,Spawn,58.67, -7.08, 112.61, 352.60)
  49. end
  50. end