AdvancementGaze.lua 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. --[[
  2. Script Name : SpawnScripts/Generic/AdvancementGaze.lua
  3. Script Author : Dorbin
  4. Script Date : 2023.08.26 12:08:46
  5. Script Purpose :
  6. :
  7. --]]
  8. local Q_MageCheck = 5877
  9. local Q_FighterCheck = 5878
  10. local Q_PriestCheck = 5879
  11. local Q_ScoutCheck = 5880
  12. local Q_Mage1 = 5767
  13. local Q_Mage2 = 5768
  14. local Q_Ench = 5771
  15. local Q_Sorc = 5769
  16. local Q_Summ = 5770
  17. local Q_Fighter1 = 5787
  18. local Q_Fighter2 = 5788
  19. local Q_Brawl = 5790
  20. local Q_Crusade = 5789
  21. local Q_Warrior = 5791
  22. local Q_Priest1 = 5772
  23. local Q_Priest2 = 5773
  24. local Q_Cleric = 5771
  25. local Q_Druid = 5769
  26. local Q_Shaman = 5770
  27. local Q_Scout1 = 5782
  28. local Q_Scout2 = 5783
  29. local Q_Bard = 5784
  30. local Q_Pred = 5785
  31. local Q_Rog = 5786
  32. --[[function spawn(NPC)
  33. SetPlayerProximityFunction(NPC, 12, "ClassCheck", "LeaveRange")
  34. end]]--
  35. function ClassCheck(NPC,Spawn) --Quest Callout
  36. if GetFactionAmount(Spawn,11)>=5000 then
  37. if GetLevel(Spawn) ==8 or GetLevel(Spawn)==9 then
  38. if GetClass(Spawn)==1 then -- FIGHTER
  39. if not HasQuest(Spawn,Q_FighterCheck) then
  40. if not HasQuest(Spawn,Q_Fighter1) and not HasCompletedQuest(Spawn,Q_Fighter1) and GetLevel(Spawn)>=8 then
  41. Offer(NPC,Spawn)
  42. elseif HasCompletedQuest(Spawn,Q_Fighter1) and GetLevel(Spawn)>=8 and not HasQuest(Spawn,Q_Fighter2) and not HasCompletedQuest(Spawn,Q_Fighter2) then
  43. Offer(NPC,Spawn)
  44. elseif HasCompletedQuest(Spawn,Q_Fighter2) and not HasQuest(Spawn,Q_Brawl) and not HasQuest(Spawn,Q_Crusade) and not HasQuest(Spawn,Q_Warrior) then
  45. Offer(NPC,Spawn)
  46. end
  47. end
  48. elseif GetClass(Spawn)==11 then -- PRIEST
  49. if not HasQuest(Spawn,Q_PriestCheck) then
  50. if not HasQuest(Spawn,Q_Priest1) and not HasCompletedQuest(Spawn,Q_Priest1) and GetLevel(Spawn)>=8 then
  51. Offer(NPC,Spawn)
  52. elseif HasCompletedQuest(Spawn,Q_Priest1) and GetLevel(Spawn)>=8 and not HasQuest(Spawn,Q_Priest2) and not HasCompletedQuest(Spawn,Q_Priest2) then
  53. Offer(NPC,Spawn)
  54. elseif HasCompletedQuest(Spawn,Q_Priest2) and not HasQuest(Spawn,Q_Cleric) and not HasQuest(Spawn,Q_Druid) and not HasQuest(Spawn,Q_Shaman) then
  55. Offer(NPC,Spawn)
  56. end
  57. end
  58. elseif GetClass(Spawn)==21 then -- MAGE
  59. if CanReceiveQuest(Spawn,Q_MageCheck) then
  60. if not HasQuest(Spawn,Q_Mage1) and not HasCompletedQuest(Spawn,Q_Mage1) and GetLevel(Spawn)>=8 then
  61. Offer(NPC,Spawn)
  62. elseif HasCompletedQuest(Spawn,Q_Mage1) and GetLevel(Spawn)>=8 and not HasQuest(Spawn,Q_Mage2) and not HasCompletedQuest(Spawn,Q_Mage2) then
  63. Offer(NPC,Spawn)
  64. elseif HasCompletedQuest(Spawn,Q_Mage2) and not HasQuest(Spawn,Q_Ench) and not HasQuest(Spawn,Q_Sorc) and not HasQuest(Spawn,Q_Summ) then
  65. Offer(NPC,Spawn)
  66. end
  67. end
  68. elseif GetClass(Spawn)==31 then -- SCOUT
  69. if not HasQuest(Spawn,Q_ScoutCheck) then
  70. if not HasQuest(Spawn,Q_Scout1) and not HasCompletedQuest(Spawn,Q_Scout1) and GetLevel(Spawn)>=8 then
  71. Offer(NPC,Spawn)
  72. elseif HasCompletedQuest(Spawn,Q_Scout1) and GetLevel(Spawn)>=8 and not HasQuest(Spawn,Q_Scout2) and not HasCompletedQuest(Spawn,Q_Scout2) then
  73. Offer(NPC,Spawn)
  74. elseif HasCompletedQuest(Spawn,Q_Scout2) and not HasQuest(Spawn,Q_Bard) and not HasQuest(Spawn,Q_Pred) and not HasQuest(Spawn,Q_Rog) then
  75. Offer(NPC,Spawn)
  76. end
  77. end
  78. end
  79. end
  80. end
  81. end
  82. function Offer(NPC,Spawn)
  83. if GetFactionAmount(Spawn,11) >= 5000 then
  84. if GetClass(Spawn) == 1 then
  85. OfferQuest(NPC,Spawn,Q_FighterCheck)
  86. elseif GetClass(Spawn) == 11 then
  87. OfferQuest(NPC,Spawn,Q_PriestCheck)
  88. elseif GetClass(Spawn) == 21 then
  89. OfferQuest(NPC,Spawn,Q_MageCheck)
  90. elseif GetClass(Spawn) == 31 then
  91. OfferQuest(NPC,Spawn,Q_ScoutCheck)
  92. end
  93. end
  94. end