Moved custom Pagan key drops to AI.

This commit is contained in:
MobiusDevelopment
2022-04-17 12:33:25 +00:00
parent cf10ace4da
commit 840588538d
17 changed files with 1635 additions and 4 deletions

View File

@@ -0,0 +1,109 @@
/*
* 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.PaganTemple;
import org.l2jmobius.Config;
import org.l2jmobius.commons.util.Rnd;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
import ai.AbstractNpcAI;
/**
* Custom script to remove custom key drop from NPC XMLs.<br>
* Used to access more conveniently Pagan Temple.
* @author Mobius
*/
public class PaganKeys extends AbstractNpcAI
{
// Items
private static final int ANTEROOM_KEY = 8273;
private static final int CHAPEL_KEY = 8274;
private static final int KEY_OF_DARKNESS = 8275;
// NPCs
private static final int ZOMBIE_WORKER = 22140;
private static final int TRIOLS_LAYPERSON = 22142;
private static final int TRIOLS_PRIEST = 22168;
// Misc
private static final int ANTEROOM_KEY_CHANCE = 10;
private static final int CHAPEL_KEY_CHANCE = 10;
private static final int KEY_OF_DARKNESS_CHANCE = 10;
private PaganKeys()
{
addKillId(ZOMBIE_WORKER, TRIOLS_LAYPERSON, TRIOLS_PRIEST);
}
@Override
public String onKill(Npc npc, Player killer, boolean isSummon)
{
switch (npc.getId())
{
case ZOMBIE_WORKER:
{
if (Rnd.get(100) < ANTEROOM_KEY_CHANCE)
{
if (Config.AUTO_LOOT)
{
giveItems(killer, ANTEROOM_KEY, 1);
}
else
{
npc.dropItem(killer, ANTEROOM_KEY, 1);
}
}
break;
}
case TRIOLS_LAYPERSON:
{
if (Rnd.get(100) < CHAPEL_KEY_CHANCE)
{
if (Config.AUTO_LOOT)
{
giveItems(killer, CHAPEL_KEY, 1);
}
else
{
npc.dropItem(killer, CHAPEL_KEY, 1);
}
}
break;
}
case TRIOLS_PRIEST:
{
if (Rnd.get(100) < KEY_OF_DARKNESS_CHANCE)
{
if (Config.AUTO_LOOT)
{
giveItems(killer, KEY_OF_DARKNESS, 1);
}
else
{
npc.dropItem(killer, KEY_OF_DARKNESS, 1);
}
}
break;
}
}
return super.onKill(npc, killer, isSummon);
}
public static void main(String[] args)
{
new PaganKeys();
}
}

View File

@@ -0,0 +1,109 @@
/*
* 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.PaganTemple;
import org.l2jmobius.Config;
import org.l2jmobius.commons.util.Rnd;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
import ai.AbstractNpcAI;
/**
* Custom script to remove custom key drop from NPC XMLs.<br>
* Used to access more conveniently Pagan Temple.
* @author Mobius
*/
public class PaganKeys extends AbstractNpcAI
{
// Items
private static final int ANTEROOM_KEY = 8273;
private static final int CHAPEL_KEY = 8274;
private static final int KEY_OF_DARKNESS = 8275;
// NPCs
private static final int ZOMBIE_WORKER = 22140;
private static final int TRIOLS_LAYPERSON = 22142;
private static final int TRIOLS_PRIEST = 22168;
// Misc
private static final int ANTEROOM_KEY_CHANCE = 10;
private static final int CHAPEL_KEY_CHANCE = 10;
private static final int KEY_OF_DARKNESS_CHANCE = 10;
private PaganKeys()
{
addKillId(ZOMBIE_WORKER, TRIOLS_LAYPERSON, TRIOLS_PRIEST);
}
@Override
public String onKill(Npc npc, Player killer, boolean isSummon)
{
switch (npc.getId())
{
case ZOMBIE_WORKER:
{
if (Rnd.get(100) < ANTEROOM_KEY_CHANCE)
{
if (Config.AUTO_LOOT)
{
giveItems(killer, ANTEROOM_KEY, 1);
}
else
{
npc.dropItem(killer, ANTEROOM_KEY, 1);
}
}
break;
}
case TRIOLS_LAYPERSON:
{
if (Rnd.get(100) < CHAPEL_KEY_CHANCE)
{
if (Config.AUTO_LOOT)
{
giveItems(killer, CHAPEL_KEY, 1);
}
else
{
npc.dropItem(killer, CHAPEL_KEY, 1);
}
}
break;
}
case TRIOLS_PRIEST:
{
if (Rnd.get(100) < KEY_OF_DARKNESS_CHANCE)
{
if (Config.AUTO_LOOT)
{
giveItems(killer, KEY_OF_DARKNESS, 1);
}
else
{
npc.dropItem(killer, KEY_OF_DARKNESS, 1);
}
}
break;
}
}
return super.onKill(npc, killer, isSummon);
}
public static void main(String[] args)
{
new PaganKeys();
}
}

