Спасибо, но как? Аль это большой секрет?)Возможно
мне не для этого надо, но идея хорошая))Баталии можно устраиватьЭпично выглядит если им еще соски с барками дать
Хочу сделать что бы 2 нпц друг с другом дрались
возможно ли такое вообще?
/*
* Copyright (C) 2004-2015 L2J DataPack
*
* This file is part of L2J DataPack.
*
* L2J DataPack 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 DataPack 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 gracia.AI.NPC.ZealotOfShilen;
import ai.npc.AbstractNpcAI;
import com.l2jserver.gameserver.ai.CtrlIntention;
import com.l2jserver.gameserver.model.actor.L2Attackable;
import com.l2jserver.gameserver.model.actor.L2Character;
import com.l2jserver.gameserver.model.actor.L2Npc;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
/**
* Zealot of Shilen AI.
* @author nonom
*/
public final class ZealotOfShilen extends AbstractNpcAI
{
// NPCs
private static final int ZEALOT = 18782;
private static final int[] GUARDS =
{
32628,
32629
};
public ZealotOfShilen()
{
super(ZealotOfShilen.class.getSimpleName(), "gracia/AI/NPC");
addSpawnId(ZEALOT);
addSpawnId(GUARDS);
addFirstTalkId(GUARDS);
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
if (npc == null)
{
return null;
}
startQuestTimer("WATCHING", 10000, npc, null, true);
if (event.equalsIgnoreCase("WATCHING") && !npc.isAttackingNow())
{
for (L2Character character : npc.getKnownList().getKnownCharacters())
{
if (character.isMonster() && !character.isDead() && !((L2Attackable) character).isDecayed())
{
npc.setRunning();
((L2Attackable) npc).addDamageHate(character, 0, 999);
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, character, null);
}
}
}
return null;
}
@Override
public String onFirstTalk(L2Npc npc, L2PcInstance player)
{
return (npc.isAttackingNow()) ? "32628-01.html" : npc.getId() + ".html";
}
@Override
public String onSpawn(L2Npc npc)
{
if (npc.getId() == ZEALOT)
{
npc.setIsNoRndWalk(true);
}
else
{
npc.setIsInvul(true);
((L2Attackable) npc).setCanReturnToSpawnPoint(false);
startQuestTimer("WATCHING", 10000, npc, null, true);
}
return super.onSpawn(npc);
}
}
Все хорошо, но я для ПТС спрашивалКод:/* * Copyright (C) 2004-2015 L2J DataPack * * This file is part of L2J DataPack. * * L2J DataPack 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 DataPack 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 gracia.AI.NPC.ZealotOfShilen; import ai.npc.AbstractNpcAI; import com.l2jserver.gameserver.ai.CtrlIntention; import com.l2jserver.gameserver.model.actor.L2Attackable; import com.l2jserver.gameserver.model.actor.L2Character; import com.l2jserver.gameserver.model.actor.L2Npc; import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; /** * Zealot of Shilen AI. * @author nonom */ public final class ZealotOfShilen extends AbstractNpcAI { // NPCs private static final int ZEALOT = 18782; private static final int[] GUARDS = { 32628, 32629 }; public ZealotOfShilen() { super(ZealotOfShilen.class.getSimpleName(), "gracia/AI/NPC"); addSpawnId(ZEALOT); addSpawnId(GUARDS); addFirstTalkId(GUARDS); } @Override public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) { if (npc == null) { return null; } startQuestTimer("WATCHING", 10000, npc, null, true); if (event.equalsIgnoreCase("WATCHING") && !npc.isAttackingNow()) { for (L2Character character : npc.getKnownList().getKnownCharacters()) { if (character.isMonster() && !character.isDead() && !((L2Attackable) character).isDecayed()) { npc.setRunning(); ((L2Attackable) npc).addDamageHate(character, 0, 999); npc.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, character, null); } } } return null; } @Override public String onFirstTalk(L2Npc npc, L2PcInstance player) { return (npc.isAttackingNow()) ? "32628-01.html" : npc.getId() + ".html"; } @Override public String onSpawn(L2Npc npc) { if (npc.getId() == ZEALOT) { npc.setIsNoRndWalk(true); } else { npc.setIsInvul(true); ((L2Attackable) npc).setCanReturnToSpawnPoint(false); startQuestTimer("WATCHING", 10000, npc, null, true); } return super.onSpawn(npc); } }
Почему же, просто как то давно копал, но не стал углубляться, переключился на другие фишкиСпасибо, но как? Аль это большой секрет?)
Ошибся разделом....Мог бы прочитать где тема находитсяКод:/* * Copyright (C) 2004-2015 L2J DataPack * * This file is part of L2J DataPack. * * L2J DataPack 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 DataPack 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 gracia.AI.NPC.ZealotOfShilen; import ai.npc.AbstractNpcAI; import com.l2jserver.gameserver.ai.CtrlIntention; import com.l2jserver.gameserver.model.actor.L2Attackable; import com.l2jserver.gameserver.model.actor.L2Character; import com.l2jserver.gameserver.model.actor.L2Npc; import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; /** * Zealot of Shilen AI. * @author nonom */ public final class ZealotOfShilen extends AbstractNpcAI { // NPCs private static final int ZEALOT = 18782; private static final int[] GUARDS = { 32628, 32629 }; public ZealotOfShilen() { super(ZealotOfShilen.class.getSimpleName(), "gracia/AI/NPC"); addSpawnId(ZEALOT); addSpawnId(GUARDS); addFirstTalkId(GUARDS); } @Override public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) { if (npc == null) { return null; } startQuestTimer("WATCHING", 10000, npc, null, true); if (event.equalsIgnoreCase("WATCHING") && !npc.isAttackingNow()) { for (L2Character character : npc.getKnownList().getKnownCharacters()) { if (character.isMonster() && !character.isDead() && !((L2Attackable) character).isDecayed()) { npc.setRunning(); ((L2Attackable) npc).addDamageHate(character, 0, 999); npc.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, character, null); } } } return null; } @Override public String onFirstTalk(L2Npc npc, L2PcInstance player) { return (npc.isAttackingNow()) ? "32628-01.html" : npc.getId() + ".html"; } @Override public String onSpawn(L2Npc npc) { if (npc.getId() == ZEALOT) { npc.setIsNoRndWalk(true); } else { npc.setIsInvul(true); ((L2Attackable) npc).setCanReturnToSpawnPoint(false); startQuestTimer("WATCHING", 10000, npc, null, true); } return super.onSpawn(npc); } }
ты гений, спасибо!Почему же, просто как то давно копал, но не стал углубляться, переключился на другие фишки
А вообще просто разбери аи Баума, ангелы которые вместе с ним появляются его же и бьют.
я хочу сама еще лучше, заплатить Конеру денег и он сделает)))
это только на птсПочему же, просто как то давно копал, но не стал углубляться, переключился на другие фишки
А вообще просто разбери аи Баума, ангелы которые вместе с ним появляются его же и бьют.
Ага) Улыбаюсь, когда вспоминаю как с этим игралисьБаталии можно устраиватьЭпично выглядит если им еще соски с барками дать
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?