Ir para conteúdo
  • Cadastre-se

L2JStudio - A new way for Interlude.


Hl4p3x

Posts recomendados


To testando o projeto a quase 2h bem dizer, e pelo visto, ta melhor que a acis, as quests estão tudo funcionando, e o core não é imundo... Acho que ganhou da acis pessoal.. Mas irei testar mais coisas, e tentar descobrir se há bugs, mas seria ótimo se mais pessoas ajuda-se, pq a pack ta parecendo realmente boa. Tem ate npc buff do  tryskell do macro ja implementado.

A source tava tendo problema pra compilar,  estava faltando a pasta lib na pasta java. Eu compilei, quem quiser toma ai.

Source

Pack + backup

Banco de dados ta l2jdb sem senha.

Irei continuar testando, to gostando desse projeto.

Editado por Christian-SDM
Link para o comentário
Compartilhar em outros sites

6 horas atrás, Christian-SDM disse:

 

Cedo demais para falar : melhor que a aCis

 

Mas, Hl4p3x, por que L2JMobius? O que você viu de interessante neste projeto? Está java 14, sim, mas o código está codado para ter performance nessa versão de JAVA? Ou você deu update nele ? Algumas funções de java's mais antigos não tem mais no 14 por que foi modificado, você fez essas alterações ou a pack veio assim?

 

Me explique um pouco o que você viu demais nessa plataforma, eu olhando, e analisando ainda não vi nada demais para usá-lo como BASE. Mas sem dúvidas, você como desenvolvedor da mesma, vai dar o que falar, será um excelente projeto.

Ah, e pra variar né, a pergunta de sempre, por que interlude? Por que não outra chronica qualquer? Por que não algo novo e sim o velho interlude que já existem inúmeros projetos tanto free quanto pagos ? 

Agradeço se puder responder minhas questões, boa sorte com o projeto! ❤️

Um mundo de diversão no Lineage 2

https://www.primeworld.com.br

Discord: Em breve

Comunidade brasileira de Lineage. Interlude Remastered / High Five / Essence 

Classes remasterizadas, sistemas únicos, diversão garantida.

Link para o comentário
Compartilhar em outros sites

9 horas atrás, Christian-SDM disse:

To testando o projeto a quase 2h bem dizer, e pelo visto, ta melhor que a acis, as quests estão tudo funcionando, e o core não é imundo... Acho que ganhou da acis pessoal.. Mas irei testar mais coisas, e tentar descobrir se há bugs, mas seria ótimo se mais pessoas ajuda-se, pq a pack ta parecendo realmente boa. Tem ate npc buff do  tryskell do macro ja implementado.

A source tava tendo problema pra compilar,  estava faltando a pasta lib na pasta java. Eu compilei, quem quiser toma ai.

Source

Pack + backup

Banco de dados ta l2jdb sem senha.

Irei continuar testando, to gostando desse projeto.

Boa !! Porem estou com erro no hexid , como faço para recriar o hexid ? Nao encontrei nenhum arquivo para tentar recriar ;x  Erro ; Damn! Registration failed! Reason: wrong hexid

Razak

Link para o comentário
Compartilhar em outros sites

2 horas atrás, Lire disse:

Cedo demais para falar : melhor que a aCis

 

Mas, Hl4p3x, por que L2JMobius? O que você viu de interessante neste projeto? Está java 14, sim, mas o código está codado para ter performance nessa versão de JAVA? Ou você deu update nele ? Algumas funções de java's mais antigos não tem mais no 14 por que foi modificado, você fez essas alterações ou a pack veio assim?

 

Me explique um pouco o que você viu demais nessa plataforma, eu olhando, e analisando ainda não vi nada demais para usá-lo como BASE. Mas sem dúvidas, você como desenvolvedor da mesma, vai dar o que falar, será um excelente projeto.

Ah, e pra variar né, a pergunta de sempre, por que interlude? Por que não outra chronica qualquer? Por que não algo novo e sim o velho interlude que já existem inúmeros projetos tanto free quanto pagos ? 

Agradeço se puder responder minhas questões, boa sorte com o projeto! ❤️

Inicialmente rodei muito para achar algo decente na versão Interlude. Procurei muito para trabalhar em cima.
Até que peguei a JMobius para testar e vi que realmente tem um bom trabalho na source do projeto.
Java 14 (Não é full JDK14 ainda), todas as quests funcionais, as que tiver bug, facilmente será fixada, todas as AI e boss funcionando corretamente, spawns, stats e skills vamos trabalhar o CORE para fazer o correto balanceamento de classes sem comprometer o trabalho correto dos skils (Power/Chance). Acis é uma boa base, sem dúvida, mas o desenvolvedor, ao meu ver, já está enrolando para finalizar o projeto e sempre fica mudando o nome dos arquivos e movendo para outro lugar, dificultando o update do mesmo e entendimento de quem é leigo no assunto. Nada contra a aCis, mas nada muito a favor. Quanto ao "Por quê Interlude?" Logo mais entro com um projeto H5 também com base em L2jServer "latest" e com oq falta implementado (Nevits, PC, Quests, Insntancias).

Bom, acho que é isso! A source ta ai e o projeto logo mais começará a ser atualizado. 😉

Agora, razak1995 disse:

Boa !! Porem estou com erro no hexid , como faço para recriar o hexid ? Nao encontrei nenhum arquivo para tentar recriar ;x  Erro ; Damn! Registration failed! Reason: wrong hexid

Acabei de fixar esse lapso, amigão!

CONFERE AQUI

Editado por Hl4p3x
  • Gostei 2
  • Amei 1

kLnregy.jpg

L2STUDIO, seu servidor está aqui!
Não me faça perder tempo se você não tem dinheiro para pagar pelos serviços e produtos. Obrigado!

Link para o comentário
Compartilhar em outros sites

Agora, JorgeDiias disse:

esse projeto usa o mariadb ou qual versao do mysql recomendada?

MySQL 8.0

kLnregy.jpg

L2STUDIO, seu servidor está aqui!
Não me faça perder tempo se você não tem dinheiro para pagar pelos serviços e produtos. Obrigado!

Link para o comentário
Compartilhar em outros sites

Update 09:
 

DOWNLOAD DO COMPILADO

Custom Daily Reward from aCis to L2jServer/Mobius e...

- Implementado no sistema de ganho diário para players configurações extras.
- Novo backup e sql para o sistema.
- Adicionado as SQL do projeto e um sistema fácil de instalação para pessoas que não tem muita experiencia.

kLnregy.jpg

L2STUDIO, seu servidor está aqui!
Não me faça perder tempo se você não tem dinheiro para pagar pelos serviços e produtos. Obrigado!

Link para o comentário
Compartilhar em outros sites

6 horas atrás, Lire disse:

Cedo demais para falar : melhor que a aCis

 

Mas, Hl4p3x, por que L2JMobius? O que você viu de interessante neste projeto? Está java 14, sim, mas o código está codado para ter performance nessa versão de JAVA? Ou você deu update nele ? Algumas funções de java's mais antigos não tem mais no 14 por que foi modificado, você fez essas alterações ou a pack veio assim?

 

Me explique um pouco o que você viu demais nessa plataforma, eu olhando, e analisando ainda não vi nada demais para usá-lo como BASE. Mas sem dúvidas, você como desenvolvedor da mesma, vai dar o que falar, será um excelente projeto.

Ah, e pra variar né, a pergunta de sempre, por que interlude? Por que não outra chronica qualquer? Por que não algo novo e sim o velho interlude que já existem inúmeros projetos tanto free quanto pagos ? 

Agradeço se puder responder minhas questões, boa sorte com o projeto! ❤️

Não dei certeza de se melhor que a acis, e sim que pode ta melhor.Não falei corretamente, O projeto ta em testes, mas em poucas horas que estou fazendo testes, digo que  estou gostando muito mais que a acis, só pelas quests ta muito a frente da acis, e te todos grand bosses na pack, todos mesmo, Acis ta longe disso, e a revisao não tem  o core poluido igual  a l2jfrozen, o core é mais limpo, mas acis ta um pouco mais leve, mas é porque falta muita coisa na acis pra se implementada, agora o jeito é testar tudo e reportar tudo de errado que encontrar.

Editado por Christian-SDM
Link para o comentário
Compartilhar em outros sites

7 minutos atrás, Christian-SDM disse:

Fui atacar orfen lv 78 ele tava azul, ate ai normal. fui atacar ele, e fiquei pedrificado, mas gerou esse erro ai

Nenhuma descrição de foto disponível.

Testei aqui com char GM, porem com status (Weapon, Armor..) normais sem enchant 65535 e ele ta normal. Mas vou verificar!

kLnregy.jpg

L2STUDIO, seu servidor está aqui!
Não me faça perder tempo se você não tem dinheiro para pagar pelos serviços e produtos. Obrigado!

Link para o comentário
Compartilhar em outros sites

oi Eu sei que é muito mais trabalho. mas é de opinião que, se eles puderem fazer um tutorial em vídeo sobre como instalar o pacote de dados e como configurar algo mínimo, como taxas, para pessoas como eu, por exemplo, que não têm muito conhecimento

 

Editado por canibal10
Link para o comentário
Compartilhar em outros sites

23 hours ago, Lire said:

Cedo demais para falar : melhor que a aCis

 

Mas, Hl4p3x, por que L2JMobius? O que você viu de interessante neste projeto? Está java 14, sim, mas o código está codado para ter performance nessa versão de JAVA? Ou você deu update nele ? Algumas funções de java's mais antigos não tem mais no 14 por que foi modificado, você fez essas alterações ou a pack veio assim?

 