View File

@@ -0,0 +1,109 @@
/*
* 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.PaganTemple;
import org.l2jmobius.Config;
import org.l2jmobius.commons.util.Rnd;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
import ai.AbstractNpcAI;
/**
* Custom script to remove custom key drop from NPC XMLs.<br>
* Used to access more conveniently Pagan Temple.
* @author Mobius
*/
public class PaganKeys extends AbstractNpcAI
{
// Items
private static final int ANTEROOM_KEY = 8273;
private static final int CHAPEL_KEY = 8274;
private static final int KEY_OF_DARKNESS = 8275;
// NPCs
private static final int ZOMBIE_WORKER = 22140;
private static final int TRIOLS_LAYPERSON = 22142;
private static final int TRIOLS_PRIEST = 22168;
// Misc
private static final int ANTEROOM_KEY_CHANCE = 10;
private static final int CHAPEL_KEY_CHANCE = 10;
private static final int KEY_OF_DARKNESS_CHANCE = 10;
private PaganKeys()
{
addKillId(ZOMBIE_WORKER, TRIOLS_LAYPERSON, TRIOLS_PRIEST);
}
@Override
public String onKill(Npc npc, Player killer, boolean isSummon)
{
switch (npc.getId())
{
case ZOMBIE_WORKER:
{
if (Rnd.get(100) < ANTEROOM_KEY_CHANCE)
{
if (Config.AUTO_LOOT)
{
giveItems(killer, ANTEROOM_KEY, 1);
}
else
{
npc.dropItem(killer, ANTEROOM_KEY, 1);
}
}
break;
}
case TRIOLS_LAYPERSON:
{
if (Rnd.get(100) < CHAPEL_KEY_CHANCE)
{
if (Config.AUTO_LOOT)
{
giveItems(killer, CHAPEL_KEY, 1);
}
else
{
npc.dropItem(killer, CHAPEL_KEY, 1);
}
}
break;
}
case TRIOLS_PRIEST:
{
if (Rnd.get(100) < KEY_OF_DARKNESS_CHANCE)
{
if (Config.AUTO_LOOT)
{
giveItems(killer, KEY_OF_DARKNESS, 1);
}
else
{
npc.dropItem(killer, KEY_OF_DARKNESS, 1);
}
}
break;
}
}
return super.onKill(npc, killer, isSummon);
}
public static void main(String[] args)
{
new PaganKeys();
}
}

View File

@@ -0,0 +1,109 @@
/*
* 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.PaganTemple;
import org.l2jmobius.Config;
import org.l2jmobius.commons.util.Rnd;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
import ai.AbstractNpcAI;
/**
* Custom script to remove custom key drop from NPC XMLs.<br>
* Used to access more conveniently Pagan Temple.
* @author Mobius
*/
public class PaganKeys extends AbstractNpcAI
{
// Items
private static final int ANTEROOM_KEY = 8273;
private static final int CHAPEL_KEY = 8274;
private static final int KEY_OF_DARKNESS = 8275;
// NPCs
private static final int ZOMBIE_WORKER = 22140;
private static final int TRIOLS_LAYPERSON = 22142;
private static final int TRIOLS_PRIEST = 22168;
// Misc
private static final int ANTEROOM_KEY_CHANCE = 10;
private static final int CHAPEL_KEY_CHANCE = 10;
private static final int KEY_OF_DARKNESS_CHANCE = 10;
private PaganKeys()
{
addKillId(ZOMBIE_WORKER, TRIOLS_LAYPERSON, TRIOLS_PRIEST);
}
@Override
public String onKill(Npc npc, Player killer, boolean isSummon)
{
switch (npc.getId())
{
case ZOMBIE_WORKER:
{
if (Rnd.get(100) < ANTEROOM_KEY_CHANCE)
{
if (Config.AUTO_LOOT)
{
giveItems(killer, ANTEROOM_KEY, 1);
}
else
{
npc.dropItem(killer, ANTEROOM_KEY, 1);
}
}
break;
}
case TRIOLS_LAYPERSON:
{
if (Rnd.get(100) < CHAPEL_KEY_CHANCE)
{
if (Config.AUTO_LOOT)
{
giveItems(killer, CHAPEL_KEY, 1);
}
else
{
npc.dropItem(killer, CHAPEL_KEY, 1);
}
}
break;
}
case TRIOLS_PRIEST:
{
if (Rnd.get(100) < KEY_OF_DARKNESS_CHANCE)
{
if (Config.AUTO_LOOT)
{
giveItems(killer, KEY_OF_DARKNESS, 1);
}
else
{
npc.dropItem(killer, KEY_OF_DARKNESS, 1);
}
}
break;
}
}
return super.onKill(npc, killer, isSummon);
}
public static void main(String[] args)
{
new PaganKeys();
}
}

View File

@@ -0,0 +1,109 @@
/*
* 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.PaganTemple;
import org.l2jmobius.Config;
import org.l2jmobius.commons.util.Rnd;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
import ai.AbstractNpcAI;
/**
* Custom script to remove custom key drop from NPC XMLs.<br>
* Used to access more conveniently Pagan Temple.
* @author Mobius
*/
public class PaganKeys extends AbstractNpcAI
{
// Items
private static final int ANTEROOM_KEY = 8273;
private static final int CHAPEL_KEY = 8274;
private static final int KEY_OF_DARKNESS = 8275;
// NPCs
private static final int ZOMBIE_WORKER = 22140;
private static final int TRIOLS_LAYPERSON = 22142;
private static final int TRIOLS_PRIEST = 22168;
// Misc
private static final int ANTEROOM_KEY_CHANCE = 10;
private static final int CHAPEL_KEY_CHANCE = 10;
private static final int KEY_OF_DARKNESS_CHANCE = 10;
private PaganKeys()
{
addKillId(ZOMBIE_WORKER, TRIOLS_LAYPERSON, TRIOLS_PRIEST);
}
@Override
public String onKill(Npc npc, Player killer, boolean isSummon)
{
switch (npc.getId())
{
case ZOMBIE_WORKER:
{
if (Rnd.get(100) < ANTEROOM_KEY_CHANCE)
{
if (Config.AUTO_LOOT)
{
giveItems(killer, ANTEROOM_KEY, 1);
}
else
{
npc.dropItem(killer, ANTEROOM_KEY, 1);
}
}
break;
}
case TRIOLS_LAYPERSON:
{
if (Rnd.get(100) < CHAPEL_KEY_CHANCE)
{
if (Config.AUTO_LOOT)
{
giveItems(killer, CHAPEL_KEY, 1);
}
else
{
npc.dropItem(killer, CHAPEL_KEY, 1);
}
}
break;
}
case TRIOLS_PRIEST:
{
if (Rnd.get(100) < KEY_OF_DARKNESS_CHANCE)
{
if (Config.AUTO_LOOT)
{
giveItems(killer, KEY_OF_DARKNESS, 1);
}
else
{
npc.dropItem(killer, KEY_OF_DARKNESS, 1);
}
}
break;
}
}
return super.onKill(npc, killer, isSummon);
}
public static void main(String[] args)
{
new PaganKeys();
}
}

View File

@@ -0,0 +1,109 @@
/*
* 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.PaganTemple;
import org.l2jmobius.Config;
import org.l2jmobius.commons.util.Rnd;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
import ai.AbstractNpcAI;
/**
* Custom script to remove custom key drop from NPC XMLs.<br>
* Used to access more conveniently Pagan Temple.
* @author Mobius
*/
public class PaganKeys extends AbstractNpcAI
{
// Items
private static final int ANTEROOM_KEY = 8273;
private static final int CHAPEL_KEY = 8274;
private static final int KEY_OF_DARKNESS = 8275;
// NPCs
private static final int ZOMBIE_WORKER = 22140;
private static final int TRIOLS_LAYPERSON = 22142;
private static final int TRIOLS_PRIEST = 22168;
// Misc
private static final int ANTEROOM_KEY_CHANCE = 10;
private static final int CHAPEL_KEY_CHANCE = 10;
private static final int KEY_OF_DARKNESS_CHANCE = 10;
private PaganKeys()
{
addKillId(ZOMBIE_WORKER, TRIOLS_LAYPERSON, TRIOLS_PRIEST);
}
@Override
public String onKill(Npc npc, Player killer, boolean isSummon)
{
switch (npc.getId())
{
case ZOMBIE_WORKER:
{
if (Rnd.get(100) < ANTEROOM_KEY_CHANCE)
{
if (Config.AUTO_LOOT)
{
giveItems(killer, ANTEROOM_KEY, 1);
}
else
{
npc.dropItem(killer, ANTEROOM_KEY, 1);
}
}
break;
}
case TRIOLS_LAYPERSON:
{
if (Rnd.get(100) < CHAPEL_KEY_CHANCE)
{
if (Config.AUTO_LOOT)
{
giveItems(killer, CHAPEL_KEY, 1);
}
else
{
npc.dropItem(killer, CHAPEL_KEY, 1);
}
}
break;
}
case TRIOLS_PRIEST:
{
if (Rnd.get(100) < KEY_OF_DARKNESS_CHANCE)
{
if (Config.AUTO_LOOT)
{
giveItems(killer, KEY_OF_DARKNESS, 1);
}
else
{
npc.dropItem(killer, KEY_OF_DARKNESS, 1);
}
}
break;
}
}
return super.onKill(npc, killer, isSummon);
}
public static void main(String[] args)
{
new PaganKeys();
}
}

View File

@@ -0,0 +1,109 @@
/*
* 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.PaganTemple;
import org.l2jmobius.Config;
import org.l2jmobius.commons.util.Rnd;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
import ai.AbstractNpcAI;
/**
* Custom script to remove custom key drop from NPC XMLs.<br>
* Used to access more conveniently Pagan Temple.
* @author Mobius
*/
public class PaganKeys extends AbstractNpcAI
{
// Items
private static final int ANTEROOM_KEY = 8273;
private static final int CHAPEL_KEY = 8274;
private static final int KEY_OF_DARKNESS = 8275;
// NPCs
private static final int ZOMBIE_WORKER = 22140;
private static final int TRIOLS_LAYPERSON = 22142;
private static final int TRIOLS_PRIEST = 22168;
// Misc
private static final int ANTEROOM_KEY_CHANCE = 10;
private static final int CHAPEL_KEY_CHANCE = 10;
private static final int KEY_OF_DARKNESS_CHANCE = 10;
private PaganKeys()
{
addKillId(ZOMBIE_WORKER, TRIOLS_LAYPERSON, TRIOLS_PRIEST);
}
@Override
public String onKill(Npc npc, Player killer, boolean isSummon)
{
switch (npc.getId())
{
case ZOMBIE_WORKER:
{
if (Rnd.get(100) < ANTEROOM_KEY_CHANCE)
{
if (Config.AUTO_LOOT)
{
giveItems(killer, ANTEROOM_KEY, 1);
}
else
{
npc.dropItem(killer, ANTEROOM_KEY, 1);
}
}
break;
}
case TRIOLS_LAYPERSON:
{
if (Rnd.get(100) < CHAPEL_KEY_CHANCE)
{
if (Config.AUTO_LOOT)
{
giveItems(killer, CHAPEL_KEY, 1);
}
else
{
npc.dropItem(killer, CHAPEL_KEY, 1);
}
}
break;
}
case TRIOLS_PRIEST:
{
if (Rnd.get(100) < KEY_OF_DARKNESS_CHANCE)
{
if (Config.AUTO_LOOT)
{
giveItems(killer, KEY_OF_DARKNESS, 1);
}
else
{
npc.dropItem(killer, KEY_OF_DARKNESS, 1);
}
}
break;
}
}
return super.onKill(npc, killer, isSummon);
}
public static void main(String[] args)
{
new PaganKeys();
}
}

View File

@@ -0,0 +1,109 @@
/*
* 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.PaganTemple;
import org.l2jmobius.Config;
import org.l2jmobius.commons.util.Rnd;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
import ai.AbstractNpcAI;
/**
* Custom script to remove custom key drop from NPC XMLs.<br>
* Used to access more conveniently Pagan Temple.
* @author Mobius
*/
public class PaganKeys extends AbstractNpcAI
{
// Items
private static final int ANTEROOM_KEY = 8273;
private static final int CHAPEL_KEY = 8274;
private static final int KEY_OF_DARKNESS = 8275;
// NPCs
private static final int ZOMBIE_WORKER = 22140;
private static final int TRIOLS_LAYPERSON = 22142;
private static final int TRIOLS_PRIEST = 22168;
// Misc
private static final int ANTEROOM_KEY_CHANCE = 10;
private static final int CHAPEL_KEY_CHANCE = 10;
private static final int KEY_OF_DARKNESS_CHANCE = 10;
private PaganKeys()
{
addKillId(ZOMBIE_WORKER, TRIOLS_LAYPERSON, TRIOLS_PRIEST);
}
@Override
public String onKill(Npc npc, Player killer, boolean isSummon)
{
switch (npc.getId())
{
case ZOMBIE_WORKER:
{
if (Rnd.get(100) < ANTEROOM_KEY_CHANCE)
{
if (Config.AUTO_LOOT)
{
giveItems(killer, ANTEROOM_KEY, 1);
}
else
{
npc.dropItem(killer, ANTEROOM_KEY, 1);
}
}
break;
}
case TRIOLS_LAYPERSON:
{
if (Rnd.get(100) < CHAPEL_KEY_CHANCE)
{
if (Config.AUTO_LOOT)
{
giveItems(killer, CHAPEL_KEY, 1);
}
else
{
npc.dropItem(killer, CHAPEL_KEY, 1);
}
}
break;
}
case TRIOLS_PRIEST:
{
if (Rnd.get(100) < KEY_OF_DARKNESS_CHANCE)
{
if (Config.AUTO_LOOT)
{
giveItems(killer, KEY_OF_DARKNESS, 1);
}
else
{
npc.dropItem(killer, KEY_OF_DARKNESS, 1);
}
}
break;
}
}
return super.onKill(npc, killer, isSummon);
}
public static void main(String[] args)
{
new PaganKeys();
}
}

View File

@@ -0,0 +1,109 @@
/*
* 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.PaganTemple;
import org.l2jmobius.Config;
import org.l2jmobius.commons.util.Rnd;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
import ai.AbstractNpcAI;
/**
* Custom script to remove custom key drop from NPC XMLs.<br>
* Used to access more conveniently Pagan Temple.
* @author Mobius
*/
public class PaganKeys extends AbstractNpcAI
{
// Items
private static final int ANTEROOM_KEY = 8273;
private static final int CHAPEL_KEY = 8274;
private static final int KEY_OF_DARKNESS = 8275;
// NPCs
private static final int ZOMBIE_WORKER = 22140;
private static final int TRIOLS_LAYPERSON = 22142;
private static final int TRIOLS_PRIEST = 22168;
// Misc
private static final int ANTEROOM_KEY_CHANCE = 10;
private static final int CHAPEL_KEY_CHANCE = 10;
private static final int KEY_OF_DARKNESS_CHANCE = 10;
private PaganKeys()
{
addKillId(ZOMBIE_WORKER, TRIOLS_LAYPERSON, TRIOLS_PRIEST);
}
@Override
public String onKill(Npc npc, Player killer, boolean isSummon)
{
switch (npc.getId())
{
case ZOMBIE_WORKER:
{
if (Rnd.get(100) < ANTEROOM_KEY_CHANCE)
{
if (Config.AUTO_LOOT)
{
giveItems(killer, ANTEROOM_KEY, 1);
}
else
{
npc.dropItem(killer, ANTEROOM_KEY, 1);
}
}
break;
}
case TRIOLS_LAYPERSON:
{
if (Rnd.get(100) < CHAPEL_KEY_CHANCE)
{
if (Config.AUTO_LOOT)
{
giveItems(killer, CHAPEL_KEY, 1);
}
else
{
npc.dropItem(killer, CHAPEL_KEY, 1);
}
}
break;
}
case TRIOLS_PRIEST:
{
if (Rnd.get(100) < KEY_OF_DARKNESS_CHANCE)
{
if (Config.AUTO_LOOT)
{
giveItems(killer, KEY_OF_DARKNESS, 1);
}
else
{
npc.dropItem(killer, KEY_OF_DARKNESS, 1);
}
}
break;
}
}
return super.onKill(npc, killer, isSummon);
}
public static void main(String[] args)
{
new PaganKeys();
}
}

View File

@@ -0,0 +1,109 @@
/*
* 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.PaganTemple;
import org.l2jmobius.Config;
import org.l2jmobius.commons.util.Rnd;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
import ai.AbstractNpcAI;
/**
* Custom script to remove custom key drop from NPC XMLs.<br>
* Used to access more conveniently Pagan Temple.
* @author Mobius
*/
public class PaganKeys extends AbstractNpcAI
{
// Items
private static final int ANTEROOM_KEY = 8273;
private static final int CHAPEL_KEY = 8274;
private static final int KEY_OF_DARKNESS = 8275;
// NPCs
private static final int ZOMBIE_WORKER = 22140;
private static final int TRIOLS_LAYPERSON = 22142;
private static final int TRIOLS_PRIEST = 22168;
// Misc
private static final int ANTEROOM_KEY_CHANCE = 10;
private static final int CHAPEL_KEY_CHANCE = 10;
private static final int KEY_OF_DARKNESS_CHANCE = 10;
private PaganKeys()
{
addKillId(ZOMBIE_WORKER, TRIOLS_LAYPERSON, TRIOLS_PRIEST);
}
@Override
public String onKill(Npc npc, Player killer, boolean isSummon)
{
switch (npc.getId())
{
case ZOMBIE_WORKER:
{
if (Rnd.get(100) < ANTEROOM_KEY_CHANCE)
{
if (Config.AUTO_LOOT)
{
giveItems(killer, ANTEROOM_KEY, 1);
}
else
{
npc.dropItem(killer, ANTEROOM_KEY, 1);
}
}
break;
}
case TRIOLS_LAYPERSON:
{
if (Rnd.get(100) < CHAPEL_KEY_CHANCE)
{
if (Config.AUTO_LOOT)
{
giveItems(killer, CHAPEL_KEY, 1);
}
else
{
npc.dropItem(killer, CHAPEL_KEY, 1);
}
}
break;
}
case TRIOLS_PRIEST:
{
if (Rnd.get(100) < KEY_OF_DARKNESS_CHANCE)
{
if (Config.AUTO_LOOT)
{
giveItems(killer, KEY_OF_DARKNESS, 1);
}
else
{
npc.dropItem(killer, KEY_OF_DARKNESS, 1);
}
}
break;
}
}
return super.onKill(npc, killer, isSummon);
}
public static void main(String[] args)
{
new PaganKeys();
}
}

View File

@@ -0,0 +1,109 @@
/*
* 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.PaganTemple;
import org.l2jmobius.Config;
import org.l2jmobius.commons.util.Rnd;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
import ai.AbstractNpcAI;
/**
* Custom script to remove custom key drop from NPC XMLs.<br>
* Used to access more conveniently Pagan Temple.
* @author Mobius
*/
public class PaganKeys extends AbstractNpcAI
{
// Items
private static final int ANTEROOM_KEY = 8273;
private static final int CHAPEL_KEY = 8274;
private static final int KEY_OF_DARKNESS = 8275;
// NPCs
private static final int ZOMBIE_WORKER = 22140;
private static final int TRIOLS_LAYPERSON = 22142;
private static final int TRIOLS_PRIEST = 22168;
// Misc
private static final int ANTEROOM_KEY_CHANCE = 10;
private static final int CHAPEL_KEY_CHANCE = 10;
private static final int KEY_OF_DARKNESS_CHANCE = 10;
private PaganKeys()
{
addKillId(ZOMBIE_WORKER, TRIOLS_LAYPERSON, TRIOLS_PRIEST);
}
@Override
public String onKill(Npc npc, Player killer, boolean isSummon)
{
switch (npc.getId())
{
case ZOMBIE_WORKER:
{
if (Rnd.get(100) < ANTEROOM_KEY_CHANCE)
{
if (Config.AUTO_LOOT)
{
giveItems(killer, ANTEROOM_KEY, 1);
}
else
{
npc.dropItem(killer, ANTEROOM_KEY, 1);
}
}
break;
}
case TRIOLS_LAYPERSON:
{
if (Rnd.get(100) < CHAPEL_KEY_CHANCE)
{
if (Config.AUTO_LOOT)
{
giveItems(killer, CHAPEL_KEY, 1);
}
else
{
npc.dropItem(killer, CHAPEL_KEY, 1);
}
}
break;
}
case TRIOLS_PRIEST:
{
if (Rnd.get(100) < KEY_OF_DARKNESS_CHANCE)
{
if (Config.AUTO_LOOT)
{
giveItems(killer, KEY_OF_DARKNESS, 1);
}
else
{
npc.dropItem(killer, KEY_OF_DARKNESS, 1);
}
}
break;
}
}
return super.onKill(npc, killer, isSummon);
}
public static void main(String[] args)
{
new PaganKeys();
}
}

View File

@@ -0,0 +1,109 @@
/*
* 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.PaganTemple;
import org.l2jmobius.Config;
import org.l2jmobius.commons.util.Rnd;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
import ai.AbstractNpcAI;
/**
* Custom script to remove custom key drop from NPC XMLs.<br>
* Used to access more conveniently Pagan Temple.
* @author Mobius
*/
public class PaganKeys extends AbstractNpcAI
{
// Items
private static final int ANTEROOM_KEY = 8273;
private static final int CHAPEL_KEY = 8274;
private static final int KEY_OF_DARKNESS = 8275;
// NPCs
private static final int ZOMBIE_WORKER = 22140;
private static final int TRIOLS_LAYPERSON = 22142;
private static final int TRIOLS_PRIEST = 22168;
// Misc
private static final int ANTEROOM_KEY_CHANCE = 10;
private static final int CHAPEL_KEY_CHANCE = 10;
private static final int KEY_OF_DARKNESS_CHANCE = 10;
private PaganKeys()
{
addKillId(ZOMBIE_WORKER, TRIOLS_LAYPERSON, TRIOLS_PRIEST);
}
@Override
public String onKill(Npc npc, Player killer, boolean isSummon)
{
switch (npc.getId())
{
case ZOMBIE_WORKER:
{
if (Rnd.get(100) < ANTEROOM_KEY_CHANCE)
{
if (Config.AUTO_LOOT)
{
giveItems(killer, ANTEROOM_KEY, 1);
}
else
{
npc.dropItem(killer, ANTEROOM_KEY, 1);
}
}
break;
}
case TRIOLS_LAYPERSON:
{
if (Rnd.get(100) < CHAPEL_KEY_CHANCE)
{
if (Config.AUTO_LOOT)
{
giveItems(killer, CHAPEL_KEY, 1);
}
else
{
npc.dropItem(killer, CHAPEL_KEY, 1);
}
}
break;
}
case TRIOLS_PRIEST:
{
if (Rnd.get(100) < KEY_OF_DARKNESS_CHANCE)
{
if (Config.AUTO_LOOT)
{
giveItems(killer, KEY_OF_DARKNESS, 1);
}
else
{
npc.dropItem(killer, KEY_OF_DARKNESS, 1);
}
}
break;
}
}
return super.onKill(npc, killer, isSummon);
}
public static void main(String[] args)
{
new PaganKeys();
}
}

View File

