Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package ai.custom1;
- import l2f.gameserver.ai.DefaultAI;
- import l2f.gameserver.model.Player;
- import l2f.gameserver.model.World;
- import l2f.gameserver.model.instances.NpcInstance;
- import l2f.gameserver.tables.SkillTable;
- public class custom extends DefaultAI
- {
- private int SKILL_ID_1 = 555;
- private int i = 1;
- public custom(NpcInstance actor)
- {
- super(actor);
- }
- protected boolean thinkActive()
- {
- NpcInstance actor = getActor();
- if (actor == null)
- {
- return true;
- }
- int skillId = SKILL_ID_1;
- for (Player player : World.getAroundPlayers(actor, 200, 200))
- {
- if ((player != null) && (player.isInAnonymousZone()) && (player.getEffectList().getEffectsBySkillId(skillId) == null))
- {
- while (i < 10)
- {
- actor.doCast(SkillTable.getInstance().getInfo(skillId, 1), player, true);
- try {
- Thread.sleep(60000); //60000 milliseconds is one minute.
- } catch(InterruptedException ex) {
- Thread.currentThread().interrupt();
- }
- i = i + 1;
- }
- }
- }
- return false;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement