Jump to content

Question

Bem galerinha estou tentando fazer com que seja utilizavel a rev L2jmobius 2.0 Fafurion porem agarrei no script do tauti onde o mesmo nao utiliza a key para entrar na sala do boss o script original e esse abaixo.
 

/*
 * 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.Tauti;

import java.util.List;

import org.l2jmobius.gameserver.enums.Movie;
import org.l2jmobius.gameserver.model.Location;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.instance.MonsterInstance;
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
import org.l2jmobius.gameserver.model.instancezone.Instance;
import org.l2jmobius.gameserver.network.serverpackets.OnEventTrigger;

import instances.AbstractInstance;

/**
 * Tauti Warzone instance zone.
 * @author Mobius
 */
public class TautiWarzone extends AbstractInstance
{
	// NPCs
	private static final int FINARIA = 33675;
	private static final int ZAHAK = 19266;
	private static final int TELEPORTER = 33678;
	private static final int TAUTI_COMMON = 29233;
	private static final int TAUTI_EXTREME = 29234;
	private static final int TAUTI_COMMON_AXE = 29236;
	private static final int TAUTI_EXTREME_AXE = 29237;
	// Item
	private static final int KEY_OF_DARKNESS = 34899;
	// Teleport
	private static final Location TAUTI_TELEPORT = new Location(-148972, 209879, -10199);
	// Misc
	private static final int TEMPLATE_ID = 218;
	private static final int EXTREME_TEMPLATE_ID = 219;
	private static final int DOOR_1 = 15240001;
	private static final int DOOR_2 = 15240002;
	
	public TautiWarzone()
	{
		super(TEMPLATE_ID, EXTREME_TEMPLATE_ID);
		addTalkId(FINARIA, TELEPORTER);
		addFirstTalkId(FINARIA, TELEPORTER);
		addAttackId(TAUTI_COMMON, TAUTI_EXTREME);
		addKillId(ZAHAK, TAUTI_COMMON_AXE, TAUTI_EXTREME_AXE);
	}
	
	@Override
	public String onAdvEvent(String event, Npc npc, PlayerInstance player)
	{
		switch (event)
		{
			case "enterEasyInstance":
			{
				enterInstance(player, npc, TEMPLATE_ID);
				if (player.getInstanceWorld() != null)
				{
					startQuestTimer("WORLD_STATUS_CHECK", 5000, player.getInstanceWorld().getNpc(FINARIA), null);
				}
				break;
			}
			case "enterExtremeInstance":
			{
				enterInstance(player, npc, EXTREME_TEMPLATE_ID);
				if (player.getInstanceWorld() != null)
				{
					startQuestTimer("WORLD_STATUS_CHECK", 5000, player.getInstanceWorld().getNpc(FINARIA), null);
				}
				break;
			}
			case "useKey":
			{
				final Instance world = npc.getInstanceWorld();
				if (hasAtLeastOneQuestItem(player, KEY_OF_DARKNESS))
				{
					takeItems(player, KEY_OF_DARKNESS, -1);
					world.setStatus(3);
					npc.broadcastPacket(new OnEventTrigger(15235001, true));
					return "33678-3.htm";
				}
				return "33678-1.htm";
			}
			case "teleport":
			{
				final Instance world = npc.getInstanceWorld();
				world.setStatus(4);
				world.openCloseDoor(DOOR_2, true);
				for (PlayerInstance member : world.getPlayers())
				{
					member.teleToLocation(TAUTI_TELEPORT, world);
					startQuestTimer("PLAY_OPENING_B_MOVIE", 5000, null, member, false);
				}
				startQuestTimer("SPAWN_TAUTI", 60000, npc, null, false);
				break;
			}
			case "PLAY_OPENING_B_MOVIE":
			{
				playMovie(player, Movie.SC_TAUTI_OPENING_B);
				break;
			}
			case "SPAWN_TAUTI":
			{
				final Instance world = npc.getInstanceWorld();
				world.openCloseDoor(DOOR_1, true);
				world.spawnGroup("boss");
				break;
			}
			case "SPAWN_AXE":
			{
				final Npc axe = addSpawn(npc.getId() == TAUTI_EXTREME ? TAUTI_EXTREME_AXE : TAUTI_COMMON_AXE, npc, false, 0, false, npc.getInstanceId());
				axe.setRandomWalking(false);
				axe.setIsImmobilized(true);
				break;
			}
			case "WORLD_STATUS_CHECK":
			{
				final Instance world = npc.getInstanceWorld();
				if (world == null)
				{
					return null;
				}
				if (world.isStatus(0))
				{
					world.setStatus(1);
					world.spawnGroup("room1");
					playMovie(world.getPlayers(), Movie.SC_TAUTI_OPENING);
					for (PlayerInstance member : world.getPlayers())
					{
						takeItems(member, KEY_OF_DARKNESS, -1);
					}
					startQuestTimer("WORLD_STATUS_CHECK", 5000, npc, null);
				}
				else if (world.isStatus(1))
				{
					if (world.getAliveNpcs(MonsterInstance.class).isEmpty())
					{
						world.setStatus(2);
						final List<Npc> monsters = world.spawnGroup("room2");
						for (Npc monster : monsters)
						{
							monster.setRandomWalking(false);
						}
					}
					startQuestTimer("WORLD_STATUS_CHECK", 5000, npc, null);
				}
				return null;
			}
		}
		return super.onAdvEvent(event, npc, player);
	}
	