@@ -0,0 +1,109 @@
/*
* 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.PaganTemple;
import org.l2jmobius.Config;
import org.l2jmobius.commons.util.Rnd;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
import ai.AbstractNpcAI;
/**
* Custom script to remove custom key drop from NPC XMLs.<br>
* Used to access more conveniently Pagan Temple.
* @author Mobius
*/
public class PaganKeys extends AbstractNpcAI
{
// Items
private static final int ANTEROOM_KEY = 8273;
private static final int CHAPEL_KEY = 8274;
private static final int KEY_OF_DARKNESS = 8275;
// NPCs
private static final int ZOMBIE_WORKER = 22140;
private static final int TRIOLS_LAYPERSON = 22142;
private static final int TRIOLS_PRIEST = 22168;
// Misc
private static final int ANTEROOM_KEY_CHANCE = 10;
private static final int CHAPEL_KEY_CHANCE = 10;
private static final int KEY_OF_DARKNESS_CHANCE = 10;
private PaganKeys()
{
addKillId(ZOMBIE_WORKER, TRIOLS_LAYPERSON, TRIOLS_PRIEST);
}
@Override
public String onKill(Npc npc, Player killer, boolean isSummon)
{
switch (npc.getId())
{
case ZOMBIE_WORKER:
{
if (Rnd.get(100) < ANTEROOM_KEY_CHANCE)
{
if (Config.AUTO_LOOT)
{
giveItems(killer, ANTEROOM_KEY, 1);
}
else
{
npc.dropItem(killer, ANTEROOM_KEY, 1);
}
}
break;
}
case TRIOLS_LAYPERSON:
{
if (Rnd.get(100) < CHAPEL_KEY_CHANCE)
{
if (Config.AUTO_LOOT)
{
giveItems(killer, CHAPEL_KEY, 1);
}
else
{
npc.dropItem(killer, CHAPEL_KEY, 1);
}
}
break;
}
case TRIOLS_PRIEST:
{
if (Rnd.get(100) < KEY_OF_DARKNESS_CHANCE)
{
if (Config.AUTO_LOOT)
{
giveItems(killer, KEY_OF_DARKNESS, 1);
}
else
{
npc.dropItem(killer, KEY_OF_DARKNESS, 1);
}
}
break;
}
}
return super.onKill(npc, killer, isSummon);
}
public static void main(String[] args)
{
new PaganKeys();
}
}

View File

@@ -5494,7 +5494,6 @@
<dropLists>
<drop>
<item id="57" min="6433" max="13186" chance="70" /> <!-- Adena -->
<item id="8275" min="1" max="1" chance="10" /> <!-- Key of Darkness -->
<item id="5320" min="1" max="1" chance="0.00365803763580322" /> <!-- Sealed Leather Armor of Nightmare -->
<item id="5480" min="1" max="1" chance="0.541991967704773" /> <!-- Sealed Leather Armor of Nightmare Fabric -->
<item id="5323" min="1" max="1" chance="0.00365803763580322" /> <!-- Sealed Majestic Leather Armor -->

View File

@@ -0,0 +1,109 @@
/*
* 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.PaganTemple;
import org.l2jmobius.Config;
import org.l2jmobius.commons.util.Rnd;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
import ai.AbstractNpcAI;
/**
* Custom script to remove custom key drop from NPC XMLs.<br>
* Used to access more conveniently Pagan Temple.
* @author Mobius
*/
public class PaganKeys extends AbstractNpcAI
{
// Items
private static final int ANTEROOM_KEY = 8273;
private static final int CHAPEL_KEY = 8274;
private static final int KEY_OF_DARKNESS = 8275;
// NPCs
private static final int ZOMBIE_WORKER = 22140;
private static final int TRIOLS_LAYPERSON = 22142;
private static final int TRIOLS_PRIEST = 22168;
// Misc
private static final int ANTEROOM_KEY_CHANCE = 10;
private static final int CHAPEL_KEY_CHANCE = 10;
private static final int KEY_OF_DARKNESS_CHANCE = 10;
private PaganKeys()
{
addKillId(ZOMBIE_WORKER, TRIOLS_LAYPERSON, TRIOLS_PRIEST);
}
@Override
public String onKill(Npc npc, Player killer, boolean isSummon)
{
switch (npc.getId())
{
case ZOMBIE_WORKER:
{
if (Rnd.get(100) < ANTEROOM_KEY_CHANCE)
{
if (Config.AUTO_LOOT)
{
giveItems(killer, ANTEROOM_KEY, 1);
}
else
{
npc.dropItem(killer, ANTEROOM_KEY, 1);
}
}
break;
}
case TRIOLS_LAYPERSON:
{
if (Rnd.get(100) < CHAPEL_KEY_CHANCE)
{
if (Config.AUTO_LOOT)
{
giveItems(killer, CHAPEL_KEY, 1);
}
else
{
npc.dropItem(killer, CHAPEL_KEY, 1);
}
}
break;
}
case TRIOLS_PRIEST:
{
if (Rnd.get(100) < KEY_OF_DARKNESS_CHANCE)
{
if (Config.AUTO_LOOT)
{
giveItems(killer, KEY_OF_DARKNESS, 1);
}
else
{
npc.dropItem(killer, KEY_OF_DARKNESS, 1);
}
}
break;
}
}
return super.onKill(npc, killer, isSummon);
}
public static void main(String[] args)
{
new PaganKeys();
}
}

