Para hacerte noble matando un mob? Sin que tenga que dropear un item.
No tienes permiso para ver los enlaces. Para poder verlos
Registrate o Conectate.Para hacerte noble matando un mob? Sin que tenga que dropear un item.
No tienes permiso para ver los enlaces. Para poder verlos
Registrate o Conectate.Para hacerte noble matando un mob? Sin que tenga que dropear un item.
/*
* 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 xxxxx.ai.AutoKillNoble;
import com.l2jserver.gameserver.model.actor.L2Npc;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import ai.npc.AbstractNpcAI;
/**
* Automatic Noble AI.
* @author swarlog
*/
public final class AutoKillNoble extends AbstractNpcAI
{
// Mobs
private static final int BARAKIEL = 25325;
public AutoKillNoble()
{
super(AutoKillHero.class.getSimpleName(), "xxxxx/ai");
addKillId(BARAKIEL);
}
@Override
public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
{
if (npc.getId() == BARAKIEL)
{
if (!killer.isNoble())
{
killer.sendMessage("[NOBLE] Felicidades, ahora sois noble!");
killer.setNoble(true);
}
}
return super.onKill(npc, killer, isSummon);
}
public static void main(String[] args)
{
new AutoKillNoble();
}
}Ahí lo tienes ^^
Cita de: djjoseYa veo, gracias! Y para que lo de en party y/o en command channel? ambas opciones
Facil, solo debes de indicar que en X distancia del mob matado afecte lo indicado. En nuestro caso:
/*
* 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 xxxxx.ai.AutoKillNoble;
import com.l2jserver.gameserver.model.actor.L2Npc;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import ai.npc.AbstractNpcAI;
/**
* Automatic Noble AI.
* @author swarlog
*/
public final class AutoKillNoble extends AbstractNpcAI
{
// Mobs
private static final int BARAKIEL = 25325;
private static final int RANGO = 250;
public AutoKillNoble()
{
super(AutoKillHero.class.getSimpleName(), "xxxxx/ai");
addKillId(BARAKIEL);
}
@Override
public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
{
if (npc.getId() == BARAKIEL)
{
for (L2PcInstance p : npc.getKnownList().getKnownPlayersInRadius(RANGO))
{
// Check if player is dead
if (!p.isDead())
{
if (!p.isNoble())
{
p.sendMessage("[NOBLE] Felicidades, ahora sois noble!");
p.setNoble(true);
}
}
}
}
return super.onKill(npc, killer, isSummon);
}
public static void main(String[] args)
{
new AutoKillNoble();
}
}