Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package l2next.scripts.events;
- import l2next.gameserver.datatables.xml.NpcTable;
- import l2next.gameserver.model.actor.L2Npc;
- import l2next.gameserver.model.actor.instance.L2PcInstance;
- import l2next.gameserver.model.actor.templates.L2NpcTemplate;
- import l2next.gameserver.model.items.base.proptypes.ProcessType;
- import l2next.gameserver.model.world.quest.Quest;
- import l2next.gameserver.util.Rnd;
- /**
- * User: Samurai
- */
- public class DropToAll extends Quest
- {
- public DropToAll()
- {
- super();
- for(L2NpcTemplate npcTemplate : NpcTable.getInstance().getAllMonstersOfLevel(90, 91, 92, 93, 94, 95, 96, 97, 98, 99))
- {
- addEventId(npcTemplate.getNpcId(), QuestEventType.ON_KILL);
- }
- }
- public static void main(String[] args)
- {
- new DropToAll();
- }
- @Override
- public String onKill(L2Npc npc, L2PcInstance killer, boolean isPet)
- {
- if(npc.getLevel() >= 85 && npc.getLevel() < 90)
- {
- if(Rnd.getChance(45))
- {
- killer.addItem(ProcessType.DROP, 4356, Rnd.get(2, 10), killer, true);
- }
- }
- else if(npc.getLevel() >= 90 && npc.getLevel() < 95)
- {
- if(Rnd.getChance(45))
- {
- killer.addItem(ProcessType.DROP, 4356, Rnd.get(10, 30), killer, true);
- }
- }
- else if(npc.getLevel() >= 95 && npc.getLevel() < 100)
- {
- if(Rnd.getChance(30))
- {
- killer.addItem(ProcessType.DROP, 4356, Rnd.get(30, 50), killer, true);
- }
- }
- return null;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement