Ir para conteúdo
  • Cadastre-se
  • 0

2 CP, 2 MANA


Kคrim

Pergunta

queria saber se é possivel ter 2 tipos de cp potion custom e o msm com a mana,

ja existe o cp e a mana no jogo eu queria criar outra custom, isso é possivel? eu tentei uma vez e deu um conflito clicava pra encher mas não acontecia nd, alguem da uma luz ai.

Editado por Kคrim

logo.png

Link para o comentário
Compartilhar em outros sites

11 respostass a esta questão

Posts recomendados

  • 0

Revisão? Há source disponível? Acredito que duplicando as poções mudando o id e adicionando no core funcione, não recordo bem mas assim como o soulshot é registrado no java as poções também.

Link para o comentário
Compartilhar em outros sites


  • 0

Sim é possível, não precisa mexer na Source!

Tentarei fazer um tutorial mais detalhado mais tarde, se eu lembrar =D

Tu precisa fazer uma Skill

Exemplo da minha Skill Custom de CP

	</skill>
		<skill id="9552" levels="1" name="CP Gauge Potion">
		<table name="#power"> 300 </table>
		<table name="#itemConsumeCount"> 1 </table>
		<set name="power" val="#power" />
		<set name="target" val="TARGET_SELF" />
		<set name="skillType" val="COMBATPOINTHEAL" />
		<set name="operateType" val="OP_ACTIVE" />
		<set name="reuseDelay" val="500" />
		<set name="magicLvl" val="1" />
		<set name="staticReuse" val="true" />
		<set name="isPotion" val="true" />
		<set name="itemConsumeId" val="9552" />
		<set name="itemConsumeCount" val="#itemConsumeCount" />
	</skill>

Como pode ver ela enche 300 de CP, com meio segundo de Delay,  e consumindo o item 9552

como mostra na imagem abaixo

oPpKTtT.jpg

o etcitem custom, usando a skill level 1. 

Depois disso e crie o item na system. 

Provavelmente deve funcionar se sua rev tiver isso. 

 

Isso no caso é pra L2JDREAM.

Editado por Dwbryel

XD

Link para o comentário
Compartilhar em outros sites

  • 0
 

Revisão? Há source disponível? Acredito que duplicando as poções mudando o id e adicionando no core funcione, não recordo bem mas assim como o soulshot é registrado no java as poções também.

Frozen 1132, sim eu tenho a source, tem algum mod pra isso ?

logo.png

Link para o comentário
Compartilhar em outros sites

  • 0
 

Sim é possível, não precisa mexer na Source!

Tentarei fazer um tutorial mais detalhado mais tarde, se eu lembrar =D

Tu precisa fazer uma Skill

Exemplo da minha Skill Custom de CP


	</skill>
		<skill id="9552" levels="1" name="CP Gauge Potion">
		<table name="#power"> 300 </table>
		<table name="#itemConsumeCount"> 1 </table>
		<set name="power" val="#power" />
		<set name="target" val="TARGET_SELF" />
		<set name="skillType" val="COMBATPOINTHEAL" />
		<set name="operateType" val="OP_ACTIVE" />
		<set name="reuseDelay" val="500" />
		<set name="magicLvl" val="1" />
		<set name="staticReuse" val="true" />
		<set name="isPotion" val="true" />
		<set name="itemConsumeId" val="9552" />
		<set name="itemConsumeCount" val="#itemConsumeCount" />
	</skill>

Como pode ver ela enche 300 de CP, com meio segundo de Delay,  e consumindo o item 9552

como mostra na imagem abaixo

oPpKTtT.jpg

o etcitem custom, usando a skill level 1. 

Depois disso e crie o item na system. 

Provavelmente deve funcionar se sua rev tiver isso. 

 

Isso no caso é pra L2JDREAM.

tentei multiplicar tudo mas não deu certo não, eu uso a l2jfrozen 

logo.png

Link para o comentário
Compartilhar em outros sites

  • 0
 

tentei registar e não deu certo não kkkkk criei outra id pra potion e não deu em nada 

Tá faltando fazer alguma coisa ai, até faria, mas desinstalei tudo referente a l2j do meu computador para liberar espaço no ssd, estou só com coisas de l2off ?

Link para o comentário
Compartilhar em outros sites

  • 0
 

Tá faltando fazer alguma coisa ai, até faria, mas desinstalei tudo referente a l2j do meu computador para liberar espaço no ssd, estou só com coisas de l2off ?

então mano eu tbm acho viu, apesar que eu não tenho conhecimento com java eu fiz o basico e deveria dar certo tlg, mas eu acho que estou esquecendo de algo.

se quiser da uma olhada eu fiz o teste com a mana id da mana 2 é 9909

/*
 * L2jFrozen Project - www.l2jfrozen.com 
 * 
 * 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 2, 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, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 * 02111-1307, USA.
 *
 * http://www.gnu.org/copyleft/gpl.html
 */
package com.l2jfrozen.gameserver.handler.itemhandlers;

import java.util.ArrayList;
import java.util.List;

import javolution.util.FastMap;

import org.apache.log4j.Logger;

import com.l2jfrozen.Config;
import com.l2jfrozen.gameserver.datatables.SkillTable;
import com.l2jfrozen.gameserver.datatables.sql.ItemTable;
import com.l2jfrozen.gameserver.handler.IItemHandler;
import com.l2jfrozen.gameserver.model.L2Effect;
import com.l2jfrozen.gameserver.model.L2Effect.EffectType;
import com.l2jfrozen.gameserver.model.L2Skill;
import com.l2jfrozen.gameserver.model.L2Summon;
import com.l2jfrozen.gameserver.model.actor.instance.L2ItemInstance;
import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance;
import com.l2jfrozen.gameserver.model.actor.instance.L2PetInstance;
import com.l2jfrozen.gameserver.model.actor.instance.L2PlayableInstance;
import com.l2jfrozen.gameserver.model.entity.event.CTF;
import com.l2jfrozen.gameserver.model.entity.event.DM;
import com.l2jfrozen.gameserver.model.entity.event.TvT;
import com.l2jfrozen.gameserver.model.entity.event.VIP;
import com.l2jfrozen.gameserver.network.SystemMessageId;
import com.l2jfrozen.gameserver.network.serverpackets.ActionFailed;
import com.l2jfrozen.gameserver.network.serverpackets.SystemMessage;
import com.l2jfrozen.gameserver.thread.ThreadPoolManager;

/**
 * This class ...
 * @version $Revision: 1.2.4.4 $ $Date: 2005/03/27 15:30:07 $
 */

public class Potions implements IItemHandler
{
	protected static final Logger LOGGER = Logger.getLogger(Potions.class);
	private int _herbstask = 0;
	
	private static FastMap<Integer, PotionsSkills> potions = new FastMap<>();
	
	private static void loadPotions()
	{
		
		for (final PotionsSkills actual_potion : PotionsSkills.values())
		{
			
			potions.put(actual_potion.potion_id, actual_potion);
			
		}
	}
	
	public static PotionsSkills get_skills_for_potion(final Integer potion_id)
	{
		
		if (potions.isEmpty())
			loadPotions();
		
		return potions.get(potion_id);
		
	}
	
	public static List<Integer> get_potions_for_skill(final Integer skill_id, final Integer skill_level)
	{
		if (potions.isEmpty())
			loadPotions();
		
		final List<Integer> output_potions = new ArrayList<>();
		for (final Integer actual_potion_item : potions.keySet())
		{
			FastMap<Integer, Integer> actual_item_skills = null;
			if (potions.get(actual_potion_item) != null)
			{
				actual_item_skills = potions.get(actual_potion_item).skills;
				if ((actual_item_skills.get(skill_id) != null) && (actual_item_skills.get(skill_id).equals(skill_level)))
				{
					output_potions.add(actual_potion_item);
				}
			}
		}
		
		return output_potions;
		
	}
	
	/** Task for Herbs */
	private class HerbTask implements Runnable
	{
		private final L2PcInstance _activeChar;
		private final int _magicId;
		private final int _level;
		
		HerbTask(final L2PcInstance activeChar, final int magicId, final int level)
		{
			_activeChar = activeChar;
			_magicId = magicId;
			_level = level;
		}
		
		@Override
		public void run()
		{
			try
			{
				usePotion(_activeChar, _magicId, _level);
			}
			catch (final Throwable t)
			{
				if (Config.ENABLE_ALL_EXCEPTIONS)
					t.printStackTrace();
				
				LOGGER.warn("", t);
			}
		}
	}
	
	private static final int[] ITEM_IDS =
	{
		65,
		725,
		726,
		727,
		728,
		9909,
		733,
		734,
		735,
		1060,
		1061,
		1062,
		1073,
		1374,
		1375,
		1539,
		1540,
		4667,
		4679,
		4680,
		5283,
		5591,
		5592,
		6035,
		6036,
		6652,
		6653,
		6654,
		6655,
		8193,
		8194,
		8195,
		8196,
		8197,
		8198,
		8199,
		8200,
		8201,
		8202,
		8600,
		8601,
		8602,
		8603,
		8604,
		8605,
		8606,
		8607,
		8608,
		8609,
		8610,
		8611,
		8612,
		8613,
		8614,
		// elixir of life
		8622,
		8623,
		8624,
		8625,
		8626,
		8627,
		// elixir of Strength
		8628,
		8629,
		8630,
		8631,
		8632,
		8633,
		// elixir of cp
		8634,
		8635,
		8636,
		8637,
		8638,
		8639,
		// primavel potions
		8786,
		8787
	};
	