	@Override
	public String onFirstTalk(Npc npc, PlayerInstance player)
	{
		String htmltext = "";
		switch (npc.getId())
		{
			case FINARIA:
			{
				htmltext = "33675.htm";
				break;
			}
			case TELEPORTER:
			{
				final int worldStatus = npc.getInstanceWorld().getStatus();
				if (worldStatus > 2)
				{
					htmltext = "33678-3.htm";
				}
				else if ((worldStatus == 2) && hasAtLeastOneQuestItem(player, KEY_OF_DARKNESS))
				{
					htmltext = "33678-2.htm";
				}
				else
				{
					htmltext = "33678-1.htm";
				}
				break;
			}
		}
		return htmltext;
	}
	
	@Override
	public String onAttack(Npc npc, PlayerInstance attacker, int damage, boolean isSummon)
	{
		final Instance world = npc.getInstanceWorld();
		if (world.isStatus(5) && (npc.getCurrentHp() < (npc.getMaxHp() * 0.15)))
		{
			world.setStatus(6);
			npc.deleteMe();
			startQuestTimer("SPAWN_AXE", 15000, npc, null, false);
			playMovie(world.getPlayers(), Movie.SC_TAUTI_PHASE);
		}
		if (world.isStatus(4))
		{
			world.setStatus(5);
			world.openCloseDoor(DOOR_1, false);
			world.openCloseDoor(DOOR_2, false);
		}
		return super.onAttack(npc, attacker, damage, isSummon);
	}
	
	@Override
	public String onKill(Npc npc, PlayerInstance killer, boolean isSummon)
	{
		if (npc.getId() == ZAHAK)
		{
			npc.dropItem(killer, KEY_OF_DARKNESS, 1);
		}
		else
		{
			final Instance world = npc.getInstanceWorld();
			playMovie(world.getPlayers(), Movie.SC_TAUTI_ENDING);
			npc.deleteMe();
			world.finishInstance();
		}
		return super.onKill(npc, killer, isSummon);
	}
	
	@Override
	public void onInstanceCreated(Instance instance, PlayerInstance player)
	{
		if (player != null)
		{
			showHtmlFile(player, instance.getTemplateId() == EXTREME_TEMPLATE_ID ? "PartyEnterExtreme.html" : "PartyEnterCommon.html");
		}
	}
	
	public static void main(String[] args)
	{
		new TautiWarzone();
	}
}

 


Conhecimento Em HTML , Multisell , SQL , DataBase e Scripts.

Share this post


