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 index 7f7cbda001..2a828f0419 100644 --- 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 @@ -22,6 +22,7 @@ import org.l2jmobius.gameserver.model.actor.Player; import org.l2jmobius.gameserver.model.quest.Quest; import org.l2jmobius.gameserver.model.quest.QuestState; import org.l2jmobius.gameserver.model.quest.State; +import org.l2jmobius.gameserver.model.variables.PlayerVariables; import org.l2jmobius.gameserver.network.serverpackets.SocialAction; public class Q101_SwordOfSolidarity extends Quest @@ -86,18 +87,22 @@ public class Q101_SwordOfSolidarity extends Quest st.takeItems(BROKEN_SWORD_HANDLE, 1); st.giveItems(SWORD_OF_SOLIDARITY, 1); st.giveItems(LESSER_HEALING_POT, 100); - if (player.isNewbie()) + // Give newbie reward if player is eligible + int newPlayerRewardsReceived = player.getVariables().getInt(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, 0); + if (player.isNewbie() && (newPlayerRewardsReceived < 2)) { st.showQuestionMark(26); if (player.isMageClass()) { st.playTutorialVoice("tutorial_voice_027"); st.giveItems(SPIRITSHOT_FOR_BEGINNERS, 3000); + player.getVariables().set(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, ++newPlayerRewardsReceived); } else { st.playTutorialVoice("tutorial_voice_026"); st.giveItems(SOULSHOT_FOR_BEGINNERS, 7000); + player.getVariables().set(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, ++newPlayerRewardsReceived); } } st.giveItems(ECHO_BATTLE, 10); 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 index 84b235bc06..b6e8d16b40 100644 --- 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 @@ -22,6 +22,7 @@ import org.l2jmobius.gameserver.model.actor.Player; import org.l2jmobius.gameserver.model.quest.Quest; import org.l2jmobius.gameserver.model.quest.QuestState; import org.l2jmobius.gameserver.model.quest.State; +import org.l2jmobius.gameserver.model.variables.PlayerVariables; import org.l2jmobius.gameserver.network.serverpackets.SocialAction; public class Q102_SeaOfSporesFever extends Quest @@ -54,6 +55,9 @@ public class Q102_SeaOfSporesFever extends Quest private static final int ECHO_SOLITUDE = 4414; private static final int ECHO_FEAST = 4415; private static final int ECHO_CELEBRATION = 4416; + // Newbie Rewards + private static final int SPIRITSHOT_FOR_BEGINNERS = 5790; + private static final int SOULSHOT_FOR_BEGINNERS = 5789; public Q102_SeaOfSporesFever() { @@ -155,6 +159,25 @@ public class Q102_SeaOfSporesFever extends Quest st.rewardItems(SOULSHOT_NO_GRADE, 1000); } + // Give newbie reward if player is eligible + int newPlayerRewardsReceived = player.getVariables().getInt(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, 0); + if (player.isNewbie() && (newPlayerRewardsReceived < 2)) + { + st.showQuestionMark(26); + if (player.isMageClass()) + { + st.playTutorialVoice("tutorial_voice_027"); + st.giveItems(SPIRITSHOT_FOR_BEGINNERS, 3000); + player.getVariables().set(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, ++newPlayerRewardsReceived); + } + else + { + st.playTutorialVoice("tutorial_voice_026"); + st.giveItems(SOULSHOT_FOR_BEGINNERS, 7000); + player.getVariables().set(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, ++newPlayerRewardsReceived); + } + } + st.giveItems(LESSER_HEALING_POT, 100); st.giveItems(ECHO_BATTLE, 10); st.giveItems(ECHO_LOVE, 10); 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 index 2189e98785..ffaa48af3a 100644 --- 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 @@ -22,6 +22,7 @@ import org.l2jmobius.gameserver.model.actor.Player; import org.l2jmobius.gameserver.model.quest.Quest; import org.l2jmobius.gameserver.model.quest.QuestState; import org.l2jmobius.gameserver.model.quest.State; +import org.l2jmobius.gameserver.model.variables.PlayerVariables; import org.l2jmobius.gameserver.network.serverpackets.SocialAction; public class Q103_SpiritOfCraftsman extends Quest @@ -134,19 +135,22 @@ public class Q103_SpiritOfCraftsman extends Quest { st.giveItems(SOULSHOT_NO_GRADE, 1000); } - - if (player.isNewbie()) + // Give newbie reward if player is eligible + int newPlayerRewardsReceived = player.getVariables().getInt(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, 0); + if (player.isNewbie() && (newPlayerRewardsReceived < 2)) { st.showQuestionMark(26); if (player.isMageClass()) { st.playTutorialVoice("tutorial_voice_027"); st.giveItems(SPIRITSHOT_FOR_BEGINNERS, 3000); + player.getVariables().set(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, ++newPlayerRewardsReceived); } else { st.playTutorialVoice("tutorial_voice_026"); st.giveItems(SOULSHOT_FOR_BEGINNERS, 7000); + player.getVariables().set(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, ++newPlayerRewardsReceived); } } 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 index d49d267202..f210eabd55 100644 --- 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 @@ -23,6 +23,7 @@ import org.l2jmobius.gameserver.model.itemcontainer.Inventory; import org.l2jmobius.gameserver.model.quest.Quest; import org.l2jmobius.gameserver.model.quest.QuestState; import org.l2jmobius.gameserver.model.quest.State; +import org.l2jmobius.gameserver.model.variables.PlayerVariables; import org.l2jmobius.gameserver.network.serverpackets.SocialAction; public class Q104_SpiritOfMirrors extends Quest @@ -139,19 +140,22 @@ public class Q104_SpiritOfMirrors extends Quest { st.giveItems(SOULSHOT_NO_GRADE, 1000); } - - if (player.isNewbie()) + // Give newbie reward if player is eligible + int newPlayerRewardsReceived = player.getVariables().getInt(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, 0); + if (player.isNewbie() && (newPlayerRewardsReceived < 2)) { st.showQuestionMark(26); if (player.isMageClass()) { st.playTutorialVoice("tutorial_voice_027"); st.giveItems(SPIRITSHOT_FOR_BEGINNERS, 3000); + player.getVariables().set(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, ++newPlayerRewardsReceived); } else { st.playTutorialVoice("tutorial_voice_026"); st.giveItems(SOULSHOT_FOR_BEGINNERS, 7000); + player.getVariables().set(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, ++newPlayerRewardsReceived); } } 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 index ef0fb0cf47..690d960ac3 100644 --- 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 @@ -22,6 +22,7 @@ import org.l2jmobius.gameserver.model.actor.Player; import org.l2jmobius.gameserver.model.quest.Quest; import org.l2jmobius.gameserver.model.quest.QuestState; import org.l2jmobius.gameserver.model.quest.State; +import org.l2jmobius.gameserver.model.variables.PlayerVariables; import org.l2jmobius.gameserver.network.serverpackets.SocialAction; public class Q105_SkirmishWithTheOrcs extends Quest @@ -51,6 +52,7 @@ public class Q105_SkirmishWithTheOrcs extends Quest private static final int SOULSHOT_FOR_BEGINNERS = 5789; private static final int RED_SUNSET_STAFF = 754; private static final int RED_SUNSET_SWORD = 981; + private static final int LESSER_HEALING_POT = 1060; private static final int ECHO_BATTLE = 4412; private static final int ECHO_LOVE = 4413; private static final int ECHO_SOLITUDE = 4414; @@ -153,22 +155,26 @@ public class Q105_SkirmishWithTheOrcs extends Quest { st.giveItems(RED_SUNSET_SWORD, 1); } - - if (player.isNewbie()) + // Give newbie reward if player is eligible + int newPlayerRewardsReceived = player.getVariables().getInt(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, 0); + if (player.isNewbie() && (newPlayerRewardsReceived < 2)) { st.showQuestionMark(26); if (player.isMageClass()) { st.playTutorialVoice("tutorial_voice_027"); st.giveItems(SPIRITSHOT_FOR_BEGINNERS, 3000); + player.getVariables().set(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, ++newPlayerRewardsReceived); } else { st.playTutorialVoice("tutorial_voice_026"); st.giveItems(SOULSHOT_FOR_BEGINNERS, 7000); + player.getVariables().set(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, ++newPlayerRewardsReceived); } } + st.rewardItems(LESSER_HEALING_POT, 100); st.giveItems(ECHO_BATTLE, 10); st.giveItems(ECHO_LOVE, 10); st.giveItems(ECHO_SOLITUDE, 10); 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 index 0e6639b1e0..a8ffc8da8c 100644 --- 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 @@ -22,6 +22,7 @@ import org.l2jmobius.gameserver.model.actor.Player; import org.l2jmobius.gameserver.model.quest.Quest; import org.l2jmobius.gameserver.model.quest.QuestState; import org.l2jmobius.gameserver.model.quest.State; +import org.l2jmobius.gameserver.model.variables.PlayerVariables; import org.l2jmobius.gameserver.network.serverpackets.SocialAction; public class Q106_ForgottenTruth extends Quest @@ -138,19 +139,22 @@ public class Q106_ForgottenTruth extends Quest { st.giveItems(SOULSHOT_NO_GRADE, 1000); } - - if (player.isNewbie()) + // Give newbie reward if player is eligible + int newPlayerRewardsReceived = player.getVariables().getInt(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, 0); + if (player.isNewbie() && (newPlayerRewardsReceived < 2)) { st.showQuestionMark(26); if (player.isMageClass()) { st.playTutorialVoice("tutorial_voice_027"); st.giveItems(SPIRITSHOT_FOR_BEGINNERS, 3000); + player.getVariables().set(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, ++newPlayerRewardsReceived); } else { st.playTutorialVoice("tutorial_voice_026"); - st.giveItems(SOULSHOT_FOR_BEGINNERS, 6000); + st.giveItems(SOULSHOT_FOR_BEGINNERS, 7000); + player.getVariables().set(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, ++newPlayerRewardsReceived); } } 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 index 8aa3b585c2..29b665abf4 100644 --- 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 @@ -22,6 +22,7 @@ import org.l2jmobius.gameserver.model.actor.Player; import org.l2jmobius.gameserver.model.quest.Quest; import org.l2jmobius.gameserver.model.quest.QuestState; import org.l2jmobius.gameserver.model.quest.State; +import org.l2jmobius.gameserver.model.variables.PlayerVariables; import org.l2jmobius.gameserver.network.serverpackets.SocialAction; public class Q107_MercilessPunishment extends Quest @@ -38,7 +39,6 @@ public class Q107_MercilessPunishment extends Quest private static final int LETTER_TO_ELF = 1558; // Rewards private static final int BUTCHER_SWORD = 1510; - private static final int SPIRITSHOT_FOR_BEGINNERS = 5790; private static final int SOULSHOT_FOR_BEGINNERS = 5789; private static final int ECHO_BATTLE = 4412; private static final int ECHO_LOVE = 4413; @@ -162,20 +162,14 @@ public class Q107_MercilessPunishment extends Quest st.giveItems(BUTCHER_SWORD, 1); st.giveItems(LESSER_HEALING_POTION, 100); - - if (player.isNewbie()) + // Give newbie reward if player is eligible + int newPlayerRewardsReceived = player.getVariables().getInt(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, 0); + if (player.isNewbie() && (newPlayerRewardsReceived < 2)) { st.showQuestionMark(26); - if (player.isMageClass()) - { - st.playTutorialVoice("tutorial_voice_027"); - st.giveItems(SPIRITSHOT_FOR_BEGINNERS, 3000); - } - else - { - st.playTutorialVoice("tutorial_voice_026"); - st.giveItems(SOULSHOT_FOR_BEGINNERS, 6000); - } + st.playTutorialVoice("tutorial_voice_026"); + st.giveItems(SOULSHOT_FOR_BEGINNERS, 7000); + player.getVariables().set(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, ++newPlayerRewardsReceived); } st.giveItems(ECHO_BATTLE, 10); 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 index a20fdb1cda..ca9a6c5083 100644 --- 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 @@ -22,6 +22,7 @@ import org.l2jmobius.gameserver.model.actor.Player; import org.l2jmobius.gameserver.model.quest.Quest; import org.l2jmobius.gameserver.model.quest.QuestState; import org.l2jmobius.gameserver.model.quest.State; +import org.l2jmobius.gameserver.model.variables.PlayerVariables; import org.l2jmobius.gameserver.network.serverpackets.SocialAction; public class Q108_JumbleTumbleDiamondFuss extends Quest @@ -184,19 +185,22 @@ public class Q108_JumbleTumbleDiamondFuss extends Quest st.takeItems(STAR_DIAMOND, -1); st.giveItems(SILVERSMITH_HAMMER, 1); st.giveItems(LESSER_HEALING_POTION, 100); - - if (player.isNewbie()) + // Give newbie reward if player is eligible + int newPlayerRewardsReceived = player.getVariables().getInt(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, 0); + if (player.isNewbie() && (newPlayerRewardsReceived < 2)) { st.showQuestionMark(26); if (player.isMageClass()) { st.playTutorialVoice("tutorial_voice_027"); st.giveItems(SPIRITSHOT_FOR_BEGINNERS, 3000); + player.getVariables().set(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, ++newPlayerRewardsReceived); } else { st.playTutorialVoice("tutorial_voice_026"); - st.giveItems(SOULSHOT_FOR_BEGINNERS, 6000); + st.giveItems(SOULSHOT_FOR_BEGINNERS, 7000); + player.getVariables().set(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, ++newPlayerRewardsReceived); } } 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 index 929847c778..1adead4d95 100644 --- 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 @@ -16,11 +16,13 @@ */ package quests.Q257_TheGuardIsBusy; +import org.l2jmobius.gameserver.enums.Race; import org.l2jmobius.gameserver.model.actor.Npc; import org.l2jmobius.gameserver.model.actor.Player; import org.l2jmobius.gameserver.model.quest.Quest; import org.l2jmobius.gameserver.model.quest.QuestState; import org.l2jmobius.gameserver.model.quest.State; +import org.l2jmobius.gameserver.model.variables.PlayerVariables; public class Q257_TheGuardIsBusy extends Quest { @@ -109,21 +111,24 @@ public class Q257_TheGuardIsBusy extends Quest } st.rewardItems(57, reward); - - if (player.isNewbie() && (st.getInt("Reward") == 0)) + // Give newbie reward if player is eligible + int newPlayerRewardsReceived = player.getVariables().getInt(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, 0); + if (player.isNewbie() && (st.getInt("Reward") == 0) && (newPlayerRewardsReceived < 2)) { st.showQuestionMark(26); st.set("Reward", "1"); - if (player.isMageClass()) + if (player.isMageClass() && (player.getRace() != Race.ORC)) { st.playTutorialVoice("tutorial_voice_027"); st.giveItems(SPIRITSHOT_FOR_BEGINNERS, 3000); + player.getVariables().set(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, ++newPlayerRewardsReceived); } else { st.playTutorialVoice("tutorial_voice_026"); st.giveItems(SOULSHOT_FOR_BEGINNERS, 6000); + player.getVariables().set(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, ++newPlayerRewardsReceived); } } } 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 index 6304b30f52..793b73479b 100644 --- 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 @@ -22,6 +22,7 @@ import org.l2jmobius.gameserver.model.actor.Player; import org.l2jmobius.gameserver.model.quest.Quest; import org.l2jmobius.gameserver.model.quest.QuestState; import org.l2jmobius.gameserver.model.quest.State; +import org.l2jmobius.gameserver.model.variables.PlayerVariables; public class Q260_HuntTheOrcs extends Quest { @@ -37,6 +38,9 @@ public class Q260_HuntTheOrcs extends Quest // Items private static final int ORC_AMULET = 1114; private static final int ORC_NECKLACE = 1115; + // Newbie Items + private static final int SPIRITSHOT_FOR_BEGINNERS = 5790; + private static final int SOULSHOT_FOR_BEGINNERS = 5789; public Q260_HuntTheOrcs() { @@ -113,6 +117,26 @@ public class Q260_HuntTheOrcs extends Quest st.takeItems(ORC_AMULET, -1); st.takeItems(ORC_NECKLACE, -1); st.rewardItems(57, (amulet * 5) + (necklace * 15)); + // Give newbie reward if player is eligible + int newPlayerRewardsReceived = player.getVariables().getInt(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, 0); + if (player.isNewbie() && (st.getInt("Reward") == 0) && (newPlayerRewardsReceived < 2)) + { + st.showQuestionMark(26); + st.set("Reward", "1"); + + if (player.isMageClass()) + { + st.playTutorialVoice("tutorial_voice_027"); + st.giveItems(SPIRITSHOT_FOR_BEGINNERS, 3000); + player.getVariables().set(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, ++newPlayerRewardsReceived); + } + else + { + st.playTutorialVoice("tutorial_voice_026"); + st.giveItems(SOULSHOT_FOR_BEGINNERS, 6000); + player.getVariables().set(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, ++newPlayerRewardsReceived); + } + } } break; } 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 index db7e0cae39..c680365b84 100644 --- 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 @@ -22,6 +22,7 @@ import org.l2jmobius.gameserver.model.actor.Player; import org.l2jmobius.gameserver.model.quest.Quest; import org.l2jmobius.gameserver.model.quest.QuestState; import org.l2jmobius.gameserver.model.quest.State; +import org.l2jmobius.gameserver.model.variables.PlayerVariables; public class Q265_ChainsOfSlavery extends Quest { @@ -109,8 +110,9 @@ public class Q265_ChainsOfSlavery extends Quest htmltext = "30357-05.htm"; st.takeItems(SHACKLE, -1); st.rewardItems(57, reward); - - if (player.isNewbie() && (st.getInt("Reward") == 0)) + // Give newbie reward if player is eligible + int newPlayerRewardsReceived = player.getVariables().getInt(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, 0); + if (player.isNewbie() && (st.getInt("Reward") == 0) && (newPlayerRewardsReceived < 2)) { st.showQuestionMark(26); st.set("Reward", "1"); @@ -119,11 +121,13 @@ public class Q265_ChainsOfSlavery extends Quest { st.playTutorialVoice("tutorial_voice_027"); st.giveItems(SPIRITSHOT_FOR_BEGINNERS, 3000); + player.getVariables().set(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, ++newPlayerRewardsReceived); } else { st.playTutorialVoice("tutorial_voice_026"); st.giveItems(SOULSHOT_FOR_BEGINNERS, 6000); + player.getVariables().set(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, ++newPlayerRewardsReceived); } } } 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 index 0871e9959d..5f0780f9bd 100644 --- 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 @@ -22,6 +22,7 @@ import org.l2jmobius.gameserver.model.actor.Player; import org.l2jmobius.gameserver.model.quest.Quest; import org.l2jmobius.gameserver.model.quest.QuestState; import org.l2jmobius.gameserver.model.quest.State; +import org.l2jmobius.gameserver.model.variables.PlayerVariables; public class Q273_InvadersOfTheHolyLand extends Quest { @@ -114,11 +115,14 @@ public class Q273_InvadersOfTheHolyLand extends Quest st.takeItems(BLACK_SOULSTONE, -1); st.takeItems(RED_SOULSTONE, -1); st.rewardItems(57, reward); - if (player.isNewbie() && (st.getInt("Reward") == 0)) + // Give newbie reward if player is eligible + int newPlayerRewardsReceived = player.getVariables().getInt(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, 0); + if (player.isNewbie() && (st.getInt("Reward") == 0) && (newPlayerRewardsReceived < 2)) { st.giveItems(SOULSHOT_FOR_BEGINNERS, 6000); st.playTutorialVoice("tutorial_voice_026"); st.set("Reward", "1"); + player.getVariables().set(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, ++newPlayerRewardsReceived); } } break; 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 index 01e57ed269..bc9ada7d72 100644 --- 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 @@ -22,6 +22,7 @@ import org.l2jmobius.gameserver.model.actor.Player; import org.l2jmobius.gameserver.model.quest.Quest; import org.l2jmobius.gameserver.model.quest.QuestState; import org.l2jmobius.gameserver.model.quest.State; +import org.l2jmobius.gameserver.model.variables.PlayerVariables; public class Q293_TheHiddenVeins extends Quest { @@ -149,11 +150,14 @@ public class Q293_TheHiddenVeins extends Quest st.takeItems(CHRYSOLITE_ORE, -1); st.takeItems(HIDDEN_VEIN_MAP, -1); st.rewardItems(57, reward); - if (player.isNewbie() && (st.getInt("Reward") == 0)) + // Give newbie reward if player is eligible + int newPlayerRewardsReceived = player.getVariables().getInt(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, 0); + if (player.isNewbie() && (st.getInt("Reward") == 0) && (newPlayerRewardsReceived < 2)) { st.giveItems(SOULSHOT_FOR_BEGINNERS, 6000); st.playTutorialVoice("tutorial_voice_026"); st.set("Reward", "1"); + player.getVariables().set(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, ++newPlayerRewardsReceived); } } break; 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 index 4dd851ea3e..dd327467dc 100644 --- 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 @@ -543,6 +543,7 @@ public class Player extends Playable if (Config.ALT_GAME_NEW_CHAR_ALWAYS_IS_NEWBIE) { player.setNewbie(true); + player.getVariables().set(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, 0); } // Add the player in the characters table of the database 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 index be66a44a4a..9bcc4b2ca7 100644 --- 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 @@ -38,6 +38,9 @@ public class PlayerVariables extends AbstractVariables private static final String DELETE_QUERY = "DELETE FROM character_variables WHERE charId = ?"; private static final String INSERT_QUERY = "INSERT INTO character_variables (charId, var, val) VALUES (?, ?, ?)"; + // Public variable names + public static final String NEW_PLAYERS_REWARDS_RECEIVED = "NEW_PLAYERS_REWARDS_RECEIVED"; + private final int _objectId; public PlayerVariables(int objectId) diff --git a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q101_SwordOfSolidarity/Q101_SwordOfSolidarity.java b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q101_SwordOfSolidarity/Q101_SwordOfSolidarity.java index 7f7cbda001..2a828f0419 100644 --- a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q101_SwordOfSolidarity/Q101_SwordOfSolidarity.java +++ b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q101_SwordOfSolidarity/Q101_SwordOfSolidarity.java @@ -22,6 +22,7 @@ import org.l2jmobius.gameserver.model.actor.Player; import org.l2jmobius.gameserver.model.quest.Quest; import org.l2jmobius.gameserver.model.quest.QuestState; import org.l2jmobius.gameserver.model.quest.State; +import org.l2jmobius.gameserver.model.variables.PlayerVariables; import org.l2jmobius.gameserver.network.serverpackets.SocialAction; public class Q101_SwordOfSolidarity extends Quest @@ -86,18 +87,22 @@ public class Q101_SwordOfSolidarity extends Quest st.takeItems(BROKEN_SWORD_HANDLE, 1); st.giveItems(SWORD_OF_SOLIDARITY, 1); st.giveItems(LESSER_HEALING_POT, 100); - if (player.isNewbie()) + // Give newbie reward if player is eligible + int newPlayerRewardsReceived = player.getVariables().getInt(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, 0); + if (player.isNewbie() && (newPlayerRewardsReceived < 2)) { st.showQuestionMark(26); if (player.isMageClass()) { st.playTutorialVoice("tutorial_voice_027"); st.giveItems(SPIRITSHOT_FOR_BEGINNERS, 3000); + player.getVariables().set(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, ++newPlayerRewardsReceived); } else { st.playTutorialVoice("tutorial_voice_026"); st.giveItems(SOULSHOT_FOR_BEGINNERS, 7000); + player.getVariables().set(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, ++newPlayerRewardsReceived); } } st.giveItems(ECHO_BATTLE, 10); diff --git a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q102_SeaOfSporesFever/Q102_SeaOfSporesFever.java b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q102_SeaOfSporesFever/Q102_SeaOfSporesFever.java index 84b235bc06..b6e8d16b40 100644 --- a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q102_SeaOfSporesFever/Q102_SeaOfSporesFever.java +++ b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q102_SeaOfSporesFever/Q102_SeaOfSporesFever.java @@ -22,6 +22,7 @@ import org.l2jmobius.gameserver.model.actor.Player; import org.l2jmobius.gameserver.model.quest.Quest; import org.l2jmobius.gameserver.model.quest.QuestState; import org.l2jmobius.gameserver.model.quest.State; +import org.l2jmobius.gameserver.model.variables.PlayerVariables; import org.l2jmobius.gameserver.network.serverpackets.SocialAction; public class Q102_SeaOfSporesFever extends Quest @@ -54,6 +55,9 @@ public class Q102_SeaOfSporesFever extends Quest private static final int ECHO_SOLITUDE = 4414; private static final int ECHO_FEAST = 4415; private static final int ECHO_CELEBRATION = 4416; + // Newbie Rewards + private static final int SPIRITSHOT_FOR_BEGINNERS = 5790; + private static final int SOULSHOT_FOR_BEGINNERS = 5789; public Q102_SeaOfSporesFever() { @@ -155,6 +159,25 @@ public class Q102_SeaOfSporesFever extends Quest st.rewardItems(SOULSHOT_NO_GRADE, 1000); } + // Give newbie reward if player is eligible + int newPlayerRewardsReceived = player.getVariables().getInt(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, 0); + if (player.isNewbie() && (newPlayerRewardsReceived < 2)) + { + st.showQuestionMark(26); + if (player.isMageClass()) + { + st.playTutorialVoice("tutorial_voice_027"); + st.giveItems(SPIRITSHOT_FOR_BEGINNERS, 3000); + player.getVariables().set(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, ++newPlayerRewardsReceived); + } + else + { + st.playTutorialVoice("tutorial_voice_026"); + st.giveItems(SOULSHOT_FOR_BEGINNERS, 7000); + player.getVariables().set(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, ++newPlayerRewardsReceived); + } + } + st.giveItems(LESSER_HEALING_POT, 100); st.giveItems(ECHO_BATTLE, 10); st.giveItems(ECHO_LOVE, 10); diff --git a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q103_SpiritOfCraftsman/Q103_SpiritOfCraftsman.java b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q103_SpiritOfCraftsman/Q103_SpiritOfCraftsman.java index 2189e98785..ffaa48af3a 100644 --- a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q103_SpiritOfCraftsman/Q103_SpiritOfCraftsman.java +++ b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q103_SpiritOfCraftsman/Q103_SpiritOfCraftsman.java @@ -22,6 +22,7 @@ import org.l2jmobius.gameserver.model.actor.Player; import org.l2jmobius.gameserver.model.quest.Quest; import org.l2jmobius.gameserver.model.quest.QuestState; import org.l2jmobius.gameserver.model.quest.State; +import org.l2jmobius.gameserver.model.variables.PlayerVariables; import org.l2jmobius.gameserver.network.serverpackets.SocialAction; public class Q103_SpiritOfCraftsman extends Quest @@ -134,19 +135,22 @@ public class Q103_SpiritOfCraftsman extends Quest { st.giveItems(SOULSHOT_NO_GRADE, 1000); } - - if (player.isNewbie()) + // Give newbie reward if player is eligible + int newPlayerRewardsReceived = player.getVariables().getInt(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, 0); + if (player.isNewbie() && (newPlayerRewardsReceived < 2)) { st.showQuestionMark(26); if (player.isMageClass()) { st.playTutorialVoice("tutorial_voice_027"); st.giveItems(SPIRITSHOT_FOR_BEGINNERS, 3000); + player.getVariables().set(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, ++newPlayerRewardsReceived); } else { st.playTutorialVoice("tutorial_voice_026"); st.giveItems(SOULSHOT_FOR_BEGINNERS, 7000); + player.getVariables().set(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, ++newPlayerRewardsReceived); } } diff --git a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q104_SpiritOfMirrors/Q104_SpiritOfMirrors.java b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q104_SpiritOfMirrors/Q104_SpiritOfMirrors.java index d49d267202..f210eabd55 100644 --- a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q104_SpiritOfMirrors/Q104_SpiritOfMirrors.java +++ b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q104_SpiritOfMirrors/Q104_SpiritOfMirrors.java @@ -23,6 +23,7 @@ import org.l2jmobius.gameserver.model.itemcontainer.Inventory; import org.l2jmobius.gameserver.model.quest.Quest; import org.l2jmobius.gameserver.model.quest.QuestState; import org.l2jmobius.gameserver.model.quest.State; +import org.l2jmobius.gameserver.model.variables.PlayerVariables; import org.l2jmobius.gameserver.network.serverpackets.SocialAction; public class Q104_SpiritOfMirrors extends Quest @@ -139,19 +140,22 @@ public class Q104_SpiritOfMirrors extends Quest { st.giveItems(SOULSHOT_NO_GRADE, 1000); } - - if (player.isNewbie()) + // Give newbie reward if player is eligible + int newPlayerRewardsReceived = player.getVariables().getInt(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, 0); + if (player.isNewbie() && (newPlayerRewardsReceived < 2)) { st.showQuestionMark(26); if (player.isMageClass()) { st.playTutorialVoice("tutorial_voice_027"); st.giveItems(SPIRITSHOT_FOR_BEGINNERS, 3000); + player.getVariables().set(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, ++newPlayerRewardsReceived); } else { st.playTutorialVoice("tutorial_voice_026"); st.giveItems(SOULSHOT_FOR_BEGINNERS, 7000); + player.getVariables().set(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, ++newPlayerRewardsReceived); } } diff --git a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q105_SkirmishWithTheOrcs/Q105_SkirmishWithTheOrcs.java b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q105_SkirmishWithTheOrcs/Q105_SkirmishWithTheOrcs.java index ef0fb0cf47..690d960ac3 100644 --- a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q105_SkirmishWithTheOrcs/Q105_SkirmishWithTheOrcs.java +++ b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q105_SkirmishWithTheOrcs/Q105_SkirmishWithTheOrcs.java @@ -22,6 +22,7 @@ import org.l2jmobius.gameserver.model.actor.Player; import org.l2jmobius.gameserver.model.quest.Quest; import org.l2jmobius.gameserver.model.quest.QuestState; import org.l2jmobius.gameserver.model.quest.State; +import org.l2jmobius.gameserver.model.variables.PlayerVariables; import org.l2jmobius.gameserver.network.serverpackets.SocialAction; public class Q105_SkirmishWithTheOrcs extends Quest @@ -51,6 +52,7 @@ public class Q105_SkirmishWithTheOrcs extends Quest private static final int SOULSHOT_FOR_BEGINNERS = 5789; private static final int RED_SUNSET_STAFF = 754; private static final int RED_SUNSET_SWORD = 981; + private static final int LESSER_HEALING_POT = 1060; private static final int ECHO_BATTLE = 4412; private static final int ECHO_LOVE = 4413; private static final int ECHO_SOLITUDE = 4414; @@ -153,22 +155,26 @@ public class Q105_SkirmishWithTheOrcs extends Quest { st.giveItems(RED_SUNSET_SWORD, 1); } - - if (player.isNewbie()) + // Give newbie reward if player is eligible + int newPlayerRewardsReceived = player.getVariables().getInt(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, 0); + if (player.isNewbie() && (newPlayerRewardsReceived < 2)) { st.showQuestionMark(26); if (player.isMageClass()) { st.playTutorialVoice("tutorial_voice_027"); st.giveItems(SPIRITSHOT_FOR_BEGINNERS, 3000); + player.getVariables().set(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, ++newPlayerRewardsReceived); } else { st.playTutorialVoice("tutorial_voice_026"); st.giveItems(SOULSHOT_FOR_BEGINNERS, 7000); + player.getVariables().set(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, ++newPlayerRewardsReceived); } } + st.rewardItems(LESSER_HEALING_POT, 100); st.giveItems(ECHO_BATTLE, 10); st.giveItems(ECHO_LOVE, 10); st.giveItems(ECHO_SOLITUDE, 10); diff --git a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q106_ForgottenTruth/Q106_ForgottenTruth.java b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q106_ForgottenTruth/Q106_ForgottenTruth.java index 0e6639b1e0..a8ffc8da8c 100644 --- a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q106_ForgottenTruth/Q106_ForgottenTruth.java +++ b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q106_ForgottenTruth/Q106_ForgottenTruth.java @@ -22,6 +22,7 @@ import org.l2jmobius.gameserver.model.actor.Player; import org.l2jmobius.gameserver.model.quest.Quest; import org.l2jmobius.gameserver.model.quest.QuestState; import org.l2jmobius.gameserver.model.quest.State; +import org.l2jmobius.gameserver.model.variables.PlayerVariables; import org.l2jmobius.gameserver.network.serverpackets.SocialAction; public class Q106_ForgottenTruth extends Quest @@ -138,19 +139,22 @@ public class Q106_ForgottenTruth extends Quest { st.giveItems(SOULSHOT_NO_GRADE, 1000); } - - if (player.isNewbie()) + // Give newbie reward if player is eligible + int newPlayerRewardsReceived = player.getVariables().getInt(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, 0); + if (player.isNewbie() && (newPlayerRewardsReceived < 2)) { st.showQuestionMark(26); if (player.isMageClass()) { st.playTutorialVoice("tutorial_voice_027"); st.giveItems(SPIRITSHOT_FOR_BEGINNERS, 3000); + player.getVariables().set(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, ++newPlayerRewardsReceived); } else { st.playTutorialVoice("tutorial_voice_026"); - st.giveItems(SOULSHOT_FOR_BEGINNERS, 6000); + st.giveItems(SOULSHOT_FOR_BEGINNERS, 7000); + player.getVariables().set(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, ++newPlayerRewardsReceived); } } diff --git a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q107_MercilessPunishment/Q107_MercilessPunishment.java b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q107_MercilessPunishment/Q107_MercilessPunishment.java index 8aa3b585c2..29b665abf4 100644 --- a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q107_MercilessPunishment/Q107_MercilessPunishment.java +++ b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q107_MercilessPunishment/Q107_MercilessPunishment.java @@ -22,6 +22,7 @@ import org.l2jmobius.gameserver.model.actor.Player; import org.l2jmobius.gameserver.model.quest.Quest; import org.l2jmobius.gameserver.model.quest.QuestState; import org.l2jmobius.gameserver.model.quest.State; +import org.l2jmobius.gameserver.model.variables.PlayerVariables; import org.l2jmobius.gameserver.network.serverpackets.SocialAction; public class Q107_MercilessPunishment extends Quest @@ -38,7 +39,6 @@ public class Q107_MercilessPunishment extends Quest private static final int LETTER_TO_ELF = 1558; // Rewards private static final int BUTCHER_SWORD = 1510; - private static final int SPIRITSHOT_FOR_BEGINNERS = 5790; private static final int SOULSHOT_FOR_BEGINNERS = 5789; private static final int ECHO_BATTLE = 4412; private static final int ECHO_LOVE = 4413; @@ -162,20 +162,14 @@ public class Q107_MercilessPunishment extends Quest st.giveItems(BUTCHER_SWORD, 1); st.giveItems(LESSER_HEALING_POTION, 100); - - if (player.isNewbie()) + // Give newbie reward if player is eligible + int newPlayerRewardsReceived = player.getVariables().getInt(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, 0); + if (player.isNewbie() && (newPlayerRewardsReceived < 2)) { st.showQuestionMark(26); - if (player.isMageClass()) - { - st.playTutorialVoice("tutorial_voice_027"); - st.giveItems(SPIRITSHOT_FOR_BEGINNERS, 3000); - } - else - { - st.playTutorialVoice("tutorial_voice_026"); - st.giveItems(SOULSHOT_FOR_BEGINNERS, 6000); - } + st.playTutorialVoice("tutorial_voice_026"); + st.giveItems(SOULSHOT_FOR_BEGINNERS, 7000); + player.getVariables().set(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, ++newPlayerRewardsReceived); } st.giveItems(ECHO_BATTLE, 10); diff --git a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q108_JumbleTumbleDiamondFuss/Q108_JumbleTumbleDiamondFuss.java b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q108_JumbleTumbleDiamondFuss/Q108_JumbleTumbleDiamondFuss.java index a20fdb1cda..ca9a6c5083 100644 --- a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q108_JumbleTumbleDiamondFuss/Q108_JumbleTumbleDiamondFuss.java +++ b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q108_JumbleTumbleDiamondFuss/Q108_JumbleTumbleDiamondFuss.java @@ -22,6 +22,7 @@ import org.l2jmobius.gameserver.model.actor.Player; import org.l2jmobius.gameserver.model.quest.Quest; import org.l2jmobius.gameserver.model.quest.QuestState; import org.l2jmobius.gameserver.model.quest.State; +import org.l2jmobius.gameserver.model.variables.PlayerVariables; import org.l2jmobius.gameserver.network.serverpackets.SocialAction; public class Q108_JumbleTumbleDiamondFuss extends Quest @@ -184,19 +185,22 @@ public class Q108_JumbleTumbleDiamondFuss extends Quest st.takeItems(STAR_DIAMOND, -1); st.giveItems(SILVERSMITH_HAMMER, 1); st.giveItems(LESSER_HEALING_POTION, 100); - - if (player.isNewbie()) + // Give newbie reward if player is eligible + int newPlayerRewardsReceived = player.getVariables().getInt(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, 0); + if (player.isNewbie() && (newPlayerRewardsReceived < 2)) { st.showQuestionMark(26); if (player.isMageClass()) { st.playTutorialVoice("tutorial_voice_027"); st.giveItems(SPIRITSHOT_FOR_BEGINNERS, 3000); + player.getVariables().set(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, ++newPlayerRewardsReceived); } else { st.playTutorialVoice("tutorial_voice_026"); - st.giveItems(SOULSHOT_FOR_BEGINNERS, 6000); + st.giveItems(SOULSHOT_FOR_BEGINNERS, 7000); + player.getVariables().set(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, ++newPlayerRewardsReceived); } } diff --git a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q257_TheGuardIsBusy/Q257_TheGuardIsBusy.java b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q257_TheGuardIsBusy/Q257_TheGuardIsBusy.java index 929847c778..1adead4d95 100644 --- a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q257_TheGuardIsBusy/Q257_TheGuardIsBusy.java +++ b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q257_TheGuardIsBusy/Q257_TheGuardIsBusy.java @@ -16,11 +16,13 @@ */ package quests.Q257_TheGuardIsBusy; +import org.l2jmobius.gameserver.enums.Race; import org.l2jmobius.gameserver.model.actor.Npc; import org.l2jmobius.gameserver.model.actor.Player; import org.l2jmobius.gameserver.model.quest.Quest; import org.l2jmobius.gameserver.model.quest.QuestState; import org.l2jmobius.gameserver.model.quest.State; +import org.l2jmobius.gameserver.model.variables.PlayerVariables; public class Q257_TheGuardIsBusy extends Quest { @@ -109,21 +111,24 @@ public class Q257_TheGuardIsBusy extends Quest } st.rewardItems(57, reward); - - if (player.isNewbie() && (st.getInt("Reward") == 0)) + // Give newbie reward if player is eligible + int newPlayerRewardsReceived = player.getVariables().getInt(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, 0); + if (player.isNewbie() && (st.getInt("Reward") == 0) && (newPlayerRewardsReceived < 2)) { st.showQuestionMark(26); st.set("Reward", "1"); - if (player.isMageClass()) + if (player.isMageClass() && (player.getRace() != Race.ORC)) { st.playTutorialVoice("tutorial_voice_027"); st.giveItems(SPIRITSHOT_FOR_BEGINNERS, 3000); + player.getVariables().set(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, ++newPlayerRewardsReceived); } else { st.playTutorialVoice("tutorial_voice_026"); st.giveItems(SOULSHOT_FOR_BEGINNERS, 6000); + player.getVariables().set(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, ++newPlayerRewardsReceived); } } } diff --git a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q260_HuntTheOrcs/Q260_HuntTheOrcs.java b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q260_HuntTheOrcs/Q260_HuntTheOrcs.java index 6304b30f52..793b73479b 100644 --- a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q260_HuntTheOrcs/Q260_HuntTheOrcs.java +++ b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q260_HuntTheOrcs/Q260_HuntTheOrcs.java @@ -22,6 +22,7 @@ import org.l2jmobius.gameserver.model.actor.Player; import org.l2jmobius.gameserver.model.quest.Quest; import org.l2jmobius.gameserver.model.quest.QuestState; import org.l2jmobius.gameserver.model.quest.State; +import org.l2jmobius.gameserver.model.variables.PlayerVariables; public class Q260_HuntTheOrcs extends Quest { @@ -37,6 +38,9 @@ public class Q260_HuntTheOrcs extends Quest // Items private static final int ORC_AMULET = 1114; private static final int ORC_NECKLACE = 1115; + // Newbie Items + private static final int SPIRITSHOT_FOR_BEGINNERS = 5790; + private static final int SOULSHOT_FOR_BEGINNERS = 5789; public Q260_HuntTheOrcs() { @@ -113,6 +117,26 @@ public class Q260_HuntTheOrcs extends Quest st.takeItems(ORC_AMULET, -1); st.takeItems(ORC_NECKLACE, -1); st.rewardItems(57, (amulet * 5) + (necklace * 15)); + // Give newbie reward if player is eligible + int newPlayerRewardsReceived = player.getVariables().getInt(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, 0); + if (player.isNewbie() && (st.getInt("Reward") == 0) && (newPlayerRewardsReceived < 2)) + { + st.showQuestionMark(26); + st.set("Reward", "1"); + + if (player.isMageClass()) + { + st.playTutorialVoice("tutorial_voice_027"); + st.giveItems(SPIRITSHOT_FOR_BEGINNERS, 3000); + player.getVariables().set(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, ++newPlayerRewardsReceived); + } + else + { + st.playTutorialVoice("tutorial_voice_026"); + st.giveItems(SOULSHOT_FOR_BEGINNERS, 6000); + player.getVariables().set(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, ++newPlayerRewardsReceived); + } + } } break; } diff --git a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q265_ChainsOfSlavery/Q265_ChainsOfSlavery.java b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q265_ChainsOfSlavery/Q265_ChainsOfSlavery.java index db7e0cae39..c680365b84 100644 --- a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q265_ChainsOfSlavery/Q265_ChainsOfSlavery.java +++ b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q265_ChainsOfSlavery/Q265_ChainsOfSlavery.java @@ -22,6 +22,7 @@ import org.l2jmobius.gameserver.model.actor.Player; import org.l2jmobius.gameserver.model.quest.Quest; import org.l2jmobius.gameserver.model.quest.QuestState; import org.l2jmobius.gameserver.model.quest.State; +import org.l2jmobius.gameserver.model.variables.PlayerVariables; public class Q265_ChainsOfSlavery extends Quest { @@ -109,8 +110,9 @@ public class Q265_ChainsOfSlavery extends Quest htmltext = "30357-05.htm"; st.takeItems(SHACKLE, -1); st.rewardItems(57, reward); - - if (player.isNewbie() && (st.getInt("Reward") == 0)) + // Give newbie reward if player is eligible + int newPlayerRewardsReceived = player.getVariables().getInt(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, 0); + if (player.isNewbie() && (st.getInt("Reward") == 0) && (newPlayerRewardsReceived < 2)) { st.showQuestionMark(26); st.set("Reward", "1"); @@ -119,11 +121,13 @@ public class Q265_ChainsOfSlavery extends Quest { st.playTutorialVoice("tutorial_voice_027"); st.giveItems(SPIRITSHOT_FOR_BEGINNERS, 3000); + player.getVariables().set(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, ++newPlayerRewardsReceived); } else { st.playTutorialVoice("tutorial_voice_026"); st.giveItems(SOULSHOT_FOR_BEGINNERS, 6000); + player.getVariables().set(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, ++newPlayerRewardsReceived); } } } diff --git a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q273_InvadersOfTheHolyLand/Q273_InvadersOfTheHolyLand.java b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q273_InvadersOfTheHolyLand/Q273_InvadersOfTheHolyLand.java index 0871e9959d..5f0780f9bd 100644 --- a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q273_InvadersOfTheHolyLand/Q273_InvadersOfTheHolyLand.java +++ b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q273_InvadersOfTheHolyLand/Q273_InvadersOfTheHolyLand.java @@ -22,6 +22,7 @@ import org.l2jmobius.gameserver.model.actor.Player; import org.l2jmobius.gameserver.model.quest.Quest; import org.l2jmobius.gameserver.model.quest.QuestState; import org.l2jmobius.gameserver.model.quest.State; +import org.l2jmobius.gameserver.model.variables.PlayerVariables; public class Q273_InvadersOfTheHolyLand extends Quest { @@ -114,11 +115,14 @@ public class Q273_InvadersOfTheHolyLand extends Quest st.takeItems(BLACK_SOULSTONE, -1); st.takeItems(RED_SOULSTONE, -1); st.rewardItems(57, reward); - if (player.isNewbie() && (st.getInt("Reward") == 0)) + // Give newbie reward if player is eligible + int newPlayerRewardsReceived = player.getVariables().getInt(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, 0); + if (player.isNewbie() && (st.getInt("Reward") == 0) && (newPlayerRewardsReceived < 2)) { st.giveItems(SOULSHOT_FOR_BEGINNERS, 6000); st.playTutorialVoice("tutorial_voice_026"); st.set("Reward", "1"); + player.getVariables().set(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, ++newPlayerRewardsReceived); } } break; diff --git a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q293_TheHiddenVeins/Q293_TheHiddenVeins.java b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q293_TheHiddenVeins/Q293_TheHiddenVeins.java index 01e57ed269..bc9ada7d72 100644 --- a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q293_TheHiddenVeins/Q293_TheHiddenVeins.java +++ b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q293_TheHiddenVeins/Q293_TheHiddenVeins.java @@ -22,6 +22,7 @@ import org.l2jmobius.gameserver.model.actor.Player; import org.l2jmobius.gameserver.model.quest.Quest; import org.l2jmobius.gameserver.model.quest.QuestState; import org.l2jmobius.gameserver.model.quest.State; +import org.l2jmobius.gameserver.model.variables.PlayerVariables; public class Q293_TheHiddenVeins extends Quest { @@ -149,11 +150,14 @@ public class Q293_TheHiddenVeins extends Quest st.takeItems(CHRYSOLITE_ORE, -1); st.takeItems(HIDDEN_VEIN_MAP, -1); st.rewardItems(57, reward); - if (player.isNewbie() && (st.getInt("Reward") == 0)) + // Give newbie reward if player is eligible + int newPlayerRewardsReceived = player.getVariables().getInt(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, 0); + if (player.isNewbie() && (st.getInt("Reward") == 0) && (newPlayerRewardsReceived < 2)) { st.giveItems(SOULSHOT_FOR_BEGINNERS, 6000); st.playTutorialVoice("tutorial_voice_026"); st.set("Reward", "1"); + player.getVariables().set(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, ++newPlayerRewardsReceived); } } break; diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/actor/Player.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/actor/Player.java index c230f914be..c2bc026f1e 100644 --- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/actor/Player.java +++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/actor/Player.java @@ -557,6 +557,7 @@ public class Player extends Playable if (Config.ALT_GAME_NEW_CHAR_ALWAYS_IS_NEWBIE) { player.setNewbie(true); + player.getVariables().set(PlayerVariables.NEW_PLAYERS_REWARDS_RECEIVED, 0); } // Add the player in the characters table of the database diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/variables/PlayerVariables.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/variables/PlayerVariables.java index be66a44a4a..9bcc4b2ca7 100644 --- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/variables/PlayerVariables.java +++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/variables/PlayerVariables.java @@ -38,6 +38,9 @@ public class PlayerVariables extends AbstractVariables private static final String DELETE_QUERY = "DELETE FROM character_variables WHERE charId = ?"; private static final String INSERT_QUERY = "INSERT INTO character_variables (charId, var, val) VALUES (?, ?, ?)"; + // Public variable names + public static final String NEW_PLAYERS_REWARDS_RECEIVED = "NEW_PLAYERS_REWARDS_RECEIVED"; + private final int _objectId; public PlayerVariables(int objectId)