	@Override
	public synchronized void useItem(final L2PlayableInstance playable, final L2ItemInstance item)
	{
		
		if (playable instanceof L2PcInstance)
		{
			L2PcInstance activeChar;
			activeChar = (L2PcInstance) playable;
			
			// if(activeChar._inEventTvT && TvT._started && !Config.TVT_ALLOW_POTIONS)
			if (activeChar._inEventTvT && TvT.is_started() && !Config.TVT_ALLOW_POTIONS)
			{
				activeChar.sendPacket(ActionFailed.STATIC_PACKET);
				return;
			}
			
			// if(activeChar._inEventDM && DM._started && !Config.DM_ALLOW_POTIONS)
			if (activeChar._inEventDM && DM.is_started() && !Config.DM_ALLOW_POTIONS)
			{
				activeChar.sendPacket(ActionFailed.STATIC_PACKET);
				return;
			}
			
			// if(activeChar._inEventCTF && CTF._started && !Config.CTF_ALLOW_POTIONS)
			if (activeChar._inEventCTF && CTF.is_started() && !Config.CTF_ALLOW_POTIONS)
			{
				activeChar.sendPacket(ActionFailed.STATIC_PACKET);
				return;
			}
			
			// if(activeChar._inEventVIP && VIP._started)
			if (activeChar._inEventVIP && VIP._started)
			{
				activeChar.sendPacket(ActionFailed.STATIC_PACKET);
				return;
			}
			
			if (activeChar.isInOlympiadMode())
			{
				activeChar.sendPacket(new SystemMessage(SystemMessageId.THIS_ITEM_IS_NOT_AVAILABLE_FOR_THE_OLYMPIAD_EVENT));
				return;
			}
			
			/*
			 * if(activeChar.isAllSkillsDisabled()) { activeChar.sendPacket(ActionFailed.STATIC_PACKET); return; }
			 */
			
			if (!Config.ALLOW_POTS_IN_PVP && (activeChar.isInDuel() || activeChar.getPvpFlag() != 0))
			{
				activeChar.sendMessage("You Cannot Use Potions In PvP!");
				return;
			}
			
			final int itemId = item.getItemId();
			switch (itemId)
			{
			// MANA POTIONS
				case 726: // mana drug, xml: 2003
					if (!isEffectReplaceable(playable, L2Effect.EffectType.MANA_HEAL_OVER_TIME, itemId))
						return;
					usePotion(activeChar, 2003, 1);
					break;
				case 728: // mana_potion, xml: 2005
					usePotion(activeChar, 2005, 1);
					break;
				case 9909: // mana_potion2, xml: 2400
					usePotion(activeChar, 2400, 1);
					break;
				
				// HEALING AND SPEED POTIONS
				case 65: // red_potion, xml: 2001
					usePotion(activeChar, 2001, 1);
					break;
				case 725: // healing_drug, xml: 2002
					if (!isEffectReplaceable(playable, L2Effect.EffectType.HEAL_OVER_TIME, itemId))
						return;
					usePotion(activeChar, 2002, 1);
					break;
				case 727: // _healing_potion, xml: 2032
					if (!isEffectReplaceable(playable, L2Effect.EffectType.HEAL_OVER_TIME, itemId))
						return;
					usePotion(activeChar, 2032, 1);
					break;
				case 733: // endeavor_potion
					usePotion(activeChar, 2010, 1);
					break;
				case 734: // quick_step_potion, xml: 2011
					usePotion(activeChar, 2011, 1);
					break;
				case 735: // swift_attack_potion, xml: 2012
					usePotion(activeChar, 2012, 1);
					break;
				case 1060: // lesser_healing_potion,
				case 1073: // beginner's potion, xml: 2031
					if (!isEffectReplaceable(playable, L2Effect.EffectType.HEAL_OVER_TIME, itemId))
						return;
					usePotion(activeChar, 2031, 1);
					break;
				case 1061: // healing_potion, xml: 2032
					if (!isEffectReplaceable(playable, L2Effect.EffectType.HEAL_OVER_TIME, itemId))
						return;
					usePotion(activeChar, 2032, 1);
					break;
				case 1062: // haste_potion, xml: 2011
					usePotion(activeChar, 2011, 1);
					break;
				case 1374: // adv_quick_step_potion, xml: 2034
					usePotion(activeChar, 2034, 1);
					break;
				case 1375: // adv_swift_attack_potion, xml: 2035
					usePotion(activeChar, 2035, 1);
					break;
				case 1539: // greater_healing_potion, xml: 2037
					if (!isEffectReplaceable(playable, L2Effect.EffectType.HEAL_OVER_TIME, itemId))
						return;
					usePotion(activeChar, 2037, 1);
					break;
				case 1540: // quick_healing_potion, xml: 2038
					usePotion(activeChar, 2038, 1);
					break;
				case 4667: // potion_of_critical_escape
					usePotion(activeChar, 2074, 1);
					break;
				case 4679: // bless of eva
					usePotion(activeChar, 2076, 1);
					break;
				case 4680: // rsk_damage_shield_potion
					usePotion(activeChar, 2077, 1);
					break;
				case 5283: // Rice Cake, xml: 2136
					if (!isEffectReplaceable(playable, L2Effect.EffectType.HEAL_OVER_TIME, itemId))
						return;
					usePotion(activeChar, 2136, 1);
					break;
				case 5591: // CP
					usePotion(activeChar, 2166, 1);
					break;
				case 5592: // Greater CP
					usePotion(activeChar, 2166, 2);
					break;
				case 6035: // Magic Haste Potion, xml: 2169
					usePotion(activeChar, 2169, 1);
					break;
				case 6036: // Greater Magic Haste Potion, xml: 2169
					usePotion(activeChar, 2169, 2);
					break;
				
				// ELIXIR
				case 8622:
				case 8623:
				case 8624:
				case 8625:
				case 8626:
				case 8627:
					// elixir of Life
					if (!isEffectReplaceable(activeChar, L2Effect.EffectType.HEAL_OVER_TIME, itemId))
						return;
					
					if (itemId == 8622 && activeChar.getExpertiseIndex() == 0 || itemId == 8623 && activeChar.getExpertiseIndex() == 1 || itemId == 8624 && activeChar.getExpertiseIndex() == 2 || itemId == 8625 && activeChar.getExpertiseIndex() == 3 || itemId == 8626 && activeChar.getExpertiseIndex() == 4 || itemId == 8627 && activeChar.getExpertiseIndex() == 5)
					{
						usePotion(activeChar, 2287, (activeChar.getExpertiseIndex() + 1));
					}
					else
					{
						SystemMessage sm = new SystemMessage(SystemMessageId.INCOMPATIBLE_ITEM_GRADE); // INCOMPATIBLE_ITEM_GRADE
						sm.addItemName(itemId);
						activeChar.sendPacket(sm);
						sm = null;
						
						return;
					}
					break;
				case 8628:
				case 8629:
				case 8630:
				case 8631:
				case 8632:
				case 8633:
					// elixir of Strength
					if (!isEffectReplaceable(activeChar, L2Effect.EffectType.HEAL_OVER_TIME, itemId))
						return;
					
					if (itemId == 8628 && activeChar.getExpertiseIndex() == 0 || itemId == 8629 && activeChar.getExpertiseIndex() == 1 || itemId == 8630 && activeChar.getExpertiseIndex() == 2 || itemId == 8631 && activeChar.getExpertiseIndex() == 3 || itemId == 8632 && activeChar.getExpertiseIndex() == 4 || itemId == 8633 && activeChar.getExpertiseIndex() == 5)
					{
						usePotion(activeChar, 2288, (activeChar.getExpertiseIndex() + 1));
					}
					else
					{
						SystemMessage sm = new SystemMessage(SystemMessageId.INCOMPATIBLE_ITEM_GRADE); // INCOMPATIBLE_ITEM_GRADE
						sm.addItemName(itemId);
						activeChar.sendPacket(sm);
						sm = null;
						
						return;
					}
					break;
				case 8634:
				case 8635:
				case 8636:
				case 8637:
				case 8638:
				case 8639:
					// elixir of cp
					if (!isEffectReplaceable(activeChar, L2Effect.EffectType.HEAL_OVER_TIME, itemId))
						return;
					
					if (itemId == 8634 && activeChar.getExpertiseIndex() == 0 || itemId == 8635 && activeChar.getExpertiseIndex() == 1 || itemId == 8636 && activeChar.getExpertiseIndex() == 2 || itemId == 8637 && activeChar.getExpertiseIndex() == 3 || itemId == 8638 && activeChar.getExpertiseIndex() == 4 || itemId == 8639 && activeChar.getExpertiseIndex() == 5)
					{
						usePotion(activeChar, 2289, (activeChar.getExpertiseIndex() + 1));
					}
					else
					{
						SystemMessage sm = new SystemMessage(SystemMessageId.INCOMPATIBLE_ITEM_GRADE); // INCOMPATIBLE_ITEM_GRADE
						sm.addItemName(itemId);
						activeChar.sendPacket(sm);
						sm = null;
						
						return;
					}
					break;
				
				// VALAKAS AMULETS
				case 6652: // Amulet Protection of Valakas
					usePotion(activeChar, 2231, 1);
					break;
				case 6653: // Amulet Flames of Valakas
					usePotion(activeChar, 2233, 1);
					break;
				case 6654: // Amulet Flames of Valakas
					usePotion(activeChar, 2233, 1);
					break;
				case 6655: // Amulet Slay Valakas
					usePotion(activeChar, 2232, 1);
					break;
				
				// HERBS
				case 8600: // Herb of Life
					usePotion(activeChar, 2278, 1);
					break;
				case 8601: // Greater Herb of Life
					usePotion(activeChar, 2278, 2);
					break;
				case 8602: // Superior Herb of Life
					usePotion(activeChar, 2278, 3);
					break;
				case 8603: // Herb of Mana
					usePotion(activeChar, 2279, 1);
					break;
				case 8604: // Greater Herb of Mane
					usePotion(activeChar, 2279, 2);
					break;
				case 8605: // Superior Herb of Mane
					usePotion(activeChar, 2279, 3);
					break;
				case 8606: // Herb of Strength
					usePotion(activeChar, 2280, 1);
					break;
				case 8607: // Herb of Magic
					usePotion(activeChar, 2281, 1);
					break;
				case 8608: // Herb of Atk. Spd.
					usePotion(activeChar, 2282, 1);
					break;
				case 8609: // Herb of Casting Spd.
					usePotion(activeChar, 2283, 1);
					break;
				case 8610: // Herb of Critical Attack
					usePotion(activeChar, 2284, 1);
					break;
				case 8611: // Herb of Speed
					usePotion(activeChar, 2285, 1);
					break;
				case 8612: // Herb of Warrior
					usePotion(activeChar, 2280, 1);
					usePotion(activeChar, 2282, 1);
					usePotion(activeChar, 2284, 1);
					break;
				case 8613: // Herb of Mystic
					usePotion(activeChar, 2281, 1);
					usePotion(activeChar, 2283, 1);
					break;
				case 8614: // Herb of Warrior
					usePotion(activeChar, 2278, 3);
					usePotion(activeChar, 2279, 3);
					break;
				
				// FISHERMAN POTIONS
				case 8193: // Fisherman's Potion - Green
					if (playable.getSkillLevel(1315) <= 3)
					{
						playable.destroyItem("Consume", item.getObjectId(), 1, null, false);
						playable.sendPacket(new SystemMessage(SystemMessageId.NOTHING_HAPPENED));
						return;
					}
					usePotion(activeChar, 2274, 1);
					break;
				case 8194: // Fisherman's Potion - Jade
					if (playable.getSkillLevel(1315) <= 6)
					{
						playable.destroyItem("Consume", item.getObjectId(), 1, null, false);
						playable.sendPacket(new SystemMessage(SystemMessageId.NOTHING_HAPPENED));
						return;
					}
					usePotion(activeChar, 2274, 2);
					break;
				case 8195: // Fisherman's Potion - Blue
					if (playable.getSkillLevel(1315) <= 9)
					{
						playable.destroyItem("Consume", item.getObjectId(), 1, null, false);
						playable.sendPacket(new SystemMessage(SystemMessageId.NOTHING_HAPPENED));
						return;
					}
					usePotion(activeChar, 2274, 3);
					break;
				case 8196: // Fisherman's Potion - Yellow
					if (playable.getSkillLevel(1315) <= 12)
					{
						playable.destroyItem("Consume", item.getObjectId(), 1, null, false);
						playable.sendPacket(new SystemMessage(SystemMessageId.NOTHING_HAPPENED));
						return;
					}
					usePotion(activeChar, 2274, 4);
					break;
				case 8197: // Fisherman's Potion - Orange
					if (playable.getSkillLevel(1315) <= 15)
					{
						playable.destroyItem("Consume", item.getObjectId(), 1, null, false);
						playable.sendPacket(new SystemMessage(SystemMessageId.NOTHING_HAPPENED));
						return;
					}
					usePotion(activeChar, 2274, 5);
					break;
				case 8198: // Fisherman's Potion - Purple
					if (playable.getSkillLevel(1315) <= 18)
					{
						playable.destroyItem("Consume", item.getObjectId(), 1, null, false);
						playable.sendPacket(new SystemMessage(SystemMessageId.NOTHING_HAPPENED));
						return;
					}
					usePotion(activeChar, 2274, 6);
					break;
				case 8199: // Fisherman's Potion - Red
					if (playable.getSkillLevel(1315) <= 21)
					{
						playable.destroyItem("Consume", item.getObjectId(), 1, null, false);
						playable.sendPacket(new SystemMessage(SystemMessageId.NOTHING_HAPPENED));
						return;
					}
					usePotion(activeChar, 2274, 7);
					break;
				case 8200: // Fisherman's Potion - White
					if (playable.getSkillLevel(1315) <= 24)
					{
						playable.destroyItem("Consume", item.getObjectId(), 1, null, false);
						playable.sendPacket(new SystemMessage(SystemMessageId.NOTHING_HAPPENED));
						return;
					}
					usePotion(activeChar, 2274, 8);
					break;
				case 8201: // Fisherman's Potion - Black
					usePotion(activeChar, 2274, 9);
					break;
				case 8202: // Fishing Potion
					usePotion(activeChar, 2275, 1);
					break;
				case 8786:
					usePotion(activeChar, 2305, 1);
					break;
				case 8787:
					usePotion(activeChar, 2305, 1);
					break;
				default:
			}
			
			activeChar = null;
			
		}
		else if (playable instanceof L2PetInstance)
		{
			L2PetInstance activeChar;
			activeChar = ((L2PetInstance) playable);
			final int itemId = item.getItemId();
			switch (itemId)
			{
			// MANA POTIONS
				case 728: // mana_potion, xml: 2005
					usePotion(activeChar, 2005, 1);
					break;
					// MANA POTIONS
				case 9909: // mana_potion2, xml: 2400
					usePotion(activeChar, 2400, 1);
					break;
				
				// HEALING AND SPEED POTIONS
				case 1060: // lesser_healing_potion,
				case 1073: // beginner's potion, xml: 2031
					if (!isEffectReplaceable(playable, L2Effect.EffectType.HEAL_OVER_TIME, itemId))
						return;
					usePotion(activeChar, 2031, 1);
					break;
				case 1061: // healing_potion, xml: 2032
					if (!isEffectReplaceable(playable, L2Effect.EffectType.HEAL_OVER_TIME, itemId))
						return;
					usePotion(activeChar, 2032, 1);
					break;
				case 1062: // haste_potion, xml: 2011
					usePotion(activeChar, 2011, 1);
					break;
				case 1539:
					if (!isEffectReplaceable(playable, L2Effect.EffectType.HEAL_OVER_TIME, itemId))
						return;
					usePotion(activeChar, 2037, 1);
					break;
				case 6035: // Magic Haste Potion, xml: 2169
					usePotion(activeChar, 2169, 1);
					break;
				default:
					activeChar.getOwner().sendMessage("You can't use " + ItemTable.getInstance().getTemplate(itemId).getName() + " on summon.");
			}
			
			activeChar = null;
		}
		else
			return;
		
		/*
		 * if(res) { playable.destroyItem("Consume", item.getObjectId(), 1, null, false); }
		 */
		
	}
	
