(https://www.united-extreme.com/u3games/foro/proxy.php?request=http%3A%2F%2Flegacy.lineage2.com%2Farchive%2Fglobal%2Fuploads%2Fspooks%2526scarecrows_main_image.jpg&hash=c44edd56580c4971db36b49f827e6b0452b7d699)
/*
* 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 custom.events.SpooksScarecrows;
import com.l2jserver.gameserver.datatables.NpcData;
import com.l2jserver.gameserver.enums.Race;
import com.l2jserver.gameserver.model.actor.L2Npc;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.actor.templates.L2NpcTemplate;
import com.l2jserver.gameserver.model.quest.Quest;
/**
* @author fissban
*/
public class SpooksScarecrows extends Quest
{
// TODO porcentajes sin confirmar
private static final int[][] DROPLIST =
{
{
14057, // Scarecrow JackTransformation Stick 30 Day
94, // 5%
},
{
20034, // Revita Pop
69, // 30%
},
};
@Override
public String onKill(L2Npc npc, L2PcInstance killer, boolean isPet)
{
if ((npc.getLevel() <= 40) && (killer.getLevel() <= 49))
{
Race nRace = npc.getTemplate().getRace();
if (Race.UNDEAD == nRace)
{
dropItem(npc, killer, DROPLIST);
}
}
return super.onKill(npc, killer, isPet);
}
private static final void dropItem(L2Npc mob, L2PcInstance player, int[][] droplist)
{
final int chance = getRandom(100);
for (int[] drop : droplist)
{
if (chance > drop[1])
{
player.addItem("Drop", drop[0], 1, player, true);
return;
}
}
}
public SpooksScarecrows()
{
super(-1, SpooksScarecrows.class.getSimpleName(), "events");
for (L2NpcTemplate template : NpcData.getInstance().getAllNpcOfClassType("L2Monster"))
{
addKillId(template.getId());
}
}
public static void main(String[] args)
{
new SpooksScarecrows();
}
}
CitarInformación del evento:
http://legacy.lineage2.com/archive/2009/10/spooks_scarecrows.html
CitarInformación rápida:
Los mobs q sean menor a lvl 40 y q sean de tipo Undead, Fairie o Spirit tendran chance de Dropear "Revita Pop" y "Scarecrow Jack Transformation"... Las revitas Pops son usadas para llenar al maximo el vitality y el Scarecrow Jack Transformation es un arma q se utiliza para convertirse en espantapajaros.... no tiene mayor función q solo de estetica.
Creditos: Fissban