Merged with released L2J-Unity files.
This commit is contained in:
78
trunk/dist/game/data/scripts/ai/areas/GardenOfGenesis/GenesisVines.java
vendored
Normal file
78
trunk/dist/game/data/scripts/ai/areas/GardenOfGenesis/GenesisVines.java
vendored
Normal file
@@ -0,0 +1,78 @@
|
||||
/*
|
||||
* 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.GardenOfGenesis;
|
||||
|
||||
import com.l2jmobius.gameserver.model.StatsSet;
|
||||
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.skills.SkillCaster;
|
||||
|
||||
import ai.AbstractNpcAI;
|
||||
|
||||
/**
|
||||
* Genesis Vines AI.
|
||||
* @author St3eT
|
||||
*/
|
||||
public final class GenesisVines extends AbstractNpcAI
|
||||
{
|
||||
// NPCs
|
||||
private static final int VINE = 18987; // Vine
|
||||
private static final int ROSE_VINE = 18988; // Rose Vine
|
||||
// Skills
|
||||
private static final SkillHolder VINE_SKILL = new SkillHolder(14092, 1);
|
||||
private static final SkillHolder ROSE_VINE_SKILL = new SkillHolder(14091, 1);
|
||||
|
||||
private GenesisVines()
|
||||
{
|
||||
addSpawnId(VINE, ROSE_VINE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTimerEvent(String event, StatsSet params, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
if (event.equals("CAST_SKILL") && npc.isScriptValue(1))
|
||||
{
|
||||
final SkillHolder skill = npc.getId() == VINE ? VINE_SKILL : ROSE_VINE_SKILL;
|
||||
if (SkillCaster.checkUseConditions(npc, skill.getSkill()))
|
||||
{
|
||||
addSkillCastDesire(npc, npc, skill, 23);
|
||||
}
|
||||
getTimers().addTimer("CAST_SKILL", 3000, npc, null);
|
||||
}
|
||||
else if (event.equals("DELETE"))
|
||||
{
|
||||
npc.setScriptValue(0);
|
||||
npc.deleteMe();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onSpawn(L2Npc npc)
|
||||
{
|
||||
npc.disableCoreAI(true);
|
||||
npc.setScriptValue(1);
|
||||
getTimers().addTimer("CAST_SKILL", 3000, npc, null);
|
||||
getTimers().addTimer("DELETE", 150000, npc, null);
|
||||
return super.onSpawn(npc);
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new GenesisVines();
|
||||
}
|
||||
}
|
3
trunk/dist/game/data/scripts/ai/areas/GardenOfGenesis/Statues/33138-no.html
vendored
Normal file
3
trunk/dist/game/data/scripts/ai/areas/GardenOfGenesis/Statues/33138-no.html
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>Genesis Angel Statue:<br>
|
||||
Others have already been through this place. You will have to wait.
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/ai/areas/GardenOfGenesis/Statues/33138.html
vendored
Normal file
4
trunk/dist/game/data/scripts/ai/areas/GardenOfGenesis/Statues/33138.html
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Genesis Angel Statue:<br>
|
||||
This place was once the playground of the angels, believe it or no. It's changed a great deal, obviously - mostly through the mutations the gods imposed on everything. For you to have the stones to approach me... well, I don't know if you're just brave or reckless.<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Statues fight">"Hah."</Button>
|
||||
</body></html>
|
3
trunk/dist/game/data/scripts/ai/areas/GardenOfGenesis/Statues/33139-no.html
vendored
Normal file
3
trunk/dist/game/data/scripts/ai/areas/GardenOfGenesis/Statues/33139-no.html
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>Genesis Fountain:<br>
|
||||
Others have already been through this place. You will have to wait.
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/ai/areas/GardenOfGenesis/Statues/33139.html
vendored
Normal file
4
trunk/dist/game/data/scripts/ai/areas/GardenOfGenesis/Statues/33139.html
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Genesis Goddess Statue:<br>
|
||||
This place once belonged to the humans, and though the periphery may not have changed, the core is mutated and poisonous. I wonder if the outise world will soon look the same...<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Statues fight">"Show me the light."</Button>
|
||||
</body></html>
|
3
trunk/dist/game/data/scripts/ai/areas/GardenOfGenesis/Statues/33140-no.html
vendored
Normal file
3
trunk/dist/game/data/scripts/ai/areas/GardenOfGenesis/Statues/33140-no.html
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>Genesis Goddess Statue:<br>
|
||||
Others have already been through this place. You will have to wait.
|
||||
</body></html>
|
5
trunk/dist/game/data/scripts/ai/areas/GardenOfGenesis/Statues/33140.html
vendored
Normal file
5
trunk/dist/game/data/scripts/ai/areas/GardenOfGenesis/Statues/33140.html
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
<html><body>Genesis Goddess Statue:<br>
|
||||
This place was originally used by the gods.<br>
|
||||
Then, when Apherus became too powerful, he was locked in the Apherus Garden, and the key was secured here.<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Statues fight">"Do you still want to fight me?"</Button>
|
||||
</body></html>
|
116
trunk/dist/game/data/scripts/ai/areas/GardenOfGenesis/Statues/Statues.java
vendored
Normal file
116
trunk/dist/game/data/scripts/ai/areas/GardenOfGenesis/Statues/Statues.java
vendored
Normal file
@@ -0,0 +1,116 @@
|
||||
/*
|
||||
* 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.GardenOfGenesis.Statues;
|
||||
|
||||
import com.l2jmobius.gameserver.model.Location;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.model.holders.SkillHolder;
|
||||
|
||||
import ai.AbstractNpcAI;
|
||||
|
||||
/**
|
||||
* Statues AI.
|
||||
* @author St3eT
|
||||
*/
|
||||
public final class Statues extends AbstractNpcAI
|
||||
{
|
||||
// NPCs
|
||||
private static final int STATUE_1 = 33138; // Genesis Angel Statue
|
||||
private static final int STATUE_2 = 33139; // Fountain of Genesis
|
||||
private static final int STATUE_3 = 33140; // Genesis Goddess Statue
|
||||
private static final int STATUE_KEEPER_1 = 23038; // Angel Statue Keeper
|
||||
private static final int STATUE_KEEPER_2 = 23039; // Fountain Keeper
|
||||
private static final int STATUE_KEEPER_3 = 23040; // Goddess Statue Keeper
|
||||
private static final int BUFF_NPC = 19073; // Genesis Transparent
|
||||
// Skills
|
||||
private static final SkillHolder REWARD_BUFF = new SkillHolder(14200, 1); // Blessing of Garden
|
||||
// Locations
|
||||
private static final Location LOC_1 = new Location(210049, 119367, -1352);
|
||||
private static final Location LOC_2 = new Location(217785, 110621, -1344);
|
||||
private static final Location LOC_3 = new Location(217792, 118844, -1760);
|
||||
|
||||
private Statues()
|
||||
{
|
||||
addStartNpc(STATUE_1, STATUE_2, STATUE_3);
|
||||
addFirstTalkId(STATUE_1, STATUE_2, STATUE_3);
|
||||
addTalkId(STATUE_1, STATUE_2, STATUE_3);
|
||||
addKillId(STATUE_KEEPER_1, STATUE_KEEPER_2, STATUE_KEEPER_3);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
String htmltext = null;
|
||||
if (event.equals("fight"))
|
||||
{
|
||||
if (npc.isScriptValue(0))
|
||||
{
|
||||
Location loc = null;
|
||||
int npcId = -1;
|
||||
switch (npc.getId())
|
||||
{
|
||||
case STATUE_1:
|
||||
loc = LOC_1;
|
||||
npcId = STATUE_KEEPER_1;
|
||||
break;
|
||||
case STATUE_2:
|
||||
loc = LOC_2;
|
||||
npcId = STATUE_KEEPER_2;
|
||||
break;
|
||||
case STATUE_3:
|
||||
loc = LOC_3;
|
||||
npcId = STATUE_KEEPER_3;
|
||||
break;
|
||||
}
|
||||
|
||||
if ((loc != null) && (npcId != -1))
|
||||
{
|
||||
npc.setScriptValue(1);
|
||||
getTimers().addTimer("FUNCTION_REUSE", 900000, evnt -> npc.setScriptValue(0));
|
||||
final L2Npc keeper = addSpawn(npcId, loc, false, 900000);
|
||||
addAttackPlayerDesire(keeper, player);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = npc.getId() + "-no.html";
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onFirstTalk(L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
return npc.getId() + ".html";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
|
||||
{
|
||||
final L2Npc buffNpc = addSpawn(BUFF_NPC, npc, false, 5000);
|
||||
buffNpc.setIsInvul(true);
|
||||
addSkillCastDesire(buffNpc, buffNpc, REWARD_BUFF, 23);
|
||||
return super.onKill(npc, killer, isSummon);
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new Statues();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user