	private boolean isEffectReplaceable(final L2PlayableInstance activeChar, final Enum<EffectType> effectType, final int itemId)
	{
		final L2Effect[] effects = activeChar.getAllEffects();
		
		if (effects == null)
			return true;
		
		for (final L2Effect e : effects)
		{
			if (e.getEffectType() == effectType)
			{
				if (e.getSkill().isPotion())
				{
					// One can reuse pots after 2/3 of their duration is over.
					// It would be faster to check if its > 10 but that would screw custom pot durations...
					if (e.getTaskTime() > e.getSkill().getBuffDuration() * 67 / 100000)
						return true;
					SystemMessage sm = new SystemMessage(SystemMessageId.S1_PREPARED_FOR_REUSE);
					sm.addItemName(itemId);
					activeChar.sendPacket(sm);
					sm = null;
					
					return false;
				}
			}
		}
		return true;
	}
	
	public boolean usePotion(final L2PlayableInstance player, final int magicId, final int level)
	{
		if (player instanceof L2PcInstance)
		{
			final L2PcInstance activeChar = player.getActingPlayer();
			
			if (activeChar.isCastingNow() && magicId > 2277 && magicId < 2285)
			{
				_herbstask += 100;
				ThreadPoolManager.getInstance().scheduleAi(new HerbTask(activeChar, magicId, level), _herbstask);
			}
			else
			{
				if (magicId > 2277 && magicId < 2285 && _herbstask >= 100)
					_herbstask -= 100;
				final L2Skill skill = SkillTable.getInstance().getInfo(magicId, level);
				if (skill != null)
				{
					// Return false if potion is in reuse
					// so is not destroyed from inventory
					if (activeChar.isSkillDisabled(skill))
					{
						if (!(skill.getId() == 2166))
						{
							final SystemMessage sm = new SystemMessage(SystemMessageId.S1_PREPARED_FOR_REUSE);
							sm.addSkillName(skill.getId(), skill.getLevel());
							activeChar.sendPacket(sm);
						}
						// Cp potion message
						else if (skill.getId() == 2166)
						{
							if (skill.getLevel() == 2)
								activeChar.sendMessage("Greater CP Potion is not available at this time: being prepared for reuse.");
							else if (skill.getLevel() == 1)
								activeChar.sendMessage("CP Potion is not available at this time: being prepared for reuse.");
						}
						
						return false;
					}
					
					activeChar.doCast(skill);
					
					// only for Heal potions
					if (magicId == 2031 || magicId == 2032 || magicId == 2037)
					{
						activeChar.shortBuffStatusUpdate(magicId, level, 15);
					}
					
					if (!(activeChar.isSitting() && !skill.isPotion()))
						return true;
				}
			}
		}
		else if (player instanceof L2PetInstance)
		{
			final L2PetInstance activeChar = (L2PetInstance) player;
			final L2Skill skill = SkillTable.getInstance().getInfo(magicId, level);
			if (skill != null)
			{
				// Return false if potion is in reuse
				// so is not destroyed from inventory
				if (activeChar.isSkillDisabled(skill))
				{
					if (!(skill.getId() == 2166))
					{
						final SystemMessage sm = new SystemMessage(SystemMessageId.S1_PREPARED_FOR_REUSE);
						sm.addSkillName(skill.getId(), skill.getLevel());
						activeChar.sendPacket(sm);
					}
					return false;
				}
				
				activeChar.doCast(skill);
				
				if (!(!skill.isPotion()))
					return true;
			}
		}
		return false;
	}
	