View File

@@ -3280,7 +3280,6 @@
<dropLists>
<drop>
<item id="57" min="4415" max="9013" chance="70" /> <!-- Adena -->
<item id="8273" min="1" max="1" chance="10" /> <!-- Anteroom Key -->
<item id="5313" min="1" max="1" chance="0.00610053888845444" /> <!-- Sealed Gauntlets of Nightmare -->
<item id="5514" min="1" max="1" chance="0.698024448236942" /> <!-- Sealed Gauntlets of Nightmare Design -->
<item id="5314" min="1" max="1" chance="0.00610053888845444" /> <!-- Sealed Boots of Nightmare -->
@@ -3454,7 +3453,6 @@
<dropLists>
<drop>
<item id="57" min="4584" max="9387" chance="70" /> <!-- Adena -->
<item id="8274" min="1" max="1" chance="10" /> <!-- Chapel Key -->
<item id="5312" min="1" max="1" chance="0.00564345579528809" /> <!-- Sealed Helm of Nightmare -->
<item id="5527" min="1" max="1" chance="0.685505782133818" /> <!-- Sealed Helm of Nightmare Design -->
<item id="5315" min="1" max="1" chance="0.00806498670744896" /> <!-- Sealed Shield of Nightmare -->
@@ -5565,7 +5563,6 @@
<dropLists>
<drop>
<item id="57" min="6433" max="13186" chance="70" /> <!-- Adena -->
<item id="8275" min="1" max="1" chance="10" /> <!-- Key of Darkness -->
<item id="5320" min="1" max="1" chance="0.00365803763580322" /> <!-- Sealed Leather Armor of Nightmare -->
<item id="5480" min="1" max="1" chance="0.541991967704773" /> <!-- Sealed Leather Armor of Nightmare Fabric -->
<item id="5323" min="1" max="1" chance="0.00365803763580322" /> <!-- Sealed Majestic Leather Armor -->

View File

@@ -0,0 +1,109 @@
/*
* 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.PaganTemple;
import org.l2jmobius.Config;
import org.l2jmobius.commons.util.Rnd;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
import ai.AbstractNpcAI;
/**
* Custom script to remove custom key drop from NPC XMLs.<br>
* Used to access more conveniently Pagan Temple.
* @author Mobius
*/
public class PaganKeys extends AbstractNpcAI
{
// Items
private static final int ANTEROOM_KEY = 8273;
private static final int CHAPEL_KEY = 8274;
private static final int KEY_OF_DARKNESS = 8275;
// NPCs
private static final int ZOMBIE_WORKER = 22140;
private static final int TRIOLS_LAYPERSON = 22142;
private static final int TRIOLS_PRIEST = 22168;
// Misc
private static final int ANTEROOM_KEY_CHANCE = 10;
private static final int CHAPEL_KEY_CHANCE = 10;
private static final int KEY_OF_DARKNESS_CHANCE = 10;
private PaganKeys()
{
addKillId(ZOMBIE_WORKER, TRIOLS_LAYPERSON, TRIOLS_PRIEST);
}
@Override
public String onKill(Npc npc, Player killer, boolean isSummon)
{
switch (npc.getId())
{
case ZOMBIE_WORKER:
{
if (Rnd.get(100) < ANTEROOM_KEY_CHANCE)
{
if (Config.AUTO_LOOT)
{
giveItems(killer, ANTEROOM_KEY, 1);
}
else
{
npc.dropItem(killer, ANTEROOM_KEY, 1);
}
}
break;
}
case TRIOLS_LAYPERSON:
{
if (Rnd.get(100) < CHAPEL_KEY_CHANCE)
{
if (Config.AUTO_LOOT)
{
giveItems(killer, CHAPEL_KEY, 1);
}
else
{
npc.dropItem(killer, CHAPEL_KEY, 1);
}
}
break;
}
case TRIOLS_PRIEST:
{
if (Rnd.get(100) < KEY_OF_DARKNESS_CHANCE)
{
if (Config.AUTO_LOOT)
{
giveItems(killer, KEY_OF_DARKNESS, 1);
}
else
{
npc.dropItem(killer, KEY_OF_DARKNESS, 1);
}
}
break;
}
}
return super.onKill(npc, killer, isSummon);
}
public static void main(String[] args)
{
new PaganKeys();
}
}