Me explique um pouco o que você viu demais nessa plataforma, eu olhando, e analisando ainda não vi nada demais para usá-lo como BASE. Mas sem dúvidas, você como desenvolvedor da mesma, vai dar o que falar, será um excelente projeto.

Ah, e pra variar né, a pergunta de sempre, por que interlude? Por que não outra chronica qualquer? Por que não algo novo e sim o velho interlude que já existem inúmeros projetos tanto free quanto pagos ? 

Agradeço se puder responder minhas questões, boa sorte com o projeto! ❤️

A voice of reason and wisdom.

aCis need rework of geoengine, movement and new spawn manager - only datapack is strong part of the project

Link para o comentário
Compartilhar em outros sites

Haha, mobius interlude foi criada baseado na frozen, mudaram toda a engine se baseando na Acis, até renomeou todo o projeto com classes iguais pra facilitar o recebimento de fixes do Triyskel ☺️, ai falar que é melhor que Acis é sacanagem. ( Acis só não é terminada, porque  Tryskel não quer, ele enrola de proposito (eu acho).

Ao meu ver, é mais interessante iniciar um projeto na Acis e adicionar o que falta para ficar uma rev show (Não mods, mas sim quests, correções entre outras coisas)

- Iniciar um projeto baseado na Mobius que baseia-se na frozen pra iniciar e na Acis para correções adicionais?

Mobius é apenas mais organizado o core, porem e a mesma coisa de vc ter uma casa simples e mantê-la sempre arrumada, a impressão que se dá e outra.

Por mais que a mobius seja organizada etc e tudo mais, a Acis tem um fino trato no geral.

 

Otima iniciativa, só não entenda minhas palavras como crítica!

Link para o comentário
Compartilhar em outros sites

6 horas atrás, SkyDoidao disse:

Haha, mobius interlude foi criada baseado na frozen, mudaram toda a engine se baseando na Acis, até renomeou todo o projeto com classes iguais pra facilitar o recebimento de fixes do Triyskel ☺️, ai falar que é melhor que Acis é sacanagem. ( Acis só não é terminada, porque  Tryskel não quer, ele enrola de proposito (eu acho).

Ao meu ver, é mais interessante iniciar um projeto na Acis e adicionar o que falta para ficar uma rev show (Não mods, mas sim quests, correções entre outras coisas)

- Iniciar um projeto baseado na Mobius que baseia-se na frozen pra iniciar e na Acis para correções adicionais?

Mobius é apenas mais organizado o core, porem e a mesma coisa de vc ter uma casa simples e mantê-la sempre arrumada, a impressão que se dá e outra.

Por mais que a mobius seja organizada etc e tudo mais, a Acis tem um fino trato no geral.

 

Otima iniciativa, só não entenda minhas palavras como crítica!

Tranquilo! Está ai para usar quem quiser. 😉

  • Gostei 1
  • Obrigado 2

kLnregy.jpg

L2STUDIO, seu servidor está aqui!
Não me faça perder tempo se você não tem dinheiro para pagar pelos serviços e produtos. Obrigado!

Link para o comentário
Compartilhar em outros sites

Em 01/05/2020 at 11:41, Hl4p3x disse:

Tranquilo! Está ai para usar quem quiser. 😉

Isso é verdade, mas os argumentos do rapaz, estão certos. :s

Mas claro, o tempo é seu e você dedica ele como achar mais conveniente

Um mundo de diversão no Lineage 2

https://www.primeworld.com.br

Discord: Em breve

Comunidade brasileira de Lineage. Interlude Remastered / High Five / Essence 

Classes remasterizadas, sistemas únicos, diversão garantida.

Link para o comentário
Compartilhar em outros sites

  • Kelvin pinned this Tópico

Estou tendo esse problema, instalei, java 14 instalado, mysql 8.0 tambem ok, instalou  o banco de dados certinho, fica subindo erros das tabelas..hgthtrh.png.e857f5d93414a22943d0d8b58a92341d.png

Positividade Sempre.

Link para o comentário
Compartilhar em outros sites

Em 29/04/2020 at 12:20, Hl4p3x disse:

Acis é uma boa base, sem dúvida, mas o desenvolvedor, ao meu ver, já está enrolando para finalizar o projeto e sempre fica mudando o nome dos arquivos e movendo para outro lugar, dificultando o update do mesmo e entendimento de quem é leigo no assunto. Nada contra a aCis, mas nada muito a favor. Quanto ao "Por quê Interlude?" Logo mais entro com um projeto H5 também com base em L2jServer "latest" e com oq falta implementado (Nevits, PC, Quests, Insntancias).
Bom, acho que é isso! A source ta ai e o projeto logo mais começará a ser atualizado. 😉

Acabei de fixar esse lapso, amigão!

CONFERE AQUI

Concordo plenamente.

Cada projeto criado tem o seu valor! os desenvolvedores capricham nas correções que o projeto precisa para deixa-lo 100%, esse é o foco deles.  uns são mais completos em umas partes e outros em outras partes, independente se o seu é uma junção de JaCis, Jfrozen, Jserver ou outras, o importante é estar estável para que possamos ter um jogo limpo  e sem bugs! esse será o diferencial de todos os outros, além disso todos vão querer usar, espero que não desista do seu projeto man, eu vou testar e farei o possível para colaborar.

a primeira coisa que vou checar é se ela já tem os fixes de duplicação! mais testarei as principais quest's. logo mais os bosses por completo, quando tiver tempo é claro.

 

Editado por RootZerO
  • Gostei 2
  • Obrigado 1
Link para o comentário
Compartilhar em outros sites

Uma pequena correção no game\data\scripts\ai\bosses

baium.ai

 

/*
 * This file is part of the L2J Mobius project.
 * 
 * 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 ai.bosses;

import static org.l2jserver.gameserver.ai.CtrlIntention.AI_INTENTION_FOLLOW;
import static org.l2jserver.gameserver.ai.CtrlIntention.AI_INTENTION_IDLE;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.logging.Logger;

import org.l2jserver.Config;
import org.l2jserver.commons.concurrent.ThreadPool;
import org.l2jserver.commons.util.Rnd;
import org.l2jserver.gameserver.datatables.SkillTable;
import org.l2jserver.gameserver.geoengine.GeoEngine;
import org.l2jserver.gameserver.instancemanager.GrandBossManager;
import org.l2jserver.gameserver.model.Effect;
import org.l2jserver.gameserver.model.Skill;
import org.l2jserver.gameserver.model.StatSet;
import org.l2jserver.gameserver.model.WorldObject;
import org.l2jserver.gameserver.model.actor.Creature;
import org.l2jserver.gameserver.model.actor.Summon;
import org.l2jserver.gameserver.model.actor.instance.GrandBossInstance;
import org.l2jserver.gameserver.model.actor.instance.MonsterInstance;
import org.l2jserver.gameserver.model.actor.instance.NpcInstance;
import org.l2jserver.gameserver.model.actor.instance.PlayerInstance;
import org.l2jserver.gameserver.model.entity.Announcements;
import org.l2jserver.gameserver.model.quest.Quest;
import org.l2jserver.gameserver.model.quest.QuestTimer;
import org.l2jserver.gameserver.model.zone.type.BossZone;
import org.l2jserver.gameserver.network.serverpackets.Earthquake;
import org.l2jserver.gameserver.network.serverpackets.MoveToPawn;
import org.l2jserver.gameserver.network.serverpackets.PlaySound;
import org.l2jserver.gameserver.network.serverpackets.SocialAction;
import org.l2jserver.gameserver.util.Util;

/**
 * Baium AI Note1: if the server gets rebooted while players are still fighting Baium, there is no lock, but players also lose their ability to wake baium up. However, should another person enter the room and wake him up, the players who had stayed inside may join the raid. This can be helpful for
 * players who became victims of a reboot (they only need 1 new player to enter and wake up baium) and is not too exploitable since any player wishing to exploit it would have to suffer 5 days of being parked in an empty room. Note2: Neither version of Baium should be a permanent spawn. This script
 * is fully capable of spawning the statue-version when the lock expires and switching it to the mob version promptly. Additional notes ( source http://aleenaresron.blogspot.com/2006_08_01_archive.html ): * Baium only first respawns five days after his last death. And from those five days he will
 * respawn within 1-8 hours of his last death. So, you have to know his last time of death. * If by some freak chance you are the only one in Baium's chamber and NO ONE comes in [ha, ha] you or someone else will have to wake Baium. There is a good chance that Baium will automatically kill whoever
 * wakes him. There are some people that have been able to wake him and not die, however if you've already gone through the trouble of getting the bloody fabric and camped him out and researched his spawn time, are you willing to take that chance that you'll wake him and not be able to finish your
 * quest? Doubtful. [ this powerful attack vs the player who wakes him up is NOT yet implemented here] * once someone starts attacking Baium no one else can port into the chamber where he is. Unlike with the other raid bosses, you can just show up at any time as long as you are there when they die.
 * Not true with Baium. Once he gets attacked, the port to Baium closes. byebye, see you in 5 days. If nobody attacks baium for 30 minutes, he auto-despawns and unlocks the vortex
 * @author Fulminus version 0.1
 */
public class Baium extends Quest
{
	protected static final Logger LOGGER = Logger.getLogger(Baium.class.getName());
	
	private Creature _target;
	private Skill _skill;
	private static final int STONE_BAIUM = 29025;
	private static final int ANGELIC_VORTEX = 31862;
	private static final int LIVE_BAIUM = 29020;
	private static final int ARCHANGEL = 29021;
	
	// Baium status tracking,
	private static final byte ASLEEP = 0; // baium is in the stone version, waiting to be woken up. Entry is unlocked,
	private static final byte AWAKE = 1; // baium is awake and fighting. Entry is locked.
	private static final byte DEAD = 2; // baium has been killed and has not yet spawned. Entry is locked,
	
	// Archangel locations.
	// @formatter:off
	private static final int[][] ANGEL_LOCATION =
	{
		{114239, 17168, 10080, 63544},
		{115780, 15564, 10080, 13620},
		{114880, 16236, 10080, 5400},
		{115168, 17200, 10080, 0},
		{115792, 16608, 10080, 0},
	};
	// @formatter:on
	
	private long _lastAttackVsBaiumTime = 0;
	private final List<NpcInstance> _minions = new CopyOnWriteArrayList<>();
	protected BossZone _zone;
	
	public Baium()
	{
		super(-1, "ai/bosses");
		
		final int[] mob =
		{
			LIVE_BAIUM
		};
		registerMobs(mob);
		
		// Quest NPC starter initialization
		addStartNpc(STONE_BAIUM);
		addStartNpc(ANGELIC_VORTEX);
		addTalkId(STONE_BAIUM);
		addTalkId(ANGELIC_VORTEX);
		_zone = GrandBossManager.getInstance().getZone(113100, 14500, 10077);
		final StatSet info = GrandBossManager.getInstance().getStatSet(LIVE_BAIUM);
		final Integer status = GrandBossManager.getInstance().getBossStatus(LIVE_BAIUM);
		if (status == DEAD)
		{
			// load the unlock date and time for baium from DB
			final long temp = (info.getLong("respawn_time") - System.currentTimeMillis());
			if (temp > 0)
			{
				// the unlock time has not yet expired. Mark Baium as currently locked (dead). Setup a timer
				// to fire at the correct time (calculate the time between now and the unlock time,
				// setup a timer to fire after that many msec)
				startQuestTimer("baium_unlock", temp, null, null);
			}
			else
			{
				// the time has already expired while the server was offline. Delete the saved time and
				// immediately spawn the stone-baium. Also the state need not be changed from ASLEEP
				addSpawn(STONE_BAIUM, 116033, 17447, 10104, 40188, false, 0);
				if (Config.ANNOUNCE_TO_ALL_SPAWN_RB)
				{
					Announcements.getInstance().announceToAll("Raid boss Baium Stone spawned in world.");
				}
				GrandBossManager.getInstance().setBossStatus(LIVE_BAIUM, ASLEEP);
			}
		}
		else if (status == AWAKE)
		{
			final int loc_x = info.getInt("loc_x");
			final int loc_y = info.getInt("loc_y");
			final int loc_z = info.getInt("loc_z");
			final int heading = info.getInt("heading");
			final int hp = info.getInt("currentHP");
			final int mp = info.getInt("currentMP");
			final GrandBossInstance baium = (GrandBossInstance) addSpawn(LIVE_BAIUM, loc_x, loc_y, loc_z, heading, false, 0);
			if (Config.ANNOUNCE_TO_ALL_SPAWN_RB)
			{
				Announcements.getInstance().announceToAll("Raid boss " + baium.getName() + " spawned in world.");
			}
			GrandBossManager.getInstance().addBoss(baium);
			ThreadPool.schedule(() ->
			{
				try
				{
					baium.setCurrentHpMp(hp, mp);
					baium.setInvul(true);
					// _baium.setImobilised(true);
					baium.broadcastPacket(new SocialAction(baium.getObjectId(), 2));
					startQuestTimer("baium_wakeup", 15000, baium, null);
				}
				catch (Exception e)
				{
					LOGGER.warning(e.getMessage());
				}
			}, 100L);
		}
		else
		{
			addSpawn(STONE_BAIUM, 116033, 17447, 10104, 40188, false, 0);
			if (Config.ANNOUNCE_TO_ALL_SPAWN_RB)
			{
				Announcements.getInstance().announceToAll("Raid boss Baium Stone spawned in world.");
			}
		}
	}
	
	@Override
	public String onAdvEvent(String event, NpcInstance npc, PlayerInstance player)
	{
		if (event.equals("baium_unlock"))
		{
			GrandBossManager.getInstance().setBossStatus(LIVE_BAIUM, ASLEEP);
			addSpawn(STONE_BAIUM, 116033, 17447, 10104, 40188, false, 0);
			if (Config.ANNOUNCE_TO_ALL_SPAWN_RB)
			{
				Announcements.getInstance().announceToAll("Raid boss Baium Stone spawned in world.");
			}
		}
		else if (event.equals("skill_range") && (npc != null))
		{
			callSkillAI(npc);
		}
		else if (event.equals("clean_player"))
		{
			_target = getRandomTarget(npc);
		}
		else if (event.equals("baium_wakeup") && (npc != null))
		{
			if (npc.getNpcId() == LIVE_BAIUM)
			{
				npc.broadcastPacket(new SocialAction(npc.getObjectId(), 1));
				npc.broadcastPacket(new Earthquake(npc.getX(), npc.getY(), npc.getZ(), 40, 5));
				// start monitoring baium's inactivity
				_lastAttackVsBaiumTime = System.currentTimeMillis();
				startQuestTimer("baium_despawn", 60000, npc, null, true);
				if (player != null)
				{
					player.reduceCurrentHp(99999999, player);
				}
				
				npc.setRunning();
				
				startQuestTimer("skill_range", 500, npc, null, true);
				final NpcInstance baium = npc;
				ThreadPool.schedule(() ->
				{
					try
					{
						baium.setInvul(false);
						// baium.setImobilised(false);
						// for (NpcInstance minion : _Minions)
						// minion.setShowSummonAnimation(false);
						baium.getAttackByList().addAll(_zone.getCharactersInside());
					}
					catch (Exception e)
					{
						LOGGER.warning(e.getMessage());
					}
				}, 11100L);
				// TODO: the person who woke baium up should be knocked across the room, onto a wall, and
				// lose massive amounts of HP.
				for (int[] element : ANGEL_LOCATION)
				{
					final MonsterInstance angel = (MonsterInstance) addSpawn(ARCHANGEL, element[0], element[1], element[2], element[3], false, 0);
					angel.setInvul(true);
					_minions.add(angel);
					angel.getAttackByList().addAll(_zone.getCharactersInside());
					angel.isAggressive();
				}
			}
			// despawn the live baium after 30 minutes of inactivity
			// also check if the players are cheating, having pulled Baium outside his zone...
		}
		else if (event.equals("baium_despawn") && (npc != null))
		{
			if (npc.getNpcId() == LIVE_BAIUM)
			{
				// just in case the zone reference has been lost (somehow...), restore the reference
				if (_zone == null)
				{
					_zone = GrandBossManager.getInstance().getZone(113100, 14500, 10077);
				}
				if ((_lastAttackVsBaiumTime + (Config.BAIUM_SLEEP * 1000)) < System.currentTimeMillis())
				{
					npc.deleteMe(); // despawn the live-baium
					for (NpcInstance minion : _minions)
					{
						if (minion != null)
						{
							minion.getSpawn().stopRespawn();
							minion.deleteMe();
						}
					}
					_minions.clear();
					addSpawn(STONE_BAIUM, 116033, 17447, 10104, 40188, false, 0); // spawn stone-baium
					GrandBossManager.getInstance().setBossStatus(LIVE_BAIUM, ASLEEP); // mark that Baium is not awake any more
					_zone.oustAllPlayers();
					cancelQuestTimer("baium_despawn", npc, null);
				}
				else if (((_lastAttackVsBaiumTime + 300000) < System.currentTimeMillis()) && (npc.getCurrentHp() < ((npc.getMaxHp() * 3) / 4.0)))
				{
					npc.setTarget(npc);
					npc.doCast(SkillTable.getInstance().getInfo(4135, 1));
					if (GrandBossManager.getInstance().getBossStatus(LIVE_BAIUM) != AWAKE)
					{
						cancelQuestTimer("baium_despawn", npc, null);
					}
				}
			}
		}
		return super.onAdvEvent(event, npc, player);
	}
	
	@Override
	public String onTalk(NpcInstance npc, PlayerInstance player)
	{
		final int npcId = npc.getNpcId();
		String htmltext = "";
		if (_zone == null)
		{
			_zone = GrandBossManager.getInstance().getZone(113100, 14500, 10077);
		}
		if (_zone == null)
		{
			return "<html><body>Angelic Vortex:<br>You may not enter while admin disabled this zone</body></html>";
		}
		
		final Integer status = GrandBossManager.getInstance().getBossStatus(LIVE_BAIUM);
		if ((npcId == STONE_BAIUM) && (status == ASLEEP))
		{
			if (Config.ALLOW_DIRECT_TP_TO_BOSS_ROOM || _zone.isPlayerAllowed(player))
			{
				// once Baium is awaken, no more people may enter until he dies, the server reboots, or
				// 30 minutes pass with no attacks made against Baium.
				GrandBossManager.getInstance().setBossStatus(LIVE_BAIUM, AWAKE);
				npc.deleteMe();
				final GrandBossInstance baium = (GrandBossInstance) addSpawn(LIVE_BAIUM, npc);
				GrandBossManager.getInstance().addBoss(baium);
				ThreadPool.schedule(() ->
				{
					try
					{
						baium.setInvul(true);
						baium.setRunning();
						baium.broadcastPacket(new SocialAction(baium.getObjectId(), 2));
						startQuestTimer("baium_wakeup", 15000, baium, player);
						// _baium.setShowSummonAnimation(false);
					}
					catch (Throwable e)
					{
						LOGGER.warning(e.getMessage());
					}
				}, 100L);
			}
			else
			{
				htmltext = "Conditions are not right to wake up Baium";
			}
		}
		else if (npcId == ANGELIC_VORTEX)
		{
			if (player.isFlying())
			{
				// print "Player "+player.getName()+" attempted to enter Baium's lair while flying!";
				return "<html><body>Angelic Vortex:<br>You may not enter while flying a wyvern</body></html>";
			}
			
			if ((status == ASLEEP) && (player.getQuestState(getName()).getQuestItemsCount(4295) > 0)) // bloody fabric
			{
				player.getQuestState(getName()).takeItems(4295, 1);
				// allow entry for the player for the next 30 secs (more than enough time for the TP to happen)
				// Note: this just means 30secs to get in, no limits on how long it takes before we get out.
				_zone.allowPlayerEntry(player, 30);
				player.teleToLocation(113100, 14500, 10077);
			}
			else
			{
				npc.showChatWindow(player, 1);
			}
		}
		return htmltext;
	}
	
	@Override
	public String onSpellFinished(NpcInstance npc, PlayerInstance player, Skill skill)
	{
		if (npc.isInvul())
		{
			npc.getAI().setIntention(AI_INTENTION_IDLE);
			return null;
		}
		else if ((npc.getNpcId() == LIVE_BAIUM) && !npc.isInvul())
		{
			callSkillAI(npc);
		}
		return super.onSpellFinished(npc, player, skill);
	}
	
	@Override
	public String onAttack(NpcInstance npc, PlayerInstance attacker, int damage, boolean isPet)
	{
		if (!_zone.isInsideZone(attacker))
		{
			attacker.reduceCurrentHp(attacker.getCurrentHp(), attacker, false);
			return super.onAttack(npc, attacker, damage, isPet);
		}
		if (npc.isInvul())
		{
			npc.getAI().setIntention(AI_INTENTION_IDLE);
			return super.onAttack(npc, attacker, damage, isPet);
		}
		else if ((npc.getNpcId() == LIVE_BAIUM) && !npc.isInvul())
		{
			if (attacker.getMountType() == 1)
			{
				int sk4258 = 0;
				final Effect[] effects = attacker.getAllEffects();
				if ((effects != null) && (effects.length != 0))
				{
					for (Effect e : effects)
					{
						if (e.getSkill().getId() == 4258)
						{
							sk4258 = 1;
						}
					}
				}
				if (sk4258 == 0)
				{
					npc.setTarget(attacker);
					npc.doCast(SkillTable.getInstance().getInfo(4258, 1));
				}
			}
			// update a variable with the last action against baium
			_lastAttackVsBaiumTime = System.currentTimeMillis();
			callSkillAI(npc);
		}
		return super.onAttack(npc, attacker, damage, isPet);
	}
	
	@Override
	public String onKill(NpcInstance npc, PlayerInstance killer, boolean isPet)
	{
		npc.broadcastPacket(new PlaySound(1, "BS01_D", npc));
		cancelQuestTimer("baium_despawn", npc, null);
		// spawn the "Teleportation Cubic" for 15 minutes (to allow players to exit the lair)
		addSpawn(29055, 115203, 16620, 10078, 0, false, 900000); // //should we teleport everyone out if the cubic despawns??
		// "lock" baium for 5 days and 1 to 8 hours [i.e. 432,000,000 + 1*3,600,000 + random-less-than(8*3,600,000) millisecs]
		final long respawnTime = (Config.BAIUM_RESP_FIRST + Rnd.get(Config.BAIUM_RESP_SECOND)) * 3600000;
		GrandBossManager.getInstance().setBossStatus(LIVE_BAIUM, DEAD);
		startQuestTimer("baium_unlock", respawnTime, null, null);
		// also save the respawn time so that the info is maintained past reboots
		final StatSet info = GrandBossManager.getInstance().getStatSet(LIVE_BAIUM);
		info.set("respawn_time", System.currentTimeMillis() + respawnTime);
		GrandBossManager.getInstance().setStatSet(LIVE_BAIUM, info);
		for (NpcInstance minion : _minions)
		{
			if (minion != null)
			{
				minion.getSpawn().stopRespawn();
				minion.deleteMe();
			}
		}
		_minions.clear();
		
		if (getQuestTimer("skill_range", npc, null) != null)
		{
			getQuestTimer("skill_range", npc, null).cancel();
		}
		
		return super.onKill(npc, killer, isPet);
	}
	
	public Creature getRandomTarget(NpcInstance npc)
	{
		final List<Creature> result = new ArrayList<>();
		final Collection<WorldObject> objs = npc.getKnownList().getKnownObjects().values();
		{
			for (WorldObject obj : objs)
			{
				if ((obj instanceof Creature) && (((((Creature) obj).getZ() < (npc.getZ() - 100)) && (((Creature) obj).getZ() > (npc.getZ() + 100))) || !GeoEngine.getInstance().canSeeTarget(obj, npc)))
				{
					continue;
				}
				if ((obj instanceof PlayerInstance) && Util.checkIfInRange(9000, npc, obj, true) && !((Creature) obj).isDead())
				{
					result.add((PlayerInstance) obj);
				}
				if ((obj instanceof Summon) && Util.checkIfInRange(9000, npc, obj, true) && !((Creature) obj).isDead())
				{
					result.add((Summon) obj);
				}
			}
		}
		if (result.isEmpty())
		{
			for (NpcInstance minion : _minions)
			{
				if (minion != null)
				{
					result.add(minion);
				}
			}
		}
		
		if (result.isEmpty())
		{
			return null;
		}
		
		final Object[] characters = result.toArray();
		final QuestTimer timer = getQuestTimer("clean_player", npc, null);
		if (timer != null)
		{
			timer.cancel();
		}
		startQuestTimer("clean_player", 20000, npc, null);
		return (Creature) characters[Rnd.get(characters.length)];
	}
	
	public synchronized void callSkillAI(NpcInstance npc)
	{
		if (npc.isInvul() || npc.isCastingNow())
		{
			return;
		}
		
		if ((_target == null) || _target.isDead() || !(_zone.isInsideZone(_target)))
		{
			_target = getRandomTarget(npc);
			if (_target != null)
			{
				_skill = SkillTable.getInstance().getInfo(getRandomSkill(npc), 1);
			}
		}
		
		final Creature target = _target;
		Skill skill = _skill;
		if (skill == null)
		{
			skill = SkillTable.getInstance().getInfo(getRandomSkill(npc), 1);
		}
		if ((target == null) || target.isDead() || !(_zone.isInsideZone(target)))
		{
			// npc.setCastingNow(false);
			return;
		}
		
		if (Util.checkIfInRange(skill.getCastRange(), npc, target, true))
		{
			npc.getAI().setIntention(AI_INTENTION_IDLE);
			npc.setTarget(target);
			// npc.setCastingNow(true);
			if (getDist(skill.getCastRange()) > 0)
			{
				npc.broadcastPacket(new MoveToPawn(npc, target, getDist(skill.getCastRange())));
			}
			try
			{
				wait(1000);
				npc.stopMove(null);
				npc.doCast(skill);
			}
			catch (Exception e)
			{
				LOGGER.warning(e.getMessage());
			}
		}
		else
		{
			npc.getAI().setIntention(AI_INTENTION_FOLLOW, target, null);
			// npc.setCastingNow(false);
		}
	}
	
	public int getRandomSkill(NpcInstance npc)
	{
		int skill;
		if (npc.getCurrentHp() > ((npc.getMaxHp() * 3) / 4.0))
		{
			if (Rnd.get(100) < 10)
			{
				skill = 4128;
			}
			else if (Rnd.get(100) < 10)
			{
				skill = 4129;
			}
			else
			{
				skill = 4127;
			}
		}
		else if (npc.getCurrentHp() > ((npc.getMaxHp() * 2) / 4.0))
		{
			if (Rnd.get(100) < 10)
			{
				skill = 4131;
			}
			else if (Rnd.get(100) < 10)
			{
				skill = 4128;
			}
			else if (Rnd.get(100) < 10)
			{
				skill = 4129;
			}
			else
			{
				skill = 4127;
			}
		}
		else if (npc.getCurrentHp() > ((npc.getMaxHp() * 1) / 4.0))
		{
			if (Rnd.get(100) < 10)
			{
				skill = 4130;
			}
			else if (Rnd.get(100) < 10)
			{
				skill = 4131;
			}
			else if (Rnd.get(100) < 10)
			{
				skill = 4128;
			}
			else if (Rnd.get(100) < 10)
			{
				skill = 4129;
			}
			else
			{
				skill = 4127;
			}
		}
		else if (Rnd.get(100) < 10)
		{
			skill = 4130;
		}
		else if (Rnd.get(100) < 10)
		{
			skill = 4131;
		}
		else if (Rnd.get(100) < 10)
		{
			skill = 4128;
		}
		else if (Rnd.get(100) < 10)
		{
			skill = 4129;
		}
		else
		{
			skill = 4127;
		}
		return skill;
	}
	
	@Override
	public String onSkillUse(NpcInstance npc, PlayerInstance caster, Skill skill)
	{
		if (npc.isInvul())
		{
			npc.getAI().setIntention(AI_INTENTION_IDLE);
			return null;
		}
		npc.setTarget(caster);
		return super.onSkillUse(npc, caster, skill);
	}
	
	public int getDist(int range)
	{
		int dist = 0;
		switch (range)
		{
			case -1:
			{
				break;
			}
			case 100:
			{
				dist = 85;
				break;
			}
			default:
			{
				dist = range - 85;
				break;
			}
		}
		return dist;
	}
	
	public static void main(String[] args)
	{
		new Baium();
	}
}

Pequena correção no game\data\scripts\ai\bosses

Editado por RootZerO
Link para o comentário
Compartilhar em outros sites

2 horas atrás, RootZerO disse:

Uma pequena correção no game\data\scripts\ai\bosses

baium.ai

  Ocultar conteúdo


/*
 * This file is part of the L2J Mobius project.
 * 
 * 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 ai.bosses;

import static org.l2jserver.gameserver.ai.CtrlIntention.AI_INTENTION_FOLLOW;
import static org.l2jserver.gameserver.ai.CtrlIntention.AI_INTENTION_IDLE;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.logging.Logger;

import org.l2jserver.Config;
import org.l2jserver.commons.concurrent.ThreadPool;
import org.l2jserver.commons.util.Rnd;
import org.l2jserver.gameserver.datatables.SkillTable;
import org.l2jserver.gameserver.geoengine.GeoEngine;
import org.l2jserver.gameserver.instancemanager.GrandBossManager;
import org.l2jserver.gameserver.model.Effect;
import org.l2jserver.gameserver.model.Skill;
import org.l2jserver.gameserver.model.StatSet;
import org.l2jserver.gameserver.model.WorldObject;
import org.l2jserver.gameserver.model.actor.Creature;
import org.l2jserver.gameserver.model.actor.Summon;
import org.l2jserver.gameserver.model.actor.instance.GrandBossInstance;
import org.l2jserver.gameserver.model.actor.instance.MonsterInstance;
import org.l2jserver.gameserver.model.actor.instance.NpcInstance;
import org.l2jserver.gameserver.model.actor.instance.PlayerInstance;
import org.l2jserver.gameserver.model.entity.Announcements;
import org.l2jserver.gameserver.model.quest.Quest;
import org.l2jserver.gameserver.model.quest.QuestTimer;
import org.l2jserver.gameserver.model.zone.type.BossZone;
import org.l2jserver.gameserver.network.serverpackets.Earthquake;
import org.l2jserver.gameserver.network.serverpackets.MoveToPawn;
import org.l2jserver.gameserver.network.serverpackets.PlaySound;
import org.l2jserver.gameserver.network.serverpackets.SocialAction;
import org.l2jserver.gameserver.util.Util;

/**
 * Baium AI Note1: if the server gets rebooted while players are still fighting Baium, there is no lock, but players also lose their ability to wake baium up. However, should another person enter the room and wake him up, the players who had stayed inside may join the raid. This can be helpful for
 * players who became victims of a reboot (they only need 1 new player to enter and wake up baium) and is not too exploitable since any player wishing to exploit it would have to suffer 5 days of being parked in an empty room. Note2: Neither version of Baium should be a permanent spawn. This script
 * is fully capable of spawning the statue-version when the lock expires and switching it to the mob version promptly. Additional notes ( source http://aleenaresron.blogspot.com/2006_08_01_archive.html ): * Baium only first respawns five days after his last death. And from those five days he will
 * respawn within 1-8 hours of his last death. So, you have to know his last time of death. * If by some freak chance you are the only one in Baium's chamber and NO ONE comes in [ha, ha] you or someone else will have to wake Baium. There is a good chance that Baium will automatically kill whoever
 * wakes him. There are some people that have been able to wake him and not die, however if you've already gone through the trouble of getting the bloody fabric and camped him out and researched his spawn time, are you willing to take that chance that you'll wake him and not be able to finish your
 * quest? Doubtful. [ this powerful attack vs the player who wakes him up is NOT yet implemented here] * once someone starts attacking Baium no one else can port into the chamber where he is. Unlike with the other raid bosses, you can just show up at any time as long as you are there when they die.
 * Not true with Baium. Once he gets attacked, the port to Baium closes. byebye, see you in 5 days. If nobody attacks baium for 30 minutes, he auto-despawns and unlocks the vortex
 * @author Fulminus version 0.1
 */
public class Baium extends Quest
{
	protected static final Logger LOGGER = Logger.getLogger(Baium.class.getName());
	
	private Creature _target;
	private Skill _skill;
	private static final int STONE_BAIUM = 29025;
	private static final int ANGELIC_VORTEX = 31862;
	private static final int LIVE_BAIUM = 29020;
	private static final int ARCHANGEL = 29021;
	
	// Baium status tracking,
	private static final byte ASLEEP = 0; // baium is in the stone version, waiting to be woken up. Entry is unlocked,
	private static final byte AWAKE = 1; // baium is awake and fighting. Entry is locked.
	private static final byte DEAD = 2; // baium has been killed and has not yet spawned. Entry is locked,
	
	// Archangel locations.
	// @formatter:off
	private static final int[][] ANGEL_LOCATION =
	{
		{114239, 17168, 10080, 63544},
		{115780, 15564, 10080, 13620},
		{114880, 16236, 10080, 5400},
		{115168, 17200, 10080, 0},
		{115792, 16608, 10080, 0},
	};
	// @formatter:on
	
	private long _lastAttackVsBaiumTime = 0;
	private final List<NpcInstance> _minions = new CopyOnWriteArrayList<>();
	protected BossZone _zone;
	
	public Baium()
	{
		super(-1, "ai/bosses");
		
		final int[] mob =
		{
			LIVE_BAIUM
		};
		registerMobs(mob);
		
		// Quest NPC starter initialization
		addStartNpc(STONE_BAIUM);
		addStartNpc(ANGELIC_VORTEX);
		addTalkId(STONE_BAIUM);
		addTalkId(ANGELIC_VORTEX);
		_zone = GrandBossManager.getInstance().getZone(113100, 14500, 10077);
		final StatSet info = GrandBossManager.getInstance().getStatSet(LIVE_BAIUM);
		final Integer status = GrandBossManager.getInstance().getBossStatus(LIVE_BAIUM);
		if (status == DEAD)
		{
			// load the unlock date and time for baium from DB
			final long temp = (info.getLong("respawn_time") - System.currentTimeMillis());
			if (temp > 0)
			{
				// the unlock time has not yet expired. Mark Baium as currently locked (dead). Setup a timer
				// to fire at the correct time (calculate the time between now and the unlock time,
				// setup a timer to fire after that many msec)
				startQuestTimer("baium_unlock", temp, null, null);
			}
			else
			{
				// the time has already expired while the server was offline. Delete the saved time and
				// immediately spawn the stone-baium. Also the state need not be changed from ASLEEP
				addSpawn(STONE_BAIUM, 116033, 17447, 10104, 40188, false, 0);
				if (Config.ANNOUNCE_TO_ALL_SPAWN_RB)
				{
					Announcements.getInstance().announceToAll("Raid boss Baium Stone spawned in world.");
				}
				GrandBossManager.getInstance().setBossStatus(LIVE_BAIUM, ASLEEP);
			}
		}
		else if (status == AWAKE)
		{
			final int loc_x = info.getInt("loc_x");
			final int loc_y = info.getInt("loc_y");
			final int loc_z = info.getInt("loc_z");
			final int heading = info.getInt("heading");
			final int hp = info.getInt("currentHP");
			final int mp = info.getInt("currentMP");
			final GrandBossInstance baium = (GrandBossInstance) addSpawn(LIVE_BAIUM, loc_x, loc_y, loc_z, heading, false, 0);
			if (Config.ANNOUNCE_TO_ALL_SPAWN_RB)
			{
				Announcements.getInstance().announceToAll("Raid boss " + baium.getName() + " spawned in world.");
			}
			GrandBossManager.getInstance().addBoss(baium);
			ThreadPool.schedule(() ->
			{
				try
				{
					baium.setCurrentHpMp(hp, mp);
					baium.setInvul(true);
					// _baium.setImobilised(true);
					baium.broadcastPacket(new SocialAction(baium.getObjectId(), 2));
					startQuestTimer("baium_wakeup", 15000, baium, null);
				}
				catch (Exception e)
				{
					LOGGER.warning(e.getMessage());
				}
			}, 100L);
		}
		else
		{
			addSpawn(STONE_BAIUM, 116033, 17447, 10104, 40188, false, 0);
			if (Config.ANNOUNCE_TO_ALL_SPAWN_RB)
			{
				Announcements.getInstance().announceToAll("Raid boss Baium Stone spawned in world.");
			}
		}
	}
	
	@Override
	public String onAdvEvent(String event, NpcInstance npc, PlayerInstance player)
	{
		if (event.equals("baium_unlock"))
		{
			GrandBossManager.getInstance().setBossStatus(LIVE_BAIUM, ASLEEP);
			addSpawn(STONE_BAIUM, 116033, 17447, 10104, 40188, false, 0);
			if (Config.ANNOUNCE_TO_ALL_SPAWN_RB)
			{
				Announcements.getInstance().announceToAll("Raid boss Baium Stone spawned in world.");
			}
		}
		else if (event.equals("skill_range") && (npc != null))
		{
			callSkillAI(npc);
		}
		else if (event.equals("clean_player"))
		{
			_target = getRandomTarget(npc);
		}
		else if (event.equals("baium_wakeup") && (npc != null))
		{
			if (npc.getNpcId() == LIVE_BAIUM)
			{
				npc.broadcastPacket(new SocialAction(npc.getObjectId(), 1));
				npc.broadcastPacket(new Earthquake(npc.getX(), npc.getY(), npc.getZ(), 40, 5));
				// start monitoring baium's inactivity
				_lastAttackVsBaiumTime = System.currentTimeMillis();
				startQuestTimer("baium_despawn", 60000, npc, null, true);
				if (player != null)
				{
					player.reduceCurrentHp(99999999, player);
				}
				
				npc.setRunning();
				
				startQuestTimer("skill_range", 500, npc, null, true);
				final NpcInstance baium = npc;
				ThreadPool.schedule(() ->
				{
					try
					{
						baium.setInvul(false);
						// baium.setImobilised(false);
						// for (NpcInstance minion : _Minions)
						// minion.setShowSummonAnimation(false);
						baium.getAttackByList().addAll(_zone.getCharactersInside());
					}
					catch (Exception e)
					{
						LOGGER.warning(e.getMessage());
					}
				}, 11100L);
				// TODO: the person who woke baium up should be knocked across the room, onto a wall, and
				// lose massive amounts of HP.
				for (int[] element : ANGEL_LOCATION)
				{
					final MonsterInstance angel = (MonsterInstance) addSpawn(ARCHANGEL, element[0], element[1], element[2], element[3], false, 0);
					angel.setInvul(true);
					_minions.add(angel);
					angel.getAttackByList().addAll(_zone.getCharactersInside());
					angel.isAggressive();
				}
			}
			// despawn the live baium after 30 minutes of inactivity
			// also check if the players are cheating, having pulled Baium outside his zone...
		}
		else if (event.equals("baium_despawn") && (npc != null))
		{
			if (npc.getNpcId() == LIVE_BAIUM)
			{
				// just in case the zone reference has been lost (somehow...), restore the reference
				if (_zone == null)
				{
					_zone = GrandBossManager.getInstance().getZone(113100, 14500, 10077);
				}
				if ((_lastAttackVsBaiumTime + (Config.BAIUM_SLEEP * 1000)) < System.currentTimeMillis())
				{
					npc.deleteMe(); // despawn the live-baium
					for (NpcInstance minion : _minions)
					{
						if (minion != null)
						{
							minion.getSpawn().stopRespawn();
							minion.deleteMe();
						}
					}
					_minions.clear();
					addSpawn(STONE_BAIUM, 116033, 17447, 10104, 40188, false, 0); // spawn stone-baium
					GrandBossManager.getInstance().setBossStatus(LIVE_BAIUM, ASLEEP); // mark that Baium is not awake any more
					_zone.oustAllPlayers();
					cancelQuestTimer("baium_despawn", npc, null);
				}
				else if (((_lastAttackVsBaiumTime + 300000) < System.currentTimeMillis()) && (npc.getCurrentHp() < ((npc.getMaxHp() * 3) / 4.0)))
				{
					npc.setTarget(npc);
					npc.doCast(SkillTable.getInstance().getInfo(4135, 1));
					if (GrandBossManager.getInstance().getBossStatus(LIVE_BAIUM) != AWAKE)
					{
						cancelQuestTimer("baium_despawn", npc, null);
					}
				}
			}
		}
		return super.onAdvEvent(event, npc, player);
	}
	
	@Override
	public String onTalk(NpcInstance npc, PlayerInstance player)
	{
		final int npcId = npc.getNpcId();
		String htmltext = "";
		if (_zone == null)
		{
			_zone = GrandBossManager.getInstance().getZone(113100, 14500, 10077);
		}
		if (_zone == null)
		{
			return "<html><body>Angelic Vortex:<br>You may not enter while admin disabled this zone</body></html>";
		}
		
		final Integer status = GrandBossManager.getInstance().getBossStatus(LIVE_BAIUM);
		if ((npcId == STONE_BAIUM) && (status == ASLEEP))
		{
			if (Config.ALLOW_DIRECT_TP_TO_BOSS_ROOM || _zone.isPlayerAllowed(player))
			{
				// once Baium is awaken, no more people may enter until he dies, the server reboots, or
				// 30 minutes pass with no attacks made against Baium.
				GrandBossManager.getInstance().setBossStatus(LIVE_BAIUM, AWAKE);
				npc.deleteMe();
				final GrandBossInstance baium = (GrandBossInstance) addSpawn(LIVE_BAIUM, npc);
				GrandBossManager.getInstance().addBoss(baium);
				ThreadPool.schedule(() ->
				{
					try
					{
						baium.setInvul(true);
						baium.setRunning();
						baium.broadcastPacket(new SocialAction(baium.getObjectId(), 2));
						startQuestTimer("baium_wakeup", 15000, baium, player);
						// _baium.setShowSummonAnimation(false);
					}
					catch (Throwable e)
					{
						LOGGER.warning(e.getMessage());
					}
				}, 100L);
			}
			else
			{
				htmltext = "Conditions are not right to wake up Baium";
			}
		}
		else if (npcId == ANGELIC_VORTEX)
		{
			if (player.isFlying())
			{
				// print "Player "+player.getName()+" attempted to enter Baium's lair while flying!";
				return "<html><body>Angelic Vortex:<br>You may not enter while flying a wyvern</body></html>";
			}
			
			if ((status == ASLEEP) && (player.getQuestState(getName()).getQuestItemsCount(4295) > 0)) // bloody fabric
			{
				player.getQuestState(getName()).takeItems(4295, 1);
				// allow entry for the player for the next 30 secs (more than enough time for the TP to happen)
				// Note: this just means 30secs to get in, no limits on how long it takes before we get out.
				_zone.allowPlayerEntry(player, 30);
				player.teleToLocation(113100, 14500, 10077);
			}
			else
			{
				npc.showChatWindow(player, 1);
			}
		}
		return htmltext;
	}
	
	@Override
	public String onSpellFinished(NpcInstance npc, PlayerInstance player, Skill skill)
	{
		if (npc.isInvul())
		{
			npc.getAI().setIntention(AI_INTENTION_IDLE);
			return null;
		}
		else if ((npc.getNpcId() == LIVE_BAIUM) && !npc.isInvul())
		{
			callSkillAI(npc);
		}
		return super.onSpellFinished(npc, player, skill);
	}
	
	@Override
	public String onAttack(NpcInstance npc, PlayerInstance attacker, int damage, boolean isPet)
	{
		if (!_zone.isInsideZone(attacker))
		{
			attacker.reduceCurrentHp(attacker.getCurrentHp(), attacker, false);
			return super.onAttack(npc, attacker, damage, isPet);
		}
		if (npc.isInvul())
		{
			npc.getAI().setIntention(AI_INTENTION_IDLE);
			return super.onAttack(npc, attacker, damage, isPet);
		}
		else if ((npc.getNpcId() == LIVE_BAIUM) && !npc.isInvul())
		{
			if (attacker.getMountType() == 1)
			{
				int sk4258 = 0;
				final Effect[] effects = attacker.getAllEffects();
				if ((effects != null) && (effects.length != 0))
				{
					for (Effect e : effects)
					{
						if (e.getSkill().getId() == 4258)
						{
							sk4258 = 1;
						}
					}
				}
				if (sk4258 == 0)
				{
					npc.setTarget(attacker);
					npc.doCast(SkillTable.getInstance().getInfo(4258, 1));
				}
			}
			// update a variable with the last action against baium
			_lastAttackVsBaiumTime = System.currentTimeMillis();
			callSkillAI(npc);
		}
		return super.onAttack(npc, attacker, damage, isPet);
	}
	
	@Override
	public String onKill(NpcInstance npc, PlayerInstance killer, boolean isPet)
	{
		npc.broadcastPacket(new PlaySound(1, "BS01_D", npc));
		cancelQuestTimer("baium_despawn", npc, null);
		// spawn the "Teleportation Cubic" for 15 minutes (to allow players to exit the lair)
		addSpawn(29055, 115203, 16620, 10078, 0, false, 900000); // //should we teleport everyone out if the cubic despawns??
		// "lock" baium for 5 days and 1 to 8 hours [i.e. 432,000,000 + 1*3,600,000 + random-less-than(8*3,600,000) millisecs]
		final long respawnTime = (Config.BAIUM_RESP_FIRST + Rnd.get(Config.BAIUM_RESP_SECOND)) * 3600000;
		GrandBossManager.getInstance().setBossStatus(LIVE_BAIUM, DEAD);
		startQuestTimer("baium_unlock", respawnTime, null, null);
		// also save the respawn time so that the info is maintained past reboots
		final StatSet info = GrandBossManager.getInstance().getStatSet(LIVE_BAIUM);
		info.set("respawn_time", System.currentTimeMillis() + respawnTime);
		GrandBossManager.getInstance().setStatSet(LIVE_BAIUM, info);
		for (NpcInstance minion : _minions)
		{
			if (minion != null)
			{
				minion.getSpawn().stopRespawn();
				minion.deleteMe();
			}
		}
		_minions.clear();
		
		if (getQuestTimer("skill_range", npc, null) != null)
		{
			getQuestTimer("skill_range", npc, null).cancel();
		}
		
		return super.onKill(npc, killer, isPet);
	}
	
	public Creature getRandomTarget(NpcInstance npc)
	{
		final List<Creature> result = new ArrayList<>();
		final Collection<WorldObject> objs = npc.getKnownList().getKnownObjects().values();
		{
			for (WorldObject obj : objs)
			{
				if ((obj instanceof Creature) && (((((Creature) obj).getZ() < (npc.getZ() - 100)) && (((Creature) obj).getZ() > (npc.getZ() + 100))) || !GeoEngine.getInstance().canSeeTarget(obj, npc)))
				{
					continue;
				}
				if ((obj instanceof PlayerInstance) && Util.checkIfInRange(9000, npc, obj, true) && !((Creature) obj).isDead())
				{
					result.add((PlayerInstance) obj);
				}
				if ((obj instanceof Summon) && Util.checkIfInRange(9000, npc, obj, true) && !((Creature) obj).isDead())
				{
					result.add((Summon) obj);
				}
			}
		}
		if (result.isEmpty())
		{
			for (NpcInstance minion : _minions)
			{
				if (minion != null)
				{
					result.add(minion);
				}
			}
		}
		
		if (result.isEmpty())
		{
			return null;
		}
		
		final Object[] characters = result.toArray();
		final QuestTimer timer = getQuestTimer("clean_player", npc, null);
		if (timer != null)
		{
			timer.cancel();
		}
		startQuestTimer("clean_player", 20000, npc, null);
		return (Creature) characters[Rnd.get(characters.length)];
	}
	
	public synchronized void callSkillAI(NpcInstance npc)
	{
		if (npc.isInvul() || npc.isCastingNow())
		{
			return;
		}
		
		if ((_target == null) || _target.isDead() || !(_zone.isInsideZone(_target)))
		{
			_target = getRandomTarget(npc);
			if (_target != null)
			{
				_skill = SkillTable.getInstance().getInfo(getRandomSkill(npc), 1);
			}
		}
		
		final Creature target = _target;
		Skill skill = _skill;
		if (skill == null)
		{
			skill = SkillTable.getInstance().getInfo(getRandomSkill(npc), 1);
		}
		if ((target == null) || target.isDead() || !(_zone.isInsideZone(target)))
		{
			// npc.setCastingNow(false);
			return;
		}
		
		if (Util.checkIfInRange(skill.getCastRange(), npc, target, true))
		{
			npc.getAI().setIntention(AI_INTENTION_IDLE);
			npc.setTarget(target);
			// npc.setCastingNow(true);
			if (getDist(skill.getCastRange()) > 0)
			{
				npc.broadcastPacket(new MoveToPawn(npc, target, getDist(skill.getCastRange())));
			}
			try
			{
				wait(1000);
				npc.stopMove(null);
				npc.doCast(skill);
			}
			catch (Exception e)
			{
				LOGGER.warning(e.getMessage());
			}
		}
		else
		{
			npc.getAI().setIntention(AI_INTENTION_FOLLOW, target, null);
			// npc.setCastingNow(false);
		}
	}
	
	public int getRandomSkill(NpcInstance npc)
	{
		int skill;
		if (npc.getCurrentHp() > ((npc.getMaxHp() * 3) / 4.0))
		{
			if (Rnd.get(100) < 10)
			{
				skill = 4128;
			}
			else if (Rnd.get(100) < 10)
			{
				skill = 4129;
			}
			else
			{
				skill = 4127;
			}
		}
		else if (npc.getCurrentHp() > ((npc.getMaxHp() * 2) / 4.0))
		{
			if (Rnd.get(100) < 10)
			{
				skill = 4131;
			}
			else if (Rnd.get(100) < 10)
			{
				skill = 4128;
			}
			else if (Rnd.get(100) < 10)
			{
				skill = 4129;
			}
			else
			{
				skill = 4127;
			}
		}
		else if (npc.getCurrentHp() > ((npc.getMaxHp() * 1) / 4.0))
		{
			if (Rnd.get(100) < 10)
			{
				skill = 4130;
			}
			else if (Rnd.get(100) < 10)
			{
				skill = 4131;
			}
			else if (Rnd.get(100) < 10)
			{
				skill = 4128;
			}
			else if (Rnd.get(100) < 10)
			{
				skill = 4129;
			}
			else
			{
				skill = 4127;
			}
		}
		else if (Rnd.get(100) < 10)
		{
			skill = 4130;
		}
		else if (Rnd.get(100) < 10)
		{
			skill = 4131;
		}
		else if (Rnd.get(100) < 10)
		{
			skill = 4128;
		}
		else if (Rnd.get(100) < 10)
		{
			skill = 4129;
		}
		else
		{
			skill = 4127;
		}
		return skill;
	}
	
	@Override
	public String onSkillUse(NpcInstance npc, PlayerInstance caster, Skill skill)
	{
		if (npc.isInvul())
		{
			npc.getAI().setIntention(AI_INTENTION_IDLE);
			return null;
		}
		npc.setTarget(caster);
		return super.onSkillUse(npc, caster, skill);
	}
	
	public int getDist(int range)
	{
		int dist = 0;
		switch (range)
		{
			case -1:
			{
				break;
			}
			case 100:
			{
				dist = 85;
				break;
			}
			default:
			{
				dist = range - 85;
				break;
			}
		}
		return dist;
	}
	
	public static void main(String[] args)
	{
		new Baium();
	}
}

Pequena correção no game\data\scripts\ai\bosses

Obrigado!
Git updated

kLnregy.jpg

L2STUDIO, seu servidor está aqui!
Não me faça perder tempo se você não tem dinheiro para pagar pelos serviços e produtos. Obrigado!

Link para o comentário
Compartilhar em outros sites

  • Registre-se

    Faça parte da maior e  mais antigas comunidades sobre Lineage2 da América Latina.






  • Patrocinadores

  • Quem Está Navegando

    • Nenhum usuário registrado visualizando esta página.
  • Conteúdo Similar

  • Posts

    • Teria como fazer do dusk shield e do zombie shield dessa maneira?     Teria como fazer do dusk shield e do zombie shield dessa maneira?     Teria como fazer do dusk shield e do zombie shield dessa maneira?     Teria como fazer do dusk shield e do zombie shield dessa maneira?     Teria como fazer do dusk shield e do zombie shield dessa maneira?     Teria como fazer do dusk shield e do zombie shield dessa maneira?    
    • muchas gracias muy lindos NPC 🙂
    • relaxa jovem gafanhoto, testa as quests. e posTa os erros indesejaveis.  
    • Se alguém pudesse me ensinar como codificar as missões, eu ficaria feliz em fazer isso sozinho ou pelo menos ajudar. Eu realmente quero jogar em um servidor onde todas as quests funcionem bem e melhor ainda se você puder fazer quests customizadas!
    • mas no interlude, nem todas as quests de class,  vai mostrar onde tem que ir, ate o reborn nao mostrava quando era interlude, só mostrou depois que eles colocaram client classic pra rodar, e ficou melhor ainda quando virou hellbound em diante, mas ha sim alguma chance de modificar isso direto no script para fazer igualmente, só basta te um pouco de paciencia e persistencia exato
    • 408_PathToElvenwizard dá Orion eu tive que mexer tbm, até modifiquei e consegui deixar ela igual do Classic, com a seta e a marcação no mapa. (não retail IL) Dá pra importar py de várias revs, o foda é que não da regular as quest py através do debug em tempo real, pelo menos eu não consegui rsrs
    • Hasta el momento todas las QUESTS son completables si te guias con un tutorial de youtube. El problema es que tienen bugs de locacion y de subquests que no avanzan o no te marcan correctamente a donde ir en el mapa, cosa que en Retail si se ve como corresponde.
    • estranho, mas pelo menos a galera nunca reclamo das quests quando tinha aberto 5x, geral fez class primeira e segunda job, poucos que compraram a class
    • en RUSaCis-3.5 data pack, las Quests estan en formato .java y son diferentes a como estan redactadas en jOrion y jFrozen 1.5 (ProyectX) package net.sf.l2j.gameserver.scripting.quest; import net.sf.l2j.commons.random.Rnd; import net.sf.l2j.gameserver.enums.Paperdoll; import net.sf.l2j.gameserver.enums.QuestStatus; import net.sf.l2j.gameserver.enums.actors.ClassId; import net.sf.l2j.gameserver.model.actor.Creature; import net.sf.l2j.gameserver.model.actor.Npc; import net.sf.l2j.gameserver.model.actor.Player; import net.sf.l2j.gameserver.network.serverpackets.SocialAction; import net.sf.l2j.gameserver.scripting.QuestState; public class Q224_TestOfSagittarius extends SecondClassQuest { private static final String QUEST_NAME = "Q224_TestOfSagittarius"; // Items private static final int BERNARD_INTRODUCTION = 3294; private static final int HAMIL_LETTER_1 = 3295; private static final int HAMIL_LETTER_2 = 3296; private static final int HAMIL_LETTER_3 = 3297; private static final int HUNTER_RUNE_1 = 3298; private static final int HUNTER_RUNE_2 = 3299; private static final int TALISMAN_OF_KADESH = 3300; private static final int TALISMAN_OF_SNAKE = 3301; private static final int MITHRIL_CLIP = 3302; private static final int STAKATO_CHITIN = 3303; private static final int REINFORCED_BOWSTRING = 3304; private static final int MANASHEN_HORN = 3305; private static final int BLOOD_OF_LIZARDMAN = 3306; private static final int CRESCENT_MOON_BOW = 3028; private static final int WOODEN_ARROW = 17; // Rewards private static final int MARK_OF_SAGITTARIUS = 3293; // NPCs private static final int BERNARD = 30702; private static final int HAMIL = 30626; private static final int SIR_ARON_TANFORD = 30653; private static final int VOKIAN = 30514; private static final int GAUEN = 30717; // Monsters private static final int ANT = 20079; private static final int ANT_CAPTAIN = 20080; private static final int ANT_OVERSEER = 20081; private static final int ANT_RECRUIT = 20082; private static final int ANT_PATROL = 20084; private static final int ANT_GUARD = 20086; private static final int NOBLE_ANT = 20089; private static final int NOBLE_ANT_LEADER = 20090; private static final int BREKA_ORC_SHAMAN = 20269; private static final int BREKA_ORC_OVERLORD = 20270; private static final int MARSH_STAKATO_WORKER = 20230; private static final int MARSH_STAKATO_SOLDIER = 20232; private static final int MARSH_STAKATO_DRONE = 20234; private static final int MARSH_SPIDER = 20233; private static final int ROAD_SCAVENGER = 20551; private static final int MANASHEN_GARGOYLE = 20563; private static final int LETO_LIZARDMAN = 20577; private static final int LETO_LIZARDMAN_ARCHER = 20578; private static final int LETO_LIZARDMAN_SOLDIER = 20579; private static final int LETO_LIZARDMAN_WARRIOR = 20580; private static final int LETO_LIZARDMAN_SHAMAN = 20581; private static final int LETO_LIZARDMAN_OVERLORD = 20582; private static final int SERPENT_DEMON_KADESH = 27090; public Q224_TestOfSagittarius() { super(224, "Test Of Sagittarius"); setItemsIds(BERNARD_INTRODUCTION, HAMIL_LETTER_1, HAMIL_LETTER_2, HAMIL_LETTER_3, HUNTER_RUNE_1, HUNTER_RUNE_2, TALISMAN_OF_KADESH, TALISMAN_OF_SNAKE, MITHRIL_CLIP, STAKATO_CHITIN, REINFORCED_BOWSTRING, MANASHEN_HORN, BLOOD_OF_LIZARDMAN, CRESCENT_MOON_BOW); addQuestStart(BERNARD); addTalkId(BERNARD, HAMIL, SIR_ARON_TANFORD, VOKIAN, GAUEN); addMyDying(ANT, ANT_CAPTAIN, ANT_OVERSEER, ANT_RECRUIT, ANT_PATROL, ANT_GUARD, NOBLE_ANT, NOBLE_ANT_LEADER, BREKA_ORC_SHAMAN, BREKA_ORC_OVERLORD, MARSH_STAKATO_WORKER, MARSH_STAKATO_SOLDIER, MARSH_STAKATO_DRONE, MARSH_SPIDER, ROAD_SCAVENGER, MANASHEN_GARGOYLE, LETO_LIZARDMAN, LETO_LIZARDMAN_ARCHER, LETO_LIZARDMAN_SOLDIER, LETO_LIZARDMAN_WARRIOR, LETO_LIZARDMAN_SHAMAN, LETO_LIZARDMAN_OVERLORD, SERPENT_DEMON_KADESH); } @Override public String onAdvEvent(String event, Npc npc, Player player) { String htmltext = event; QuestState st = player.getQuestList().getQuestState(QUEST_NAME); if (st == null) return htmltext; // BERNARD if (event.equalsIgnoreCase("30702-04.htm")) { st.setState(QuestStatus.STARTED); st.setCond(1); playSound(player, SOUND_ACCEPT); giveItems(player, BERNARD_INTRODUCTION, 1); if (giveDimensionalDiamonds39(player)) htmltext = "30702-04a.htm"; } // HAMIL else if (event.equalsIgnoreCase("30626-03.htm")) { st.setCond(2); playSound(player, SOUND_MIDDLE); takeItems(player, BERNARD_INTRODUCTION, 1); giveItems(player, HAMIL_LETTER_1, 1); } else if (event.equalsIgnoreCase("30626-07.htm")) { st.setCond(5); playSound(player, SOUND_MIDDLE); takeItems(player, HUNTER_RUNE_1, 10); giveItems(player, HAMIL_LETTER_2, 1); } // SIR_ARON_TANFORD else if (event.equalsIgnoreCase("30653-02.htm")) { st.setCond(3); playSound(player, SOUND_MIDDLE); takeItems(player, HAMIL_LETTER_1, 1); } // VOKIAN else if (event.equalsIgnoreCase("30514-02.htm")) { st.setCond(6); playSound(player, SOUND_MIDDLE); takeItems(player, HAMIL_LETTER_2, 1); } return htmltext; } @Override public String onTalk(Npc npc, Player player) { String htmltext = getNoQuestMsg(); QuestState st = player.getQuestList().getQuestState(QUEST_NAME); if (st == null) return htmltext; switch (st.getState()) { case CREATED: if (player.getClassId() != ClassId.ROGUE && player.getClassId() != ClassId.ELVEN_SCOUT && player.getClassId() != ClassId.ASSASSIN) htmltext = "30702-02.htm"; else if (player.getStatus().getLevel() < 39) htmltext = "30702-01.htm"; else htmltext = "30702-03.htm"; break; case STARTED: int cond = st.getCond(); switch (npc.getNpcId()) { case BERNARD: htmltext = "30702-05.htm"; break; case HAMIL: if (cond == 1) htmltext = "30626-01.htm"; else if (cond == 2 || cond == 3) htmltext = "30626-04.htm"; else if (cond == 4) htmltext = "30626-05.htm"; else if (cond > 4 && cond < 8) htmltext = "30626-08.htm"; else if (cond == 8) { htmltext = "30626-09.htm"; st.setCond(9); playSound(player, SOUND_MIDDLE); takeItems(player, HUNTER_RUNE_2, 10); giveItems(player, HAMIL_LETTER_3, 1); } else if (cond > 8 && cond < 12) htmltext = "30626-10.htm"; else if (cond == 12) { htmltext = "30626-11.htm"; st.setCond(13); playSound(player, SOUND_MIDDLE); } else if (cond == 13) htmltext = "30626-12.htm"; else if (cond == 14) { htmltext = "30626-13.htm"; takeItems(player, BLOOD_OF_LIZARDMAN, -1); takeItems(player, CRESCENT_MOON_BOW, 1); takeItems(player, TALISMAN_OF_KADESH, 1); giveItems(player, MARK_OF_SAGITTARIUS, 1); rewardExpAndSp(player, 54726, 20250); player.broadcastPacket(new SocialAction(player, 3)); playSound(player, SOUND_FINISH); st.exitQuest(false); } break; case SIR_ARON_TANFORD: if (cond == 2) htmltext = "30653-01.htm"; else if (cond > 2) htmltext = "30653-03.htm"; break; case VOKIAN: if (cond == 5) htmltext = "30514-01.htm"; else if (cond == 6) htmltext = "30514-03.htm"; else if (cond == 7) { htmltext = "30514-04.htm"; st.setCond(8); playSound(player, SOUND_MIDDLE); takeItems(player, TALISMAN_OF_SNAKE, 1); } else if (cond > 7) htmltext = "30514-05.htm"; break; case GAUEN: if (cond == 9) { htmltext = "30717-01.htm"; st.setCond(10); playSound(player, SOUND_MIDDLE); takeItems(player, HAMIL_LETTER_3, 1); } else if (cond == 10) htmltext = "30717-03.htm"; else if (cond == 11) { htmltext = "30717-02.htm"; st.setCond(12); playSound(player, SOUND_MIDDLE); takeItems(player, MANASHEN_HORN, 1); takeItems(player, MITHRIL_CLIP, 1); takeItems(player, REINFORCED_BOWSTRING, 1); takeItems(player, STAKATO_CHITIN, 1); giveItems(player, CRESCENT_MOON_BOW, 1); giveItems(player, WOODEN_ARROW, 10); } else if (cond > 11) htmltext = "30717-04.htm"; break; } break; case COMPLETED: htmltext = getAlreadyCompletedMsg(); break; } return htmltext; } @Override public void onMyDying(Npc npc, Creature killer) { final Player player = killer.getActingPlayer(); final QuestState st = checkPlayerState(player, npc, QuestStatus.STARTED); if (st == null) return; switch (npc.getNpcId()) { case ANT: case ANT_CAPTAIN: case ANT_OVERSEER: case ANT_RECRUIT: case ANT_PATROL: case ANT_GUARD: case NOBLE_ANT: case NOBLE_ANT_LEADER: if (st.getCond() == 3 && dropItems(player, HUNTER_RUNE_1, 1, 10, 500000)) st.setCond(4); break; case BREKA_ORC_SHAMAN: case BREKA_ORC_OVERLORD: if (st.getCond() == 6 && dropItems(player, HUNTER_RUNE_2, 1, 10, 500000)) { st.setCond(7); giveItems(player, TALISMAN_OF_SNAKE, 1); } break; case MARSH_STAKATO_WORKER: case MARSH_STAKATO_SOLDIER: case MARSH_STAKATO_DRONE: if (st.getCond() == 10 && dropItems(player, STAKATO_CHITIN, 1, 1, 100000) && player.getInventory().hasItems(MANASHEN_HORN, MITHRIL_CLIP, REINFORCED_BOWSTRING)) st.setCond(11); break; case MARSH_SPIDER: if (st.getCond() == 10 && dropItems(player, REINFORCED_BOWSTRING, 1, 1, 100000) && player.getInventory().hasItems(MANASHEN_HORN, MITHRIL_CLIP, STAKATO_CHITIN)) st.setCond(11); break; case ROAD_SCAVENGER: if (st.getCond() == 10 && dropItems(player, MITHRIL_CLIP, 1, 1, 100000) && player.getInventory().hasItems(MANASHEN_HORN, REINFORCED_BOWSTRING, STAKATO_CHITIN)) st.setCond(11); break; case MANASHEN_GARGOYLE: if (st.getCond() == 10 && dropItems(player, MANASHEN_HORN, 1, 1, 100000) && player.getInventory().hasItems(REINFORCED_BOWSTRING, MITHRIL_CLIP, STAKATO_CHITIN)) st.setCond(11); break; case LETO_LIZARDMAN: case LETO_LIZARDMAN_ARCHER: case LETO_LIZARDMAN_SOLDIER: case LETO_LIZARDMAN_WARRIOR: case LETO_LIZARDMAN_SHAMAN: case LETO_LIZARDMAN_OVERLORD: if (st.getCond() == 13) { if (((player.getInventory().getItemCount(BLOOD_OF_LIZARDMAN) - 120) * 5) > Rnd.get(100)) { playSound(player, SOUND_BEFORE_BATTLE); takeItems(player, BLOOD_OF_LIZARDMAN, -1); addSpawn(SERPENT_DEMON_KADESH, player, false, 300000, true); } else dropItemsAlways(player, BLOOD_OF_LIZARDMAN, 1, 0); } break; case SERPENT_DEMON_KADESH: if (st.getCond() == 13) { if (player.getInventory().getItemIdFrom(Paperdoll.RHAND) == CRESCENT_MOON_BOW) { st.setCond(14); playSound(player, SOUND_MIDDLE); giveItems(player, TALISMAN_OF_KADESH, 1); } else addSpawn(SERPENT_DEMON_KADESH, player, false, 300000, true); } break; } } }  
×
×
  • Criar Novo...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.