Link to post
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...



     



  • Recently Browsing

    No registered users viewing this page.

  • Similar Content

    • By Rita Corlleone
      L2J-Mobius CLASSIC Interlude, based Grand Crusader.
      Bitbucket MOBIUS Dev
      https://bitbucket.org/MobiusDev/l2j_mobius/src/master/L2J_Mobius_Classic_Interlude/
       
      Client: https://drive.google.com/uc?id=1Cyfb_OumjhPS9NFcLDMY11_s_ktH0kDk&export=download
      Lineage II Clientes, By: WariinG
       
      Patch: https://www.mediafire.com/file/mdxq5ovyyu3p40o/L2J_Mobius_Classic_Interlude_Patch_v4.zip
       
      Geodata: http://www.mediafire.com/file/hpibngz0y2x0iwd/L2J_Mobius_Classic_Interlude_Geodata.zip
       
      JDK: https://www.mediafire.com/file/k25pt0umuf16uoh/openjdk-12.0.2_windows-x64_bin.zip
       
       
      This is a Classic server based on the Grand Crusade client.
      The goal is to make a better approximation of what Classic is to older chronicles, like Interlude.
      Never the less this is still Classic, do not expect a pure Interlude version.
      It is shared with the hope that more people will be involved and help with the development.
      Who knows? Maybe some day it will be a pure Interlude version.
       
      Este é um servidor Clássico baseado no cliente Grand Crusade. O objetivo é fazer uma aproximação melhor do que Clássico é as crônicas mais antigas, como o Interlude.  
      Mesmo assim, ainda é clássico, não espere uma versão pura do Interlude Estamos compartilhando com a esperança de que mais pessoas se envolvam e tenham o desejo de ajudar com o desenvolvimento. 
      Quem sabe? Talvez algum dia será uma versão pura do Interlude.
       
      A lot of things can go wrong while using this project,
      if you do not know what you are doing, it is best not to use it.
       
      Um monte de coisas podem dar errado ao usar este projeto, 
      se você não sabe o que você está fazendo, é melhor não usá-lo.
       
      Tools that might be helpful (use with Java 1.8)
      L2ClientDat: https://github.com/MobiusDevelopment/l2clientdat
       
      XdatEditor: https://github.com/MobiusDevelopment/xdat_editor
       
      L2Tool: https://github.com/MobiusDevelopment/l2tool
       
      E pra que diz que fórum está parado. 😝
    • By junin00
      Bom como tinha falado que ia postar um pre config que tava mechendo da Rev que o @AlessandroJustino postou.
      Está ai com algumas modificação na Community Board, como teleport, Shop, e outros.
      Bom proveito pra quem quer se divertir. 
      ( Já informando que o Servidor não está estavel pra colocar Online. ) E também não dou suporte.
       
      -> Download Pré Config + Backup <-
       
      Rates:
      Screens:
       
       
         
         
       
    • By AlessandroJustino
      Sem delongas venho por desse meio passar a cronica com o servidor compilada por mim, diretamente do l2J-mobius.

      Client: CLIENT NOVO LINK  system setada pro 127.0.0.1



      Geodata: Download (Atualizado)

      JDK: 10.0.2

      Mysql: 8.0.16.0

      Compilado: L2 Fafurion versão 1 (Antiga)
      Compilado: L2 Fafurion  versão 2 (Mais atualizado)


      Servidor está configurado para l2jmobius. é isso,
    • By tuningxtreme
      Implementation done in this update:
      Implemented AI for Drill Sergeant in Talking Island
      Implemented AI for Training Solider in Talking Island
      Implemented AI for cocoons Fairy Settlement
      Implemented an item: Pa'agrio's Box, Maphr's Box, Shyeed's Box, Eva's Box, Mentee Certificate Pack, Blessed Scroll - R Grade, Blessed Scroll - R95 Grade, Blessed Scroll - R99 Grade, Player Commendation - Quick Healing Potion, Einhasad's T-shirt Enchant Scroll, Einhasad's Energy, Essence of Destruction, Pathfinder's Reward - Relief
      Implemented mascots: R90 Talisman - P. Atk, R95 Talisman - P. Atk, R99 Talisman - P. Atk, R85 Talisman - P. Def, R90 Talisman - P. Def, R95 Talisman - P. Def, R99 Talisman - P. Def, R85 Talisman - M. Atk, R90 Talisman - M. Atk, R95 Talisman - M. Atk., R99 Talisman - M. Atk, R90 Talisman - HP, R95 Talisman - HP, R99 Talisman - HP
      Implemented script manager Maps
      Implemented dialogue for NPC: Kartia Researcher, Mentor Guide, Moe, Hermuncus' Minion, Sayune Manager, Renfad, Schuazen, Selina, Horpina, Cas, Kitt Cat, Mr. Kay
      Implemented new messages for NPC
      Implemented new recipes R grade
      Implemented zone R grade
      Teleport Device implemented in Garden Of Genesis
      Provides new an item: Proof of Survival, Clan Flag, Herb Remnants, Herb of Helping Seed, Trowel, Hard Leather, Novella Prophecy, Bottle of Istina's Soul, Bottle of Octavis's Soul, Mentee Certificate Pack, Shattered Egg Shell, Ingredient and Hardener Pouch - R, Hair Accessory Exchange Certificate, Greater Cokes, Accessory Gem, Armor Piece, Weapon Piece, Dimension Keeper's Boxes
      Implemented mobs (drop, stats, skills, etc): Satyr Summoner, Satyr Wizard, Fairy Knight, Fairy Rogue, Fairy Warrior, Satyr Witch, Satyr Summoner, Orbis 'Victim, Orbis' Guard, Orbis 'Javelin Thrower, Orbis' Curator, Orbis' Ancient Hero, Orbis' Veteran Curator, Octavis' Gladiator
      Implemented settlement Orbis Temple
      Implemented in the area Orbis Temple
      Includes new effects for skill
      Implemented AI for NPC in City Of Arcan: Cas, Kitt, Mr. Kay
      Sold tickets to enter the maze Maps
      Implemented instance Kartia Labyrinth - Solo 85
      Implemented dialogue for NPC: Priest Yohanes, Master Minia, Rosalia, Conrad, Selon, Linkes, Sebion, Blacksmith Vincenz, Seer Somak
      Implemented Community Board

      Realized fixes in this release:
      Fixed routes for running children in Talking Island
      Fixed skill: Warrior - Individual, Illusion Hide, Impaired, Shadow Attack, Survival Movement
      Fixed dialogues for Quest Start The New Destiny
      Edit rollback for new skills
      Fixed quest Obligations Of Seeker
      Fixed NPC: Kanilov,
      Fixed garbage sborschiik
      Fixed the bug with a storage dyupom
      Fixed skill: Wisp Heal
      Fixed spawn in the Fairy Settlement
      Fixed status check Chara for jumping
      A small patch Kartia Researcher
      Fixed quest Request Of Seeker


      Site:
      http://dev-world.org


      Protocolo: 449-449



      Cliente: Tauti



      Java 6u35



      Donwload:
      http://rghost.ru/41789131

  • Posts

×
×
  • Create New...