Removed last custom python scripts.

This commit is contained in:
MobiusDevelopment 2019-07-26 11:45:23 +00:00
parent d6fde0dde0
commit 216f4627f1
6 changed files with 130 additions and 98 deletions

View File

@ -0,0 +1,110 @@
/*
* 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.HotSprings;
import org.l2jmobius.commons.util.Rnd;
import org.l2jmobius.gameserver.datatables.SkillTable;
import org.l2jmobius.gameserver.model.Effect;
import org.l2jmobius.gameserver.model.Skill;
import org.l2jmobius.gameserver.model.actor.Creature;
import org.l2jmobius.gameserver.model.actor.instance.NpcInstance;
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
import org.l2jmobius.gameserver.model.quest.Quest;
/**
* Hot Springs AI.
* @author Mobius
*/
public final class HotSprings extends Quest
{
private static final String qn = "HotSprings";
// NPCs
private static final int BANDERSNATCHLING = 21314;
private static final int FLAVA = 21316;
private static final int ATROXSPAWN = 21317;
private static final int NEPENTHES = 21319;
private static final int ATROX = 21321;
private static final int BANDERSNATCH = 21322;
// Skills
private static final int RHEUMATISM = 4551;
private static final int CHOLERA = 4552;
private static final int FLU = 4553;
private static final int MALARIA = 4554;
// Misc
private static final int DISEASE_CHANCE = 10;
private HotSprings()
{
super(-1, qn, "areas");
addAttackId(BANDERSNATCHLING, FLAVA, ATROXSPAWN, NEPENTHES, ATROX, BANDERSNATCH);
}
@Override
public String onAttack(NpcInstance npc, PlayerInstance attacker, int damage, boolean isSummon)
{
if (Rnd.get(100) < DISEASE_CHANCE)
{
tryToInfect(npc, attacker, MALARIA);
}
if (Rnd.get(100) < DISEASE_CHANCE)
{
switch (npc.getNpcId())
{
case BANDERSNATCHLING:
case ATROX:
{
tryToInfect(npc, attacker, RHEUMATISM);
break;
}
case FLAVA:
case NEPENTHES:
{
tryToInfect(npc, attacker, CHOLERA);
break;
}
case ATROXSPAWN:
case BANDERSNATCH:
{
tryToInfect(npc, attacker, FLU);
break;
}
}
}
return super.onAttack(npc, attacker, damage, isSummon);
}
private void tryToInfect(NpcInstance npc, Creature creature, int diseaseId)
{
final Effect info = creature.getFirstEffect(diseaseId);
final int skillLevel = (info == null) ? 1 : (info.getSkill().getLevel() < 10) ? info.getSkill().getLevel() + 1 : 10;
final Skill skill = SkillTable.getInstance().getInfo(diseaseId, skillLevel);
if ((skill != null) && !npc.isCastingNow() && !npc.isSkillDisabled(skill))
{
npc.setTarget(creature);
npc.doCast(skill);
}
}
public static void main(String[] args)
{
new HotSprings();
}
}

View File

@ -0,0 +1,20 @@
/*
* 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/>.
*/
/**
* @author Mobius
*/
package ai.areas;

View File

@ -1,4 +0,0 @@
<html><body>Angelic Vortex:<br>
The Angelic Vortex emits a faint light, and in the midst of the light an image appears. In the deepest part of a specious area, a gigantic stone statue is visible. The statue has a human-like appearance and is in a seated position, as though it was being held by some invisible force against its will.<br>
<a action="bypass -h npc_%objectId%_Quest baium">Go where the Angelic Vortex leads.</a>
</body></html>

View File

@ -1,34 +0,0 @@
# Created by L2Emu Team
import sys
from org.l2jmobius.gameserver.instancemanager import GrandBossManager
from org.l2jmobius.gameserver.model.quest import State
from org.l2jmobius.gameserver.model.quest import QuestState
from org.l2jmobius.gameserver.model.quest.jython import QuestJython as JQuest
qn = "8003_MeetBaium"
class Quest (JQuest) :
def __init__(self,id,name,descr): JQuest.__init__(self,id,name,descr)
def onFirstTalk (self,npc,player):
st = player.getQuestState(qn)
if not st : st = self.newQuestState(player)
baiumStatus = GrandBossManager.getInstance().getBossStatus(29020)
if baiumStatus != 2 and st.getQuestItemsCount(4295) :
st.exitQuest(1)
return "31862.htm"
else :
npc.showChatWindow(player)
st.exitQuest(1)
return
return
QUEST = Quest(-1,qn,"custom")
QUEST.addStartNpc(31862)
QUEST.addFirstTalkId(31862)
QUEST.addTalkId(31862)

View File

@ -1,51 +0,0 @@
import sys
from org.l2jmobius.gameserver.model.quest import State
from org.l2jmobius.gameserver.model.quest import QuestState
from org.l2jmobius.gameserver.model.quest.jython import QuestJython as JQuest
from org.l2jmobius.gameserver.datatables import SkillTable
from org.l2jmobius.gameserver.model import Effect
from org.l2jmobius.commons.util import Rnd
qn = "8009_HotSpringsBuffs"
#print "HotSpringsBuffs"
HSMOBS = [21316, 21321, 21314, 21319]
class Quest (JQuest) :
def __init__(self,id,name,descr): JQuest.__init__(self,id,name,descr)
def onAttack (self,npc,player,damage,isPet):
npcId = npc.getNpcId()
if npcId in HSMOBS:
if (Rnd.get(2) == 1):
if (Rnd.get(2) == 1):
if player.getFirstEffect(int(4552)):
holera = player.getFirstEffect(int(4552)).getLevel()
if (Rnd.get(100) < 30):
if holera < 10:
newholera = int(holera + 1)
npc.setTarget(player)
npc.doCast(SkillTable.getInstance().getInfo(4552,newholera))
else:
npc.setTarget(player)
npc.doCast(SkillTable.getInstance().getInfo(4552,1))
else:
if player.getFirstEffect(int(4554)):
malaria = player.getFirstEffect(int(4554)).getLevel()
if (Rnd.get(100) < 15):
if malaria < 10:
newmalaria = int(malaria + 1)
npc.setTarget(player)
npc.doCast(SkillTable.getInstance().getInfo(4554,newmalaria))
else:
npc.setTarget(player)
npc.doCast(SkillTable.getInstance().getInfo(4554,1))
return
QUEST = Quest(8009,qn,"custom")
for i in HSMOBS:
QUEST.addAttackId(i)

View File

@ -1,9 +0,0 @@
Jython scripts added in the custom folder define quests and/or AI that are not normally part of
the original Lineage 2 game.
In addition, "custom" is sometimes used as a temporary implementation of aspects of the original
game that are not yet fully implementable by L2J. In this manner, partially accurate emulation
may be offered until a better method is implemented.
The mechanics and syntax of custom scripts are the same as all quest scripts. For more
details, please see "jscript/quests/documentation.txt"