Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/aCis_datapack/data/html/script/feature/TutorialQuest/60050-03.htm b/aCis_datapack/data/html/script/feature/TutorialQuest/60050-03.htm
- new file mode 100644
- index 0000000..79c6646
- --- /dev/null
- +++ b/aCis_datapack/data/html/script/feature/TutorialQuest/60050-03.htm
- @@ -0,0 +1,7 @@
- +<html><body>
- +<center><font color="LEVEL">[Welcome Tutorial]</font></center><br>
- +Hello Traveller! Welcome to our Lineage II World.<br>
- +Until level 20, your character is limited to wearing No-Grade items. However, once you reach level 20, you will be able to wear D-Grade items.<br>
- +<font color="LEVEL">For every monster you kill, I have some items to give you and also explain to you about the game. I hope you are doing well and don't encounter any problems.</font><br>
- +<a action="link close">Close window.</a>
- +</body></html>
- \ No newline at end of file
- diff --git a/aCis_datapack/data/html/script/feature/TutorialQuest/60050-06.htm b/aCis_datapack/data/html/script/feature/TutorialQuest/60050-06.htm
- new file mode 100644
- index 0000000..64d7dd7
- --- /dev/null
- +++ b/aCis_datapack/data/html/script/feature/TutorialQuest/60050-06.htm
- @@ -0,0 +1,7 @@
- +<html><body><br>
- +<center><font color="LEVEL">[Acquire Item]</font></center><br>
- +<font color="FF0000">You just obtained your first weapon!</font> This weapon will makes you stronger! Our weapons help us become stronger against other players.<br>
- +Click on the <font color="FF0000">bag</font> on the bottom right screen to open the Inventory Window, or press Tab or ALT+V.<br>
- +<img src="L2UI_CH3.tutorial_img07" width=175 height=64><br>
- +<a action="link close">Close window.</a>
- +</body></html>
- \ No newline at end of file
- diff --git a/aCis_datapack/data/html/script/feature/TutorialQuest/60050-07.htm b/aCis_datapack/data/html/script/feature/TutorialQuest/60050-07.htm
- new file mode 100644
- index 0000000..4bc87e8
- --- /dev/null
- +++ b/aCis_datapack/data/html/script/feature/TutorialQuest/60050-07.htm
- @@ -0,0 +1,7 @@
- +<html><body><br>
- +<center><font color="LEVEL">[Acquire Weapon Item]</font></center><br>
- +<font color="FF0000">Here is your Armor</font>, so that you can be more resilient against monsters or other players. I also gave you some jewels, so that you can take less damage from magic skills.<br>
- +Click on the <font color="FF0000">bag</font> on the bottom right screen to open the Inventory Window, or press Tab or ALT+V.<br>
- +<img src="L2UI_CH3.tutorial_img07" width=175 height=64><br>
- +<a action="link close">Close window.</a>
- +</body></html>
- \ No newline at end of file
- diff --git a/aCis_datapack/data/html/script/feature/TutorialQuest/60050-08.htm b/aCis_datapack/data/html/script/feature/TutorialQuest/60050-08.htm
- new file mode 100644
- index 0000000..8050583
- --- /dev/null
- +++ b/aCis_datapack/data/html/script/feature/TutorialQuest/60050-08.htm
- @@ -0,0 +1,8 @@
- +<html><body><br>
- +<center><font color="LEVEL">[Tutorial Completed]</font></center><br><br>
- +You have just completed the Tutorial with the basic steps to familiarize yourself more with the game<br>
- +You are now ready for the world of Lineage II. You can now explore all the remaining areas within the game!<br><br>
- +<font color="LEVEL">I wish you a pleasant stay! Good luck!</font><br>
- +<center><a action="link move">Move me for more exp.</a><br>
- +<center><a action="link town">Back to Town</a></center>
- +</body></html>
- \ No newline at end of file
- diff --git a/aCis_datapack/data/html/script/feature/TutorialQuest/60050-buff.htm b/aCis_datapack/data/html/script/feature/TutorialQuest/60050-buff.htm
- new file mode 100644
- index 0000000..e3d3ca6
- --- /dev/null
- +++ b/aCis_datapack/data/html/script/feature/TutorialQuest/60050-buff.htm
- @@ -0,0 +1,16 @@
- +<html><body><br>
- +<font color="LEVEL">[Increase your power]</font><br><br>
- +<font color="FF0000">Here are some buffs</font> that will make you stronger and faster in executing your skills.<br>
- +These buffs are available to certain characters such as the Prophet and Shillien Elder.<br>
- +Check your stats, so you can see what each buff offers you. <font color="LEVEL">Make sure you will never run out of buffs.</font><br>
- +<table border="1" bordercolor="#2E9AFE" bgcolor="2E9AFE">
- +<tr>
- +<td width=37 height=39 align=center><img src="icon.skill0364" width=32 height=32></td>
- +<td width=38 height=39 align=center><img src="icon.skill1355" width=32 height=32></td>
- +<td width=37 height=39 align=center><img src="icon.skill1332" width=32 height=32></td>
- +<td width=38 height=39 align=center><img src="icon.skill1352" width=32 height=32></td>
- +</tr>
- +</table>
- +</center>
- +<a action="link close">Close window.</a>
- +</body></html>
- \ No newline at end of file
- diff --git a/aCis_datapack/data/html/script/feature/TutorialQuest/60050-pickup.htm b/aCis_datapack/data/html/script/feature/TutorialQuest/60050-pickup.htm
- new file mode 100644
- index 0000000..bd36644
- --- /dev/null
- +++ b/aCis_datapack/data/html/script/feature/TutorialQuest/60050-pickup.htm
- @@ -0,0 +1,6 @@
- +<html><body>
- +<center><font color="LEVEL">[Picking Up Items]</font></center><br
- +>When you defeat monsters, they drop their items on the ground.<br>
- +Press the <font color="LEVEL">F4 key</font> and you can automatically pick up nearby items. Currently, the fourth slot on the shortcut bar is registered with the pickup action and therefore, when you press the F4 key, that action is activated.<table border=0><tr><td><img src="L2UI_CH3.tutorial_img151" width=64 height=64></td><td><img src="L2UI_CH3.tutorial_img20" width=64 height=64></td></tr></table><br>
- +<a action="link close">Close Window.</a>
- +</body></html>
- \ No newline at end of file
- diff --git a/aCis_datapack/data/html/script/feature/TutorialQuest/60050-skills.htm b/aCis_datapack/data/html/script/feature/TutorialQuest/60050-skills.htm
- new file mode 100644
- index 0000000..fc10cbb
- --- /dev/null
- +++ b/aCis_datapack/data/html/script/feature/TutorialQuest/60050-skills.htm
- @@ -0,0 +1,7 @@
- +<html><body><br>
- +<center><font color="LEVEL">[Skills]</font></center><br><br>
- +Once you reach level 7 or above you will learn new skills. With <font color="LEVEL">"Alt+K"</font> you can check all your available skills. <br>
- +It's important to customize your bar (F keys) with the right skills so that you can easily use them whenever needed.<br>
- +You can also enchant your skills to make them more powerful, so that for example, your chance skills are more effective against monsters or other players.<br>
- +<a action="link close">Close window.</a>
- +</body></html>
- \ No newline at end of file
- diff --git a/aCis_datapack/data/html/script/feature/TutorialQuest/60050-soulshot.htm b/aCis_datapack/data/html/script/feature/TutorialQuest/60050-soulshot.htm
- new file mode 100644
- index 0000000..5df1c58
- --- /dev/null
- +++ b/aCis_datapack/data/html/script/feature/TutorialQuest/60050-soulshot.htm
- @@ -0,0 +1,14 @@
- +<html><body><br>
- +<center><font color="LEVEL">[Soulshots]</font></center><br><br>
- +I just gave you 300 soulshots. Soulshots are useful to make your weapon stronger!<br>
- +Soulshots will be useful to you throughout the game.<br>
- +<table border="1" bordercolor="#2E9AFE" bgcolor="2E9AFE">
- +<tr>
- +<td align=center><img src="icon.etc_spirit_bullet_white_i00" width=32 height=32></td>
- +</tr>
- +</table>
- +</center>
- +Fighter classes use <font color="LEVEL">soulshots</font> and only Mage classes uses <font color="LEVEL">Blessed spirishots</font>.<br>
- +In game you will find and <font color="LEVEL">Spirishots</font> but you will need them for olympiad matches as a Mage class.<br>
- +<a action="link close">Close window.</a>
- +</body></html>
- \ No newline at end of file
- diff --git a/aCis_datapack/data/html/script/feature/TutorialQuest/60050-sp.htm b/aCis_datapack/data/html/script/feature/TutorialQuest/60050-sp.htm
- new file mode 100644
- index 0000000..5b35c5c
- --- /dev/null
- +++ b/aCis_datapack/data/html/script/feature/TutorialQuest/60050-sp.htm
- @@ -0,0 +1,7 @@
- +<html><body>
- +<center><font color="LEVEL">[EXP & SP]</font></center><br>
- +As you kill monsters, you will have noticed that you receive exp & sp. Your exp is useful for leveling up. The more exp you collect, the faster you level up.<br>
- +<font color="LEVEL">On the other hand, you need sp to learn new skills.</font> In every village/town there are Masters where, depending on your class, you can learn some new skills.<br>
- +So, it's important to kill monsters. Also, monsters should not be smaller than you because the smaller the monster compared to your level, the less exp & sp you gain.<br>
- +<a action="link close">Close window.</a>
- +</body></html>
- \ No newline at end of file
- diff --git a/aCis_datapack/data/html/script/feature/TutorialQuest/60050-spiritshot.htm b/aCis_datapack/data/html/script/feature/TutorialQuest/60050-spiritshot.htm
- new file mode 100644
- index 0000000..e92067c
- --- /dev/null
- +++ b/aCis_datapack/data/html/script/feature/TutorialQuest/60050-spiritshot.htm
- @@ -0,0 +1,14 @@
- +<html><body><br>
- +<center><font color="LEVEL">[Blessed Spiritshots]</font></center><br><br>
- +I just gave you 300 Blessed Spiritshot. Spiritshots are useful to make your weapon stronger!<br>
- +Soulshots will be useful to you throughout the game.<br>
- +<table border="1" bordercolor="#2E9AFE" bgcolor="2E9AFE">
- +<tr>
- +<td align=center><img src="icon.etc_spell_shot_white_i01" width=32 height=32></td>
- +</tr>
- +</table>
- +</center>
- +Mage classes use <font color="LEVEL">spiritshots</font> and only Fighter classes uses <font color="LEVEL">soulshots</font>.<br>
- +In game you will find and <font color="LEVEL">Spirishots</font> but you will need them for olympiad matches as a Mage class.<br>
- +<a action="link close">Close window.</a>
- +</body></html>
- \ No newline at end of file
- diff --git a/aCis_datapack/data/html/script/feature/TutorialQuest/60050-view.htm b/aCis_datapack/data/html/script/feature/TutorialQuest/60050-view.htm
- new file mode 100644
- index 0000000..e535103
- --- /dev/null
- +++ b/aCis_datapack/data/html/script/feature/TutorialQuest/60050-view.htm
- @@ -0,0 +1,6 @@
- +<html><body>
- +<center><font color="LEVEL">[Changing Point-Of-View]</font></center><br>
- +Good work! Now, I will explain to you how you can change your point-of-view.<br>
- +<font color="FF0000">Try moving your mouse while pressing down the right button. </font> You can set your viewpoint in any direction.<img src="L2UI_CH3.tutorial_img04" width=128 height=64><br>When you need to examine the area around your character, you can use this feature to change your viewpoint as needed.<br>
- +<a action="link close">Close window.</a>
- +</body></html>
- \ No newline at end of file
- diff --git a/aCis_datapack/data/html/script/feature/TutorialQuest/60050.htm b/aCis_datapack/data/html/script/feature/TutorialQuest/60050.htm
- new file mode 100644
- index 0000000..869f5d6
- --- /dev/null
- +++ b/aCis_datapack/data/html/script/feature/TutorialQuest/60050.htm
- @@ -0,0 +1,8 @@
- +<html><body>
- +<font color="LEVEL">[Tutorial Window]</font><br>
- +Welcome Traveller! Welcome to our Lineage II World.<br>
- +I have some items to give you and also explain to you about the game. The tutorial will help you with your first steps.</font><br>
- +You can choose to decline the quest and continue without guidance. <font color="LEVEL">However, you will not benefit from the items/buffs that this tutorial provides.</font><br>
- +<a action="link start">Yes I want to.</a><br>
- +<a action="link exit">Exit tutorial.</a>
- +</body></html>
- \ No newline at end of file
- diff --git a/aCis_datapack/data/xml/scripts.xml b/aCis_datapack/data/xml/scripts.xml
- index 3e38b21..6ed1371 100644
- --- a/aCis_datapack/data/xml/scripts.xml
- +++ b/aCis_datapack/data/xml/scripts.xml
- @@ -411,6 +411,7 @@
- <script path="script.feature.SecondClassChange"/>
- <script path="script.feature.ShadowWeapon"/>
- <script path="script.feature.Tutorial"/>
- + <script path="script.feature.TutorialQuest"/>
- <script path="script.feature.VarkaSilenosSupport"/>
- <!-- Siegable Halls -->
- diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/EnterWorld.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/EnterWorld.java
- index e0fdf75..64657c3 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/EnterWorld.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/EnterWorld.java
- @@ -51,6 +51,7 @@
- import net.sf.l2j.gameserver.network.serverpackets.UserInfo;
- import net.sf.l2j.gameserver.scripting.Quest;
- import net.sf.l2j.gameserver.scripting.QuestState;
- +import net.sf.l2j.gameserver.scripting.script.feature.TutorialQuest;
- import net.sf.l2j.gameserver.skills.L2Skill;
- import net.sf.l2j.gameserver.taskmanager.GameTimeTaskManager;
- @@ -260,6 +261,7 @@
- PetitionManager.getInstance().checkActivePetition(player);
- + TutorialQuest.onCreate(player);
- player.onPlayerEnter();
- sendPacket(new SkillCoolTime(player));
- diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestCharacterCreate.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestCharacterCreate.java
- index 3d4cfae..a8bf410 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestCharacterCreate.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestCharacterCreate.java
- @@ -20,7 +20,6 @@
- import net.sf.l2j.gameserver.network.serverpackets.CharCreateFail;
- import net.sf.l2j.gameserver.network.serverpackets.CharCreateOk;
- import net.sf.l2j.gameserver.network.serverpackets.CharSelectInfo;
- -import net.sf.l2j.gameserver.scripting.Quest;
- public final class RequestCharacterCreate extends L2GameClientPacket
- {
- @@ -165,9 +164,9 @@
- }
- // Tutorial runs here.
- - final Quest quest = ScriptData.getInstance().getQuest("Tutorial");
- - if (quest != null)
- - quest.newQuestState(player).setState(QuestStatus.STARTED);
- + var quest = ScriptData.getInstance().getQuest("TutorialQuest");
- + if (quest != null)
- + quest.newQuestState(player).setState(QuestStatus.STARTED);
- player.setOnlineStatus(true, false);
- player.deleteMe();
- diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestTutorialLinkHtml.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestTutorialLinkHtml.java
- index a60ea86..f0987c7 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestTutorialLinkHtml.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestTutorialLinkHtml.java
- @@ -1,7 +1,13 @@
- package net.sf.l2j.gameserver.network.clientpackets;
- +import net.sf.l2j.commons.random.Rnd;
- +
- +import net.sf.l2j.gameserver.data.xml.MapRegionData;
- +import net.sf.l2j.gameserver.data.xml.MapRegionData.TeleportType;
- import net.sf.l2j.gameserver.model.actor.Player;
- +import net.sf.l2j.gameserver.network.serverpackets.TutorialCloseHtml;
- import net.sf.l2j.gameserver.scripting.QuestState;
- +import net.sf.l2j.gameserver.scripting.script.feature.TutorialQuest;
- public class RequestTutorialLinkHtml extends L2GameClientPacket
- {
- @@ -20,6 +26,43 @@
- if (player == null)
- return;
- + if (_bypass != null)
- + {
- + switch (_bypass)
- + {
- + case "move":
- + int random = Rnd.get(1, 3);
- + switch(random)
- + {
- + case 1:
- + player.teleportTo(-99685, 237680, -3568, 20);
- + break;
- + case 2:
- + player.teleportTo(-99091, 230749, -3608, 20);
- + break;
- + case 3:
- + player.teleportTo(-103743, 222504, -3440, 20);
- + break;
- + }
- + break;
- + case "town":
- + var loc = MapRegionData.getInstance().getLocationToTeleport(player, TeleportType.TOWN);
- + player.teleportTo(loc.getX(), loc.getY(), loc.getZ(), 20);
- + break;
- + case "close":
- + player.sendPacket(TutorialCloseHtml.STATIC_PACKET);
- + break;
- + case "start":
- + TutorialQuest.onStartTutorial(player);
- + break;
- + case "exit":
- + TutorialQuest.onExitTutorial(player);
- + break;
- + default:
- + return;
- + }
- + player.sendPacket(TutorialCloseHtml.STATIC_PACKET);
- + }
- final QuestState qs = player.getQuestList().getQuestState("Tutorial");
- if (qs != null)
- qs.getQuest().notifyEvent(_bypass, null, player);
- diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/scripting/script/feature/TutorialQuest.java b/aCis_gameserver/java/net/sf/l2j/gameserver/scripting/script/feature/TutorialQuest.java
- new file mode 100644
- index 0000000..cec048f
- --- /dev/null
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/scripting/script/feature/TutorialQuest.java
- @@ -0,0 +1,237 @@
- +package net.sf.l2j.gameserver.scripting.script.feature;
- +
- +import java.util.ArrayList;
- +import java.util.Arrays;
- +import java.util.List;
- +
- +import net.sf.l2j.commons.pool.ThreadPool;
- +
- +import net.sf.l2j.gameserver.data.SkillTable;
- +import net.sf.l2j.gameserver.data.cache.HtmCache;
- +import net.sf.l2j.gameserver.data.xml.NpcData;
- +import net.sf.l2j.gameserver.enums.QuestStatus;
- +import net.sf.l2j.gameserver.enums.actors.ClassId;
- +import net.sf.l2j.gameserver.model.actor.Creature;
- +import net.sf.l2j.gameserver.model.actor.Npc;
- +import net.sf.l2j.gameserver.model.actor.Player;
- +import net.sf.l2j.gameserver.network.SystemMessageId;
- +import net.sf.l2j.gameserver.network.serverpackets.InventoryUpdate;
- +import net.sf.l2j.gameserver.network.serverpackets.SystemMessage;
- +import net.sf.l2j.gameserver.network.serverpackets.TutorialShowHtml;
- +import net.sf.l2j.gameserver.scripting.Quest;
- +import net.sf.l2j.gameserver.skills.L2Skill;
- +
- +/**
- + * @author Baggos
- + */
- +public class TutorialQuest extends Quest
- +{
- + private static final String QUEST_NAME = "TutorialQuest";
- + private static final int ADENA_REWARD = 20000;
- +
- + public TutorialQuest()
- + {
- + super(-1, "feature");
- +
- + for (var monsterId = 18000; monsterId <= 21000; monsterId++)
- + {
- + var template = NpcData.getInstance().getTemplate(monsterId);
- + if (template != null && template.getLevel() < 20)
- + addKillId(monsterId);
- + }
- + }
- +
- + @Override
- + public String onKill(Npc npc, Creature killer)
- + {
- + var player = killer.getActingPlayer();
- + var htmltext = getNoQuestMsg();
- + var st = player.getQuestList().getQuestState(QUEST_NAME);
- +
- + if (st == null)
- + return htmltext;
- +
- + var cond = st.getCond();
- + if (cond == 0)
- + return null;
- +
- + switch (cond)
- + {
- + case 1:
- + st.setCond(2);
- + player.sendPacket(new TutorialShowHtml(HtmCache.getInstance().getHtmForce("data/html/script/feature/TutorialQuest/60050-pickup.htm")));
- + break;
- + case 2:
- + st.setCond(3);
- + player.sendPacket(new TutorialShowHtml(HtmCache.getInstance().getHtmForce("data/html/script/feature/TutorialQuest/60050-view.htm")));
- + break;
- + case 3:
- + st.setCond(4);
- + var mageBuffs = Arrays.asList(4342, 4355, 4356, 4344);
- + var fighterBuffs = Arrays.asList(4342, 4357, 4345, 4344);
- + var newbieBuffs = player.isMageClass() || player.getClassId() == ClassId.ORC_MYSTIC ? mageBuffs : fighterBuffs;
- +
- + for (var id : newbieBuffs)
- + {
- + player.getStatus().setMaxHpMp();
- + L2Skill buff = SkillTable.getInstance().getInfo(id, SkillTable.getInstance().getMaxLevel(id));
- + buff.getEffects(player, player);
- + player.sendPacket(new TutorialShowHtml(HtmCache.getInstance().getHtmForce("data/html/script/feature/TutorialQuest/60050-buff.htm")));
- + }
- + break;
- +
- + case 4:
- + st.setCond(5);
- + playSound(player, SOUND_ITEMGET);
- + giveItems(player, player.isMageClass() || player.getClassId() == ClassId.ORC_MYSTIC ? 3947 : 1835, 300);
- + player.sendPacket(new TutorialShowHtml(HtmCache.getInstance().getHtmForce(player.isMageClass() || player.getClassId() == ClassId.ORC_MYSTIC ? "data/html/script/feature/TutorialQuest/60050-spiritshot.htm" : "data/html/script/feature/TutorialQuest/60050-soulshot.htm")));
- + break;
- +
- + case 5:
- + st.setCond(6);
- + playSound(player, SOUND_ITEMGET);
- + equipClassWeapon(null, player);
- + player.sendPacket(new TutorialShowHtml(HtmCache.getInstance().getHtmForce("data/html/script/feature/TutorialQuest/60050-06.htm")));
- + break;
- +
- + case 6:
- + st.setCond(7);
- + playSound(player, SOUND_ITEMGET);
- + equipClassArmor(null, player);
- + player.sendPacket(new TutorialShowHtml(HtmCache.getInstance().getHtmForce("data/html/script/feature/TutorialQuest/60050-07.htm")));
- + break;
- + case 7:
- + st.setCond(8);
- + player.sendPacket(new TutorialShowHtml(HtmCache.getInstance().getHtmForce("data/html/script/feature/TutorialQuest/60050-sp.htm")));
- + break;
- + case 8:
- + st.setCond(9);
- + player.sendPacket(new TutorialShowHtml(HtmCache.getInstance().getHtmForce("data/html/script/feature/TutorialQuest/60050-skills.htm")));
- + break;
- + case 9:
- + st.setCond(0);
- + player.getStatus().addExpAndSp(12000, 2000);
- + player.sendMessage("Quest completed!");
- + giveItems(player, 57, ADENA_REWARD);
- + st.setState(QuestStatus.COMPLETED);
- + playSound(player, SOUND_FINISH);
- + st.exitQuest(true);
- + player.sendPacket(new TutorialShowHtml(HtmCache.getInstance().getHtmForce("data/html/script/feature/TutorialQuest/60050-08.htm")));
- + break;
- + }
- + return null;
- + }
- +
- + public static void onCreate(Player player)
- + {
- + var st = player.getQuestList().getQuestState(QUEST_NAME);
- + var cond = st.getCond();
- + if (cond == 0 && player.getStatus().getLevel() == 1)
- + player.sendPacket(new TutorialShowHtml(HtmCache.getInstance().getHtmForce("data/html/script/feature/TutorialQuest/60050.htm")));
- + }
- +
- + public static void onStartTutorial(Player player)
- + {
- + ThreadPool.schedule(() -> player.sendPacket(new TutorialShowHtml(HtmCache.getInstance().getHtmForce("data/html/script/feature/TutorialQuest/60050-03.htm"))), 1000);
- + var st = player.getQuestList().getQuestState(QUEST_NAME);
- + var cond = st.getCond();
- +
- + if (cond == 0 && player.getStatus().getLevel() == 1)
- + {
- + st.setState(QuestStatus.STARTED);
- + playSound(player, SOUND_ACCEPT);
- + st.setCond(1);
- + }
- + }
- +
- + public static void onExitTutorial(Player player)
- + {
- + var st = player.getQuestList().getQuestState(QUEST_NAME);
- + st.setState(QuestStatus.COMPLETED);
- + playSound(player, SOUND_FINISH);
- + st.set("cond", "0");
- + }
- +
- + /**
- + * @param armorIds - a List of integers representing the IDs of the armors/weapons to be equipped
- + * @param player - a Player object representing the player who will equip the armors/weapons.
- + */
- + private static void equip(List<Integer> armorIds, Player player)
- + {
- + for (var id : armorIds)
- + {
- + player.getInventory().addItem("Armors", id, 1, player, null);
- + player.getInventory().equipItemAndRecord(player.getInventory().getItemByItemId(id));
- + }
- + player.getInventory().reloadEquippedItems();
- + player.broadcastCharInfo();
- + new InventoryUpdate();
- + }
- +
- + /**
- + * Equips weapon based on the player's class ID.
- + * @param classId the class ID of the player
- + * @param player the player to equip weapon for
- + */
- + public static void equipClassWeapon(ClassId classId, Player player)
- + {
- + List<Integer> weaponIds = new ArrayList<>();
- +
- + switch (player.getClassId().getId())
- + {
- + case 0:
- + case 31:
- + case 36:
- + case 53:
- + weaponIds.addAll(Arrays.asList(6354));
- + player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.EARNED_S2_S1_S).addItemName(6354));
- + break;
- + case 44:
- + weaponIds.addAll(Arrays.asList(257));
- + player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.EARNED_S2_S1_S).addItemName(257));
- + break;
- + case 10:
- + case 25:
- + case 38:
- + case 49:
- + weaponIds.addAll(Arrays.asList(100));
- + player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.EARNED_S2_S1_S).addItemName(100));
- + break;
- + }
- + equip(weaponIds, player);
- + }
- +
- + /**
- + * Equips armor based on the player's class ID.
- + * @param classId the class ID of the player
- + * @param player the player to equip armor for
- + */
- + public static void equipClassArmor(ClassId classId, Player player)
- + {
- + List<Integer> armorIds = new ArrayList<>();
- +
- + switch (player.getClassId().getId())
- + {
- + case 0:
- + case 31:
- + case 36:
- + case 53:
- + armorIds.addAll(Arrays.asList(44, 24, 31, 51, 38, 625, 908, 877, 877, 115, 115));
- + player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.EARNED_S2_S1_S).addItemName(24));
- + break;
- + case 44:
- + armorIds.addAll(Arrays.asList(44, 24, 31, 51, 38, 625, 908, 877, 877, 115, 115));
- + player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.EARNED_S2_S1_S).addItemName(24));
- + break;
- + case 10:
- + case 25:
- + case 38:
- + case 49:
- + armorIds.addAll(Arrays.asList(44, 1101, 1104, 51, 38, 625, 908, 877, 877, 115, 115));
- + player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.EARNED_S2_S1_S).addItemName(1101));
- + break;
- + }
- + equip(armorIds, player);
- + }
- +}
- \ No newline at end of file
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement