Advertisement
Guest User

Untitled

a guest
Jun 29th, 2022
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 41.33 KB | None | 0 0
  1. diff --git a/L2J_Mobius_C4_ScionsOfDestiny/.gitignore b/L2J_Mobius_C4_ScionsOfDestiny/.gitignore
  2. new file mode 100644
  3. index 0000000..ae3c172
  4. --- /dev/null
  5. +++ b/L2J_Mobius_C4_ScionsOfDestiny/.gitignore
  6. @@ -0,0 +1 @@
  7. +/bin/
  8. diff --git a/L2J_Mobius_C4_ScionsOfDestiny/dist/game/config/General.ini b/L2J_Mobius_C4_ScionsOfDestiny/dist/game/config/General.ini
  9. index b462ee8..c3729b6 100644
  10. --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/game/config/General.ini
  11. +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/game/config/General.ini
  12. @@ -461,6 +461,11 @@
  13.  # Default: 10
  14.  WearPrice = 10
  15.  
  16. +# Disable additional adena rewards for starter villages repeatable quests based on turning in items
  17. +# True = additional reward for 10+ items not given on quest turn in, False = get additional reward for 10+ items on quest turn in
  18. +# ATTENTION: enabling this option greatly decrease adena income capabilities on low levels.
  19. +# Default: False
  20. +AltVillagesRepQuestReward = False
  21.  
  22.  # ---------------------------------------------------------------------------
  23.  # Enable/Disable features
  24. diff --git a/L2J_Mobius_C4_ScionsOfDestiny/dist/game/data/scripts/quests/Q101_SwordOfSolidarity/Q101_SwordOfSolidarity.java b/L2J_Mobius_C4_ScionsOfDestiny/dist/game/data/scripts/quests/Q101_SwordOfSolidarity/Q101_SwordOfSolidarity.java
  25. index cc30bc9..c3e7119 100644
  26. --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/game/data/scripts/quests/Q101_SwordOfSolidarity/Q101_SwordOfSolidarity.java
  27. +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/game/data/scripts/quests/Q101_SwordOfSolidarity/Q101_SwordOfSolidarity.java
  28. @@ -22,6 +22,7 @@
  29.  import org.l2jmobius.gameserver.model.quest.Quest;
  30.  import org.l2jmobius.gameserver.model.quest.QuestState;
  31.  import org.l2jmobius.gameserver.model.quest.State;
  32. +import org.l2jmobius.gameserver.model.variables.PlayerVariables;
  33.  import org.l2jmobius.gameserver.network.serverpackets.SocialAction;
  34.  
  35.  public class Q101_SwordOfSolidarity extends Quest
  36. @@ -86,18 +87,22 @@
  37.                 st.takeItems(BROKEN_SWORD_HANDLE, 1);
  38.                 st.giveItems(SWORD_OF_SOLIDARITY, 1);
  39.                 st.giveItems(LESSER_HEALING_POT, 100);
  40. -               if (player.isNewbie())
  41. +               // Give newbie reward if player is eligible
  42. +               int newPlayerRewardsReceived = player.getVariables().getInt(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, 0);
  43. +               if (player.isNewbie() && (newPlayerRewardsReceived < 2))
  44.                 {
  45.                     st.showQuestionMark(26);
  46.                     if (player.isMageClass())
  47.                     {
  48.                         st.playTutorialVoice("tutorial_voice_027");
  49.                         st.giveItems(SPIRITSHOT_FOR_BEGINNERS, 3000);
  50. +                       player.getVariables().set(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, ++newPlayerRewardsReceived);
  51.                     }
  52.                     else
  53.                     {
  54.                         st.playTutorialVoice("tutorial_voice_026");
  55.                         st.giveItems(SOULSHOT_FOR_BEGINNERS, 7000);
  56. +                       player.getVariables().set(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, ++newPlayerRewardsReceived);
  57.                     }
  58.                 }
  59.                 st.giveItems(ECHO_BATTLE, 10);
  60. diff --git a/L2J_Mobius_C4_ScionsOfDestiny/dist/game/data/scripts/quests/Q102_SeaOfSporesFever/Q102_SeaOfSporesFever.java b/L2J_Mobius_C4_ScionsOfDestiny/dist/game/data/scripts/quests/Q102_SeaOfSporesFever/Q102_SeaOfSporesFever.java
  61. index ebbb082..5c73209 100644
  62. --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/game/data/scripts/quests/Q102_SeaOfSporesFever/Q102_SeaOfSporesFever.java
  63. +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/game/data/scripts/quests/Q102_SeaOfSporesFever/Q102_SeaOfSporesFever.java
  64. @@ -22,6 +22,7 @@
  65.  import org.l2jmobius.gameserver.model.quest.Quest;
  66.  import org.l2jmobius.gameserver.model.quest.QuestState;
  67.  import org.l2jmobius.gameserver.model.quest.State;
  68. +import org.l2jmobius.gameserver.model.variables.PlayerVariables;
  69.  import org.l2jmobius.gameserver.network.serverpackets.SocialAction;
  70.  
  71.  public class Q102_SeaOfSporesFever extends Quest
  72. @@ -54,6 +55,9 @@
  73.     private static final int ECHO_SOLITUDE = 4414;
  74.     private static final int ECHO_FEAST = 4415;
  75.     private static final int ECHO_CELEBRATION = 4416;
  76. +   // Newbie Rewards
  77. +   private static final int SPIRITSHOT_FOR_BEGINNERS = 5790;
  78. +   private static final int SOULSHOT_FOR_BEGINNERS = 5789;
  79.    
  80.     public Q102_SeaOfSporesFever()
  81.     {
  82. @@ -155,6 +159,25 @@
  83.                                 st.rewardItems(SOULSHOT_NO_GRADE, 1000);
  84.                             }
  85.                            
  86. +                           // Give newbie reward if player is eligible
  87. +                           int newPlayerRewardsReceived = player.getVariables().getInt(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, 0);
  88. +                           if (player.isNewbie() && (newPlayerRewardsReceived < 2))
  89. +                           {
  90. +                               st.showQuestionMark(26);
  91. +                               if (player.isMageClass())
  92. +                               {
  93. +                                   st.playTutorialVoice("tutorial_voice_027");
  94. +                                   st.giveItems(SPIRITSHOT_FOR_BEGINNERS, 3000);
  95. +                                   player.getVariables().set(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, ++newPlayerRewardsReceived);
  96. +                               }
  97. +                               else
  98. +                               {
  99. +                                   st.playTutorialVoice("tutorial_voice_026");
  100. +                                   st.giveItems(SOULSHOT_FOR_BEGINNERS, 7000);
  101. +                                   player.getVariables().set(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, ++newPlayerRewardsReceived);
  102. +                               }
  103. +                           }
  104. +                          
  105.                             st.giveItems(LESSER_HEALING_POT, 100);
  106.                             st.giveItems(ECHO_BATTLE, 10);
  107.                             st.giveItems(ECHO_LOVE, 10);
  108. diff --git a/L2J_Mobius_C4_ScionsOfDestiny/dist/game/data/scripts/quests/Q103_SpiritOfCraftsman/Q103_SpiritOfCraftsman.java b/L2J_Mobius_C4_ScionsOfDestiny/dist/game/data/scripts/quests/Q103_SpiritOfCraftsman/Q103_SpiritOfCraftsman.java
  109. index 6a1c03f..ba9bdde 100644
  110. --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/game/data/scripts/quests/Q103_SpiritOfCraftsman/Q103_SpiritOfCraftsman.java
  111. +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/game/data/scripts/quests/Q103_SpiritOfCraftsman/Q103_SpiritOfCraftsman.java
  112. @@ -22,6 +22,7 @@
  113.  import org.l2jmobius.gameserver.model.quest.Quest;
  114.  import org.l2jmobius.gameserver.model.quest.QuestState;
  115.  import org.l2jmobius.gameserver.model.quest.State;
  116. +import org.l2jmobius.gameserver.model.variables.PlayerVariables;
  117.  import org.l2jmobius.gameserver.network.serverpackets.SocialAction;
  118.  
  119.  public class Q103_SpiritOfCraftsman extends Quest
  120. @@ -134,19 +135,22 @@
  121.                             {
  122.                                 st.giveItems(SOULSHOT_NO_GRADE, 1000);
  123.                             }
  124. -                          
  125. -                           if (player.isNewbie())
  126. +                           // Give newbie reward if player is eligible
  127. +                           int newPlayerRewardsReceived = player.getVariables().getInt(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, 0);
  128. +                           if (player.isNewbie() && (newPlayerRewardsReceived < 2))
  129.                             {
  130.                                 st.showQuestionMark(26);
  131.                                 if (player.isMageClass())
  132.                                 {
  133.                                     st.playTutorialVoice("tutorial_voice_027");
  134.                                     st.giveItems(SPIRITSHOT_FOR_BEGINNERS, 3000);
  135. +                                   player.getVariables().set(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, ++newPlayerRewardsReceived);
  136.                                 }
  137.                                 else
  138.                                 {
  139.                                     st.playTutorialVoice("tutorial_voice_026");
  140.                                     st.giveItems(SOULSHOT_FOR_BEGINNERS, 7000);
  141. +                                   player.getVariables().set(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, ++newPlayerRewardsReceived);
  142.                                 }
  143.                             }
  144.                            
  145. diff --git a/L2J_Mobius_C4_ScionsOfDestiny/dist/game/data/scripts/quests/Q104_SpiritOfMirrors/Q104_SpiritOfMirrors.java b/L2J_Mobius_C4_ScionsOfDestiny/dist/game/data/scripts/quests/Q104_SpiritOfMirrors/Q104_SpiritOfMirrors.java
  146. index 6f42fa2..11dd4c7 100644
  147. --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/game/data/scripts/quests/Q104_SpiritOfMirrors/Q104_SpiritOfMirrors.java
  148. +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/game/data/scripts/quests/Q104_SpiritOfMirrors/Q104_SpiritOfMirrors.java
  149. @@ -23,6 +23,7 @@
  150.  import org.l2jmobius.gameserver.model.quest.Quest;
  151.  import org.l2jmobius.gameserver.model.quest.QuestState;
  152.  import org.l2jmobius.gameserver.model.quest.State;
  153. +import org.l2jmobius.gameserver.model.variables.PlayerVariables;
  154.  import org.l2jmobius.gameserver.network.serverpackets.SocialAction;
  155.  
  156.  public class Q104_SpiritOfMirrors extends Quest
  157. @@ -139,19 +140,22 @@
  158.                             {
  159.                                 st.giveItems(SOULSHOT_NO_GRADE, 1000);
  160.                             }
  161. -                          
  162. -                           if (player.isNewbie())
  163. +                           // Give newbie reward if player is eligible
  164. +                           int newPlayerRewardsReceived = player.getVariables().getInt(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, 0);
  165. +                           if (player.isNewbie() && (newPlayerRewardsReceived < 2))
  166.                             {
  167.                                 st.showQuestionMark(26);
  168.                                 if (player.isMageClass())
  169.                                 {
  170.                                     st.playTutorialVoice("tutorial_voice_027");
  171.                                     st.giveItems(SPIRITSHOT_FOR_BEGINNERS, 3000);
  172. +                                   player.getVariables().set(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, ++newPlayerRewardsReceived);
  173.                                 }
  174.                                 else
  175.                                 {
  176.                                     st.playTutorialVoice("tutorial_voice_026");
  177.                                     st.giveItems(SOULSHOT_FOR_BEGINNERS, 7000);
  178. +                                   player.getVariables().set(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, ++newPlayerRewardsReceived);
  179.                                 }
  180.                             }
  181.                            
  182. diff --git a/L2J_Mobius_C4_ScionsOfDestiny/dist/game/data/scripts/quests/Q105_SkirmishWithTheOrcs/Q105_SkirmishWithTheOrcs.java b/L2J_Mobius_C4_ScionsOfDestiny/dist/game/data/scripts/quests/Q105_SkirmishWithTheOrcs/Q105_SkirmishWithTheOrcs.java
  183. index 9e62f88..be8087b 100644
  184. --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/game/data/scripts/quests/Q105_SkirmishWithTheOrcs/Q105_SkirmishWithTheOrcs.java
  185. +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/game/data/scripts/quests/Q105_SkirmishWithTheOrcs/Q105_SkirmishWithTheOrcs.java
  186. @@ -22,6 +22,7 @@
  187.  import org.l2jmobius.gameserver.model.quest.Quest;
  188.  import org.l2jmobius.gameserver.model.quest.QuestState;
  189.  import org.l2jmobius.gameserver.model.quest.State;
  190. +import org.l2jmobius.gameserver.model.variables.PlayerVariables;
  191.  import org.l2jmobius.gameserver.network.serverpackets.SocialAction;
  192.  
  193.  public class Q105_SkirmishWithTheOrcs extends Quest
  194. @@ -51,6 +52,7 @@
  195.     private static final int SOULSHOT_FOR_BEGINNERS = 5789;
  196.     private static final int RED_SUNSET_STAFF = 754;
  197.     private static final int RED_SUNSET_SWORD = 981;
  198. +   private static final int LESSER_HEALING_POT = 1060;
  199.     private static final int ECHO_BATTLE = 4412;
  200.     private static final int ECHO_LOVE = 4413;
  201.     private static final int ECHO_SOLITUDE = 4414;
  202. @@ -153,22 +155,26 @@
  203.                     {
  204.                         st.giveItems(RED_SUNSET_SWORD, 1);
  205.                     }
  206. -                  
  207. -                   if (player.isNewbie())
  208. +                   // Give newbie reward if player is eligible
  209. +                   int newPlayerRewardsReceived = player.getVariables().getInt(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, 0);
  210. +                   if (player.isNewbie() && (newPlayerRewardsReceived < 2))
  211.                     {
  212.                         st.showQuestionMark(26);
  213.                         if (player.isMageClass())
  214.                         {
  215.                             st.playTutorialVoice("tutorial_voice_027");
  216.                             st.giveItems(SPIRITSHOT_FOR_BEGINNERS, 3000);
  217. +                           player.getVariables().set(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, ++newPlayerRewardsReceived);
  218.                         }
  219.                         else
  220.                         {
  221.                             st.playTutorialVoice("tutorial_voice_026");
  222.                             st.giveItems(SOULSHOT_FOR_BEGINNERS, 7000);
  223. +                           player.getVariables().set(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, ++newPlayerRewardsReceived);
  224.                         }
  225.                     }
  226.                    
  227. +                   st.rewardItems(LESSER_HEALING_POT, 100);
  228.                     st.giveItems(ECHO_BATTLE, 10);
  229.                     st.giveItems(ECHO_LOVE, 10);
  230.                     st.giveItems(ECHO_SOLITUDE, 10);
  231. diff --git a/L2J_Mobius_C4_ScionsOfDestiny/dist/game/data/scripts/quests/Q106_ForgottenTruth/Q106_ForgottenTruth.java b/L2J_Mobius_C4_ScionsOfDestiny/dist/game/data/scripts/quests/Q106_ForgottenTruth/Q106_ForgottenTruth.java
  232. index fd7d5e0..1d53ebf 100644
  233. --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/game/data/scripts/quests/Q106_ForgottenTruth/Q106_ForgottenTruth.java
  234. +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/game/data/scripts/quests/Q106_ForgottenTruth/Q106_ForgottenTruth.java
  235. @@ -22,6 +22,7 @@
  236.  import org.l2jmobius.gameserver.model.quest.Quest;
  237.  import org.l2jmobius.gameserver.model.quest.QuestState;
  238.  import org.l2jmobius.gameserver.model.quest.State;
  239. +import org.l2jmobius.gameserver.model.variables.PlayerVariables;
  240.  import org.l2jmobius.gameserver.network.serverpackets.SocialAction;
  241.  
  242.  public class Q106_ForgottenTruth extends Quest
  243. @@ -138,19 +139,22 @@
  244.                             {
  245.                                 st.giveItems(SOULSHOT_NO_GRADE, 1000);
  246.                             }
  247. -                          
  248. -                           if (player.isNewbie())
  249. +                           // Give newbie reward if player is eligible
  250. +                           int newPlayerRewardsReceived = player.getVariables().getInt(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, 0);
  251. +                           if (player.isNewbie() && (newPlayerRewardsReceived < 2))
  252.                             {
  253.                                 st.showQuestionMark(26);
  254.                                 if (player.isMageClass())
  255.                                 {
  256.                                     st.playTutorialVoice("tutorial_voice_027");
  257.                                     st.giveItems(SPIRITSHOT_FOR_BEGINNERS, 3000);
  258. +                                   player.getVariables().set(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, ++newPlayerRewardsReceived);
  259.                                 }
  260.                                 else
  261.                                 {
  262.                                     st.playTutorialVoice("tutorial_voice_026");
  263. -                                   st.giveItems(SOULSHOT_FOR_BEGINNERS, 6000);
  264. +                                   st.giveItems(SOULSHOT_FOR_BEGINNERS, 7000);
  265. +                                   player.getVariables().set(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, ++newPlayerRewardsReceived);
  266.                                 }
  267.                             }
  268.                            
  269. diff --git a/L2J_Mobius_C4_ScionsOfDestiny/dist/game/data/scripts/quests/Q107_MercilessPunishment/Q107_MercilessPunishment.java b/L2J_Mobius_C4_ScionsOfDestiny/dist/game/data/scripts/quests/Q107_MercilessPunishment/Q107_MercilessPunishment.java
  270. index 01c4cb2..7b09733 100644
  271. --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/game/data/scripts/quests/Q107_MercilessPunishment/Q107_MercilessPunishment.java
  272. +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/game/data/scripts/quests/Q107_MercilessPunishment/Q107_MercilessPunishment.java
  273. @@ -22,6 +22,7 @@
  274.  import org.l2jmobius.gameserver.model.quest.Quest;
  275.  import org.l2jmobius.gameserver.model.quest.QuestState;
  276.  import org.l2jmobius.gameserver.model.quest.State;
  277. +import org.l2jmobius.gameserver.model.variables.PlayerVariables;
  278.  import org.l2jmobius.gameserver.network.serverpackets.SocialAction;
  279.  
  280.  public class Q107_MercilessPunishment extends Quest
  281. @@ -38,7 +39,6 @@
  282.     private static final int LETTER_TO_ELF = 1558;
  283.     // Rewards
  284.     private static final int BUTCHER_SWORD = 1510;
  285. -   private static final int SPIRITSHOT_FOR_BEGINNERS = 5790;
  286.     private static final int SOULSHOT_FOR_BEGINNERS = 5789;
  287.     private static final int ECHO_BATTLE = 4412;
  288.     private static final int ECHO_LOVE = 4413;
  289. @@ -162,20 +162,14 @@
  290.                            
  291.                             st.giveItems(BUTCHER_SWORD, 1);
  292.                             st.giveItems(LESSER_HEALING_POTION, 100);
  293. -                          
  294. -                           if (player.isNewbie())
  295. +                           // Give newbie reward if player is eligible
  296. +                           int newPlayerRewardsReceived = player.getVariables().getInt(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, 0);
  297. +                           if (player.isNewbie() && (newPlayerRewardsReceived < 2))
  298.                             {
  299.                                 st.showQuestionMark(26);
  300. -                               if (player.isMageClass())
  301. -                               {
  302. -                                   st.playTutorialVoice("tutorial_voice_027");
  303. -                                   st.giveItems(SPIRITSHOT_FOR_BEGINNERS, 3000);
  304. -                               }
  305. -                               else
  306. -                               {
  307. -                                   st.playTutorialVoice("tutorial_voice_026");
  308. -                                   st.giveItems(SOULSHOT_FOR_BEGINNERS, 6000);
  309. -                               }
  310. +                               st.playTutorialVoice("tutorial_voice_026");
  311. +                               st.giveItems(SOULSHOT_FOR_BEGINNERS, 7000);
  312. +                               player.getVariables().set(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, ++newPlayerRewardsReceived);
  313.                             }
  314.                            
  315.                             st.giveItems(ECHO_BATTLE, 10);
  316. diff --git a/L2J_Mobius_C4_ScionsOfDestiny/dist/game/data/scripts/quests/Q108_JumbleTumbleDiamondFuss/Q108_JumbleTumbleDiamondFuss.java b/L2J_Mobius_C4_ScionsOfDestiny/dist/game/data/scripts/quests/Q108_JumbleTumbleDiamondFuss/Q108_JumbleTumbleDiamondFuss.java
  317. index 984ca25..7d0bad2 100644
  318. --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/game/data/scripts/quests/Q108_JumbleTumbleDiamondFuss/Q108_JumbleTumbleDiamondFuss.java
  319. +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/game/data/scripts/quests/Q108_JumbleTumbleDiamondFuss/Q108_JumbleTumbleDiamondFuss.java
  320. @@ -22,6 +22,7 @@
  321.  import org.l2jmobius.gameserver.model.quest.Quest;
  322.  import org.l2jmobius.gameserver.model.quest.QuestState;
  323.  import org.l2jmobius.gameserver.model.quest.State;
  324. +import org.l2jmobius.gameserver.model.variables.PlayerVariables;
  325.  import org.l2jmobius.gameserver.network.serverpackets.SocialAction;
  326.  
  327.  public class Q108_JumbleTumbleDiamondFuss extends Quest
  328. @@ -184,19 +185,22 @@
  329.                             st.takeItems(STAR_DIAMOND, -1);
  330.                             st.giveItems(SILVERSMITH_HAMMER, 1);
  331.                             st.giveItems(LESSER_HEALING_POTION, 100);
  332. -                          
  333. -                           if (player.isNewbie())
  334. +                           // Give newbie reward if player is eligible
  335. +                           int newPlayerRewardsReceived = player.getVariables().getInt(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, 0);
  336. +                           if (player.isNewbie() && (newPlayerRewardsReceived < 2))
  337.                             {
  338.                                 st.showQuestionMark(26);
  339.                                 if (player.isMageClass())
  340.                                 {
  341.                                     st.playTutorialVoice("tutorial_voice_027");
  342.                                     st.giveItems(SPIRITSHOT_FOR_BEGINNERS, 3000);
  343. +                                   player.getVariables().set(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, ++newPlayerRewardsReceived);
  344.                                 }
  345.                                 else
  346.                                 {
  347.                                     st.playTutorialVoice("tutorial_voice_026");
  348. -                                   st.giveItems(SOULSHOT_FOR_BEGINNERS, 6000);
  349. +                                   st.giveItems(SOULSHOT_FOR_BEGINNERS, 7000);
  350. +                                   player.getVariables().set(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, ++newPlayerRewardsReceived);
  351.                                 }
  352.                             }
  353.                            
  354. diff --git a/L2J_Mobius_C4_ScionsOfDestiny/dist/game/data/scripts/quests/Q159_ProtectTheWaterSource/Q159_ProtectTheWaterSource.java b/L2J_Mobius_C4_ScionsOfDestiny/dist/game/data/scripts/quests/Q159_ProtectTheWaterSource/Q159_ProtectTheWaterSource.java
  355. index de61ca9..7e70bea 100644
  356. --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/game/data/scripts/quests/Q159_ProtectTheWaterSource/Q159_ProtectTheWaterSource.java
  357. +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/game/data/scripts/quests/Q159_ProtectTheWaterSource/Q159_ProtectTheWaterSource.java
  358. @@ -140,7 +140,7 @@
  359.         {
  360.             st.setCond(2);
  361.         }
  362. -       else if (st.isCond(2) && st.dropItems(PLAGUE_DUST, 1, 5, 400000))
  363. +       else if (st.isCond(3) && st.dropItems(PLAGUE_DUST, 1, 5, 400000))
  364.         {
  365.             st.setCond(4);
  366.         }
  367. diff --git a/L2J_Mobius_C4_ScionsOfDestiny/dist/game/data/scripts/quests/Q257_TheGuardIsBusy/Q257_TheGuardIsBusy.java b/L2J_Mobius_C4_ScionsOfDestiny/dist/game/data/scripts/quests/Q257_TheGuardIsBusy/Q257_TheGuardIsBusy.java
  368. index 640367b..a0ecb58 100644
  369. --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/game/data/scripts/quests/Q257_TheGuardIsBusy/Q257_TheGuardIsBusy.java
  370. +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/game/data/scripts/quests/Q257_TheGuardIsBusy/Q257_TheGuardIsBusy.java
  371. @@ -16,11 +16,14 @@
  372.   */
  373.  package quests.Q257_TheGuardIsBusy;
  374.  
  375. +import org.l2jmobius.Config;
  376. +import org.l2jmobius.gameserver.enums.Race;
  377.  import org.l2jmobius.gameserver.model.actor.Npc;
  378.  import org.l2jmobius.gameserver.model.actor.Player;
  379.  import org.l2jmobius.gameserver.model.quest.Quest;
  380.  import org.l2jmobius.gameserver.model.quest.QuestState;
  381.  import org.l2jmobius.gameserver.model.quest.State;
  382. +import org.l2jmobius.gameserver.model.variables.PlayerVariables;
  383.  
  384.  public class Q257_TheGuardIsBusy extends Quest
  385.  {
  386. @@ -102,28 +105,31 @@
  387.                     st.takeItems(ORC_NECKLACE, -1);
  388.                     st.takeItems(WEREWOLF_FANG, -1);
  389.                    
  390. -                   int reward = (10 * amulets) + (20 * (necklaces + fangs));
  391. -                   if ((amulets + necklaces + fangs) >= 10)
  392. +                   int reward = (5 * amulets) + (10 * fangs) + (15 * necklaces);
  393. +                   if (!Config.ALT_VILLAGES_REPEATABLE_QUEST_REWARD && ((amulets + necklaces + fangs) >= 10))
  394.                     {
  395.                         reward += 1000;
  396.                     }
  397.                    
  398.                     st.rewardItems(57, reward);
  399. -                  
  400. -                   if (player.isNewbie() && (st.getInt("Reward") == 0))
  401. +                   // Give newbie reward if player is eligible
  402. +                   int newPlayerRewardsReceived = player.getVariables().getInt(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, 0);
  403. +                   if (player.isNewbie() && (st.getInt("Reward") == 0) && (newPlayerRewardsReceived < 2))
  404.                     {
  405.                         st.showQuestionMark(26);
  406.                         st.set("Reward", "1");
  407.                        
  408. -                       if (player.isMageClass())
  409. +                       if (player.isMageClass() && (player.getRace() != Race.ORC))
  410.                         {
  411.                             st.playTutorialVoice("tutorial_voice_027");
  412.                             st.giveItems(SPIRITSHOT_FOR_BEGINNERS, 3000);
  413. +                           player.getVariables().set(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, ++newPlayerRewardsReceived);
  414.                         }
  415.                         else
  416.                         {
  417.                             st.playTutorialVoice("tutorial_voice_026");
  418.                             st.giveItems(SOULSHOT_FOR_BEGINNERS, 6000);
  419. +                           player.getVariables().set(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, ++newPlayerRewardsReceived);
  420.                         }
  421.                     }
  422.                 }
  423. diff --git a/L2J_Mobius_C4_ScionsOfDestiny/dist/game/data/scripts/quests/Q259_RanchersPlea/Q259_RanchersPlea.java b/L2J_Mobius_C4_ScionsOfDestiny/dist/game/data/scripts/quests/Q259_RanchersPlea/Q259_RanchersPlea.java
  424. index d827e3e..867abe2 100644
  425. --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/game/data/scripts/quests/Q259_RanchersPlea/Q259_RanchersPlea.java
  426. +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/game/data/scripts/quests/Q259_RanchersPlea/Q259_RanchersPlea.java
  427. @@ -16,6 +16,7 @@
  428.   */
  429.  package quests.Q259_RanchersPlea;
  430.  
  431. +import org.l2jmobius.Config;
  432.  import org.l2jmobius.gameserver.model.actor.Npc;
  433.  import org.l2jmobius.gameserver.model.actor.Player;
  434.  import org.l2jmobius.gameserver.model.quest.Quest;
  435. @@ -141,7 +142,12 @@
  436.                         {
  437.                             htmltext = "30497-05.htm";
  438.                             st.takeItems(GIANT_SPIDER_SKIN, -1);
  439. -                           st.rewardItems(ADENA, ((count >= 10) ? 250 : 0) + (count * 25));
  440. +                           int reward = count * 25;
  441. +                           if (!Config.ALT_VILLAGES_REPEATABLE_QUEST_REWARD && (count >= 10))
  442. +                           {
  443. +                               reward += 250;
  444. +                           }
  445. +                           st.rewardItems(ADENA, reward);
  446.                         }
  447.                         break;
  448.                     }
  449. diff --git a/L2J_Mobius_C4_ScionsOfDestiny/dist/game/data/scripts/quests/Q260_HuntTheOrcs/Q260_HuntTheOrcs.java b/L2J_Mobius_C4_ScionsOfDestiny/dist/game/data/scripts/quests/Q260_HuntTheOrcs/Q260_HuntTheOrcs.java
  450. index d5b3032..93ab129 100644
  451. --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/game/data/scripts/quests/Q260_HuntTheOrcs/Q260_HuntTheOrcs.java
  452. +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/game/data/scripts/quests/Q260_HuntTheOrcs/Q260_HuntTheOrcs.java
  453. @@ -16,12 +16,14 @@
  454.   */
  455.  package quests.Q260_HuntTheOrcs;
  456.  
  457. +import org.l2jmobius.Config;
  458.  import org.l2jmobius.gameserver.enums.Race;
  459.  import org.l2jmobius.gameserver.model.actor.Npc;
  460.  import org.l2jmobius.gameserver.model.actor.Player;
  461.  import org.l2jmobius.gameserver.model.quest.Quest;
  462.  import org.l2jmobius.gameserver.model.quest.QuestState;
  463.  import org.l2jmobius.gameserver.model.quest.State;
  464. +import org.l2jmobius.gameserver.model.variables.PlayerVariables;
  465.  
  466.  public class Q260_HuntTheOrcs extends Quest
  467.  {
  468. @@ -37,6 +39,9 @@
  469.     // Items
  470.     private static final int ORC_AMULET = 1114;
  471.     private static final int ORC_NECKLACE = 1115;
  472. +   // Newbie Items
  473. +   private static final int SPIRITSHOT_FOR_BEGINNERS = 5790;
  474. +   private static final int SOULSHOT_FOR_BEGINNERS = 5789;
  475.    
  476.     public Q260_HuntTheOrcs()
  477.     {
  478. @@ -112,7 +117,33 @@
  479.                     htmltext = "30221-05.htm";
  480.                     st.takeItems(ORC_AMULET, -1);
  481.                     st.takeItems(ORC_NECKLACE, -1);
  482. -                   st.rewardItems(57, (amulet * 5) + (necklace * 15));
  483. +                   int reward = (amulet * 5) + (necklace * 15);
  484. +                   if (!Config.ALT_VILLAGES_REPEATABLE_QUEST_REWARD && ((amulet + necklace) >= 10))
  485. +                   {
  486. +                       reward += 1000;
  487. +                   }
  488. +                  
  489. +                   st.rewardItems(57, reward);
  490. +                   // Give newbie reward if player is eligible
  491. +                   int newPlayerRewardsReceived = player.getVariables().getInt(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, 0);
  492. +                   if (player.isNewbie() && (st.getInt("Reward") == 0) && (newPlayerRewardsReceived < 2))
  493. +                   {
  494. +                       st.showQuestionMark(26);
  495. +                       st.set("Reward", "1");
  496. +                      
  497. +                       if (player.isMageClass())
  498. +                       {
  499. +                           st.playTutorialVoice("tutorial_voice_027");
  500. +                           st.giveItems(SPIRITSHOT_FOR_BEGINNERS, 3000);
  501. +                           player.getVariables().set(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, ++newPlayerRewardsReceived);
  502. +                       }
  503. +                       else
  504. +                       {
  505. +                           st.playTutorialVoice("tutorial_voice_026");
  506. +                           st.giveItems(SOULSHOT_FOR_BEGINNERS, 6000);
  507. +                           player.getVariables().set(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, ++newPlayerRewardsReceived);
  508. +                       }
  509. +                   }
  510.                 }
  511.                 break;
  512.             }
  513. diff --git a/L2J_Mobius_C4_ScionsOfDestiny/dist/game/data/scripts/quests/Q263_OrcSubjugation/Q263_OrcSubjugation.java b/L2J_Mobius_C4_ScionsOfDestiny/dist/game/data/scripts/quests/Q263_OrcSubjugation/Q263_OrcSubjugation.java
  514. index 9f95a28..25d5068 100644
  515. --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/game/data/scripts/quests/Q263_OrcSubjugation/Q263_OrcSubjugation.java
  516. +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/game/data/scripts/quests/Q263_OrcSubjugation/Q263_OrcSubjugation.java
  517. @@ -16,6 +16,7 @@
  518.   */
  519.  package quests.Q263_OrcSubjugation;
  520.  
  521. +import org.l2jmobius.Config;
  522.  import org.l2jmobius.gameserver.enums.Race;
  523.  import org.l2jmobius.gameserver.model.actor.Npc;
  524.  import org.l2jmobius.gameserver.model.actor.Player;
  525. @@ -102,7 +103,14 @@
  526.                     htmltext = "30346-05.htm";
  527.                     st.takeItems(ORC_AMULET, -1);
  528.                     st.takeItems(ORC_NECKLACE, -1);
  529. -                   st.rewardItems(57, (amulet * 20) + (necklace * 30));
  530. +                   int reward = (amulet * 20) + (necklace * 30);
  531. +                   if (!Config.ALT_VILLAGES_REPEATABLE_QUEST_REWARD && ((amulet + necklace) >= 10))
  532. +                   {
  533. +                       reward += 1000;
  534. +                   }
  535. +                  
  536. +                   st.rewardItems(57, reward);
  537. +                  
  538.                 }
  539.                 break;
  540.             }
  541. diff --git a/L2J_Mobius_C4_ScionsOfDestiny/dist/game/data/scripts/quests/Q265_ChainsOfSlavery/Q265_ChainsOfSlavery.java b/L2J_Mobius_C4_ScionsOfDestiny/dist/game/data/scripts/quests/Q265_ChainsOfSlavery/Q265_ChainsOfSlavery.java
  542. index f221541..2bfe030 100644
  543. --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/game/data/scripts/quests/Q265_ChainsOfSlavery/Q265_ChainsOfSlavery.java
  544. +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/game/data/scripts/quests/Q265_ChainsOfSlavery/Q265_ChainsOfSlavery.java
  545. @@ -16,12 +16,14 @@
  546.   */
  547.  package quests.Q265_ChainsOfSlavery;
  548.  
  549. +import org.l2jmobius.Config;
  550.  import org.l2jmobius.gameserver.enums.Race;
  551.  import org.l2jmobius.gameserver.model.actor.Npc;
  552.  import org.l2jmobius.gameserver.model.actor.Player;
  553.  import org.l2jmobius.gameserver.model.quest.Quest;
  554.  import org.l2jmobius.gameserver.model.quest.QuestState;
  555.  import org.l2jmobius.gameserver.model.quest.State;
  556. +import org.l2jmobius.gameserver.model.variables.PlayerVariables;
  557.  
  558.  public class Q265_ChainsOfSlavery extends Quest
  559.  {
  560. @@ -101,7 +103,7 @@
  561.                 else
  562.                 {
  563.                     int reward = 12 * shackles;
  564. -                   if (shackles > 10)
  565. +                   if (!Config.ALT_VILLAGES_REPEATABLE_QUEST_REWARD && (shackles >= 10))
  566.                     {
  567.                         reward += 500;
  568.                     }
  569. @@ -109,8 +111,9 @@
  570.                     htmltext = "30357-05.htm";
  571.                     st.takeItems(SHACKLE, -1);
  572.                     st.rewardItems(57, reward);
  573. -                  
  574. -                   if (player.isNewbie() && (st.getInt("Reward") == 0))
  575. +                   // Give newbie reward if player is eligible
  576. +                   int newPlayerRewardsReceived = player.getVariables().getInt(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, 0);
  577. +                   if (player.isNewbie() && (st.getInt("Reward") == 0) && (newPlayerRewardsReceived < 2))
  578.                     {
  579.                         st.showQuestionMark(26);
  580.                         st.set("Reward", "1");
  581. @@ -119,11 +122,13 @@
  582.                         {
  583.                             st.playTutorialVoice("tutorial_voice_027");
  584.                             st.giveItems(SPIRITSHOT_FOR_BEGINNERS, 3000);
  585. +                           player.getVariables().set(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, ++newPlayerRewardsReceived);
  586.                         }
  587.                         else
  588.                         {
  589.                             st.playTutorialVoice("tutorial_voice_026");
  590.                             st.giveItems(SOULSHOT_FOR_BEGINNERS, 6000);
  591. +                           player.getVariables().set(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, ++newPlayerRewardsReceived);
  592.                         }
  593.                     }
  594.                 }
  595. diff --git a/L2J_Mobius_C4_ScionsOfDestiny/dist/game/data/scripts/quests/Q267_WrathOfVerdure/Q267_WrathOfVerdure.java b/L2J_Mobius_C4_ScionsOfDestiny/dist/game/data/scripts/quests/Q267_WrathOfVerdure/Q267_WrathOfVerdure.java
  596. index 156d988..eb94b18 100644
  597. --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/game/data/scripts/quests/Q267_WrathOfVerdure/Q267_WrathOfVerdure.java
  598. +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/game/data/scripts/quests/Q267_WrathOfVerdure/Q267_WrathOfVerdure.java
  599. @@ -16,6 +16,7 @@
  600.   */
  601.  package quests.Q267_WrathOfVerdure;
  602.  
  603. +import org.l2jmobius.Config;
  604.  import org.l2jmobius.gameserver.enums.Race;
  605.  import org.l2jmobius.gameserver.model.actor.Npc;
  606.  import org.l2jmobius.gameserver.model.actor.Player;
  607. @@ -98,6 +99,10 @@
  608.                     htmltext = "31853-05.htm";
  609.                     st.takeItems(GOBLIN_CLUB, -1);
  610.                     st.rewardItems(SILVERY_LEAF, count);
  611. +                   if (!Config.ALT_VILLAGES_REPEATABLE_QUEST_REWARD && (count >= 10))
  612. +                   {
  613. +                       st.rewardItems(57, 600);
  614. +                   }
  615.                 }
  616.                 else
  617.                 {
  618. diff --git a/L2J_Mobius_C4_ScionsOfDestiny/dist/game/data/scripts/quests/Q273_InvadersOfTheHolyLand/Q273_InvadersOfTheHolyLand.java b/L2J_Mobius_C4_ScionsOfDestiny/dist/game/data/scripts/quests/Q273_InvadersOfTheHolyLand/Q273_InvadersOfTheHolyLand.java
  619. index 66488fd..9ac3147 100644
  620. --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/game/data/scripts/quests/Q273_InvadersOfTheHolyLand/Q273_InvadersOfTheHolyLand.java
  621. +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/game/data/scripts/quests/Q273_InvadersOfTheHolyLand/Q273_InvadersOfTheHolyLand.java
  622. @@ -16,12 +16,14 @@
  623.   */
  624.  package quests.Q273_InvadersOfTheHolyLand;
  625.  
  626. +import org.l2jmobius.Config;
  627.  import org.l2jmobius.gameserver.enums.Race;
  628.  import org.l2jmobius.gameserver.model.actor.Npc;
  629.  import org.l2jmobius.gameserver.model.actor.Player;
  630.  import org.l2jmobius.gameserver.model.quest.Quest;
  631.  import org.l2jmobius.gameserver.model.quest.QuestState;
  632.  import org.l2jmobius.gameserver.model.quest.State;
  633. +import org.l2jmobius.gameserver.model.variables.PlayerVariables;
  634.  
  635.  public class Q273_InvadersOfTheHolyLand extends Quest
  636.  {
  637. @@ -110,15 +112,23 @@
  638.                         htmltext = "30566-06.htm";
  639.                     }
  640.                    
  641. -                   final int reward = (black * 3) + (red * 10) + ((black >= 10) ? ((red >= 1) ? 1800 : 1500) : 0);
  642. +                   int reward = (black * 5) + (red * 50);
  643. +                   if (!Config.ALT_VILLAGES_REPEATABLE_QUEST_REWARD)
  644. +                   {
  645. +                       reward += ((black >= 10) ? ((red >= 1) ? 1800 : 1500) : 0);
  646. +                   }
  647. +                  
  648.                     st.takeItems(BLACK_SOULSTONE, -1);
  649.                     st.takeItems(RED_SOULSTONE, -1);
  650.                     st.rewardItems(57, reward);
  651. -                   if (player.isNewbie() && (st.getInt("Reward") == 0))
  652. +                   // Give newbie reward if player is eligible
  653. +                   int newPlayerRewardsReceived = player.getVariables().getInt(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, 0);
  654. +                   if (player.isNewbie() && (st.getInt("Reward") == 0) && (newPlayerRewardsReceived < 2))
  655.                     {
  656.                         st.giveItems(SOULSHOT_FOR_BEGINNERS, 6000);
  657.                         st.playTutorialVoice("tutorial_voice_026");
  658.                         st.set("Reward", "1");
  659. +                       player.getVariables().set(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, ++newPlayerRewardsReceived);
  660.                     }
  661.                 }
  662.                 break;
  663. diff --git a/L2J_Mobius_C4_ScionsOfDestiny/dist/game/data/scripts/quests/Q292_BrigandsSweep/Q292_BrigandsSweep.java b/L2J_Mobius_C4_ScionsOfDestiny/dist/game/data/scripts/quests/Q292_BrigandsSweep/Q292_BrigandsSweep.java
  664. index a81e21f..c9b973b 100644
  665. --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/game/data/scripts/quests/Q292_BrigandsSweep/Q292_BrigandsSweep.java
  666. +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/game/data/scripts/quests/Q292_BrigandsSweep/Q292_BrigandsSweep.java
  667. @@ -16,6 +16,7 @@
  668.   */
  669.  package quests.Q292_BrigandsSweep;
  670.  
  671. +import org.l2jmobius.Config;
  672.  import org.l2jmobius.gameserver.enums.Race;
  673.  import org.l2jmobius.gameserver.model.actor.Npc;
  674.  import org.l2jmobius.gameserver.model.actor.Player;
  675. @@ -148,7 +149,13 @@
  676.                                 st.takeItems(SUSPICIOUS_CONTRACT, -1);
  677.                             }
  678.                            
  679. -                           st.rewardItems(57, ((12 * goblinNecklaces) + (36 * goblinPendants) + (33 * goblinLordPendants) + (countAll >= 10 ? 1000 : 0) + ((hasContract) ? 1120 : 0)));
  680. +                           int reward = (12 * goblinNecklaces) + (36 * goblinPendants) + (33 * goblinLordPendants) + ((hasContract) ? 1120 : 0);
  681. +                           if (!Config.ALT_VILLAGES_REPEATABLE_QUEST_REWARD && (countAll >= 10))
  682. +                           {
  683. +                               reward += 1000;
  684. +                           }
  685. +                          
  686. +                           st.rewardItems(57, reward);
  687.                         }
  688.                         break;
  689.                     }
  690. diff --git a/L2J_Mobius_C4_ScionsOfDestiny/dist/game/data/scripts/quests/Q293_TheHiddenVeins/Q293_TheHiddenVeins.java b/L2J_Mobius_C4_ScionsOfDestiny/dist/game/data/scripts/quests/Q293_TheHiddenVeins/Q293_TheHiddenVeins.java
  691. index 82c11b2..458325e 100644
  692. --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/game/data/scripts/quests/Q293_TheHiddenVeins/Q293_TheHiddenVeins.java
  693. +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/game/data/scripts/quests/Q293_TheHiddenVeins/Q293_TheHiddenVeins.java
  694. @@ -16,12 +16,14 @@
  695.   */
  696.  package quests.Q293_TheHiddenVeins;
  697.  
  698. +import org.l2jmobius.Config;
  699.  import org.l2jmobius.gameserver.enums.Race;
  700.  import org.l2jmobius.gameserver.model.actor.Npc;
  701.  import org.l2jmobius.gameserver.model.actor.Player;
  702.  import org.l2jmobius.gameserver.model.quest.Quest;
  703.  import org.l2jmobius.gameserver.model.quest.QuestState;
  704.  import org.l2jmobius.gameserver.model.quest.State;
  705. +import org.l2jmobius.gameserver.model.variables.PlayerVariables;
  706.  
  707.  public class Q293_TheHiddenVeins extends Quest
  708.  {
  709. @@ -145,15 +147,23 @@
  710.                                 htmltext = "30535-05.htm";
  711.                             }
  712.                            
  713. -                           final int reward = (chrysoliteOres * 5) + (hiddenVeinMaps * 500) + ((chrysoliteOres >= 10) ? 2000 : 0);
  714.                             st.takeItems(CHRYSOLITE_ORE, -1);
  715.                             st.takeItems(HIDDEN_VEIN_MAP, -1);
  716. +                           int reward = (chrysoliteOres * 10) + (hiddenVeinMaps * 1000);
  717. +                           if (!Config.ALT_VILLAGES_REPEATABLE_QUEST_REWARD && (chrysoliteOres >= 10))
  718. +                           {
  719. +                               reward += 2000;
  720. +                           }
  721. +                          
  722.                             st.rewardItems(57, reward);
  723. -                           if (player.isNewbie() && (st.getInt("Reward") == 0))
  724. +                           // Give newbie reward if player is eligible
  725. +                           int newPlayerRewardsReceived = player.getVariables().getInt(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, 0);
  726. +                           if (player.isNewbie() && (st.getInt("Reward") == 0) && (newPlayerRewardsReceived < 2))
  727.                             {
  728.                                 st.giveItems(SOULSHOT_FOR_BEGINNERS, 6000);
  729.                                 st.playTutorialVoice("tutorial_voice_026");
  730.                                 st.set("Reward", "1");
  731. +                               player.getVariables().set(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, ++newPlayerRewardsReceived);
  732.                             }
  733.                         }
  734.                         break;
  735. diff --git a/L2J_Mobius_C4_ScionsOfDestiny/dist/game/data/scripts/quests/Q296_TarantulasSpiderSilk/Q296_TarantulasSpiderSilk.java b/L2J_Mobius_C4_ScionsOfDestiny/dist/game/data/scripts/quests/Q296_TarantulasSpiderSilk/Q296_TarantulasSpiderSilk.java
  736. index 3418ec4..4190ec5 100644
  737. --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/game/data/scripts/quests/Q296_TarantulasSpiderSilk/Q296_TarantulasSpiderSilk.java
  738. +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/game/data/scripts/quests/Q296_TarantulasSpiderSilk/Q296_TarantulasSpiderSilk.java
  739. @@ -16,6 +16,7 @@
  740.   */
  741.  package quests.Q296_TarantulasSpiderSilk;
  742.  
  743. +import org.l2jmobius.Config;
  744.  import org.l2jmobius.gameserver.model.actor.Npc;
  745.  import org.l2jmobius.gameserver.model.actor.Player;
  746.  import org.l2jmobius.gameserver.model.quest.Quest;
  747. @@ -123,7 +124,14 @@
  748.                         {
  749.                             htmltext = "30519-05.htm";
  750.                             st.takeItems(TARANTULA_SPIDER_SILK, -1);
  751. -                           st.rewardItems(57, ((count >= 10) ? 2000 : 0) + (count * 30));
  752. +                          
  753. +                           int reward = count * 20;
  754. +                           if (!Config.ALT_VILLAGES_REPEATABLE_QUEST_REWARD && (count >= 10))
  755. +                           {
  756. +                               reward += 2000;
  757. +                           }
  758. +                          
  759. +                           st.rewardItems(57, reward);
  760.                         }
  761.                         break;
  762.                     }
  763.                 }
  764. diff --git a/L2J_Mobius_C4_ScionsOfDestiny/dist/game/data/scripts/quests/Q306_CrystalsOfFireAndIce/Q306_CrystalsOfFireAndIce.java b/L2J_Mobius_C4_ScionsOfDestiny/dist/game/data/scripts/quests/Q306_CrystalsOfFireAndIce/Q306_CrystalsOfFireAndIce.java
  765. index f151544..ce90799 100644
  766. --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/game/data/scripts/quests/Q306_CrystalsOfFireAndIce/Q306_CrystalsOfFireAndIce.java
  767. +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/game/data/scripts/quests/Q306_CrystalsOfFireAndIce/Q306_CrystalsOfFireAndIce.java
  768. @@ -16,6 +16,7 @@
  769.   */
  770.  package quests.Q306_CrystalsOfFireAndIce;
  771.  
  772. +import org.l2jmobius.Config;
  773.  import org.l2jmobius.gameserver.model.actor.Npc;
  774.  import org.l2jmobius.gameserver.model.actor.Player;
  775.  import org.l2jmobius.gameserver.model.quest.Quest;
  776. @@ -102,7 +103,14 @@
  777.                     htmltext = "30004-05.htm";
  778.                     st.takeItems(FLAME_SHARD, -1);
  779.                     st.takeItems(ICE_SHARD, -1);
  780. -                   st.rewardItems(57, (30 * totalItems) + ((totalItems > 10) ? 5000 : 0));
  781. +                  
  782. +                   int reward = totalItems * 60;
  783. +                   if (!Config.ALT_VILLAGES_REPEATABLE_QUEST_REWARD && (totalItems >= 10))
  784. +                   {
  785. +                       reward += 5000;
  786. +                   }
  787. +                  
  788. +                   st.rewardItems(57, reward);
  789.                 }
  790.                 break;
  791.             }
  792. diff --git a/L2J_Mobius_C4_ScionsOfDestiny/dist/game/data/scripts/quests/Q316_DestroyPlagueCarriers/Q316_DestroyPlagueCarriers.java b/L2J_Mobius_C4_ScionsOfDestiny/dist/game/data/scripts/quests/Q316_DestroyPlagueCarriers/Q316_DestroyPlagueCarriers.java
  793. index 72ce607..33d53f9 100644
  794. --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/game/data/scripts/quests/Q316_DestroyPlagueCarriers/Q316_DestroyPlagueCarriers.java
  795. +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/game/data/scripts/quests/Q316_DestroyPlagueCarriers/Q316_DestroyPlagueCarriers.java
  796. @@ -16,6 +16,7 @@
  797.   */
  798.  package quests.Q316_DestroyPlagueCarriers;
  799.  
  800. +import org.l2jmobius.Config;
  801.  import org.l2jmobius.gameserver.enums.Race;
  802.  import org.l2jmobius.gameserver.model.actor.Npc;
  803.  import org.l2jmobius.gameserver.model.actor.Player;
  804. @@ -106,7 +107,14 @@
  805.                     htmltext = "30155-07.htm";
  806.                     st.takeItems(WERERAT_FANG, -1);
  807.                     st.takeItems(VAROOL_FOULCLAW_FANG, -1);
  808. -                   st.rewardItems(57, (ratFangs * 30) + (varoolFangs * 10000) + ((ratFangs > 10) ? 5000 : 0));
  809. +                  
  810. +                   int reward = (ratFangs * 60) + (varoolFangs * 10000);
  811. +                   if (!Config.ALT_VILLAGES_REPEATABLE_QUEST_REWARD && (ratFangs >= 10))
  812. +                   {
  813. +                       reward += 5000;
  814. +                   }
  815. +                  
  816. +                   st.rewardItems(57, reward);
  817.                 }
  818.                 break;
  819.             }
  820. diff --git a/L2J_Mobius_C4_ScionsOfDestiny/dist/game/data/scripts/quests/Q317_CatchTheWind/Q317_CatchTheWind.java b/L2J_Mobius_C4_ScionsOfDestiny/dist/game/data/scripts/quests/Q317_CatchTheWind/Q317_CatchTheWind.java
  821. index 67b258c..258430b 100644
  822. --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/game/data/scripts/quests/Q317_CatchTheWind/Q317_CatchTheWind.java
  823. +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/game/data/scripts/quests/Q317_CatchTheWind/Q317_CatchTheWind.java
  824. @@ -16,6 +16,7 @@
  825.   */
  826.  package quests.Q317_CatchTheWind;
  827.  
  828. +import org.l2jmobius.Config;
  829.  import org.l2jmobius.gameserver.model.actor.Npc;
  830.  import org.l2jmobius.gameserver.model.actor.Player;
  831.  import org.l2jmobius.gameserver.model.quest.Quest;
  832. @@ -87,7 +88,14 @@
  833.                 {
  834.                     htmltext = "30361-07.htm";
  835.                     st.takeItems(WIND_SHARD, -1);
  836. -                   st.rewardItems(57, (40 * shards) + (shards >= 10 ? 2988 : 0));
  837. +                  
  838. +                   int reward = 30 * shards;
  839. +                   if (!Config.ALT_VILLAGES_REPEATABLE_QUEST_REWARD && (shards >= 10))
  840. +                   {
  841. +                       reward += 2988;
  842. +                   }
  843. +                  
  844. +                   st.rewardItems(57, reward);
  845.                 }
  846.                 break;
  847.             }
  848. diff --git a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/Config.java b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/Config.java
  849. index 2f23cff..b584ee4 100644
  850. --- a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/Config.java
  851. +++ b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/Config.java
  852. @@ -156,6 +156,7 @@
  853.     public static boolean ALLOW_WEAR;
  854.     public static int WEAR_DELAY;
  855.     public static int WEAR_PRICE;
  856. +   public static boolean ALT_VILLAGES_REPEATABLE_QUEST_REWARD;
  857.     public static boolean ALLOW_LOTTERY;
  858.     public static boolean ALLOW_RACE;
  859.     public static boolean ALLOW_RENTPET;
  860. @@ -1424,6 +1425,7 @@
  861.         ALLOW_WEAR = generalConfig.getBoolean("AllowWear", false);
  862.         WEAR_DELAY = generalConfig.getInt("WearDelay", 5);
  863.         WEAR_PRICE = generalConfig.getInt("WearPrice", 10);
  864. +       ALT_VILLAGES_REPEATABLE_QUEST_REWARD = generalConfig.getBoolean("AltVillagesRepQuestReward", false);
  865.         ALLOW_LOTTERY = generalConfig.getBoolean("AllowLottery", false);
  866.         ALLOW_RACE = generalConfig.getBoolean("AllowRace", false);
  867.         ALLOW_RENTPET = generalConfig.getBoolean("AllowRentPet", false);
  868. diff --git a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/model/actor/Player.java b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/model/actor/Player.java
  869. index 7b23297..b966282 100644
  870. --- a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/model/actor/Player.java
  871. +++ b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/model/actor/Player.java
  872. @@ -541,6 +541,7 @@
  873.         if (Config.ALT_GAME_NEW_CHAR_ALWAYS_IS_NEWBIE)
  874.         {
  875.             player.setNewbie(true);
  876. +           player.getVariables().set(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, 0);
  877.         }
  878.        
  879.         // Add the player in the characters table of the database
  880. diff --git a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/model/variables/PlayerVariables.java b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/model/variables/PlayerVariables.java
  881. index 58bd39b..86440e7 100644
  882. --- a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/model/variables/PlayerVariables.java
  883. +++ b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/model/variables/PlayerVariables.java
  884. @@ -38,6 +38,9 @@
  885.     private static final String DELETE_QUERY = "DELETE FROM character_variables WHERE charId = ?";
  886.     private static final String INSERT_QUERY = "INSERT INTO character_variables (charId, var, val) VALUES (?, ?, ?)";
  887.    
  888. +   // Public variable names
  889. +   public static final String NEW_PLAYERS_REWARDS_RECEIVED = "NEW_PLAYERS_REWARDS_RECEIVED";
  890. +  
  891.     private final int _objectId;
  892.    
  893.     public PlayerVariables(int objectId)
  894.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement