Skip to content
La2Base
Home
DownloadsWikiForumFAQ
Search
ruen
Sign up Login
HomeFilesWikiLogin
  • Home
  • Downloads
  • Wiki
  • FAQ
  • Contact Us
  • About
  • Rules
  • Privacy
  • Terms of Service

© 2026 la2base.com · All rights reserved

ruen
Forum/Форум для новичков[JAVA]/[help]frintezza
Search

[help]frintezza

9 replies231 viewsCurrently viewing: 1
Fix009
Fix009

User

Бывалый

Posts: 270

На форуме с: 05/01/2009

Репутация: +4

Рейтинг: 0

· 05/04/2009, 02:28 PM

Сборка:la2base1.1.7

Краткое изложение СУТИ проблемы:скажыте плз может ктот дать настроеную фринтезу? оч надо плз
Вопрос: плз выручите!
Мои соображения по этому поводу:не знаю

неужели никто не шарит?

0
Давид
Давид

User

Бывалый

Posts: 162

На форуме с: 03/14/2008

Репутация: +37

Рейтинг: 0

· 05/04/2009, 03:06 PM

1. Я думаю просто так никто не даст :)
2. Моё предложение тебе:
а) Взять и сделать самому.
б) как же это сделать!? - спросишь ты
в) Благо la2base Team позаботилась о тебе. 3c2f1c34aa11.gif
г) Ищишь квест.
д) Пишешь *.java квест на Frintezzy
ж) вставляем в \server\data\scripts\ai\individual
з) идём в конфиг Scripts.ini
и) Заменяем:

Это делете:

Код
ai/individual/Antharas.java
ai/individual/Baium.java
ai/individual/Core.java
ai/individual/DrChaos.java
ai/individual/FleeNpc.java
ai/individual/Orfen.java
ai/individual/QueenAnt.java
ai/individual/Valakas.java
ai/individual/Zaken.java
ai/individual/Gordon.java
#ai/individual/IceFairySirra.java


Это ставим вместо того)) что выше)))
Код
ai/individual/Antharas.java
ai/individual/Baium.java
ai/individual/Core.java
ai/individual/DrChaos.java
ai/individual/FleeNpc.java
ai/individual/Frintezza.java
ai/individual/Orfen.java
ai/individual/QueenAnt.java
ai/individual/Valakas.java
ai/individual/Zaken.java
ai/individual/Gordon.java
#ai/individual/IceFairySirra.java

подпись она и в Африке подпись!

0
Fix009
Fix009

User

Бывалый

Posts: 270

На форуме с: 05/01/2009

Репутация: +4

Рейтинг: 0

· 05/04/2009, 03:13 PM

ето все хорошо а где квест найти?

0
eeee
eeee

User

Участник

Posts: 49

На форуме с: 09/26/2007

Репутация: +4

Рейтинг: 0

· 05/04/2009, 03:22 PM

Цитата
ето все хорошо а где квест найти?


не квест, а AI...


ищи тут: _http://www.l2jserver.com/forum/

0
Fix009
Fix009

User

Бывалый

Posts: 270

На форуме с: 05/01/2009

Репутация: +4

Рейтинг: 0

· 05/04/2009, 03:35 PM

уууу там все тупо на англ а я с англ не дружу

дайет плз правельный АИ плз

помогите плз

0
Fix009
Fix009

User

Бывалый

Posts: 270

На форуме с: 05/01/2009

Репутация: +4

Рейтинг: 0

· 05/04/2009, 03:53 PM

все нашол АИ фринтезы теперьс кажыте как посмотреть в етой яве какие там кординаты де она стоиТ?

0
-=[BloodKill]=-
-=[BloodKill]=-

User

Ветеран

Posts: 1355

На форуме с: 09/01/2008

Репутация: +1179

Рейтинг: 0

· 05/04/2009, 04:12 PM

Fix009: все нашол АИ фринтезы теперьс кажыте как посмотреть в етой яве какие там кординаты де она стоиТ?

БД

— Оо

0
Fix009
Fix009

User

Бывалый

Posts: 270

На форуме с: 05/01/2009

Репутация: +4

Рейтинг: 0

· 05/04/2009, 04:29 PM

поставил фринтезу все но ее нет и в папке индливидуал выдает ещо фали фринтеза ява ерор вот какой АИ фринтезы

Раскрывающийся текст
package ai.individual;

import java.util.Collection;
import java.util.List;

import static net.sf.l2j.gameserver.ai.CtrlIntention.AI_INTENTION_FOLLOW;
import static net.sf.l2j.gameserver.ai.CtrlIntention.AI_INTENTION_IDLE;

import net.sf.l2j.gameserver.GeoData;
import net.sf.l2j.gameserver.ai.CtrlIntention;
import net.sf.l2j.gameserver.datatables.DoorTable;
import net.sf.l2j.gameserver.datatables.SkillTable;
import net.sf.l2j.gameserver.instancemanager.GrandBossManager;
import net.sf.l2j.gameserver.model.L2Character;
import net.sf.l2j.gameserver.model.L2CommandChannel;
import net.sf.l2j.gameserver.model.L2Object;
import net.sf.l2j.gameserver.model.L2Party;
import net.sf.l2j.gameserver.model.L2Skill;
import net.sf.l2j.gameserver.model.L2Summon;
import net.sf.l2j.gameserver.model.actor.instance.L2DecoyInstance;
import net.sf.l2j.gameserver.model.actor.instance.L2GrandBossInstance;
import net.sf.l2j.gameserver.model.actor.instance.L2NpcInstance;
import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
import net.sf.l2j.gameserver.model.zone.type.L2BossZone;
import net.sf.l2j.gameserver.network.SystemMessageId;
import net.sf.l2j.gameserver.network.serverpackets.CreatureSay;
import net.sf.l2j.gameserver.network.serverpackets.Earthquake;
import net.sf.l2j.gameserver.network.serverpackets.MagicSkillUse;
import net.sf.l2j.gameserver.network.serverpackets.PlaySound;
import net.sf.l2j.gameserver.network.serverpackets.SocialAction;
import net.sf.l2j.gameserver.network.serverpackets.SpecialCamera;
import net.sf.l2j.gameserver.network.serverpackets.SystemMessage;
import net.sf.l2j.gameserver.templates.StatsSet;
import net.sf.l2j.gameserver.util.Util;
import net.sf.l2j.util.Rnd;
import ai.group_template.L2AttackableAIScript;
import javolution.util.FastList;

/**
* Imperial tomb instance and AI
* @author Aris
*/
public class frintezza extends L2AttackableAIScript
{

private static final int HALISHA1 = 100200;
private static final int HALISHA2 = 29046;
private static final int HALISHA3 = 29047;
private static final int FRINTEZZA = 29045;
private static final int GHOST1 = 29050;
private static final int GHOST2 = 29051;
private static final int GHOST3 = 29050;
private static final int GHOST4 = 29051;
private static final int TOMB_TELE = 32011;

private static final byte DORMANT = 0; //Antharas is spawned and no one has entered yet. Entry is unlocked
private static final byte WAITING = 1; //Antharas is spawend and someone has entered, triggering a 30 minute window for additional people to enter
//before he unleashes his attack. Entry is unlocked
private static final byte FIGHTING = 2; //Antharas is engaged in battle, annihilating his foes. Entry is locked
private static final byte DEAD = 3; //Antharas has been killed. Entry is locked

private static long _LastAction = 0;

private static L2BossZone _TombZone;
private static L2BossZone _LairZone;
private static boolean _EntryLocked = false;
private static int _AlarmKill=0;
private static L2GrandBossInstance _frintezza;
private static L2NpcInstance _Halisha1;
private static L2NpcInstance _Halisha2;
private static L2NpcInstance _Halisha3;
private static L2NpcInstance _Ghost1;
private static L2NpcInstance _Ghost2;
private static L2NpcInstance _Ghost3;
private static L2NpcInstance _Ghost4;
private static int _intervalSong = 31000;
private static L2Character _target;

private static boolean _morphing;


// Boss: Antharas
public frintezza(int id,String name,String descr) {
super(id,name,descr);
int[] mob = {HALISHA1,HALISHA2,HALISHA3,FRINTEZZA,GHOST1,GHOST2,GHOST3,GHOST4,100100,100101,
100102,100103,100104,18336,18337};

this.registerMobs(mob);
addStartNpc(TOMB_TELE);
addTalkId(TOMB_TELE);

_morphing = false;
_LairZone = GrandBossManager.getInstance().getZone(174231,-88006,-5108);
_TombZone = GrandBossManager.getInstance().getZone(174157,-76232,-5108);
StatsSet info = GrandBossManager.getInstance().getStatsSet(FRINTEZZA);
int status = GrandBossManager.getInstance().getBossStatus(FRINTEZZA);
closeDoorRoom1();
closeDoorRoom2();
status = DORMANT;
if (status == DEAD) {
long temp = (info.getLong("respawn_time") - System.currentTimeMillis());
temp = -1;
if (temp > 0) {
this.startQuestTimer("frintezza_unlock", temp, null, null);
_EntryLocked=true;
} else {
_frintezza = (L2GrandBossInstance) addSpawn(FRINTEZZA,174239,-89802,-5021,15450,false,0);
GrandBossManager.getInstance().setBossStatus(FRINTEZZA,DORMANT);
_frintezza.broadcastPacket(new Earthquake(174239,-89802,-5021,20,10));
GrandBossManager.getInstance().addBoss(_frintezza);
_EntryLocked=false;
}
} else {
_frintezza = (L2GrandBossInstance) addSpawn(FRINTEZZA,174239,-89802,-5021,15450,false,0);
GrandBossManager.getInstance().addBoss(_frintezza);
_EntryLocked=false;
}
}

public String onTalk (L2NpcInstance npc, L2PcInstance talker) {
int i;
List<L2PcInstance> channelmembers;
int channelsize;
L2PcInstance channelleader;
L2CommandChannel channel;
L2Party party;
List<L2PcInstance> pointA;


if (npc.getNpcId() != TOMB_TELE)
return "";
if (talker.getQuestState("frintezza").getQuestItemsCount(8073) == 0 )
return "<html><body>You do not have the necessary scroll in your possession.</html></body>";
if (_EntryLocked==true)
return "<html><body>Either there is another group in the Last Imperial Tomb or Frintezza cannot recieve visitors at the moment. Come back later.</html></body>";

party = talker.getParty();
if (party==null)
return "<html><body>You are not in a party</html></body>";
if (!party.isInCommandChannel())
return "<html><body>You are not in a command channel</html></body>";
channel = party.getCommandChannel();
channelsize = channel.getPartys().size();
channelmembers = channel.getMembers();
channelleader = channel.getChannelLeader();
if ((channelsize != 4) || (channelmembers.size()<20))
return "<html><body>Your command channel needs to have 4 parties and at least 5 person by party.</html></body>";
if (channelleader.getName() != talker.getName())
return "<html><body>You are not the channel commander</body></html>";
talker.getQuestState("frintezza").takeItems(8073, 1);
pointA = new FastList<L2PcInstance>();
for (i=0; i<(channelmembers.size()/2); i++) {
pointA.add(channelmembers.get(Rnd.get(channelmembers.size())));
}
for (L2PcInstance pc : channelmembers) {
boolean in = false;
for (L2PcInstance pc2 : pointA) {
if (pc2 == pc) in=true;
}
if (!in) {
_TombZone.allowPlayerEntry(pc, 120);
pc.teleToLocation(173102, -75248, -5108);
}
}
for (L2PcInstance pc : pointA) {
_TombZone.allowPlayerEntry(pc, 120);
pc.teleToLocation(174157, -76232, -5108);
}
GrandBossManager.getInstance().setBossStatus(FRINTEZZA,WAITING);
startQuestTimer("teleport_out", 2100000, null, null);
startQuestTimer("Area_open", 10800800, null, null);
_EntryLocked = true;
return "<html><body>Your group has been split into 2. The group on the outer rim need to kill the alarms in order to free the one inside. From this point, you have 35 minutes to complete the challenges and get into Frintezza's chambers</body></html>";
}

public String onAdvEvent (String event, L2NpcInstance npc, L2PcInstance player){
if (event == "cinema") { // spawn.
_frintezza.setIsInvul(true);
closeDoorRoom2();
_frintezza.setIsImmobilized(true);
_frintezza.disableAllSkills();
startQuestTimer("cinema2", 1000, null, null);
}
if (event == "cinema2") {
showSocialActionMovie(_frintezza, 1000, 90, 30, 0, 5000, 0);
startQuestTimer("cinema3", 1000, null, null);
}
if (event == "cinema3") {
showSocialActionMovie(_frintezza, 1000, 90, 30, 0, 5000, 0);
startQuestTimer("cinema4", 3000, null, null);
}
if (event == "cinema4") {
showSocialActionMovie(_frintezza, 140, 90, 0, 6000, 6000, 2);
startQuestTimer("cinema5", 5800, null, null);
}
if (event == "cinema5") {
showSocialActionMovie(_frintezza, 240, 90, 3, 22000, 6000, 3);
startQuestTimer("cinema6", 5800, null, null);
}
if (event == "cinema6") {
showSocialActionMovie(_frintezza, 1500, 150, 30, 10500, 10000, 0);
_frintezza.broadcastPacket(new MagicSkillUse(_frintezza, _frintezza, 5006, 1, 30000, 0));
startQuestTimer("cinema7", 10000, null, null);

_Halisha1 = addSpawn(HALISHA1,174234, -88015, -5116, 48028,false,0);
_Halisha1.setIsImmobilized(true);

_Ghost1 = addSpawn(GHOST1, 175833, -87165, -4972, 35048, false, 0);
_Ghost1.setIsImmobilized(true);
_Ghost2 = addSpawn(GHOST2, 175876, -88713, -4972, 28205, false, 0);
_Ghost2.setIsImmobilized(true);
_Ghost3 = addSpawn(GHOST3, 172608, -88702, -4972, 64817, false, 0);
_Ghost3.setIsImmobilized(true);
_Ghost4 = addSpawn(GHOST4, 172634, -87165, -4972, 57730, false, 0);
_Ghost4.setIsImmobilized(true);

Earthquake eq = new Earthquake(_frintezza.getX(), _frintezza.getY(), _frintezza.getZ(), 50, 6);
_frintezza.broadcastPacket(eq);
}
if (event == "cinema7") {
showSocialActionMovie(_Ghost1, 140, 0, 6, 4500, 4000, 1);
startQuestTimer("cinema8", 2800, null, null);
}
if (event == "cinema8") {
showSocialActionMovie(_Ghost2, 140, 0, 6, 4500, 4000, 1);
startQuestTimer("cinema9", 2800, null, null);
}
if (event == "cinema9") {
showSocialActionMovie(_Ghost3, 200, 180, 9, 4500, 4000, 1);

startQuestTimer("cinema10", 2800, null, null);
}
if (event == "cinema10") {
showSocialActionMovie(_Ghost4, 140, 270, 6, 4500, 4000, 1);
startQuestTimer("cinema11", 2800, null, null);
}
if (event == "cinema11") {
showSocialActionMovie(_Halisha1, 1000, 0, 20, 4500, 4000, 3);
startQuestTimer("cinema12", 3500, null, null);
}
if (event == "cinema12") {
showSocialActionMovie(_Halisha1, 1000, 90, 20, 4500, 4000, 3);
startQuestTimer("cinema13", 3500, null, null);
}
if (event == "cinema13") {
showSocialActionMovie(_Halisha1, 1000, 180, 20, 4500, 4000, 0);
startQuestTimer("cinema14", 3500, null, null);
}
if (event == "cinema14") {
showSocialActionMovie(_Halisha1, 1000, 270, 20, 4500, 4000, 0);
startQuestTimer("cinema15", 3500, null, null);
}
if (event == "cinema15") {
startQuestTimer("cinema16", 3500, null, null);
showSocialActionMovie(_Halisha1, 200, 360, 19, 15000, 4000, 0);
}
if (event == "cinema16") {
_Halisha1.enableAllSkills();
_Halisha1.setIsImmobilized(false);
_frintezza.abortCast();
_frintezza.enableAllSkills();
_frintezza.setIsImmobileUntilAttacked(false);
_Ghost1.setIsImmobilized(false);
_Ghost2.setIsImmobilized(false);
_Ghost3.setIsImmobilized(false);
_Ghost4.setIsImmobilized(false);
_frintezza.broadcastPacket(new CreatureSay(_frintezza.getObjectId(),0,"Frintezza","Halisha!!! Get rid of these ones!"));
GrandBossManager.getInstance().setBossStatus(FRINTEZZA,FIGHTING);
startQuestTimer("attack", 1000, null, null);
startQuestTimer("song", 1000, npc, player);
startQuestTimer("stopstun", 1000, npc, player);
}
if (event == "attack") {
L2NpcInstance h = null;
if (_Halisha1!= null && !_Halisha1.isDead()) h=_Halisha1;
if (_Halisha2!= null && !_Halisha2.isDead()) h=_Halisha2;
if (_Halisha3!= null && !_Halisha3.isDead()) h=_Halisha3;
if (h.getTarget() == null)
_target = getRandomTarget(h);
h.getAI().setIntention(AI_INTENTION_FOLLOW, _target);
h.setTarget(_target);
getSkillAI(h);
//Pour eviter qu'il fasse rien si on arrete de le taper => la fonction onspellfinished marche mal
startQuestTimer("attack", 20000, null, null);


}
if (event == "song") {
frintezzaSong();
startQuestTimer("song", _intervalSong, null, null);
}
if (event == "stopstun") {
exitStunDanceEffect();
startQuestTimer("stopstun", 10000, npc, player);
}
if (event == "poly1") {
int heading = npc.getHeading();
double hp = npc.getCurrentHp();
double mp = npc.getCurrentMp();
npc.deleteMe();
_Halisha2 = addSpawn(HALISHA2, npc);
_Halisha2.broadcastPacket(new CreatureSay(_Halisha2.getObjectId(),0,"Scarlet Von Halisha","You will die!!!"));
startQuestTimer("poly1a", 100, npc, player);
_Halisha2.setHeading(heading);
_Halisha2.setCurrentHpMp(hp, mp);
_Halisha2.setTarget(_target);
}
if (event == "poly1a") {
showSocialActionMovie(_Halisha2, 800, 0, 150, 0, 7000, 1);
startQuestTimer("poly1b", 6800, null, null);
}
if (event == "poly1b") {
_Halisha2.getAI().setIntention(CtrlIntention.AI_INTENTION_FOLLOW, _target);
startQuestTimer("attack", 1000, null, null);
_morphing = false;
}

if (event == "poly2") {
int heading = npc.getHeading();
npc.deleteMe();
_Halisha3 = addSpawn(HALISHA3, npc);
_Halisha3.broadcastPacket(new CreatureSay(_Halisha3.getObjectId(),0,"Scarlet Von Halisha","You will die!!!"));
_Halisha3.setHeading(heading);
_Halisha3.getAI().setIntention(CtrlIntention.AI_INTENTION_FOLLOW, player);
startQuestTimer("attack", 1000, null, null);
_Halisha3.setTarget(_target);
_morphing = false;
}
if (event == "frintezza_unlock") {
_frintezza = (L2GrandBossInstance) addSpawn(FRINTEZZA,174239,-89802,-5021,15450,false,0);
GrandBossManager.getInstance().addBoss(_frintezza);
_EntryLocked=false;
}
if (event == "Area_open") {
_TombZone.oustAllPlayers();
_LairZone.oustAllPlayers();
_EntryLocked = false;
_frintezza.setIsInvul(false);
}
if (event == "frintezza_despawn") {
if ( (_LastAction + 1800000) < System.currentTimeMillis()) {
closeDoorRoom1();
closeDoorRoom2();
if (_Ghost1 != null) _Ghost1.deleteMe();
if (_Ghost2 != null) _Ghost2.deleteMe();
if (_Ghost3 != null) _Ghost3.deleteMe();
if (_Ghost4 != null) _Ghost4.deleteMe();
if (_Halisha1 != null) _Halisha1.deleteMe();
if (_Halisha2 != null) _Halisha2.deleteMe();
if (_Halisha3 != null) _Halisha3.deleteMe();
_EntryLocked = false;
_TombZone.oustAllPlayers();
_LairZone.oustAllPlayers();
cancelQuestTimers("attack");
cancelQuestTimers("song");
cancelQuestTimers("stopstun");
}
}
if (event == "spawn_cubes") {
closeDoorRoom1();
closeDoorRoom2();
if (_Ghost1 != null) _Ghost1.deleteMe();
if (_Ghost2 != null) _Ghost2.deleteMe();
if (_Ghost3 != null) _Ghost3.deleteMe();
if (_Ghost4 != null) _Ghost4.deleteMe();
addSpawn(31859, 174231, -88006, -5115, 0, false, 0);
}
if (event == "teleport_out") {
int nbin=0;
for (L2Character p: _LairZone.getCharactersInside().values()) {
if (p instanceof L2PcInstance) nbin++;
}
if (nbin == 0) {
cancelQuestTimers("attack");
cancelQuestTimers("song");
cancelQuestTimers("stopstun");
_EntryLocked = false;
} else {
startQuestTimer("cinema", 1000, null, null);
}
closeDoorRoom1();
closeDoorRoom2();
_TombZone.oustAllPlayers();
_morphing = false;
cancelQuestTimer("teleport_out", npc, player);
}
return super.onAdvEvent(event, npc, player);
}

public String onAttack (L2NpcInstance npc, L2PcInstance attacker, int damage, boolean isPet){
int npcId = npc.getNpcId();
if (npcId == HALISHA1) {
_LastAction = System.currentTimeMillis();
startQuestTimer("frintezza_despawn", 60000, null, null);
if ( (npc.getCurrentHp() < (npc.getMaxHp() *0.66)) && !_morphing) {
_morphing = true;
startQuestTimer("poly1", 1000, npc, attacker);
}
}
if (npcId == HALISHA2) {
_LastAction = System.currentTimeMillis();
startQuestTimer("frintezza_despawn", 60000, null, null);
if ( (npc.getCurrentHp() < (npc.getMaxHp() *0.25)) && !_morphing) {
_morphing = true;
startQuestTimer("poly2", 1000, npc, attacker);
}
}
//Si on tape une des formes de halisha
if ((npcId == HALISHA1) || (npcId == HALISHA2) || (npcId == HALISHA3)) {
L2NpcInstance h = null;
_LastAction = System.currentTimeMillis();
startQuestTimer("frintezza_despawn", 60000, null, null);
if (_Halisha1!= null && !_Halisha1.isDead()) h=_Halisha1;
if (_Halisha2!= null && !_Halisha2.isDead()) h=_Halisha2;
if (_Halisha3!= null && !_Halisha3.isDead()) h=_Halisha3;
getSkillAI(h);
}
//Si on attaque les ghost mages
if (npcId == GHOST1 || npcId==GHOST3) {
npc.setTarget(attacker);
//attaque suicide
if (Rnd.get(100)< 10) npc.doCast(SkillTable.getInstance().getInfo(5011, 1));
else if (Rnd.get(100) < 25) npc.doCast(SkillTable.getInstance().getInfo(5010, 1));
}
//Si on attaque les ghost warrior
if (npcId == GHOST2 || npcId==GHOST4) {
npc.setTarget(attacker);
//attaque suicide
if (Rnd.get(100)< 10) npc.doCast(SkillTable.getInstance().getInfo(5011, 1));
else if (Rnd.get(100) < 25) npc.doCast(SkillTable.getInstance().getInfo(5009, 1));
}
if (npcId == FRINTEZZA) {
L2NpcInstance h = null;
if (_Halisha1!= null && !_Halisha1.isDead()) h=_Halisha1;
if (_Halisha2!= null && !_Halisha2.isDead()) h=_Halisha2;
if (_Halisha3!= null && !_Halisha3.isDead()) h=_Halisha3;
System.out.println(h);
if (h==null) {
System.out.println("blabla");
cancelQuestTimer("teleport_out", null, null);
startQuestTimer("teleport_out", 100, null, null);
}
}
return super.onAttack(npc, attacker, damage, isPet);
}

public String onKill (L2NpcInstance npc, L2PcInstance killer, boolean isPet) {
L2Party party;
int npcId = npc.getNpcId();
L2CommandChannel channel;
List<L2PcInstance> channelMembers;
//Lors de la mort d'une alarm
if ((npcId == 100100) || (npcId == 100101) || (npcId == 100102) || (npcId == 100103) || (npcId == 100104) ) {
_AlarmKill++;
if (Rnd.get(100)<_AlarmKill*10) { //10% de chance d'ouvrir a la premiere alarm, 20 а la deuxieme etc
openDoorRoom1();
spawnRoom2(npcId);
}
spawnRoom1(npcId);
}
//Lors de la mort d'un monstre de la deuxiиme room
if ((npcId == 18336) || (npcId == 18337)) {
if (Rnd.get(100)<30) { //30% de chance d'ouvrir les portes
if (killer != null) {
party = killer.getParty();
if (party != null) {
channel = party.getCommandChannel();
channelMembers=channel.getMembers();
for (L2PcInstance pc : channelMembers)
_LairZone.allowPlayerEntry(pc, 600);
} else _LairZone.allowPlayerEntry(killer, 600);
}
openDoorRoom2();
closeDoorRoom1();
spawnRoom2outside();
}
}
//Lors de la mort de Halisha3
if (npcId == HALISHA3) {
cancelQuestTimer("frintezza_despawn", npc, null);
npc.broadcastPacket(new PlaySound(1, "BS01_D", 1, npc.getObjectId(), npc.getX(), npc.getY(), npc.getZ()));
npc.broadcastPacket(new SpecialCamera(npc.getObjectId(),800,0,10,22000,20000));
_frintezza.deleteMe();
// On spawn les cubes de tp
startQuestTimer("spawn_cubes", 10000, npc, null);
// On arrete les song et attack en cours
cancelQuestTimer("song", npc, null);
cancelQuestTimer("attack", npc, null);
// On calcul son repop
long respawnTime = ((121 + Rnd.get(8)) * 3600000);
GrandBossManager.getInstance().setBossStatus(FRINTEZZA,DEAD);
startQuestTimer("frintezza_unlock", 432000000, null, null);
StatsSet info = GrandBossManager.getInstance().getStatsSet(FRINTEZZA);
info.set("respawn_time",(System.currentTimeMillis()) + respawnTime);

}

return super.onKill(npc,killer,isPet);
}

private void spawnRoom2outside() {
int i;
for (i=0;i<2;i++) {
addSpawn(18334, 172988+(150-Rnd.get(300)), -81719+(150-Rnd.get(300)), -5108, 0, false, 0);
addSpawn(18334, 175174+(150-Rnd.get(300)), -81804+(150-Rnd.get(300)), -5108, 0, false, 0);
}

}

private void closeDoorRoom1() {
int i;
for (i=25150051;i<=25150058;i++)
DoorTable.getInstance().getDoor(i).closeMe();
DoorTable.getInstance().getDoor(25150042).closeMe();
DoorTable.getInstance().getDoor(25150043).closeMe();

}

private void closeDoorRoom2() {
int i;
for (i=25150061;i<=25150070;i++)
DoorTable.getInstance().getDoor(i).closeMe();
DoorTable.getInstance().getDoor(25150045).closeMe();
DoorTable.getInstance().getDoor(25150046).closeMe();

}

private void openDoorRoom2() {
int i;
for (i=25150061;i<=25150070;i++)
DoorTable.getInstance().getDoor(i).openMe();
DoorTable.getInstance().getDoor(25150045).openMe();
DoorTable.getInstance().getDoor(25150046).openMe();

}

private void spawnRoom2(int npcId) {
int i;
for (i=0;i<15;i++) {
addSpawn(18336+Rnd.get(2), 174058+(350-Rnd.get(750)), -81690+(350-Rnd.get(750)), -5108, 0, false, 0);
}

}

private void openDoorRoom1() {
int i;
for (i=25150051;i<=25150058;i++)
DoorTable.getInstance().getDoor(i).openMe();
DoorTable.getInstance().getDoor(25150042).openMe();
DoorTable.getInstance().getDoor(25150043).openMe();

}

private void spawnRoom1(int npcId) {
switch (npcId) {
case 100100:
addSpawn(18329, 174157+(350-Rnd.get(750)), -76232+(350-Rnd.get(750)), -5108, 0, false, 0);
addSpawn(18331, 174157+(350-Rnd.get(750)), -76232+(350-Rnd.get(750)), -5108, 0, false, 0);
addSpawn(18330, 174157+(350-Rnd.get(750)), -76232+(350-Rnd.get(750)), -5108, 0, false, 0);
addSpawn(18332, 174157+(350-Rnd.get(750)), -76232+(350-Rnd.get(750)), -5108, 0, false, 0);
addSpawn(18332, 174157+(350-Rnd.get(750)), -76232+(350-Rnd.get(750)), -5108, 0, false, 0);
break;
case 100101:
addSpawn(18329, 174157+(350-Rnd.get(750)), -76232+(350-Rnd.get(750)), -5108, 0, false, 0);
addSpawn(18330, 174157+(350-Rnd.get(750)), -76232+(350-Rnd.get(750)), -5108, 0, false, 0);
addSpawn(18330, 174157+(350-Rnd.get(750)), -76232+(350-Rnd.get(750)), -5108, 0, false, 0);
addSpawn(18330, 174157+(350-Rnd.get(750)), -76232+(350-Rnd.get(750)), -5108, 0, false, 0);
addSpawn(18330, 174157+(350-Rnd.get(750)), -76232+(350-Rnd.get(750)), -5108, 0, false, 0);
break;
case 100102:
addSpawn(18329, 174157+(350-Rnd.get(750)), -76232+(350-Rnd.get(750)), -5108, 0, false, 0);
addSpawn(18331, 174157+(350-Rnd.get(750)), -76232+(350-Rnd.get(750)), -5108, 0, false, 0);
addSpawn(18331, 174157+(350-Rnd.get(750)), -76232+(350-Rnd.get(750)), -5108, 0, false, 0);
addSpawn(18331, 174157+(350-Rnd.get(750)), -76232+(350-Rnd.get(750)), -5108, 0, false, 0);
addSpawn(18331, 174157+(350-Rnd.get(750)), -76232+(350-Rnd.get(750)), -5108, 0, false, 0);
break;
case 100103:
addSpawn(18329, 174157+(350-Rnd.get(750)), -76232+(350-Rnd.get(750)), -5108, 0, false, 0);
addSpawn(18332, 174157+(350-Rnd.get(750)), -76232+(350-Rnd.get(750)), -5108, 0, false, 0);
addSpawn(18332, 174157+(350-Rnd.get(750)), -76232+(350-Rnd.get(750)), -5108, 0, false, 0);
addSpawn(18332, 174157+(350-Rnd.get(750)), -76232+(350-Rnd.get(750)), -5108, 0, false, 0);
addSpawn(18332, 174157+(350-Rnd.get(750)), -76232+(350-Rnd.get(750)), -5108, 0, false, 0);
break;
case 100104:
addSpawn(18329, 174157+(350-Rnd.get(750)), -76232+(350-Rnd.get(750)), -5108, 0, false, 0);
addSpawn(18333, 174157+(350-Rnd.get(750)), -76232+(350-Rnd.get(750)), -5108, 0, false, 0);
addSpawn(18333, 174157+(350-Rnd.get(750)), -76232+(350-Rnd.get(750)), -5108, 0, false, 0);
addSpawn(18333, 174157+(350-Rnd.get(750)), -76232+(350-Rnd.get(750)), -5108, 0, false, 0);
addSpawn(18333, 174157+(350-Rnd.get(750)), -76232+(350-Rnd.get(750)), -5108, 0, false, 0);
break;
}


}

private void showSocialActionMovie(L2NpcInstance target, int dist, int yaw, int pitch, int time, int duration, int socialAction)
{
Collection<L2Character> plrs = _LairZone.getCharactersInside().values();
for (L2Character player : plrs) {
if (player instanceof L2PcInstance) {
player.sendPacket(new SpecialCamera(target.getObjectId(), dist, yaw, pitch, time, duration));
// do social.
if (socialAction > 0 && socialAction < 5) {
player.sendPacket(new SocialAction(target.getObjectId(), socialAction));
}
}
}
}

private L2Character getRandomTarget(L2NpcInstance npc)
{
FastList<L2Character> result = new FastList<L2Character>();
Collection<L2Character> objs = _LairZone.getCharactersInside().values();
{
for (L2Character obj : objs)
{
if (!(GeoData.getInstance().canSeeTarget(((L2Character) obj).getX(), ((L2Character) obj).getY(), ((L2Character) obj).getZ(), npc.getX(), npc.getY(), npc.getZ())))
continue;

if (obj instanceof L2PcInstance || obj instanceof L2Summon || obj instanceof L2DecoyInstance)
{
if (Util.checkIfInRange(9000, npc, obj, true) && !obj.isDead())
result.add(obj);
}
}
}
if (!result.isEmpty() && result.size() != 0)
{
Object[] characters = result.toArray();
return (L2Character) characters[Rnd.get(characters.length)];
}
return null;
}
/*
* SONG 1 : Heal
* SONG 2 : Dash
* SONG 3 : pAttack / spped
* SONG 4 : reduce heal
* SONG 5 : Psycho symphony
* SONG 6 : Stun + dance
*/
private void frintezzaSong() {
int song;
L2NpcInstance h = null;
if (_Halisha1!= null && !_Halisha1.isDead()) h=_Halisha1;
if (_Halisha2!= null && !_Halisha2.isDead()) h=_Halisha2;
if (_Halisha3!= null && !_Halisha3.isDead()) h=_Halisha3;
song = Rnd.get(5) + 1;
L2Object p = h.getTarget();
if (h.getNpcId()==HALISHA3) {
if ((h.getCurrentHp() > (h.getMaxHp()* 3/4)) && Rnd.get(100)< 5) {
_frintezza.broadcastPacket(new CreatureSay(_frintezza.getObjectId(),0,"Frintezza","Hypnotic Mazurka !"));
_frintezza.setTarget(p);
_frintezza.broadcastPacket(new MagicSkillUse(_frintezza,_frintezza,5007,5,30000,0));
startStunDanceEffect();
return;
}
if ((h.getCurrentHp() > (h.getMaxHp()* 2/4)) && Rnd.get(100)< 15) {
_frintezza.broadcastPacket(new CreatureSay(_frintezza.getObjectId(),0,"Frintezza","Hypnotic Mazurka !"));
_frintezza.setTarget(p);
_frintezza.broadcastPacket(new MagicSkillUse(_frintezza,_frintezza,5007,5,30000,0));
startStunDanceEffect();
return;
}
if ((h.getCurrentHp() > (h.getMaxHp()* 1/4)) && Rnd.get(100)< 25) {
_frintezza.broadcastPacket(new CreatureSay(_frintezza.getObjectId(),0,"Frintezza","Hypnotic Mazurka !"));
_frintezza.setTarget(p);
_frintezza.broadcastPacket(new MagicSkillUse(_frintezza,_frintezza,5007,5,30000,0));
startStunDanceEffect();
return;
}
if (Rnd.get(100)< 35) {
_frintezza.broadcastPacket(new CreatureSay(_frintezza.getObjectId(),0,"Frintezza","Hypnotic Mazurka !"));
_frintezza.setTarget(p);
_frintezza.broadcastPacket(new MagicSkillUse(_frintezza,_frintezza,5007,5,30000,0));
startStunDanceEffect();
return;
}
}
switch (song) {
case 1: // Consecutive Heal : Greater Heal - on the monsters
_frintezza.broadcastPacket(new CreatureSay(_frintezza.getObjectId(),0,"Frintezza","Healing Rhapsody!"));;
_frintezza.setTarget(h);
_frintezza.doSimultaneousCast((SkillTable.getInstance().getInfo(5007,1)));
break;
case 2:
_frintezza.broadcastPacket(new CreatureSay(_frintezza.getObjectId(),0,"Frintezza","Rampagin Opus !"));
_frintezza.setTarget(h);
_frintezza.doSimultaneousCast((SkillTable.getInstance().getInfo(5007,2)));
break;
case 3: // Affecting Patack/Atk Spd : Haste Buff - monsters attack faster
_frintezza.broadcastPacket(new CreatureSay(_frintezza.getObjectId(),0,"Frintezza","Power Concerto !"));
_frintezza.setTarget(h);
_frintezza.doSimultaneousCast((SkillTable.getInstance().getInfo(5007,3)));
break;
case 4: // Offensive Skill: Decreases the effect of HP reg. on the players
_frintezza.broadcastPacket(new CreatureSay(_frintezza.getObjectId(),0,"Frintezza","Plagued Concerto !"));
_frintezza.setTarget(p);
_frintezza.broadcastPacket(new MagicSkillUse(_frintezza,_frintezza,5007,4,30000,0));
_frintezza.doSimultaneousCast((SkillTable.getInstance().getInfo(5008,4)));

break;
case 5:
_frintezza.broadcastPacket(new CreatureSay(_frintezza.getObjectId(),0,"Frintezza","Psycho Symphony !"));
_frintezza.setTarget(h);
_frintezza.doSimultaneousCast((SkillTable.getInstance().getInfo(5007,5)));
break;
}

}

private synchronized void getSkillAI(L2NpcInstance npc) {
if (npc.isInvul() || npc.isCastingNow() || _morphing) return;
if (Rnd.get(100) < 5) { //5% de chance de changer de target
L2Character target = getRandomTarget(npc);
if (target != null) {
_target = target;
}
}
npc.getAI().setIntention(AI_INTENTION_FOLLOW, _target);
npc.setTarget(_target);
L2Skill skill = choose_skill(npc);
npc.setIsCastingNow(true);
npc.doCast(skill);
}

private L2Skill choose_skill(L2NpcInstance npc) {
int npcId = npc.getNpcId();
//Si on tape halisha3
if (npcId == HALISHA3) {
if ( (npc.getCurrentHp() <= npc.getMaxHp() * 0.80) && (Rnd.get(5) == 0)) {
// Gros skill de halisha3 fait tres bobo :)
return SkillTable.getInstance().getInfo(5019,1);
}
}
//Si on tape une des formes de halisha
if ((npcId == HALISHA1) || (npcId == HALISHA2) || (npcId == HALISHA3)) {
double distance;
try {
distance = npc.getDistanceSq(npc.getTarget());
} catch (Exception e) {
distance = 0;
}
if (Rnd.get(100) < 20) {
if (npcId == HALISHA3) return SkillTable.getInstance().getInfo(5018,2); //Si halisha3, def lvl2
else if (npcId == HALISHA2) return SkillTable.getInstance().getInfo(5018,1); //Si halisja 2, def lvl1
}
if ( (npc.getCurrentHp() <= npc.getMaxHp() * 0.8) && (Rnd.get(100) < 20) ) {
return SkillTable.getInstance().getInfo(5016,1);
}
if ((distance > 40000) && (Rnd.get(100) < 33))
return SkillTable.getInstance().getInfo(5015,Rnd.get(6)+1);//On tire au hasard un des skill de tp (skill identique, power diffйrents)
}
return SkillTable.getInstance().getInfo(5014,1); //Attack normale
}

public String onSpellFinished(L2NpcInstance npc, L2PcInstance player, L2Skill skill)
{
if (npc.isInvul())
{
npc.getAI().setIntention(AI_INTENTION_IDLE);
return null;
}
else if (npc.getNpcId() == HALISHA1 || npc.getNpcId() == HALISHA2 || npc.getNpcId() == HALISHA3)
{
getSkillAI(npc);
}
return super.onSpellFinished(npc, player, skill);
}

private void startStunDanceEffect() {
Collection<L2Character> plrs = _LairZone.getCharactersInside().values();
L2Skill skill= SkillTable.getInstance().getInfo(5008,5);
for (L2Character p : plrs) {
if (p instanceof L2PcInstance) {
L2PcInstance player= (L2PcInstance)p;
if (Rnd.get(100)>60) continue;
try
{
if (player == null)
return;
if (player.isInvul() || ((L2PcInstance)player).getAppearance().getInvisible())
return;

// stop all actions
player.abortAttack();
player.abortCast();
player.setIsImmobilized(true);
player.disableAllSkills();

player.setTarget(null);

// start the animation
player.startAbnormalEffect(L2Character.ABNORMAL_EFFECT_DANCE_STUNNED);

// add the effect icon
player.callSkill(skill, new L2Object[]
{ player });

// send target the message
SystemMessage sm = new SystemMessage(SystemMessageId.YOU_FEEL_S1_EFFECT);
sm.addSkillName(skill.getId(),5);
player.sendPacket(sm);
}
catch (Throwable t)
{
if (player != null && !player.isAlikeDead())
{
player.enableAllSkills();
player.setIsImmobilized(false);
}
}
}
}
}

/**
* Ends the dance+stun effect on the target
*
* @author Darki699
*/
private void exitStunDanceEffect() {
Collection<L2Character> plrs = _LairZone.getCharactersInside().values();
for (L2Character p : plrs) {
if (p instanceof L2PcInstance) {
L2PcInstance player= (L2PcInstance)p;
if (Rnd.get(100)<33) {
if (player == null)
return;
player.enableAllSkills();
player.setIsImmobilized(false);
player.stopAbnormalEffect(L2Character.ABNORMAL_EFFECT_DANCE_STUNNED);
}
}
}
}

public static void main(String[] args) {
// now call the constructor (starts up the ai)
new frintezza(-1,"frintezza","ai");
}
}


кому не сложно найдите плз ошыбку а то я щас убиюсь щас!

парни выручайте плз

0
Давид
Давид

User

Бывалый

Posts: 162

На форуме с: 03/14/2008

Репутация: +37

Рейтинг: 0

· 05/05/2009, 08:50 AM

1. за такой флуд как ты разводишь я бы тебе уже бан дал!

2. Учи яву и сам всё сам! ну или купи))) я думаю мало кто сможет помочь))

3. когда выкладываешь AI нужно ставить [spoiler][/spoiler]

подпись она и в Африке подпись!

0
Войдите или зарегистрируйтесь чтобы ответить