	@Override
	public int[] getItemIds()
	{
		return ITEM_IDS;
	}
	
	public static void delete_Potion_Item(final L2PlayableInstance playable, final Integer skill_id, final Integer skill_level)
	{
		
		if (!(playable instanceof L2PcInstance) && !(playable instanceof L2Summon))
		{
			return;
		}
		
		final List<Integer> possible_potions = Potions.get_potions_for_skill(skill_id, skill_level);
		
		if (!possible_potions.isEmpty())
		{
			
			for (final Integer potion : possible_potions)
			{
				
				if (potion >= 8600 && potion <= 8614)
				{ // herbs are directly destroyed
					continue;
				}
				
				if (playable instanceof L2PcInstance)
				{
					final L2PcInstance activeChar = (L2PcInstance) playable;
					
					if (activeChar.getInventory().getInventoryItemCount(potion, 0) > 0)
					{
						
						final L2ItemInstance item = activeChar.getInventory().getItemByItemId(potion);
						activeChar.destroyItem("Consume", item.getObjectId(), 1, null, false);
					}
					else
					{
						if (Config.DEBUG)
							LOGGER.warn("Attention: playable " + playable.getName() + " has not potions " + potion + "!");
					}
				}
				else if (playable instanceof L2Summon)
				{
					final L2Summon activeChar = (L2Summon) playable;
					
					if (activeChar.getInventory().getInventoryItemCount(potion, 0) > 0)
					{
						final L2ItemInstance item = activeChar.getInventory().getItemByItemId(potion);
						activeChar.destroyItem("Consume", item.getObjectId(), 1, null, false);
					}
					else
					{
						if (Config.DEBUG)
							LOGGER.warn("Attention: playable " + playable.getName() + " has not potions " + potion + "!");
					}
				}
				
			}
			
		}
		else
		{
			LOGGER.warn("Attention: Can't destroy potion for skill " + skill_id + " level " + skill_level);
		}
		
	}
	
	enum PotionsSkills
	{
		
		mana_drug(726, 2003, 1),
		mana_potion(728, 2005, 1),
		mana_potion2(9909, 2004, 1),
		red_potion(65, 2001, 1),
		healing_drug(725, 2002, 1),
		healing_potion_ring(727, 2032, 1),
		quick_step_potion(734, 2011, 1),
		swift_attack_potion(735, 2012, 1),
		lesser_healing_potion(1060, 2031, 1),
		beginner_s_potion(1073, 2031, 1),
		healing_potion(1061, 2032, 1),
		haste_potion(1062, 2011, 1),
		adv_quick_step_potion(1374, 2034, 1),
		adv_swift_attack_potion(1375, 2035, 1),
		greater_healing_potion(1539, 2037, 1),
		quick_healing_potion(1540, 2038, 1),
		bless_of_eva(4679, 2076, 1),
		endeavor_potion(733, 2010, 1),
		potion_of_critical_escape(4667, 2074, 1),
		rsk_damage_shield_potion(4680, 2077, 1),
		Rice_Cake(5283, 2136, 1),
		CP(5591, 2166, 1),
		Greater_CP(5592, 2166, 2),
		Magic_Haste_Potion(6035, 2169, 1),
		Greater_Magic_Haste_Potion(6036, 2169, 2),
		elixir_of_Life_nog(8622, 2287, 1),
		elixir_of_Life_d(8623, 2287, 2),
		elixir_of_Life_c(8624, 2287, 3),
		elixir_of_Life_b(8625, 2287, 4),
		elixir_of_Life_a(8626, 2287, 5),
		elixir_of_Life_s(8627, 2287, 6),
		elixir_of_Strength_nog(8628, 2288, 1),
		elixir_of_Strength_d(8629, 2288, 2),
		elixir_of_Strength_c(8630, 2288, 3),
		elixir_of_Strength_b(8631, 2288, 4),
		elixir_of_Strength_a(8632, 2288, 5),
		elixir_of_Strength_s(8633, 2288, 6),
		elixir_of_cp_nog(8634, 2289, 1),
		elixir_of_cp_d(8635, 2289, 2),
		elixir_of_cp_c(8636, 2289, 3),
		elixir_of_cp_b(8637, 2289, 4),
		elixir_of_cp_a(8638, 2289, 5),
		elixir_of_cp_s(8639, 2289, 6),
		Amulet_Protection_of_Valakas(6652, 2231, 1),
		Amulet_Flames_of_Valakas_1(6653, 2233, 1),
		Amulet_Flames_of_Valakas_2(6654, 2233, 1),
		Amulet_Slay_Valakas(6655, 2232, 1),
		Herb_of_Life(8600, 2278, 1),
		Greater_Herb_of_Life(8601, 2278, 2),
		Superior_Herb_of_Life(8602, 2278, 3),
		Herb_of_Mana(8603, 2279, 1),
		Greater_Herb_of_Mane(8604, 2279, 2),
		Superior_Herb_of_Mane(8605, 2279, 3),
		Herb_of_Strength(8606, 2280, 1),
		Herb_of_Magic(8607, 2281, 1),
		Herb_of_Atk_Spd(8608, 2282, 1),
		Herb_of_Casting_Spd(8609, 2283, 1),
		Herb_of_Critical_Attack(8610, 2284, 1),
		Herb_of_Speed(8611, 2285, 1),
		
		Herb_of_Warrior(8612, new Integer[]
		{
			2280,
			2282,
			2284
		}, new Integer[]
		{
			1,
			1,
			1
		}),
		Herb_of_Mystic(8613, new Integer[]
		{
			2281,
			2283
		}, new Integer[]
		{
			1,
			1
		}),
		Herb_of_Recovery(8614, new Integer[]
		{
			2278,
			2279
		}, new Integer[]
		{
			3,
			3
		}),
		
		Fisherman_s_Potion_Green(8193, 2274, 1),
		Fisherman_s_Potion_Jade(8194, 2274, 2),
		Fisherman_s_Potion_Blue(8195, 2274, 3),
		Fisherman_s_Potion_Yellow(8196, 2274, 4),
		Fisherman_s_Potion_Orange(8197, 2274, 5),
		Fisherman_s_Potion_Purple(8198, 2274, 6),
		Fisherman_s_Potion_Red(8199, 2274, 7),
		Fisherman_s_Potion_White(8200, 2274, 8),
		Fisherman_s_Potion_Black(8201, 2274, 9),
		Fishing_Potion(8202, 2275, 1),
		Primeval_Potion(8786, 2305, 1),
		Primeval_Potion1(8787, 2305, 1);
		
		public Integer potion_id;
		public FastMap<Integer, Integer> skills = new FastMap<>();
		
		private PotionsSkills(final int potion_item, final int skill_identifier, final int skill_level)
		{
			// FastMap<Integer, Integer> skills = new FastMap<Integer, Integer>();
			skills.put(skill_identifier, skill_level);
			// potion_id_skills.put(potion_item, skills);
			potion_id = potion_item;
		}
		
		private PotionsSkills(final int potion_item, final Integer[] skill_identifiers, final Integer[] skill_levels)
		{
			// FastMap<Integer, Integer> skills = new FastMap<Integer, Integer>();
			for (int i = 0; i < skill_identifiers.length; i++)
			{
				skills.put(skill_identifiers[i], skill_levels[i]); // each skill of a particular potion
																	// can have just 1 level, not more
			}
			potion_id = potion_item;
			// potion_id_skills.put(potion_item, skills);
		}
	}
}

Editado por Nattan Felipe
Adicionando QT em tópico gigante.

logo.png

Link para o comentário
Compartilhar em outros sites

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.

Visitante
Responder esta pergunta...

×   Você colou conteúdo com formatação.   Remover formatação

  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.

Processando...
  • 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.
  • 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.