Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ===================================================================
- --- java/com/l2jserver/gameserver/model/L2Object.java (revision 6327)
- +++ java/com/l2jserver/gameserver/model/L2Object.java (working copy)
- @@ -174,7 +174,8 @@
- L2NpcBufferInstance(L2Npc),
- L2TvTEventNpcInstance(L2Npc),
- L2WeddingManagerInstance(L2Npc),
- - L2EventMobInstance(L2Npc);
- + L2EventMobInstance(L2Npc),
- + L2NpcNoBotsInstance(L2MonsterInstance);
- private final InstanceType _parent;
- private final long _typeL;
- Index: java/com/l2jserver/gameserver/model/actor/instance/L2NpcNoBotsInstance.java
- ===================================================================
- --- java/com/l2jserver/gameserver/model/actor/instance/L2NpcNoBotsInstance.java (revision 0)
- +++ java/com/l2jserver/gameserver/model/actor/instance/L2NpcNoBotsInstance.java (revision 0)
- @@ -0,0 +1,84 @@
- +/*
- + * Copyright (C) 2004-2014 L2J Server
- + *
- + * This file is part of L2J Server.
- + *
- + * L2J Server 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.
- + *
- + * L2J Server 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 com.l2jserver.gameserver.model.actor.instance;
- +
- +import com.l2jserver.gameserver.model.actor.L2Character;
- +import com.l2jserver.gameserver.model.actor.templates.L2NpcTemplate;
- +
- +/**
- + * @author Kimera
- + * @web kimeraweb.es
- + * @Descripcion Este mob está pensado para ser spawneado en las zonas de farmeo. Los bots matan indiscriminadamente todos los mobs que tienen delante, pero este mob es un señuelo. Si se mata, te envia a la carcel. <br>
- + * <br>
- + * Es mas comodo evitar un mob que obligar a un jugador a estar tecleando CAPCTHAS constantemente. <br>
- + * <br>
- + * Eres libre de editar el codigo a tu gusto, pero no omitas su autoria! Gracias! <br>
- + * <br>
- + * @Creado Para los foros de adminsproL2
- + */
- +public class L2NpcNoBotsInstance extends L2MonsterInstance
- +{
- +
- + /**
- + * @param objectId
- + * @param template
- + */
- + public L2NpcNoBotsInstance(int objectId, L2NpcTemplate template)
- + {
- + super(objectId, template);
- + setInstanceType(InstanceType.L2NpcNoBotsInstance);
- + setAutoAttackable(true);
- + }
- +
- + @Override
- + public boolean doDie(L2Character killer)
- + {
- + // Si no es un jugador, finalizamos aqui.
- + if (!(killer instanceof L2PcInstance))
- + {
- + return false;
- + }
- +
- + // Si no hay asesino
- + if (!super.doDie(killer))
- + {
- + return false;
- + }
- +
- + // Quitar el cadaver del suelo
- + if (_maintenanceTask != null)
- + {
- + _maintenanceTask.cancel(false);
- + _maintenanceTask = null;
- + }
- +
- + killer.sendMessage("Vas a la carcel por un minuto. Has matado a un monster antibot!!");
- + ((L2PcInstance) killer).setPunishLevel(L2PcInstance.PunishLevel.JAIL, 1);
- +
- + // Otros posibles castigos (los puedes activar todos):
- + // ((L2PcInstance)killer).setPunishLevel(L2PcInstance.PunishLevel.CHAR, 1); // Baneo del PJ
- + // ((L2PcInstance)killer).setPunishLevel(L2PcInstance.PunishLevel.ACC,1); // Baneo de la cuenta
- + // ((L2PcInstance)killer).setKarma(1000); // 1000 de karma (El PJ ya es un evento xD)
- + // ((L2PcInstance)killer).doDie(this); // Este mob mata al PJ
- + // ((L2PcInstance)killer).logout(); // Kickea al PJ
- +
- + return true;
- + }
- +
- +}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement