Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package custom.SuperMonster;
- import net.sf.l2j.gameserver.model.actor.L2Npc;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- import net.sf.l2j.gameserver.model.quest.Quest;
- import net.sf.l2j.gameserver.util.Broadcast;
- public class SuperMonster extends Quest
- {
- // Monsters's ID.
- private static final int MONSTERS[] =
- {
- 12564
- };
- private static final boolean REWARD_PARTY = false;
- private final static boolean REWARD_NOBLE = true;
- private final static boolean REWARD_ITEMS = true;
- private final static int REWARD_ITEM_ID = 5575;
- private final static int REWARD_ITEM_COUNT = 100000;
- public SuperMonster()
- {
- super(-1, "SuperMonster", "custom");
- for (int mobs : MONSTERS)
- addKillId(mobs);
- }
- @Override
- public String onKill(L2Npc npc, L2PcInstance player, boolean isPet)
- {
- Broadcast.announceToOnlinePlayers("The Villain was successfully killed by " + player.getName() + ".");
- if (REWARD_PARTY)
- {
- if (player.getParty() != null)
- {
- for (L2PcInstance members : player.getParty().getPartyMembers())
- {
- if (REWARD_ITEMS)
- members.addItem("Reward", REWARD_ITEM_ID, REWARD_ITEM_COUNT, members, true);
- if (REWARD_NOBLE)
- {
- if (!members.isNoble())
- members.setNoble(true, true);
- else
- members.sendMessage("You already Noblesse.");
- }
- members.sendMessage("Congratulations! You have killed the Villain.");
- }
- }
- }
- else
- {
- player.sendMessage("Congratulations! You have killed the Villain.");
- if (REWARD_ITEMS)
- player.addItem("Add", REWARD_ITEM_ID, REWARD_ITEM_COUNT, player, true);
- if (REWARD_NOBLE)
- {
- if (!player.isNoble())
- player.setNoble(true, true);
- }
- }
- return null;
- }
- public static void main(String args[])
- {
- new SuperMonster();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment