From 1bc62c8a01da1c3995f4bf8def1d59b7198dd665 Mon Sep 17 00:00:00 2001 From: MobiusDev <8391001+MobiusDevelopment@users.noreply.github.com> Date: Sun, 29 Oct 2017 23:04:28 +0000 Subject: [PATCH] Theorn AI. Contributed by gigilo1968. --- .../areas/HellboundIsland/Theron/33897.html | 9 + .../HellboundIsland/Theron/33897_x16.html | 7 + .../HellboundIsland/Theron/33897_x2.html | 8 + .../HellboundIsland/Theron/33897_x32.html | 5 + .../HellboundIsland/Theron/33897_x4.html | 7 + .../HellboundIsland/Theron/33897_x8.html | 7 + .../areas/HellboundIsland/Theron/Theorn.java | 283 ++++++++++++++++++ .../ai/areas/HellboundIsland/Theron/nosp.html | 3 + .../game/data/spawns/Hellbound/Hellbound.xml | 3 + .../game/data/stats/skills/16100-16199.xml | 147 +++++++-- .../areas/HellboundIsland/Theron/33897.html | 9 + .../HellboundIsland/Theron/33897_x16.html | 7 + .../HellboundIsland/Theron/33897_x2.html | 8 + .../HellboundIsland/Theron/33897_x32.html | 5 + .../HellboundIsland/Theron/33897_x4.html | 7 + .../HellboundIsland/Theron/33897_x8.html | 7 + .../areas/HellboundIsland/Theron/Theorn.java | 283 ++++++++++++++++++ .../ai/areas/HellboundIsland/Theron/nosp.html | 3 + .../game/data/spawns/Hellbound/Hellbound.xml | 3 + .../game/data/stats/skills/16100-16199.xml | 147 +++++++-- .../areas/HellboundIsland/Theron/33897.html | 9 + .../HellboundIsland/Theron/33897_x16.html | 7 + .../HellboundIsland/Theron/33897_x2.html | 8 + .../HellboundIsland/Theron/33897_x32.html | 5 + .../HellboundIsland/Theron/33897_x4.html | 7 + .../HellboundIsland/Theron/33897_x8.html | 7 + .../areas/HellboundIsland/Theron/Theorn.java | 283 ++++++++++++++++++ .../ai/areas/HellboundIsland/Theron/nosp.html | 3 + .../game/data/spawns/Hellbound/Hellbound.xml | 3 + .../game/data/stats/skills/16100-16199.xml | 147 +++++++-- 30 files changed, 1350 insertions(+), 87 deletions(-) create mode 100644 L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/HellboundIsland/Theron/33897.html create mode 100644 L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/HellboundIsland/Theron/33897_x16.html create mode 100644 L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/HellboundIsland/Theron/33897_x2.html create mode 100644 L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/HellboundIsland/Theron/33897_x32.html create mode 100644 L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/HellboundIsland/Theron/33897_x4.html create mode 100644 L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/HellboundIsland/Theron/33897_x8.html create mode 100644 L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/HellboundIsland/Theron/Theorn.java create mode 100644 L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/HellboundIsland/Theron/nosp.html create mode 100644 L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/areas/HellboundIsland/Theron/33897.html create mode 100644 L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/areas/HellboundIsland/Theron/33897_x16.html create mode 100644 L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/areas/HellboundIsland/Theron/33897_x2.html create mode 100644 L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/areas/HellboundIsland/Theron/33897_x32.html create mode 100644 L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/areas/HellboundIsland/Theron/33897_x4.html create mode 100644 L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/areas/HellboundIsland/Theron/33897_x8.html create mode 100644 L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/areas/HellboundIsland/Theron/Theorn.java create mode 100644 L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/areas/HellboundIsland/Theron/nosp.html create mode 100644 L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/HellboundIsland/Theron/33897.html create mode 100644 L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/HellboundIsland/Theron/33897_x16.html create mode 100644 L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/HellboundIsland/Theron/33897_x2.html create mode 100644 L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/HellboundIsland/Theron/33897_x32.html create mode 100644 L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/HellboundIsland/Theron/33897_x4.html create mode 100644 L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/HellboundIsland/Theron/33897_x8.html create mode 100644 L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/HellboundIsland/Theron/Theorn.java create mode 100644 L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/HellboundIsland/Theron/nosp.html diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/HellboundIsland/Theron/33897.html b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/HellboundIsland/Theron/33897.html new file mode 100644 index 0000000000..9ac452817c --- /dev/null +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/HellboundIsland/Theron/33897.html @@ -0,0 +1,9 @@ +Theorn:
+Hey there! I'm researching the power of Heroes, and boy do I need lots of Skill Points for it! Do you want to donate yours? If things go well, you can earn additional SP! Interested? Here's the trick.
+This research requires 100,000 Adena and 500,000 SP. If my experiment is a success, I can pay you in double the SP! But if it fails, say goodbye to the SP! Oh, and no refunds for your Adena. It's necessary for my research!
+And don't die! Or else you will lose the buff I give you, and lose out on rewards.
+And I'm kind of a night-owl, so don't expect me to be around to reward you in the daytime.
+Well, what do you say? I'm at the end of my experimental stages, so all that's left to do is to inject some SP into either the Flask of Darkness or Flask of Light. Here, I'll let you pick.
+ + + \ No newline at end of file diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/HellboundIsland/Theron/33897_x16.html b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/HellboundIsland/Theron/33897_x16.html new file mode 100644 index 0000000000..318893fd73 --- /dev/null +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/HellboundIsland/Theron/33897_x16.html @@ -0,0 +1,7 @@ +Theorn:
+Excellent! Emotions overwhelm me! Since our meeting, you have become even stronger. So until the completion is very little do you want to continue? Can stop here
+But if you want to continue, then I'll understand everything without words ...But think well, because if this attempt turns out you are all SP who were before.
+ + + + \ No newline at end of file diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/HellboundIsland/Theron/33897_x2.html b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/HellboundIsland/Theron/33897_x2.html new file mode 100644 index 0000000000..6bd9383985 --- /dev/null +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/HellboundIsland/Theron/33897_x2.html @@ -0,0 +1,8 @@ +Theorn:
+I knew it! You chose well.
+Which leads me to ask... do you want to help again? Come on, it will really help me obtain - I mean, us obtain - the power of Heroes. Ahem.
+But if you fail this time, all of your accumulated SP will kiss you goodbye. What do you think?
+ + + + \ No newline at end of file diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/HellboundIsland/Theron/33897_x32.html b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/HellboundIsland/Theron/33897_x32.html new file mode 100644 index 0000000000..8d7a27c48e --- /dev/null +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/HellboundIsland/Theron/33897_x32.html @@ -0,0 +1,5 @@ +Theorn:
+What a surprise! Incredible! Thanks to you I know the power of the hero! By our next meeting myself will become a hero. Ho-ho-ho-ho I will always remember you.
+From this benefit not only me! you can get 32 times more SP. Which made at the first study. This is called mutually beneficial cooperation! Ha-ha! Well, see you friend
+ + \ No newline at end of file diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/HellboundIsland/Theron/33897_x4.html b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/HellboundIsland/Theron/33897_x4.html new file mode 100644 index 0000000000..0585d3d1cc --- /dev/null +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/HellboundIsland/Theron/33897_x4.html @@ -0,0 +1,7 @@ +Theorn:
You are a genius!
+I dreamed that you'd succeed last night -- and I was right! What talent. Do you wanna try again?
+If you fail, you'll lose all your SP, but... you don't really need them, do you?
+ + + + \ No newline at end of file diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/HellboundIsland/Theron/33897_x8.html b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/HellboundIsland/Theron/33897_x8.html new file mode 100644 index 0000000000..e58dcbce12 --- /dev/null +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/HellboundIsland/Theron/33897_x8.html @@ -0,0 +1,7 @@ +Theorn:
+I knew there was something unusual about you. You're a rare genius! Which means you should of course try again. Right?
+If you fail, you lose all your SP, but you don't really care, right? +
+ + + \ No newline at end of file diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/HellboundIsland/Theron/Theorn.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/HellboundIsland/Theron/Theorn.java new file mode 100644 index 0000000000..e044b1cf14 --- /dev/null +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/HellboundIsland/Theron/Theorn.java @@ -0,0 +1,283 @@ +/* + * This file is part of the L2J Mobius project. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package ai.areas.HellboundIsland.Theron; + +import com.l2jmobius.gameserver.data.xml.impl.SkillData; +import com.l2jmobius.gameserver.enums.ChatType; +import com.l2jmobius.gameserver.model.actor.L2Npc; +import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; +import com.l2jmobius.gameserver.model.itemcontainer.Inventory; +import com.l2jmobius.gameserver.model.skills.AbnormalType; +import com.l2jmobius.gameserver.model.skills.Skill; +import com.l2jmobius.gameserver.model.skills.SkillCaster; +import com.l2jmobius.gameserver.network.NpcStringId; +import com.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage; + +import ai.AbstractNpcAI; + +/** + * Theorn AI + * @author Gigi, Mobius + * @date 2017-10-26 - [22:17:03] + */ +public class Theorn extends AbstractNpcAI +{ + // NPC + private static final int THERON = 33897; + // Skills + private static final int REWARD_BUFF_X2 = 16136; + private static final int REWARD_BUFF_X4 = 16137; + private static final int REWARD_BUFF_X8 = 16138; + private static final int REWARD_BUFF_X16 = 16139; + private static final int REWARD_BUFF_X32 = 16140; + private static final Skill RESEARCH_SUCCESS_1 = SkillData.getInstance().getSkill(16141, 1); + private static final Skill RESEARCH_SUCCESS_2 = SkillData.getInstance().getSkill(16142, 1); + private static final Skill RESEARCH_SUCCESS_3 = SkillData.getInstance().getSkill(16143, 1); + private static final Skill RESEARCH_SUCCESS_4 = SkillData.getInstance().getSkill(16144, 1); + private static final Skill RESEARCH_SUCCESS_5 = SkillData.getInstance().getSkill(16145, 1); + private static final Skill RESEARCH_FAIL = SkillData.getInstance().getSkill(16146, 1); + + private Theorn() + { + addStartNpc(THERON); + addTalkId(THERON); + addFirstTalkId(THERON); + addSpawnId(THERON); + } + + @Override + public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) + { + String htmltext = null; + switch (event) + { + case "BROADCAST_TEXT": + { + npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.I_WILL_LEAVE_THIS_PLACE_ONCE_DAY_BREAKS_IF_YOU_WANT_A_REWARD_HURRY_UP_AND_GET_IT_BE_CAREFUL_NOT_TO_LOSE_THE_RESEARCH_REWARDS_IN_THE_VOID); + startQuestTimer("BROADCAST_TEXT", (60 + getRandom(10)) * 3000, npc, null); + break; + } + case "light_1": + { + if ((player.getSp() < 500000) || (player.getAdena() < 100000)) + { + htmltext = "nosp.html"; + break; + } + tryLuck(npc, player, RESEARCH_SUCCESS_1, true); + break; + } + case "darkness_1": + { + if ((player.getSp() < 500000) || (player.getAdena() < 100000)) + { + htmltext = "nosp.html"; + break; + } + tryLuck(npc, player, RESEARCH_SUCCESS_1, false); + break; + } + case "light_2": + { + if ((player.getSp() < 500000) || (player.getAdena() < 100000)) + { + htmltext = "nosp.html"; + break; + } + tryLuck(npc, player, RESEARCH_SUCCESS_2, true); + break; + } + case "darkness_2": + { + if ((player.getSp() < 500000) || (player.getAdena() < 100000)) + { + htmltext = "nosp.html"; + break; + } + tryLuck(npc, player, RESEARCH_SUCCESS_2, false); + break; + } + case "light_3": + { + if ((player.getSp() < 500000) || (player.getAdena() < 100000)) + { + htmltext = "nosp.html"; + break; + } + tryLuck(npc, player, RESEARCH_SUCCESS_3, true); + break; + } + case "darkness_3": + { + if ((player.getSp() < 500000) || (player.getAdena() < 100000)) + { + htmltext = "nosp.html"; + break; + } + tryLuck(npc, player, RESEARCH_SUCCESS_3, false); + break; + } + case "light_4": + { + if ((player.getSp() < 500000) || (player.getAdena() < 100000)) + { + htmltext = "nosp.html"; + break; + } + tryLuck(npc, player, RESEARCH_SUCCESS_4, true); + break; + } + case "darkness_4": + { + if ((player.getSp() < 500000) || (player.getAdena() < 100000)) + { + htmltext = "nosp.html"; + break; + } + tryLuck(npc, player, RESEARCH_SUCCESS_4, false); + break; + } + case "light_5": + { + if ((player.getSp() < 500000) || (player.getAdena() < 100000)) + { + htmltext = "nosp.html"; + break; + } + tryLuck(npc, player, RESEARCH_SUCCESS_5, true); + break; + } + case "darkness_5": + { + if ((player.getSp() < 500000) || (player.getAdena() < 100000)) + { + htmltext = "nosp.html"; + break; + } + tryLuck(npc, player, RESEARCH_SUCCESS_5, false); + break; + } + case "stop_1": + { + if ((player != null) && !player.isDead() && (player.getEffectList().getBuffInfoBySkillId(REWARD_BUFF_X2) != null)) + { + addExpAndSp(player, 0, 1000000); + showOnScreenMsg(player, NpcStringId.YOU_HAVE_ACQUIRED_SP_X_2, ExShowScreenMessage.TOP_CENTER, 5000); + player.getEffectList().stopEffects(AbnormalType.STAR_AGATHION_EXP_SP_BUFF1); + } + break; + } + case "stop_2": + { + if ((player != null) && !player.isDead() && (player.getEffectList().getBuffInfoBySkillId(REWARD_BUFF_X4) != null)) + { + addExpAndSp(player, 0, 2000000); + showOnScreenMsg(player, NpcStringId.YOU_HAVE_ACQUIRED_SP_X_4, ExShowScreenMessage.TOP_CENTER, 5000); + player.getEffectList().stopEffects(AbnormalType.STAR_AGATHION_EXP_SP_BUFF1); + } + break; + } + case "stop_3": + { + if ((player != null) && !player.isDead() && (player.getEffectList().getBuffInfoBySkillId(REWARD_BUFF_X8) != null)) + { + addExpAndSp(player, 0, 4000000); + showOnScreenMsg(player, NpcStringId.YOU_HAVE_ACQUIRED_SP_X_8, ExShowScreenMessage.TOP_CENTER, 5000); + player.getEffectList().stopEffects(AbnormalType.STAR_AGATHION_EXP_SP_BUFF1); + } + break; + } + case "stop_4": + { + if ((player != null) && !player.isDead() && (player.getEffectList().getBuffInfoBySkillId(REWARD_BUFF_X16) != null)) + { + addExpAndSp(player, 0, 8000000); + showOnScreenMsg(player, NpcStringId.YOU_HAVE_ACQUIRED_SP_X_16, ExShowScreenMessage.TOP_CENTER, 5000); + player.getEffectList().stopEffects(AbnormalType.STAR_AGATHION_EXP_SP_BUFF1); + } + break; + } + case "stop_5": + { + if ((player != null) && !player.isDead() && (player.getEffectList().getBuffInfoBySkillId(REWARD_BUFF_X32) != null)) + { + addExpAndSp(player, 0, 16000000); + showOnScreenMsg(player, NpcStringId.S1_ACQUIRED_32_TIMES_THE_SKILL_POINTS_AS_A_REWARD, ExShowScreenMessage.TOP_CENTER, 5000, player.getName()); + player.getEffectList().stopEffects(AbnormalType.STAR_AGATHION_EXP_SP_BUFF1); + } + break; + } + case "REMOVE_BUFF": + { + player.getEffectList().stopEffects(AbnormalType.STAR_AGATHION_EXP_SP_BUFF1); + break; + } + } + return htmltext; + } + + @Override + public String onFirstTalk(L2Npc npc, L2PcInstance player) + { + if (player.getEffectList().getBuffInfoBySkillId(REWARD_BUFF_X2) != null) + { + return "33897_x2.html"; + } + else if (player.getEffectList().getBuffInfoBySkillId(REWARD_BUFF_X4) != null) + { + return "33897_x4.html"; + } + else if (player.getEffectList().getBuffInfoBySkillId(REWARD_BUFF_X8) != null) + { + return "33897_x8.html"; + } + else if (player.getEffectList().getBuffInfoBySkillId(REWARD_BUFF_X16) != null) + { + return "33897_x16.html"; + } + else if (player.getEffectList().getBuffInfoBySkillId(REWARD_BUFF_X32) != null) + { + return "33897_x32.html"; + } + return "33897.html"; + } + + private void tryLuck(L2Npc npc, L2PcInstance player, Skill skill, boolean isLight) + { + takeItems(player, Inventory.ADENA_ID, 100000); + player.setSp(player.getSp() - 500000); + if (isLight ? getRandom(10) > 4 : getRandom(10) < 5) + { + SkillCaster.triggerCast(npc, player, skill); + return; + } + SkillCaster.triggerCast(npc, player, RESEARCH_FAIL); + startQuestTimer("REMOVE_BUFF", 3000, npc, player); + } + + @Override + public String onSpawn(L2Npc npc) + { + startQuestTimer("BROADCAST_TEXT", 3000, npc, null); + return super.onSpawn(npc); + } + + public static void main(String[] args) + { + new Theorn(); + } +} \ No newline at end of file diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/HellboundIsland/Theron/nosp.html b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/HellboundIsland/Theron/nosp.html new file mode 100644 index 0000000000..cdda50998f --- /dev/null +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/HellboundIsland/Theron/nosp.html @@ -0,0 +1,3 @@ +Theorn:
+What? You don't even have the basic funding or Skill Points? What do you think I survive on, grass? Go hunt or something and make ends meet! + \ No newline at end of file diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/spawns/Hellbound/Hellbound.xml b/L2J_Mobius_1.0_Ertheia/dist/game/data/spawns/Hellbound/Hellbound.xml index 2d28a436e4..3d09222273 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/spawns/Hellbound/Hellbound.xml +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/spawns/Hellbound/Hellbound.xml @@ -270,5 +270,8 @@ + + + \ No newline at end of file diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/stats/skills/16100-16199.xml b/L2J_Mobius_1.0_Ertheia/dist/game/data/stats/skills/16100-16199.xml index 3d1ba214d2..fb0539c56f 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/stats/skills/16100-16199.xml +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/stats/skills/16100-16199.xml @@ -497,118 +497,207 @@ 10000 - icon.etc_deco_star_i00 + 1 + 4 + STAR_AGATHION_EXP_SP_BUFF1 + STARS_0 + 900 A2 - 1000 - 2000 + 4000 1 - 1 + 4 + TARGET + SINGLE - icon.etc_deco_star_i00 + 1 + 300 + STAR_AGATHION_EXP_SP_BUFF1 + STARS_1 A2 - 1000 + 4000 2000 1 - 1 + 4 + TARGET + SINGLE - - icon.etc_deco_star_i00 + 2 + 300 + STAR_AGATHION_EXP_SP_BUFF1 + STARS_2 A2 - 1000 + 4000 2000 1 - 1 + 4 + TARGET + SINGLE - - icon.etc_deco_star_i00 + 3 + 300 + STAR_AGATHION_EXP_SP_BUFF1 + STARS_3 A2 - 1000 + 4000 2000 1 - 1 + 4 + TARGET + SINGLE - - icon.etc_deco_star_i00 + 4 + 300 + STAR_AGATHION_EXP_SP_BUFF1 + STARS_4 A2 - 1000 + 4000 2000 1 - 1 + 4 + TARGET + SINGLE - - icon.etc_deco_star_i00 + 5 + 300 + STAR_AGATHION_EXP_SP_BUFF1 + STARS_5 A2 - 1000 + 4000 2000 1 - 1 + 4 + TARGET + SINGLE - icon.etc_deco_star_i00 + 4 + 1 + STAR_AGATHION_EXP_SP_BUFF1 + STARS_0 A2 900 1 4 + 4000 + TARGET + SINGLE + + + 16136 + 1 + + - icon.etc_deco_star_i00 + 4 + 2 + STAR_AGATHION_EXP_SP_BUFF1 + STARS_1 A2 900 1 4 + 4000 + TARGET + SINGLE + + + 16137 + 1 + + - icon.etc_deco_star_i00 + 4 + 3 + STAR_AGATHION_EXP_SP_BUFF1 + STARS_2 A2 900 1 4 + 4000 + TARGET + SINGLE + + + 16138 + 1 + + - icon.etc_deco_star_i00 + 4 + 4 + STAR_AGATHION_EXP_SP_BUFF1 + STARS_3 A2 900 1 4 + 4000 + TARGET + SINGLE + + + 16139 + 1 + + - icon.etc_deco_star_i00 + 4 + 5 + STAR_AGATHION_EXP_SP_BUFF1 + STARS_4 A2 900 1 4 + 4000 + TARGET + SINGLE + + + 16140 + 1 + + - icon.etc_deco_star_i00 + 1 A2 900 1 4 + 500 + TARGET + SINGLE diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/areas/HellboundIsland/Theron/33897.html b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/areas/HellboundIsland/Theron/33897.html new file mode 100644 index 0000000000..9ac452817c --- /dev/null +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/areas/HellboundIsland/Theron/33897.html @@ -0,0 +1,9 @@ +Theorn:
+Hey there! I'm researching the power of Heroes, and boy do I need lots of Skill Points for it! Do you want to donate yours? If things go well, you can earn additional SP! Interested? Here's the trick.
+This research requires 100,000 Adena and 500,000 SP. If my experiment is a success, I can pay you in double the SP! But if it fails, say goodbye to the SP! Oh, and no refunds for your Adena. It's necessary for my research!
+And don't die! Or else you will lose the buff I give you, and lose out on rewards.
+And I'm kind of a night-owl, so don't expect me to be around to reward you in the daytime.
+Well, what do you say? I'm at the end of my experimental stages, so all that's left to do is to inject some SP into either the Flask of Darkness or Flask of Light. Here, I'll let you pick.
+ + + \ No newline at end of file diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/areas/HellboundIsland/Theron/33897_x16.html b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/areas/HellboundIsland/Theron/33897_x16.html new file mode 100644 index 0000000000..318893fd73 --- /dev/null +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/areas/HellboundIsland/Theron/33897_x16.html @@ -0,0 +1,7 @@ +Theorn:
+Excellent! Emotions overwhelm me! Since our meeting, you have become even stronger. So until the completion is very little do you want to continue? Can stop here
+But if you want to continue, then I'll understand everything without words ...But think well, because if this attempt turns out you are all SP who were before.
+ + + + \ No newline at end of file diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/areas/HellboundIsland/Theron/33897_x2.html b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/areas/HellboundIsland/Theron/33897_x2.html new file mode 100644 index 0000000000..6bd9383985 --- /dev/null +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/areas/HellboundIsland/Theron/33897_x2.html @@ -0,0 +1,8 @@ +Theorn:
+I knew it! You chose well.
+Which leads me to ask... do you want to help again? Come on, it will really help me obtain - I mean, us obtain - the power of Heroes. Ahem.
+But if you fail this time, all of your accumulated SP will kiss you goodbye. What do you think?
+ + + + \ No newline at end of file diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/areas/HellboundIsland/Theron/33897_x32.html b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/areas/HellboundIsland/Theron/33897_x32.html new file mode 100644 index 0000000000..8d7a27c48e --- /dev/null +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/areas/HellboundIsland/Theron/33897_x32.html @@ -0,0 +1,5 @@ +Theorn:
+What a surprise! Incredible! Thanks to you I know the power of the hero! By our next meeting myself will become a hero. Ho-ho-ho-ho I will always remember you.
+From this benefit not only me! you can get 32 times more SP. Which made at the first study. This is called mutually beneficial cooperation! Ha-ha! Well, see you friend
+ + \ No newline at end of file diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/areas/HellboundIsland/Theron/33897_x4.html b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/areas/HellboundIsland/Theron/33897_x4.html new file mode 100644 index 0000000000..0585d3d1cc --- /dev/null +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/areas/HellboundIsland/Theron/33897_x4.html @@ -0,0 +1,7 @@ +Theorn:
You are a genius!
+I dreamed that you'd succeed last night -- and I was right! What talent. Do you wanna try again?
+If you fail, you'll lose all your SP, but... you don't really need them, do you?
+ + + + \ No newline at end of file diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/areas/HellboundIsland/Theron/33897_x8.html b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/areas/HellboundIsland/Theron/33897_x8.html new file mode 100644 index 0000000000..e58dcbce12 --- /dev/null +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/areas/HellboundIsland/Theron/33897_x8.html @@ -0,0 +1,7 @@ +Theorn:
+I knew there was something unusual about you. You're a rare genius! Which means you should of course try again. Right?
+If you fail, you lose all your SP, but you don't really care, right? +
+ + + \ No newline at end of file diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/areas/HellboundIsland/Theron/Theorn.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/areas/HellboundIsland/Theron/Theorn.java new file mode 100644 index 0000000000..e044b1cf14 --- /dev/null +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/areas/HellboundIsland/Theron/Theorn.java @@ -0,0 +1,283 @@ +/* + * This file is part of the L2J Mobius project. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package ai.areas.HellboundIsland.Theron; + +import com.l2jmobius.gameserver.data.xml.impl.SkillData; +import com.l2jmobius.gameserver.enums.ChatType; +import com.l2jmobius.gameserver.model.actor.L2Npc; +import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; +import com.l2jmobius.gameserver.model.itemcontainer.Inventory; +import com.l2jmobius.gameserver.model.skills.AbnormalType; +import com.l2jmobius.gameserver.model.skills.Skill; +import com.l2jmobius.gameserver.model.skills.SkillCaster; +import com.l2jmobius.gameserver.network.NpcStringId; +import com.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage; + +import ai.AbstractNpcAI; + +/** + * Theorn AI + * @author Gigi, Mobius + * @date 2017-10-26 - [22:17:03] + */ +public class Theorn extends AbstractNpcAI +{ + // NPC + private static final int THERON = 33897; + // Skills + private static final int REWARD_BUFF_X2 = 16136; + private static final int REWARD_BUFF_X4 = 16137; + private static final int REWARD_BUFF_X8 = 16138; + private static final int REWARD_BUFF_X16 = 16139; + private static final int REWARD_BUFF_X32 = 16140; + private static final Skill RESEARCH_SUCCESS_1 = SkillData.getInstance().getSkill(16141, 1); + private static final Skill RESEARCH_SUCCESS_2 = SkillData.getInstance().getSkill(16142, 1); + private static final Skill RESEARCH_SUCCESS_3 = SkillData.getInstance().getSkill(16143, 1); + private static final Skill RESEARCH_SUCCESS_4 = SkillData.getInstance().getSkill(16144, 1); + private static final Skill RESEARCH_SUCCESS_5 = SkillData.getInstance().getSkill(16145, 1); + private static final Skill RESEARCH_FAIL = SkillData.getInstance().getSkill(16146, 1); + + private Theorn() + { + addStartNpc(THERON); + addTalkId(THERON); + addFirstTalkId(THERON); + addSpawnId(THERON); + } + + @Override + public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) + { + String htmltext = null; + switch (event) + { + case "BROADCAST_TEXT": + { + npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.I_WILL_LEAVE_THIS_PLACE_ONCE_DAY_BREAKS_IF_YOU_WANT_A_REWARD_HURRY_UP_AND_GET_IT_BE_CAREFUL_NOT_TO_LOSE_THE_RESEARCH_REWARDS_IN_THE_VOID); + startQuestTimer("BROADCAST_TEXT", (60 + getRandom(10)) * 3000, npc, null); + break; + } + case "light_1": + { + if ((player.getSp() < 500000) || (player.getAdena() < 100000)) + { + htmltext = "nosp.html"; + break; + } + tryLuck(npc, player, RESEARCH_SUCCESS_1, true); + break; + } + case "darkness_1": + { + if ((player.getSp() < 500000) || (player.getAdena() < 100000)) + { + htmltext = "nosp.html"; + break; + } + tryLuck(npc, player, RESEARCH_SUCCESS_1, false); + break; + } + case "light_2": + { + if ((player.getSp() < 500000) || (player.getAdena() < 100000)) + { + htmltext = "nosp.html"; + break; + } + tryLuck(npc, player, RESEARCH_SUCCESS_2, true); + break; + } + case "darkness_2": + { + if ((player.getSp() < 500000) || (player.getAdena() < 100000)) + { + htmltext = "nosp.html"; + break; + } + tryLuck(npc, player, RESEARCH_SUCCESS_2, false); + break; + } + case "light_3": + { + if ((player.getSp() < 500000) || (player.getAdena() < 100000)) + { + htmltext = "nosp.html"; + break; + } + tryLuck(npc, player, RESEARCH_SUCCESS_3, true); + break; + } + case "darkness_3": + { + if ((player.getSp() < 500000) || (player.getAdena() < 100000)) + { + htmltext = "nosp.html"; + break; + } + tryLuck(npc, player, RESEARCH_SUCCESS_3, false); + break; + } + case "light_4": + { + if ((player.getSp() < 500000) || (player.getAdena() < 100000)) + { + htmltext = "nosp.html"; + break; + } + tryLuck(npc, player, RESEARCH_SUCCESS_4, true); + break; + } + case "darkness_4": + { + if ((player.getSp() < 500000) || (player.getAdena() < 100000)) + { + htmltext = "nosp.html"; + break; + } + tryLuck(npc, player, RESEARCH_SUCCESS_4, false); + break; + } + case "light_5": + { + if ((player.getSp() < 500000) || (player.getAdena() < 100000)) + { + htmltext = "nosp.html"; + break; + } + tryLuck(npc, player, RESEARCH_SUCCESS_5, true); + break; + } + case "darkness_5": + { + if ((player.getSp() < 500000) || (player.getAdena() < 100000)) + { + htmltext = "nosp.html"; + break; + } + tryLuck(npc, player, RESEARCH_SUCCESS_5, false); + break; + } + case "stop_1": + { + if ((player != null) && !player.isDead() && (player.getEffectList().getBuffInfoBySkillId(REWARD_BUFF_X2) != null)) + { + addExpAndSp(player, 0, 1000000); + showOnScreenMsg(player, NpcStringId.YOU_HAVE_ACQUIRED_SP_X_2, ExShowScreenMessage.TOP_CENTER, 5000); + player.getEffectList().stopEffects(AbnormalType.STAR_AGATHION_EXP_SP_BUFF1); + } + break; + } + case "stop_2": + { + if ((player != null) && !player.isDead() && (player.getEffectList().getBuffInfoBySkillId(REWARD_BUFF_X4) != null)) + { + addExpAndSp(player, 0, 2000000); + showOnScreenMsg(player, NpcStringId.YOU_HAVE_ACQUIRED_SP_X_4, ExShowScreenMessage.TOP_CENTER, 5000); + player.getEffectList().stopEffects(AbnormalType.STAR_AGATHION_EXP_SP_BUFF1); + } + break; + } + case "stop_3": + { + if ((player != null) && !player.isDead() && (player.getEffectList().getBuffInfoBySkillId(REWARD_BUFF_X8) != null)) + { + addExpAndSp(player, 0, 4000000); + showOnScreenMsg(player, NpcStringId.YOU_HAVE_ACQUIRED_SP_X_8, ExShowScreenMessage.TOP_CENTER, 5000); + player.getEffectList().stopEffects(AbnormalType.STAR_AGATHION_EXP_SP_BUFF1); + } + break; + } + case "stop_4": + { + if ((player != null) && !player.isDead() && (player.getEffectList().getBuffInfoBySkillId(REWARD_BUFF_X16) != null)) + { + addExpAndSp(player, 0, 8000000); + showOnScreenMsg(player, NpcStringId.YOU_HAVE_ACQUIRED_SP_X_16, ExShowScreenMessage.TOP_CENTER, 5000); + player.getEffectList().stopEffects(AbnormalType.STAR_AGATHION_EXP_SP_BUFF1); + } + break; + } + case "stop_5": + { + if ((player != null) && !player.isDead() && (player.getEffectList().getBuffInfoBySkillId(REWARD_BUFF_X32) != null)) + { + addExpAndSp(player, 0, 16000000); + showOnScreenMsg(player, NpcStringId.S1_ACQUIRED_32_TIMES_THE_SKILL_POINTS_AS_A_REWARD, ExShowScreenMessage.TOP_CENTER, 5000, player.getName()); + player.getEffectList().stopEffects(AbnormalType.STAR_AGATHION_EXP_SP_BUFF1); + } + break; + } + case "REMOVE_BUFF": + { + player.getEffectList().stopEffects(AbnormalType.STAR_AGATHION_EXP_SP_BUFF1); + break; + } + } + return htmltext; + } + + @Override + public String onFirstTalk(L2Npc npc, L2PcInstance player) + { + if (player.getEffectList().getBuffInfoBySkillId(REWARD_BUFF_X2) != null) + { + return "33897_x2.html"; + } + else if (player.getEffectList().getBuffInfoBySkillId(REWARD_BUFF_X4) != null) + { + return "33897_x4.html"; + } + else if (player.getEffectList().getBuffInfoBySkillId(REWARD_BUFF_X8) != null) + { + return "33897_x8.html"; + } + else if (player.getEffectList().getBuffInfoBySkillId(REWARD_BUFF_X16) != null) + { + return "33897_x16.html"; + } + else if (player.getEffectList().getBuffInfoBySkillId(REWARD_BUFF_X32) != null) + { + return "33897_x32.html"; + } + return "33897.html"; + } + + private void tryLuck(L2Npc npc, L2PcInstance player, Skill skill, boolean isLight) + { + takeItems(player, Inventory.ADENA_ID, 100000); + player.setSp(player.getSp() - 500000); + if (isLight ? getRandom(10) > 4 : getRandom(10) < 5) + { + SkillCaster.triggerCast(npc, player, skill); + return; + } + SkillCaster.triggerCast(npc, player, RESEARCH_FAIL); + startQuestTimer("REMOVE_BUFF", 3000, npc, player); + } + + @Override + public String onSpawn(L2Npc npc) + { + startQuestTimer("BROADCAST_TEXT", 3000, npc, null); + return super.onSpawn(npc); + } + + public static void main(String[] args) + { + new Theorn(); + } +} \ No newline at end of file diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/areas/HellboundIsland/Theron/nosp.html b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/areas/HellboundIsland/Theron/nosp.html new file mode 100644 index 0000000000..cdda50998f --- /dev/null +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/areas/HellboundIsland/Theron/nosp.html @@ -0,0 +1,3 @@ +Theorn:
+What? You don't even have the basic funding or Skill Points? What do you think I survive on, grass? Go hunt or something and make ends meet! + \ No newline at end of file diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/spawns/Hellbound/Hellbound.xml b/L2J_Mobius_2.5_Underground/dist/game/data/spawns/Hellbound/Hellbound.xml index 2d28a436e4..3d09222273 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/spawns/Hellbound/Hellbound.xml +++ b/L2J_Mobius_2.5_Underground/dist/game/data/spawns/Hellbound/Hellbound.xml @@ -270,5 +270,8 @@ + + + \ No newline at end of file diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/stats/skills/16100-16199.xml b/L2J_Mobius_2.5_Underground/dist/game/data/stats/skills/16100-16199.xml index e63a144779..e2341397b6 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/stats/skills/16100-16199.xml +++ b/L2J_Mobius_2.5_Underground/dist/game/data/stats/skills/16100-16199.xml @@ -497,118 +497,207 @@ 10000
- icon.etc_deco_star_i00 + 1 + 4 + STAR_AGATHION_EXP_SP_BUFF1 + STARS_0 + 900 A2 - 1000 - 2000 + 4000 1 - 1 + 4 + TARGET + SINGLE - icon.etc_deco_star_i00 + 1 + 300 + STAR_AGATHION_EXP_SP_BUFF1 + STARS_1 A2 - 1000 + 4000 2000 1 - 1 + 4 + TARGET + SINGLE - - icon.etc_deco_star_i00 + 2 + 300 + STAR_AGATHION_EXP_SP_BUFF1 + STARS_2 A2 - 1000 + 4000 2000 1 - 1 + 4 + TARGET + SINGLE - - icon.etc_deco_star_i00 + 3 + 300 + STAR_AGATHION_EXP_SP_BUFF1 + STARS_3 A2 - 1000 + 4000 2000 1 - 1 + 4 + TARGET + SINGLE - - icon.etc_deco_star_i00 + 4 + 300 + STAR_AGATHION_EXP_SP_BUFF1 + STARS_4 A2 - 1000 + 4000 2000 1 - 1 + 4 + TARGET + SINGLE - - icon.etc_deco_star_i00 + 5 + 300 + STAR_AGATHION_EXP_SP_BUFF1 + STARS_5 A2 - 1000 + 4000 2000 1 - 1 + 4 + TARGET + SINGLE - icon.etc_deco_star_i00 + 4 + 1 + STAR_AGATHION_EXP_SP_BUFF1 + STARS_0 A2 900 1 4 + 4000 + TARGET + SINGLE + + + 16136 + 1 + + - icon.etc_deco_star_i00 + 4 + 2 + STAR_AGATHION_EXP_SP_BUFF1 + STARS_1 A2 900 1 4 + 4000 + TARGET + SINGLE + + + 16137 + 1 + + - icon.etc_deco_star_i00 + 4 + 3 + STAR_AGATHION_EXP_SP_BUFF1 + STARS_2 A2 900 1 4 + 4000 + TARGET + SINGLE + + + 16138 + 1 + + - icon.etc_deco_star_i00 + 4 + 4 + STAR_AGATHION_EXP_SP_BUFF1 + STARS_3 A2 900 1 4 + 4000 + TARGET + SINGLE + + + 16139 + 1 + + - icon.etc_deco_star_i00 + 4 + 5 + STAR_AGATHION_EXP_SP_BUFF1 + STARS_4 A2 900 1 4 + 4000 + TARGET + SINGLE + + + 16140 + 1 + + - icon.etc_deco_star_i00 + 1 A2 900 1 4 + 500 + TARGET + SINGLE diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/HellboundIsland/Theron/33897.html b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/HellboundIsland/Theron/33897.html new file mode 100644 index 0000000000..9ac452817c --- /dev/null +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/HellboundIsland/Theron/33897.html @@ -0,0 +1,9 @@ +Theorn:
+Hey there! I'm researching the power of Heroes, and boy do I need lots of Skill Points for it! Do you want to donate yours? If things go well, you can earn additional SP! Interested? Here's the trick.
+This research requires 100,000 Adena and 500,000 SP. If my experiment is a success, I can pay you in double the SP! But if it fails, say goodbye to the SP! Oh, and no refunds for your Adena. It's necessary for my research!
+And don't die! Or else you will lose the buff I give you, and lose out on rewards.
+And I'm kind of a night-owl, so don't expect me to be around to reward you in the daytime.
+Well, what do you say? I'm at the end of my experimental stages, so all that's left to do is to inject some SP into either the Flask of Darkness or Flask of Light. Here, I'll let you pick.
+ + + \ No newline at end of file diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/HellboundIsland/Theron/33897_x16.html b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/HellboundIsland/Theron/33897_x16.html new file mode 100644 index 0000000000..318893fd73 --- /dev/null +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/HellboundIsland/Theron/33897_x16.html @@ -0,0 +1,7 @@ +Theorn:
+Excellent! Emotions overwhelm me! Since our meeting, you have become even stronger. So until the completion is very little do you want to continue? Can stop here
+But if you want to continue, then I'll understand everything without words ...But think well, because if this attempt turns out you are all SP who were before.
+ + + + \ No newline at end of file diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/HellboundIsland/Theron/33897_x2.html b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/HellboundIsland/Theron/33897_x2.html new file mode 100644 index 0000000000..6bd9383985 --- /dev/null +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/HellboundIsland/Theron/33897_x2.html @@ -0,0 +1,8 @@ +Theorn:
+I knew it! You chose well.
+Which leads me to ask... do you want to help again? Come on, it will really help me obtain - I mean, us obtain - the power of Heroes. Ahem.
+But if you fail this time, all of your accumulated SP will kiss you goodbye. What do you think?
+ + + + \ No newline at end of file diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/HellboundIsland/Theron/33897_x32.html b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/HellboundIsland/Theron/33897_x32.html new file mode 100644 index 0000000000..8d7a27c48e --- /dev/null +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/HellboundIsland/Theron/33897_x32.html @@ -0,0 +1,5 @@ +Theorn:
+What a surprise! Incredible! Thanks to you I know the power of the hero! By our next meeting myself will become a hero. Ho-ho-ho-ho I will always remember you.
+From this benefit not only me! you can get 32 times more SP. Which made at the first study. This is called mutually beneficial cooperation! Ha-ha! Well, see you friend
+ + \ No newline at end of file diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/HellboundIsland/Theron/33897_x4.html b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/HellboundIsland/Theron/33897_x4.html new file mode 100644 index 0000000000..0585d3d1cc --- /dev/null +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/HellboundIsland/Theron/33897_x4.html @@ -0,0 +1,7 @@ +Theorn:
You are a genius!
+I dreamed that you'd succeed last night -- and I was right! What talent. Do you wanna try again?
+If you fail, you'll lose all your SP, but... you don't really need them, do you?
+ + + + \ No newline at end of file diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/HellboundIsland/Theron/33897_x8.html b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/HellboundIsland/Theron/33897_x8.html new file mode 100644 index 0000000000..e58dcbce12 --- /dev/null +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/HellboundIsland/Theron/33897_x8.html @@ -0,0 +1,7 @@ +Theorn:
+I knew there was something unusual about you. You're a rare genius! Which means you should of course try again. Right?
+If you fail, you lose all your SP, but you don't really care, right? +
+ + + \ No newline at end of file diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/HellboundIsland/Theron/Theorn.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/HellboundIsland/Theron/Theorn.java new file mode 100644 index 0000000000..e044b1cf14 --- /dev/null +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/HellboundIsland/Theron/Theorn.java @@ -0,0 +1,283 @@ +/* + * This file is part of the L2J Mobius project. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package ai.areas.HellboundIsland.Theron; + +import com.l2jmobius.gameserver.data.xml.impl.SkillData; +import com.l2jmobius.gameserver.enums.ChatType; +import com.l2jmobius.gameserver.model.actor.L2Npc; +import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; +import com.l2jmobius.gameserver.model.itemcontainer.Inventory; +import com.l2jmobius.gameserver.model.skills.AbnormalType; +import com.l2jmobius.gameserver.model.skills.Skill; +import com.l2jmobius.gameserver.model.skills.SkillCaster; +import com.l2jmobius.gameserver.network.NpcStringId; +import com.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage; + +import ai.AbstractNpcAI; + +/** + * Theorn AI + * @author Gigi, Mobius + * @date 2017-10-26 - [22:17:03] + */ +public class Theorn extends AbstractNpcAI +{ + // NPC + private static final int THERON = 33897; + // Skills + private static final int REWARD_BUFF_X2 = 16136; + private static final int REWARD_BUFF_X4 = 16137; + private static final int REWARD_BUFF_X8 = 16138; + private static final int REWARD_BUFF_X16 = 16139; + private static final int REWARD_BUFF_X32 = 16140; + private static final Skill RESEARCH_SUCCESS_1 = SkillData.getInstance().getSkill(16141, 1); + private static final Skill RESEARCH_SUCCESS_2 = SkillData.getInstance().getSkill(16142, 1); + private static final Skill RESEARCH_SUCCESS_3 = SkillData.getInstance().getSkill(16143, 1); + private static final Skill RESEARCH_SUCCESS_4 = SkillData.getInstance().getSkill(16144, 1); + private static final Skill RESEARCH_SUCCESS_5 = SkillData.getInstance().getSkill(16145, 1); + private static final Skill RESEARCH_FAIL = SkillData.getInstance().getSkill(16146, 1); + + private Theorn() + { + addStartNpc(THERON); + addTalkId(THERON); + addFirstTalkId(THERON); + addSpawnId(THERON); + } + + @Override + public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) + { + String htmltext = null; + switch (event) + { + case "BROADCAST_TEXT": + { + npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.I_WILL_LEAVE_THIS_PLACE_ONCE_DAY_BREAKS_IF_YOU_WANT_A_REWARD_HURRY_UP_AND_GET_IT_BE_CAREFUL_NOT_TO_LOSE_THE_RESEARCH_REWARDS_IN_THE_VOID); + startQuestTimer("BROADCAST_TEXT", (60 + getRandom(10)) * 3000, npc, null); + break; + } + case "light_1": + { + if ((player.getSp() < 500000) || (player.getAdena() < 100000)) + { + htmltext = "nosp.html"; + break; + } + tryLuck(npc, player, RESEARCH_SUCCESS_1, true); + break; + } + case "darkness_1": + { + if ((player.getSp() < 500000) || (player.getAdena() < 100000)) + { + htmltext = "nosp.html"; + break; + } + tryLuck(npc, player, RESEARCH_SUCCESS_1, false); + break; + } + case "light_2": + { + if ((player.getSp() < 500000) || (player.getAdena() < 100000)) + { + htmltext = "nosp.html"; + break; + } + tryLuck(npc, player, RESEARCH_SUCCESS_2, true); + break; + } + case "darkness_2": + { + if ((player.getSp() < 500000) || (player.getAdena() < 100000)) + { + htmltext = "nosp.html"; + break; + } + tryLuck(npc, player, RESEARCH_SUCCESS_2, false); + break; + } + case "light_3": + { + if ((player.getSp() < 500000) || (player.getAdena() < 100000)) + { + htmltext = "nosp.html"; + break; + } + tryLuck(npc, player, RESEARCH_SUCCESS_3, true); + break; + } + case "darkness_3": + { + if ((player.getSp() < 500000) || (player.getAdena() < 100000)) + { + htmltext = "nosp.html"; + break; + } + tryLuck(npc, player, RESEARCH_SUCCESS_3, false); + break; + } + case "light_4": + { + if ((player.getSp() < 500000) || (player.getAdena() < 100000)) + { + htmltext = "nosp.html"; + break; + } + tryLuck(npc, player, RESEARCH_SUCCESS_4, true); + break; + } + case "darkness_4": + { + if ((player.getSp() < 500000) || (player.getAdena() < 100000)) + { + htmltext = "nosp.html"; + break; + } + tryLuck(npc, player, RESEARCH_SUCCESS_4, false); + break; + } + case "light_5": + { + if ((player.getSp() < 500000) || (player.getAdena() < 100000)) + { + htmltext = "nosp.html"; + break; + } + tryLuck(npc, player, RESEARCH_SUCCESS_5, true); + break; + } + case "darkness_5": + { + if ((player.getSp() < 500000) || (player.getAdena() < 100000)) + { + htmltext = "nosp.html"; + break; + } + tryLuck(npc, player, RESEARCH_SUCCESS_5, false); + break; + } + case "stop_1": + { + if ((player != null) && !player.isDead() && (player.getEffectList().getBuffInfoBySkillId(REWARD_BUFF_X2) != null)) + { + addExpAndSp(player, 0, 1000000); + showOnScreenMsg(player, NpcStringId.YOU_HAVE_ACQUIRED_SP_X_2, ExShowScreenMessage.TOP_CENTER, 5000); + player.getEffectList().stopEffects(AbnormalType.STAR_AGATHION_EXP_SP_BUFF1); + } + break; + } + case "stop_2": + { + if ((player != null) && !player.isDead() && (player.getEffectList().getBuffInfoBySkillId(REWARD_BUFF_X4) != null)) + { + addExpAndSp(player, 0, 2000000); + showOnScreenMsg(player, NpcStringId.YOU_HAVE_ACQUIRED_SP_X_4, ExShowScreenMessage.TOP_CENTER, 5000); + player.getEffectList().stopEffects(AbnormalType.STAR_AGATHION_EXP_SP_BUFF1); + } + break; + } + case "stop_3": + { + if ((player != null) && !player.isDead() && (player.getEffectList().getBuffInfoBySkillId(REWARD_BUFF_X8) != null)) + { + addExpAndSp(player, 0, 4000000); + showOnScreenMsg(player, NpcStringId.YOU_HAVE_ACQUIRED_SP_X_8, ExShowScreenMessage.TOP_CENTER, 5000); + player.getEffectList().stopEffects(AbnormalType.STAR_AGATHION_EXP_SP_BUFF1); + } + break; + } + case "stop_4": + { + if ((player != null) && !player.isDead() && (player.getEffectList().getBuffInfoBySkillId(REWARD_BUFF_X16) != null)) + { + addExpAndSp(player, 0, 8000000); + showOnScreenMsg(player, NpcStringId.YOU_HAVE_ACQUIRED_SP_X_16, ExShowScreenMessage.TOP_CENTER, 5000); + player.getEffectList().stopEffects(AbnormalType.STAR_AGATHION_EXP_SP_BUFF1); + } + break; + } + case "stop_5": + { + if ((player != null) && !player.isDead() && (player.getEffectList().getBuffInfoBySkillId(REWARD_BUFF_X32) != null)) + { + addExpAndSp(player, 0, 16000000); + showOnScreenMsg(player, NpcStringId.S1_ACQUIRED_32_TIMES_THE_SKILL_POINTS_AS_A_REWARD, ExShowScreenMessage.TOP_CENTER, 5000, player.getName()); + player.getEffectList().stopEffects(AbnormalType.STAR_AGATHION_EXP_SP_BUFF1); + } + break; + } + case "REMOVE_BUFF": + { + player.getEffectList().stopEffects(AbnormalType.STAR_AGATHION_EXP_SP_BUFF1); + break; + } + } + return htmltext; + } + + @Override + public String onFirstTalk(L2Npc npc, L2PcInstance player) + { + if (player.getEffectList().getBuffInfoBySkillId(REWARD_BUFF_X2) != null) + { + return "33897_x2.html"; + } + else if (player.getEffectList().getBuffInfoBySkillId(REWARD_BUFF_X4) != null) + { + return "33897_x4.html"; + } + else if (player.getEffectList().getBuffInfoBySkillId(REWARD_BUFF_X8) != null) + { + return "33897_x8.html"; + } + else if (player.getEffectList().getBuffInfoBySkillId(REWARD_BUFF_X16) != null) + { + return "33897_x16.html"; + } + else if (player.getEffectList().getBuffInfoBySkillId(REWARD_BUFF_X32) != null) + { + return "33897_x32.html"; + } + return "33897.html"; + } + + private void tryLuck(L2Npc npc, L2PcInstance player, Skill skill, boolean isLight) + { + takeItems(player, Inventory.ADENA_ID, 100000); + player.setSp(player.getSp() - 500000); + if (isLight ? getRandom(10) > 4 : getRandom(10) < 5) + { + SkillCaster.triggerCast(npc, player, skill); + return; + } + SkillCaster.triggerCast(npc, player, RESEARCH_FAIL); + startQuestTimer("REMOVE_BUFF", 3000, npc, player); + } + + @Override + public String onSpawn(L2Npc npc) + { + startQuestTimer("BROADCAST_TEXT", 3000, npc, null); + return super.onSpawn(npc); + } + + public static void main(String[] args) + { + new Theorn(); + } +} \ No newline at end of file diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/HellboundIsland/Theron/nosp.html b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/HellboundIsland/Theron/nosp.html new file mode 100644 index 0000000000..cdda50998f --- /dev/null +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/HellboundIsland/Theron/nosp.html @@ -0,0 +1,3 @@ +Theorn:
+What? You don't even have the basic funding or Skill Points? What do you think I survive on, grass? Go hunt or something and make ends meet! + \ No newline at end of file diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/spawns/Hellbound/Hellbound.xml b/L2J_Mobius_3.0_Helios/dist/game/data/spawns/Hellbound/Hellbound.xml index 331fdb7beb..a04a4fbd65 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/spawns/Hellbound/Hellbound.xml +++ b/L2J_Mobius_3.0_Helios/dist/game/data/spawns/Hellbound/Hellbound.xml @@ -272,5 +272,8 @@ + + + diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/stats/skills/16100-16199.xml b/L2J_Mobius_3.0_Helios/dist/game/data/stats/skills/16100-16199.xml index e223ab638d..d5efd875eb 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/stats/skills/16100-16199.xml +++ b/L2J_Mobius_3.0_Helios/dist/game/data/stats/skills/16100-16199.xml @@ -497,118 +497,207 @@ 10000
- icon.etc_deco_star_i00 + 1 + 4 + STAR_AGATHION_EXP_SP_BUFF1 + STARS_0 + 900 A2 - 1000 - 2000 + 4000 1 - 1 + 4 + TARGET + SINGLE - icon.etc_deco_star_i00 + 1 + 300 + STAR_AGATHION_EXP_SP_BUFF1 + STARS_1 A2 - 1000 + 4000 2000 1 - 1 + 4 + TARGET + SINGLE - - icon.etc_deco_star_i00 + 2 + 300 + STAR_AGATHION_EXP_SP_BUFF1 + STARS_2 A2 - 1000 + 4000 2000 1 - 1 + 4 + TARGET + SINGLE - - icon.etc_deco_star_i00 + 3 + 300 + STAR_AGATHION_EXP_SP_BUFF1 + STARS_3 A2 - 1000 + 4000 2000 1 - 1 + 4 + TARGET + SINGLE - - icon.etc_deco_star_i00 + 4 + 300 + STAR_AGATHION_EXP_SP_BUFF1 + STARS_4 A2 - 1000 + 4000 2000 1 - 1 + 4 + TARGET + SINGLE - - icon.etc_deco_star_i00 + 5 + 300 + STAR_AGATHION_EXP_SP_BUFF1 + STARS_5 A2 - 1000 + 4000 2000 1 - 1 + 4 + TARGET + SINGLE - icon.etc_deco_star_i00 + 4 + 1 + STAR_AGATHION_EXP_SP_BUFF1 + STARS_0 A2 900 1 4 + 4000 + TARGET + SINGLE + + + 16136 + 1 + + - icon.etc_deco_star_i00 + 4 + 2 + STAR_AGATHION_EXP_SP_BUFF1 + STARS_1 A2 900 1 4 + 4000 + TARGET + SINGLE + + + 16137 + 1 + + - icon.etc_deco_star_i00 + 4 + 3 + STAR_AGATHION_EXP_SP_BUFF1 + STARS_2 A2 900 1 4 + 4000 + TARGET + SINGLE + + + 16138 + 1 + + - icon.etc_deco_star_i00 + 4 + 4 + STAR_AGATHION_EXP_SP_BUFF1 + STARS_3 A2 900 1 4 + 4000 + TARGET + SINGLE + + + 16139 + 1 + + - icon.etc_deco_star_i00 + 4 + 5 + STAR_AGATHION_EXP_SP_BUFF1 + STARS_4 A2 900 1 4 + 4000 + TARGET + SINGLE + + + 16140 + 1 + + - icon.etc_deco_star_i00 + 1 A2 900 1 4 + 500 + TARGET + SINGLE