Merged with released L2J-Unity files.
This commit is contained in:
4
trunk/dist/game/data/scripts/ai/areas/SeedOfAnnihilation/Klemis/32734-01.html
vendored
Normal file
4
trunk/dist/game/data/scripts/ai/areas/SeedOfAnnihilation/Klemis/32734-01.html
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Officer Klemis:<br>
|
||||
I understand the situation is urgent, but I think this place is still too dangerous for you. I cannot let any tourists walk into such a deadly place and waste their lives. So, please understand. But of course I will always welcome you back if you become stronger and gain more skills.<br>
|
||||
(Only characters <font color="LEVEL">level 85</font> or above can enter the Seed of Annihilation.)
|
||||
</body></html>
|
6
trunk/dist/game/data/scripts/ai/areas/SeedOfAnnihilation/Klemis/32734.html
vendored
Normal file
6
trunk/dist/game/data/scripts/ai/areas/SeedOfAnnihilation/Klemis/32734.html
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
<html><body>Officer Klemis:<br>
|
||||
Thank you for coming. I know the journey was long, but we have much to do. This place is in need of a good... how should I put it... cleansing. That's why I've called you here.<br>
|
||||
Now go in and meet <font color="LEVEL">Ermian</font>. He has a mission for you.<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Klemis portInside">Enter the Seed of Annihilation</Button>
|
||||
<Button ALIGN=LEFT ICON="QUEST" action="bypass -h npc_%objectId%_Quest">Quest</Button>
|
||||
</body></html>
|
66
trunk/dist/game/data/scripts/ai/areas/SeedOfAnnihilation/Klemis/Klemis.java
vendored
Normal file
66
trunk/dist/game/data/scripts/ai/areas/SeedOfAnnihilation/Klemis/Klemis.java
vendored
Normal file
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package ai.areas.SeedOfAnnihilation.Klemis;
|
||||
|
||||
import com.l2jmobius.gameserver.model.Location;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
|
||||
import ai.AbstractNpcAI;
|
||||
|
||||
/**
|
||||
* Klemis AI.
|
||||
* @author St3eT
|
||||
*/
|
||||
public final class Klemis extends AbstractNpcAI
|
||||
{
|
||||
// NPC
|
||||
private static final int KLEMIS = 32734; // Klemis
|
||||
// Location
|
||||
private static final Location LOCATION = new Location(-180218, 185923, -10576);
|
||||
// Misc
|
||||
private static final int MIN_LV = 85;
|
||||
|
||||
private Klemis()
|
||||
{
|
||||
addStartNpc(KLEMIS);
|
||||
addTalkId(KLEMIS);
|
||||
addFirstTalkId(KLEMIS);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
if (event.equals("portInside"))
|
||||
{
|
||||
if (player.getLevel() >= MIN_LV)
|
||||
{
|
||||
player.teleToLocation(LOCATION);
|
||||
}
|
||||
else
|
||||
{
|
||||
return "32734-01.html";
|
||||
}
|
||||
}
|
||||
return super.onAdvEvent(event, npc, player);
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new Klemis();
|
||||
}
|
||||
}
|
379
trunk/dist/game/data/scripts/ai/areas/SeedOfAnnihilation/Maguen.java
vendored
Normal file
379
trunk/dist/game/data/scripts/ai/areas/SeedOfAnnihilation/Maguen.java
vendored
Normal file
@@ -0,0 +1,379 @@
|
||||
/*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package ai.areas.SeedOfAnnihilation;
|
||||
|
||||
import com.l2jmobius.gameserver.ai.CtrlIntention;
|
||||
import com.l2jmobius.gameserver.instancemanager.QuestManager;
|
||||
import com.l2jmobius.gameserver.model.L2Object;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.model.holders.SkillHolder;
|
||||
import com.l2jmobius.gameserver.model.quest.Quest;
|
||||
import com.l2jmobius.gameserver.model.skills.BuffInfo;
|
||||
import com.l2jmobius.gameserver.model.skills.Skill;
|
||||
import com.l2jmobius.gameserver.network.NpcStringId;
|
||||
|
||||
import ai.AbstractNpcAI;
|
||||
import ai.areas.SeedOfAnnihilation.Nemo.Nemo;
|
||||
|
||||
/**
|
||||
* Maguen AI.
|
||||
* @author St3eT
|
||||
*/
|
||||
public final class Maguen extends AbstractNpcAI
|
||||
{
|
||||
// NPC
|
||||
private static final int MAGUEN = 18839; // Wild Maguen
|
||||
private static final int[] ELITES =
|
||||
{
|
||||
22750, // Elite Bgurent (Bistakon)
|
||||
22751, // Elite Brakian (Bistakon)
|
||||
22752, // Elite Groikan (Bistakon)
|
||||
22753, // Elite Treykan (Bistakon)
|
||||
22757, // Elite Turtlelian (Reptilikon)
|
||||
22758, // Elite Krajian (Reptilikon)
|
||||
22759, // Elite Tardyon (Reptilikon)
|
||||
22763, // Elite Kanibi (Kokracon)
|
||||
22764, // Elite Kiriona (Kokracon)
|
||||
22765, // Elite Kaiona (Kokracon)
|
||||
};
|
||||
// Item
|
||||
private static final int MAGUEN_PET = 15488; // Maguen Pet Collar
|
||||
private static final int ELITE_MAGUEN_PET = 15489; // Elite Maguen Pet Collar
|
||||
// Skills
|
||||
private static final SkillHolder MACHINE = new SkillHolder(9060, 1); // Maguen Machine
|
||||
private static final SkillHolder B_BUFF_1 = new SkillHolder(6343, 1); // Maguen Plasma - Power
|
||||
private static final SkillHolder B_BUFF_2 = new SkillHolder(6343, 2); // Maguen Plasma - Power
|
||||
private static final SkillHolder C_BUFF_1 = new SkillHolder(6365, 1); // Maguen Plasma - Speed
|
||||
private static final SkillHolder C_BUFF_2 = new SkillHolder(6365, 2); // Maguen Plasma - Speed
|
||||
private static final SkillHolder R_BUFF_1 = new SkillHolder(6366, 1); // Maguen Plasma - Critical
|
||||
private static final SkillHolder R_BUFF_2 = new SkillHolder(6366, 2); // Maguen Plasma - Critical
|
||||
private static final SkillHolder B_PLASMA1 = new SkillHolder(6367, 1); // Maguen Plasma - Bistakon
|
||||
private static final SkillHolder B_PLASMA2 = new SkillHolder(6367, 2); // Maguen Plasma - Bistakon
|
||||
private static final SkillHolder B_PLASMA3 = new SkillHolder(6367, 3); // Maguen Plasma - Bistakon
|
||||
private static final SkillHolder C_PLASMA1 = new SkillHolder(6368, 1); // Maguen Plasma - Cokrakon
|
||||
private static final SkillHolder C_PLASMA2 = new SkillHolder(6368, 2); // Maguen Plasma - Cokrakon
|
||||
private static final SkillHolder C_PLASMA3 = new SkillHolder(6368, 3); // Maguen Plasma - Cokrakon
|
||||
private static final SkillHolder R_PLASMA1 = new SkillHolder(6369, 1); // Maguen Plasma - Reptilikon
|
||||
private static final SkillHolder R_PLASMA2 = new SkillHolder(6369, 2); // Maguen Plasma - Reptilikon
|
||||
private static final SkillHolder R_PLASMA3 = new SkillHolder(6369, 3); // Maguen Plasma - Reptilikon
|
||||
|
||||
public Maguen()
|
||||
{
|
||||
addKillId(ELITES);
|
||||
addSkillSeeId(MAGUEN);
|
||||
addSpellFinishedId(MAGUEN);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
if ((npc == null) || (player == null))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
switch (event)
|
||||
{
|
||||
case "SPAWN_MAGUEN":
|
||||
{
|
||||
final L2Npc maguen = addSpawn(MAGUEN, npc.getLocation(), true, 60000, true);
|
||||
maguen.getVariables().set("SUMMON_PLAYER", player);
|
||||
maguen.setTitle(player.getName());
|
||||
maguen.setIsRunning(true);
|
||||
maguen.getAI().setIntention(CtrlIntention.AI_INTENTION_FOLLOW, player);
|
||||
maguen.broadcastStatusUpdate();
|
||||
showOnScreenMsg(player, NpcStringId.MAGUEN_APPEARANCE, 2, 4000);
|
||||
startQuestTimer("DIST_CHECK_TIMER", 1000, maguen, player);
|
||||
break;
|
||||
}
|
||||
case "DIST_CHECK_TIMER":
|
||||
{
|
||||
if ((npc.calculateDistance(player, true, false) < 100) && (npc.getVariables().getInt("IS_NEAR_PLAYER") == 0))
|
||||
{
|
||||
npc.getVariables().set("IS_NEAR_PLAYER", 1);
|
||||
startQuestTimer("FIRST_TIMER", 4000, npc, player);
|
||||
}
|
||||
else
|
||||
{
|
||||
startQuestTimer("DIST_CHECK_TIMER", 1000, npc, player);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "FIRST_TIMER":
|
||||
{
|
||||
npc.getAI().stopFollow();
|
||||
final int randomEffect = getRandom(1, 3);
|
||||
npc.setDisplayEffect(randomEffect);
|
||||
npc.getVariables().set("NPC_EFFECT", randomEffect);
|
||||
startQuestTimer("SECOND_TIMER", 5000 + getRandom(300), npc, player);
|
||||
npc.broadcastSocialAction(getRandom(1, 3));
|
||||
break;
|
||||
}
|
||||
case "SECOND_TIMER":
|
||||
{
|
||||
final int randomEffect = getRandom(1, 3);
|
||||
npc.setDisplayEffect(randomEffect);
|
||||
npc.getVariables().set("NPC_EFFECT", randomEffect);
|
||||
startQuestTimer("THIRD_TIMER", 4600 + getRandom(600), npc, player);
|
||||
npc.broadcastSocialAction(getRandom(1, 3));
|
||||
break;
|
||||
}
|
||||
case "THIRD_TIMER":
|
||||
{
|
||||
final int randomEffect = getRandom(1, 3);
|
||||
npc.setDisplayEffect(randomEffect);
|
||||
npc.getVariables().set("NPC_EFFECT", randomEffect);
|
||||
startQuestTimer("FORTH_TIMER", 4200 + getRandom(900), npc, player);
|
||||
npc.broadcastSocialAction(getRandom(1, 3));
|
||||
break;
|
||||
}
|
||||
case "FORTH_TIMER":
|
||||
{
|
||||
npc.getVariables().set("NPC_EFFECT", 0);
|
||||
npc.setDisplayEffect(4);
|
||||
startQuestTimer("END_TIMER", 500, npc, player);
|
||||
npc.broadcastSocialAction(getRandom(1, 3));
|
||||
break;
|
||||
}
|
||||
case "END_TIMER":
|
||||
{
|
||||
if (npc.getVariables().getInt("TEST_MAGUEN") == 1)
|
||||
{
|
||||
player.getEffectList().stopSkillEffects(true, B_PLASMA1.getSkill().getAbnormalType());
|
||||
player.getEffectList().stopSkillEffects(true, C_PLASMA1.getSkill().getAbnormalType());
|
||||
player.getEffectList().stopSkillEffects(true, R_PLASMA1.getSkill().getAbnormalType());
|
||||
nemoAi().notifyEvent("DECREASE_COUNT", npc, player);
|
||||
}
|
||||
npc.doDie(null);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return super.onAdvEvent(event, npc, player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onSpellFinished(L2Npc npc, L2PcInstance player, Skill skill)
|
||||
{
|
||||
final BuffInfo b_info = player.getEffectList().getBuffInfoByAbnormalType(B_PLASMA1.getSkill().getAbnormalType());
|
||||
final BuffInfo c_info = player.getEffectList().getBuffInfoByAbnormalType(C_PLASMA1.getSkill().getAbnormalType());
|
||||
final BuffInfo r_info = player.getEffectList().getBuffInfoByAbnormalType(R_PLASMA1.getSkill().getAbnormalType());
|
||||
|
||||
final int b = b_info == null ? 0 : b_info.getSkill().getAbnormalLvl();
|
||||
final int c = c_info == null ? 0 : c_info.getSkill().getAbnormalLvl();
|
||||
final int r = r_info == null ? 0 : r_info.getSkill().getAbnormalLvl();
|
||||
|
||||
if ((b == 3) && (c == 0) && (r == 0))
|
||||
{
|
||||
showOnScreenMsg(player, NpcStringId.ENOUGH_MAGUEN_PLASMA_BISTAKON_HAVE_GATHERED, 2, 4000);
|
||||
player.getEffectList().stopSkillEffects(true, B_PLASMA1.getSkill().getAbnormalType());
|
||||
npc.setTarget(player);
|
||||
npc.doCast((getRandom(100) < 70) ? B_BUFF_1.getSkill() : B_BUFF_2.getSkill());
|
||||
maguenPetChance(player);
|
||||
startQuestTimer("END_TIMER", 3000, npc, player);
|
||||
}
|
||||
else if ((b == 0) && (c == 3) && (r == 0))
|
||||
{
|
||||
showOnScreenMsg(player, NpcStringId.ENOUGH_MAGUEN_PLASMA_KOKRACON_HAVE_GATHERED, 2, 4000);
|
||||
player.getEffectList().stopSkillEffects(true, C_PLASMA1.getSkill().getAbnormalType());
|
||||
npc.setTarget(player);
|
||||
npc.doCast((getRandom(100) < 70) ? C_BUFF_1.getSkill() : C_BUFF_2.getSkill());
|
||||
maguenPetChance(player);
|
||||
startQuestTimer("END_TIMER", 3000, npc, player);
|
||||
}
|
||||
else if ((b == 0) && (c == 0) && (r == 3))
|
||||
{
|
||||
showOnScreenMsg(player, NpcStringId.ENOUGH_MAGUEN_PLASMA_LEPTILIKON_HAVE_GATHERED, 2, 4000);
|
||||
player.getEffectList().stopSkillEffects(true, R_PLASMA1.getSkill().getAbnormalType());
|
||||
npc.setTarget(player);
|
||||
npc.doCast((getRandom(100) < 70) ? R_BUFF_1.getSkill() : R_BUFF_2.getSkill());
|
||||
maguenPetChance(player);
|
||||
startQuestTimer("END_TIMER", 3000, npc, player);
|
||||
}
|
||||
else if ((b + c + r) == 3)
|
||||
{
|
||||
if ((b == 1) && (c == 1) && (r == 1))
|
||||
{
|
||||
player.getEffectList().stopSkillEffects(true, B_PLASMA1.getSkill().getAbnormalType());
|
||||
player.getEffectList().stopSkillEffects(true, C_PLASMA1.getSkill().getAbnormalType());
|
||||
player.getEffectList().stopSkillEffects(true, R_PLASMA1.getSkill().getAbnormalType());
|
||||
showOnScreenMsg(player, NpcStringId.THE_PLASMAS_HAVE_FILLED_THE_AEROSCOPE_AND_ARE_HARMONIZED, 2, 4000);
|
||||
SkillHolder skillToCast = null;
|
||||
switch (getRandom(3))
|
||||
{
|
||||
case 0:
|
||||
skillToCast = (getRandom(100) < 70) ? B_BUFF_1 : B_BUFF_2;
|
||||
break;
|
||||
case 1:
|
||||
skillToCast = (getRandom(100) < 70) ? C_BUFF_1 : C_BUFF_2;
|
||||
break;
|
||||
case 2:
|
||||
skillToCast = (getRandom(100) < 70) ? R_BUFF_1 : R_BUFF_2;
|
||||
break;
|
||||
}
|
||||
|
||||
if (skillToCast != null)
|
||||
{
|
||||
npc.setTarget(player);
|
||||
npc.doCast(skillToCast.getSkill());
|
||||
}
|
||||
maguenPetChance(player);
|
||||
startQuestTimer("END_TIMER", 3000, npc, player);
|
||||
}
|
||||
else
|
||||
{
|
||||
showOnScreenMsg(player, NpcStringId.THE_PLASMAS_HAVE_FILLED_THE_AEROSCOPE_BUT_THEY_ARE_RAMMING_INTO_EACH_OTHER_EXPLODING_AND_DYING, 2, 4000);
|
||||
player.getEffectList().stopSkillEffects(true, B_PLASMA1.getSkill().getAbnormalType());
|
||||
player.getEffectList().stopSkillEffects(true, C_PLASMA1.getSkill().getAbnormalType());
|
||||
player.getEffectList().stopSkillEffects(true, R_PLASMA1.getSkill().getAbnormalType());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
startQuestTimer("END_TIMER", 1000, npc, player);
|
||||
}
|
||||
npc.setDisplayEffect(4);
|
||||
return super.onSpellFinished(npc, player, skill);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onSkillSee(L2Npc npc, L2PcInstance caster, Skill skill, L2Object[] targets, boolean isSummon)
|
||||
{
|
||||
if ((skill == MACHINE.getSkill()) && (caster == npc.getVariables().getObject("SUMMON_PLAYER", L2PcInstance.class)))
|
||||
{
|
||||
if ((npc.getVariables().getInt("NPC_EFFECT") != 0) && (npc.getVariables().getInt("BLOCKED_SKILLSEE") == 0))
|
||||
{
|
||||
final BuffInfo i1_info = caster.getEffectList().getBuffInfoByAbnormalType(B_PLASMA1.getSkill().getAbnormalType());
|
||||
final BuffInfo i2_info = caster.getEffectList().getBuffInfoByAbnormalType(C_PLASMA1.getSkill().getAbnormalType());
|
||||
final BuffInfo i3_info = caster.getEffectList().getBuffInfoByAbnormalType(R_PLASMA1.getSkill().getAbnormalType());
|
||||
|
||||
final int i1 = i1_info == null ? 0 : i1_info.getSkill().getAbnormalLvl();
|
||||
final int i2 = i2_info == null ? 0 : i2_info.getSkill().getAbnormalLvl();
|
||||
final int i3 = i3_info == null ? 0 : i3_info.getSkill().getAbnormalLvl();
|
||||
|
||||
caster.getEffectList().stopSkillEffects(true, B_PLASMA1.getSkill().getAbnormalType());
|
||||
caster.getEffectList().stopSkillEffects(true, C_PLASMA1.getSkill().getAbnormalType());
|
||||
caster.getEffectList().stopSkillEffects(true, R_PLASMA1.getSkill().getAbnormalType());
|
||||
cancelQuestTimer("FIRST_TIMER", npc, caster);
|
||||
cancelQuestTimer("SECOND_TIMER", npc, caster);
|
||||
cancelQuestTimer("THIRD_TIMER", npc, caster);
|
||||
cancelQuestTimer("FORTH_TIMER", npc, caster);
|
||||
npc.getVariables().set("BLOCKED_SKILLSEE", 1);
|
||||
|
||||
SkillHolder skillToCast = null;
|
||||
switch (npc.getVariables().getInt("NPC_EFFECT"))
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
switch (i1)
|
||||
{
|
||||
case 0:
|
||||
skillToCast = B_PLASMA1;
|
||||
break;
|
||||
case 1:
|
||||
skillToCast = B_PLASMA2;
|
||||
break;
|
||||
case 2:
|
||||
skillToCast = B_PLASMA3;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
switch (i2)
|
||||
{
|
||||
case 0:
|
||||
skillToCast = C_PLASMA1;
|
||||
break;
|
||||
case 1:
|
||||
skillToCast = C_PLASMA2;
|
||||
break;
|
||||
case 2:
|
||||
skillToCast = C_PLASMA3;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
{
|
||||
switch (i3)
|
||||
{
|
||||
case 0:
|
||||
skillToCast = R_PLASMA1;
|
||||
break;
|
||||
case 1:
|
||||
skillToCast = R_PLASMA2;
|
||||
break;
|
||||
case 2:
|
||||
skillToCast = R_PLASMA3;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (skillToCast != null)
|
||||
{
|
||||
npc.setTarget(caster);
|
||||
npc.doCast(skillToCast.getSkill());
|
||||
}
|
||||
}
|
||||
}
|
||||
return super.onSkillSee(npc, caster, skill, targets, isSummon);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
|
||||
{
|
||||
if (killer.isInParty())
|
||||
{
|
||||
final L2PcInstance partyMember = getRandomPartyMember(killer);
|
||||
final int i0 = 10 + (10 * killer.getParty().getMemberCount());
|
||||
|
||||
if ((getRandom(1000) < i0) && (npc.calculateDistance(killer, true, false) < 2000) && (npc.calculateDistance(partyMember, true, false) < 2000))
|
||||
{
|
||||
notifyEvent("SPAWN_MAGUEN", npc, partyMember);
|
||||
}
|
||||
}
|
||||
return super.onKill(npc, killer, isSummon);
|
||||
}
|
||||
|
||||
private void maguenPetChance(L2PcInstance player)
|
||||
{
|
||||
final int chance1 = getRandom(10000);
|
||||
final int chance2 = getRandom(20);
|
||||
if ((chance1 == 0) && (chance2 != 0))
|
||||
{
|
||||
giveItems(player, MAGUEN_PET, 1);
|
||||
}
|
||||
else if ((chance1 == 0) && (chance2 == 0))
|
||||
{
|
||||
giveItems(player, ELITE_MAGUEN_PET, 1);
|
||||
}
|
||||
}
|
||||
|
||||
private Quest nemoAi()
|
||||
{
|
||||
return QuestManager.getInstance().getQuest(Nemo.class.getSimpleName());
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new Maguen();
|
||||
}
|
||||
}
|
8
trunk/dist/game/data/scripts/ai/areas/SeedOfAnnihilation/Nemo/32735-01.html
vendored
Normal file
8
trunk/dist/game/data/scripts/ai/areas/SeedOfAnnihilation/Nemo/32735-01.html
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
<html><body>Nemo:<br>
|
||||
I have no information about the origins of this species, but what I have found is that these creatures do possess a unique energy, sort of plasma if you will.<2E>Hmm... <font color="LEVEL">Maguen Plasma</font>. I like that.<2E>I think that is what I'll call it. Anyway, when a Maguen appears it begins to bring forth one of these plasmas. It will also cycle through its various plasmas before hiding.<br>
|
||||
With Blacksmith Kusto's talent and my magic we were able to create a device that could harvest these plasmas... a <font color="LEVEL">Maguen Plasma Collector</font>. I know it isn't too creative but we decided to keep the name simple to avoid explaining what it does.<br>
|
||||
Ugh... fine. I'll explain it to you. When you are in the Seed and a Maguen appears, you have a very limited time to collect the Maguen Plasma. If you don't collect the plasma in time, the Maguen will go back into hiding. I've set up a practice Maguen if you want to try using the Maguen Plasma Collector.<br>
|
||||
This isn't a real Maguen, so you won't collect any Plasma... just thought you should know so you don't get your hopes up.<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Nemo giveCollector">"Can I get a Maguen Plasma Collector?"</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Nemo summonMaguen"> "I want to try a Maguen Plasma Collector."</Button>
|
||||
</body></html>
|
6
trunk/dist/game/data/scripts/ai/areas/SeedOfAnnihilation/Nemo/32735-02.html
vendored
Normal file
6
trunk/dist/game/data/scripts/ai/areas/SeedOfAnnihilation/Nemo/32735-02.html
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
<html><body>Nemo:<br>
|
||||
Here is the Maguen Plasma Collector.<br1>
|
||||
Remember these rules:<br1>
|
||||
1. Collect <font color="LEVEL">one of each type</font>, or <font color="LEVEL">several of the same type</font>.<br1>
|
||||
2. Collecting random Maguen Plasmas can overload the Plasma Collector and will release any plasma you have collected. Yes, this means you'll have to start all over again.
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/ai/areas/SeedOfAnnihilation/Nemo/32735-03.html
vendored
Normal file
4
trunk/dist/game/data/scripts/ai/areas/SeedOfAnnihilation/Nemo/32735-03.html
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Nemo:<br>
|
||||
Are you pulling my leg? You're NOT an adventurer? Or you ARE? You have one? You want another? What is it?! Tell me!!<br>
|
||||
You've confused me. I don't know what to say... I need a moment...
|
||||
</body></html>
|
3
trunk/dist/game/data/scripts/ai/areas/SeedOfAnnihilation/Nemo/32735-04.html
vendored
Normal file
3
trunk/dist/game/data/scripts/ai/areas/SeedOfAnnihilation/Nemo/32735-04.html
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>Nemo:<br>
|
||||
Everything needs preparation. Did you think about how you are going to use it when you carry all that stuff? Make yourself lighter, or empty your inventory. Sheez.
|
||||
</body></html>
|
3
trunk/dist/game/data/scripts/ai/areas/SeedOfAnnihilation/Nemo/32735-05.html
vendored
Normal file
3
trunk/dist/game/data/scripts/ai/areas/SeedOfAnnihilation/Nemo/32735-05.html
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>Nemo:<br>
|
||||
Take a look at the top of the Maguen's head. Observe the aura of the Plasma that the Maguen is producing. Use the Maguen Plasma Collector when the Maguen summons the Plasma you wish to collect.
|
||||
</body></html>
|
3
trunk/dist/game/data/scripts/ai/areas/SeedOfAnnihilation/Nemo/32735-06.html
vendored
Normal file
3
trunk/dist/game/data/scripts/ai/areas/SeedOfAnnihilation/Nemo/32735-06.html
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>Nemo:<br>
|
||||
This is my magic's limit, now I can't help you. Look around... there are others just like you.
|
||||
</body></html>
|
6
trunk/dist/game/data/scripts/ai/areas/SeedOfAnnihilation/Nemo/32735.html
vendored
Normal file
6
trunk/dist/game/data/scripts/ai/areas/SeedOfAnnihilation/Nemo/32735.html
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
<html><body>Nemo:<br>
|
||||
Who are you? What business do you have with the Great Magician of Oren? Speak! Hmm... not a chatty one, are you? Well if you must know, I am here on important business.<br>
|
||||
It is said that a mysterious creature can only be found on this Seed. Have you heard of a <font color="LEVEL">Maguen</font>? Yes, I know it is a silly name. But aren't you the least bit intrigued?<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Nemo 32735-01.html">"What is a Maguen?"</Button>
|
||||
<Button ALIGN=LEFT ICON="QUEST" action="bypass -h npc_%objectId%_Quest">Quest</Button>
|
||||
</body></html>
|
124
trunk/dist/game/data/scripts/ai/areas/SeedOfAnnihilation/Nemo/Nemo.java
vendored
Normal file
124
trunk/dist/game/data/scripts/ai/areas/SeedOfAnnihilation/Nemo/Nemo.java
vendored
Normal file
@@ -0,0 +1,124 @@
|
||||
/*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package ai.areas.SeedOfAnnihilation.Nemo;
|
||||
|
||||
import com.l2jmobius.gameserver.ai.CtrlIntention;
|
||||
import com.l2jmobius.gameserver.instancemanager.QuestManager;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.model.quest.Quest;
|
||||
import com.l2jmobius.gameserver.network.NpcStringId;
|
||||
|
||||
import ai.AbstractNpcAI;
|
||||
import ai.areas.SeedOfAnnihilation.Maguen;
|
||||
|
||||
/**
|
||||
* Nemo AI.
|
||||
* @author St3eT
|
||||
*/
|
||||
public final class Nemo extends AbstractNpcAI
|
||||
{
|
||||
// NPCs
|
||||
private static final int NEMO = 32735; // Nemo
|
||||
private static final int MAGUEN = 18839; // Wild Maguen
|
||||
// Items
|
||||
private static final int COLLECTOR = 15487; // Maguen Plasma Collector
|
||||
// Misc
|
||||
private static final int MAXIMUM_MAGUEN = 18; // Maximum maguens in one time
|
||||
|
||||
public Nemo()
|
||||
{
|
||||
addStartNpc(NEMO);
|
||||
addFirstTalkId(NEMO);
|
||||
addTalkId(NEMO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
String htmltext = null;
|
||||
switch (event)
|
||||
{
|
||||
case "32735-01.html":
|
||||
{
|
||||
htmltext = event;
|
||||
break;
|
||||
}
|
||||
case "giveCollector":
|
||||
{
|
||||
if (hasQuestItems(player, COLLECTOR))
|
||||
{
|
||||
htmltext = "32735-03.html";
|
||||
}
|
||||
else if (!player.isInventoryUnder80(false))
|
||||
{
|
||||
htmltext = "32735-04.html";
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "32735-02.html";
|
||||
giveItems(player, COLLECTOR, 1);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "summonMaguen":
|
||||
{
|
||||
if ((player.getVariables().getInt("TEST_MAGUEN", 0) == 0) && (npc.getScriptValue() < MAXIMUM_MAGUEN))
|
||||
{
|
||||
final L2Npc maguen = addSpawn(MAGUEN, npc.getLocation(), true, 60000, true);
|
||||
maguen.getVariables().set("SUMMON_PLAYER", player);
|
||||
maguen.getVariables().set("SPAWNED_NPC", npc);
|
||||
maguen.getVariables().set("TEST_MAGUEN", 1);
|
||||
player.getVariables().set("TEST_MAGUEN", 1);
|
||||
maguen.setTitle(player.getName());
|
||||
maguen.setIsRunning(true);
|
||||
maguen.getAI().setIntention(CtrlIntention.AI_INTENTION_FOLLOW, player);
|
||||
maguen.broadcastStatusUpdate();
|
||||
showOnScreenMsg(player, NpcStringId.MAGUEN_APPEARANCE, 2, 4000);
|
||||
maguenAi().startQuestTimer("DIST_CHECK_TIMER", 1000, maguen, player);
|
||||
npc.setScriptValue(npc.getScriptValue() + 1);
|
||||
htmltext = "32735-05.html";
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "32735-06.html";
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "DECREASE_COUNT":
|
||||
{
|
||||
final L2Npc spawnedNpc = npc.getVariables().getObject("SPAWNED_NPC", L2Npc.class);
|
||||
if ((spawnedNpc != null) && (spawnedNpc.getScriptValue() > 0))
|
||||
{
|
||||
player.getVariables().remove("TEST_MAGUEN");
|
||||
spawnedNpc.setScriptValue(spawnedNpc.getScriptValue() - 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
private Quest maguenAi()
|
||||
{
|
||||
return QuestManager.getInstance().getQuest(Maguen.class.getSimpleName());
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new Nemo();
|
||||
}
|
||||
}
|
5
trunk/dist/game/data/scripts/ai/areas/SeedOfAnnihilation/Rumiese/33151-01.html
vendored
Normal file
5
trunk/dist/game/data/scripts/ai/areas/SeedOfAnnihilation/Rumiese/33151-01.html
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
<html><body>Rumiese:<br>
|
||||
For quite some time, we've been wondering how to counter Istina's mysterious Spirit Energy. We've found a device that can exert some slight control over the Spirit Energy. Istina will summon the <font color="LEVEL">Sealing Energy</font>, and that will bind one target. When that happens, you can use the <font color="LEVEL">Energy Control Device</font> to unbind the target. However, the Energy Control Device will need some time to recharge after each use, so be sure to save it for when your need is great.<br>
|
||||
Also, when Istina goes into her frenzy, the power of one person alone will not stop her; you'll need at least five people using the Energy Control Device at that point.<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Rumiese giveDevice">"Got it."</Button>
|
||||
</body></html>
|
3
trunk/dist/game/data/scripts/ai/areas/SeedOfAnnihilation/Rumiese/33151-02.html
vendored
Normal file
3
trunk/dist/game/data/scripts/ai/areas/SeedOfAnnihilation/Rumiese/33151-02.html
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>Rumiese:<br>
|
||||
Here you go. Please do not forget you use this when your need is greatest--and only then!
|
||||
</body></html>
|
2
trunk/dist/game/data/scripts/ai/areas/SeedOfAnnihilation/Rumiese/33151-03.html
vendored
Normal file
2
trunk/dist/game/data/scripts/ai/areas/SeedOfAnnihilation/Rumiese/33151-03.html
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
<html><body>Rumiese:<br>
|
||||
You can't sell this, you know. Then why try and get a second one?</body></html>
|
11
trunk/dist/game/data/scripts/ai/areas/SeedOfAnnihilation/Rumiese/33151.html
vendored
Normal file
11
trunk/dist/game/data/scripts/ai/areas/SeedOfAnnihilation/Rumiese/33151.html
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
<html><body>Rumiese:<br>
|
||||
Are you really ready, physically and mentally? Do not underestimate Istina's power, especially here on her home turf.<br>
|
||||
If you still believe you have a chance, we will help you by weakening Istina with the magical power Ballista.<br>
|
||||
Istina's creative power is generated by the soul stone in her body. Regular attacks won't even scratch the soul stone, but by concentrating your magical power into a huge attack with the Ballista, we can damage her. I will give you more details once you are inside the cavern. Are you ready to enter now?<br>
|
||||
Also, do you have the <font color="LEVEL">Energy Control Device</font>? You will need it for this fight.<br><br>
|
||||
By the way, I can exchange Istina's Accessories for something better for you. But keep in mind that the enchantment in the accessories will be reset.<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest IstinaCavern enterInstanceCommon">"I want to go inside Istina's Cavern."</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest IstinaCavern enterInstanceExtreme">"Send me into Istina's Cavern (Epic)."</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Rumiese 33151-01.html">"Huh? Energy Control Device?"</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_multisell 2016">"I'd like to exchange a Bottle of Soul and a bracelet for a Refined Bracelet."</Button>
|
||||
</body></html>
|
75
trunk/dist/game/data/scripts/ai/areas/SeedOfAnnihilation/Rumiese/Rumiese.java
vendored
Normal file
75
trunk/dist/game/data/scripts/ai/areas/SeedOfAnnihilation/Rumiese/Rumiese.java
vendored
Normal file
@@ -0,0 +1,75 @@
|
||||
/*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package ai.areas.SeedOfAnnihilation.Rumiese;
|
||||
|
||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
|
||||
import ai.AbstractNpcAI;
|
||||
|
||||
/**
|
||||
* Rumiese AI.
|
||||
* @author St3eT
|
||||
*/
|
||||
public final class Rumiese extends AbstractNpcAI
|
||||
{
|
||||
// NPC
|
||||
private static final int RUMIESE = 33151;
|
||||
// Item
|
||||
private static final int CONTROL_DEVICE = 17608; // Energy Control Device
|
||||
|
||||
public Rumiese()
|
||||
{
|
||||
addStartNpc(RUMIESE);
|
||||
addTalkId(RUMIESE);
|
||||
addFirstTalkId(RUMIESE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
String htmltext = null;
|
||||
|
||||
switch (event)
|
||||
{
|
||||
case "33151-01.html":
|
||||
{
|
||||
htmltext = event;
|
||||
break;
|
||||
}
|
||||
case "giveDevice":
|
||||
{
|
||||
if (!hasQuestItems(player, CONTROL_DEVICE))
|
||||
{
|
||||
giveItems(player, CONTROL_DEVICE, 1);
|
||||
htmltext = "33151-02.html";
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "33151-03.html";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new Rumiese();
|
||||
}
|
||||
}
|
3
trunk/dist/game/data/scripts/ai/areas/SeedOfAnnihilation/Seyo/32737-01.html
vendored
Normal file
3
trunk/dist/game/data/scripts/ai/areas/SeedOfAnnihilation/Seyo/32737-01.html
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>Seyo:<br>
|
||||
... Okay, who are you? You aren't here to give me a hard time I hope... I'm married already. Can't you just leave me alone...
|
||||
</body></html>
|
3
trunk/dist/game/data/scripts/ai/areas/SeedOfAnnihilation/Seyo/32737-02.html
vendored
Normal file
3
trunk/dist/game/data/scripts/ai/areas/SeedOfAnnihilation/Seyo/32737-02.html
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>Seyo:<br>
|
||||
If you don't have 5... why are you here....? I said five. One more than four, but not yet six... geez... No silver barrel items unless you have five... I hate my job... Less than five is a brown yellow barrel item... next!
|
||||
</body></html>
|
3
trunk/dist/game/data/scripts/ai/areas/SeedOfAnnihilation/Seyo/32737-03.html
vendored
Normal file
3
trunk/dist/game/data/scripts/ai/areas/SeedOfAnnihilation/Seyo/32737-03.html
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>Seyo:<br>
|
||||
Is twenty too many? No, not to me... You said you would give, don't change your mind now.... I'm a busy person too... Is it break time yet?
|
||||
</body></html>
|
3
trunk/dist/game/data/scripts/ai/areas/SeedOfAnnihilation/Seyo/32737-04.html
vendored
Normal file
3
trunk/dist/game/data/scripts/ai/areas/SeedOfAnnihilation/Seyo/32737-04.html
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>Seyo:<br>
|
||||
One at a time... Stand in line... Wait your turn... That's it. It's just a line... You can do it...
|
||||
</body></html>
|
7
trunk/dist/game/data/scripts/ai/areas/SeedOfAnnihilation/Seyo/32737.html
vendored
Normal file
7
trunk/dist/game/data/scripts/ai/areas/SeedOfAnnihilation/Seyo/32737.html
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
<html><body>Seyo:<br>
|
||||
Hello, and welcome to the middle of nowhere. Who am I? I like to think of myself as a business man of sorts. What I offer to you is a game of chance. I am giving you the opportunity to win <font color="LEVEL">Soul Stone Fragments</font>. You agree to give me a predetermined number of fragments. And in return, you have the chance of winning a random number of fragments. Sound good? Well then, how much can I put you down for?<br>
|
||||
<a action="bypass -h Quest Seyo give1">Give Seyo 1 fragment.</a><br>
|
||||
<a action="bypass -h Quest Seyo give5">Give Seyo 5 fragments.</a><br>
|
||||
<a action="bypass -h Quest Seyo give20">Give Seyo 20 fragments.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Quest">Quest</a>
|
||||
</body></html>
|
175
trunk/dist/game/data/scripts/ai/areas/SeedOfAnnihilation/Seyo/Seyo.java
vendored
Normal file
175
trunk/dist/game/data/scripts/ai/areas/SeedOfAnnihilation/Seyo/Seyo.java
vendored
Normal file
@@ -0,0 +1,175 @@
|
||||
/*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package ai.areas.SeedOfAnnihilation.Seyo;
|
||||
|
||||
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.network.NpcStringId;
|
||||
|
||||
import ai.AbstractNpcAI;
|
||||
|
||||
/**
|
||||
* Seyo AI.
|
||||
* @author St3eT
|
||||
*/
|
||||
public final class Seyo extends AbstractNpcAI
|
||||
{
|
||||
// NPC
|
||||
private static final int SEYO = 32737;
|
||||
// Item
|
||||
private static final int STONE_FRAGMENT = 15486; // Spirit Stone Fragment
|
||||
// Misc
|
||||
private static final NpcStringId[] TEXT =
|
||||
{
|
||||
NpcStringId.NO_ONE_ELSE_DON_T_WORRY_I_DON_T_BITE_HAHA,
|
||||
NpcStringId.OK_MASTER_OF_LUCK_THAT_S_YOU_HAHA_WELL_ANYONE_CAN_COME_AFTER_ALL,
|
||||
NpcStringId.SHEDDING_BLOOD_IS_A_GIVEN_ON_THE_BATTLEGROUND_AT_LEAST_IT_S_SAFE_HERE,
|
||||
NpcStringId.OK_WHO_S_NEXT_IT_ALL_DEPENDS_ON_YOUR_FATE_AND_LUCK_RIGHT_AT_LEAST_COME_AND_TAKE_A_LOOK,
|
||||
NpcStringId.THERE_WAS_SOMEONE_WHO_WON_10_000_FROM_ME_A_WARRIOR_SHOULDN_T_JUST_BE_GOOD_AT_FIGHTING_RIGHT_YOU_VE_GOTTA_BE_GOOD_IN_EVERYTHING
|
||||
};
|
||||
|
||||
public Seyo()
|
||||
{
|
||||
addStartNpc(SEYO);
|
||||
addTalkId(SEYO);
|
||||
addFirstTalkId(SEYO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
String htmltext = null;
|
||||
if (npc == null)
|
||||
{
|
||||
return htmltext;
|
||||
}
|
||||
switch (event)
|
||||
{
|
||||
case "TRICKERY_TIMER":
|
||||
{
|
||||
if (npc.isScriptValue(1))
|
||||
{
|
||||
npc.setScriptValue(0);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, TEXT[getRandom(TEXT.length)]);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "give1":
|
||||
{
|
||||
if (npc.isScriptValue(1))
|
||||
{
|
||||
htmltext = "32737-04.html";
|
||||
}
|
||||
else if (!hasQuestItems(player, STONE_FRAGMENT))
|
||||
{
|
||||
htmltext = "32737-01.html";
|
||||
}
|
||||
else
|
||||
{
|
||||
npc.setScriptValue(1);
|
||||
takeItems(player, STONE_FRAGMENT, 1);
|
||||
if (getRandom(100) == 0)
|
||||
{
|
||||
giveItems(player, STONE_FRAGMENT, 100);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.AMAZING_S1_TOOK_100_OF_THESE_SOUL_STONE_FRAGMENTS_WHAT_A_COMPLETE_SWINDLER, player.getName());
|
||||
}
|
||||
else
|
||||
{
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.HMM_HEY_DID_YOU_GIVE_S1_SOMETHING_BUT_IT_WAS_JUST_1_HAHA, player.getName());
|
||||
}
|
||||
startQuestTimer("TRICKERY_TIMER", 5000, npc, null);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "give5":
|
||||
{
|
||||
if (npc.isScriptValue(1))
|
||||
{
|
||||
htmltext = "32737-04.html";
|
||||
}
|
||||
else if (getQuestItemsCount(player, STONE_FRAGMENT) < 5)
|
||||
{
|
||||
htmltext = "32737-02.html";
|
||||
}
|
||||
else
|
||||
{
|
||||
npc.setScriptValue(1);
|
||||
takeItems(player, STONE_FRAGMENT, 5);
|
||||
final int chance = getRandom(100);
|
||||
if (chance < 20)
|
||||
{
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.AHEM_S1_HAS_NO_LUCK_AT_ALL_TRY_PRAYING, player.getName());
|
||||
}
|
||||
else if (chance < 80)
|
||||
{
|
||||
giveItems(player, STONE_FRAGMENT, 1);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.IT_S_BETTER_THAN_LOSING_IT_ALL_RIGHT_OR_DOES_THIS_FEEL_WORSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
final int itemCount = getRandom(10, 16);
|
||||
giveItems(player, STONE_FRAGMENT, itemCount);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.S1_PULLED_ONE_WITH_S2_DIGITS_LUCKY_NOT_BAD, player.getName(), String.valueOf(itemCount));
|
||||
}
|
||||
startQuestTimer("TRICKERY_TIMER", 5000, npc, null);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "give20":
|
||||
{
|
||||
if (npc.isScriptValue(1))
|
||||
{
|
||||
htmltext = "32737-04.html";
|
||||
}
|
||||
else if (getQuestItemsCount(player, STONE_FRAGMENT) < 20)
|
||||
{
|
||||
htmltext = "32737-03.html";
|
||||
}
|
||||
else
|
||||
{
|
||||
npc.setScriptValue(1);
|
||||
takeItems(player, STONE_FRAGMENT, 20);
|
||||
final int chance = getRandom(10000);
|
||||
if (chance == 0)
|
||||
{
|
||||
giveItems(player, STONE_FRAGMENT, 10000);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.AH_IT_S_OVER_WHAT_KIND_OF_GUY_IS_THAT_DAMN_FINE_YOU_S1_TAKE_IT_AND_GET_OUTTA_HERE, player.getName());
|
||||
}
|
||||
else if (chance < 10)
|
||||
{
|
||||
giveItems(player, STONE_FRAGMENT, 1);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.YOU_DON_T_FEEL_BAD_RIGHT_ARE_YOU_SAD_BUT_DON_T_CRY);
|
||||
}
|
||||
else
|
||||
{
|
||||
giveItems(player, STONE_FRAGMENT, getRandom(1, 100));
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.A_BIG_PIECE_IS_MADE_UP_OF_LITTLE_PIECES_SO_HERE_S_A_LITTLE_PIECE);
|
||||
}
|
||||
startQuestTimer("TRICKERY_TIMER", 5000, npc, null);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new Seyo();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user