Jump to content

BAN_L2JDev

Banned
  • Posts

    94
  • Credits

  • Joined

  • Last visited

  • Days Won

    2
  • Feedback

    100%

Posts posted by BAN_L2JDev

  1. 22 minutes ago, 77upup said:

    I did include the id, the custom npc id is 1002000 also included some Adventure Guildsman Id's for testing, none works

    	private static final int[] ZIGGURATS =
    	{
    		31729, 31730, 31731, 31732, 31733, 1002000
    	};

     

    scripts.xml

    <?xml version="1.0" encoding="UTF-8"?> 
    <list xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../data/xsd/Scripts.xsd">
    	<!-- Skip these filenames from script loading, because they are already loaded using a different way. -->
    	<exclude file="package-info.java" />
    	<exclude file="handlers" />
    	
    	<!--
    	With this file you can exclude/include specific folders/files from within the scripts directory.
    	
    	In order to exclude a folder/file simply add the following line:
    	<exclude file="{FOLDER/FILE NAME HERE}" />
    	For example to exclude the quests directory, use:
    	<exclude file="quests" />
    	
    	If you want to exclude all files within a directory except certain file(s), you can do it like so:
    	<exclude file="{FOLDER NAME HERE}">
    		<include file="{FOLDER/FILE NAME HERE}" />
    		<include file="{FOLDER/FILE NAME HERE}" />
    		...
    	</exclude>
    	For example to exclude ForgeOfTheGods folder except Valakas script, use:
    	<exclude file="ForgeOfTheGods">
    		<include file="Valakas.java" />
    	</exclude>
    	-->
    </list>

     

    tente com um ID menor se possivel 5 casa E.p 65535 

  2. Just now, ๖ۣۜG๖ۣۜL๖ۣۜO๖ۣۜR๖ۣۜY said:

     

     

    Você não entendeu muito bem a pergunta, eu sei que existem algumas alterações que devem ser feitas nas configurações do servidor l2j e no mysql.ini para executar tantos membros online e meu gameserver.bat está na versão java: 1.7

    Server.proprierts

    # Maximum database connections.
    MaximumDbConnections = 1000

     

    # Define how many players are allowed to play simultaneously on your server.
    MaximumOnlineUsers = 1000

    # =================================================================
    #                            Threadpool
    # =================================================================

    # Determines the amount of scheduled thread pools. If set to -1, the server will decide the amount depending on the available processors.
    ScheduledThreadPoolCount = -1

    # Specifies how many threads will be in a single scheduled pool.
    ThreadsPerScheduledThreadPool = 750

    # Determines the amount of instant thread pools. If set to -1, the server will decide the amount depending on the available processors.
    InstantThreadPoolCount = -1

    # Specifies how many threads will be in a single instant pool.
    ThreadsPerInstantThreadPool = 8

     

    LoguinServer

    # Maximum database connections.
    MaximumDbConnections = 1000

     

    Can you make your question clearer now?

  3. 9 minutes ago, ๖ۣۜG๖ۣۜL๖ۣۜO๖ۣۜR๖ۣۜY said:

    Olá, não sei se este é o lugar certo para postar isso, mas vou, se não movê-lo, desculpe.

    Temos uma máquina:
    64 GB de RAM
    2x 2 TB SSD (Sem RAID)
    Windows Server 2022 Standard Edition 64 bits

    Eu sei que o linux é recomendado, mas o Windows é mais fácil para mim. É por isso que temos alguns GB extras.
    Como configurar o servidor L2J gameserver.bat e configs para rodar a quantidade máxima de jogadores e qual seria a quantidade máxima de fato, qualquer informação é apreciada!

     

    Editar:

    Sim, eu pesquisei antes de perguntar... 

    Eu sei que não sei tudo por isso pergunto <font style=😅">

    with a machine like that it depends on java and it is important if you are going to use a java8 that is very light you will support so many players that you will never bog down the server only thing you should look at in Task of the task manager what is the consumption that the JDK is consuming

  4. acis nunca será acabado apenas refinado.

    Uso o projeto há muitos anos. 
    e uma das fontes mais leves

    então poderia ter ficado em JAVA 8
    plus 2022 a escrita não suportaria
    acis sempre terá problemas bobos deixados pelo dono de propósito

     

    Is it true that Acis has some secret NPCS in the water?
    even with new XML spawn system?


    PS: meu inglês está escrito em frases desculpe

  5. My doubt and how can I remove the visibility of an object

    I already left the Instance ready but even so it continues to see all NPCs Player Objects

    Class WorldObject.java

    package net.sf.l2j.gameserver.model;
    
    import java.util.ArrayList;
    import java.util.Collections;
    import java.util.List;
    import java.util.function.Predicate;
    
    import net.sf.l2j.commons.logging.CLogger;
    import net.sf.l2j.commons.math.MathUtil;
    
    import net.sf.l2j.Instancia.Instance;
    import net.sf.l2j.Instancia.InstanceManager;
    import net.sf.l2j.gameserver.enums.ZoneId;
    import net.sf.l2j.gameserver.enums.items.ShotType;
    import net.sf.l2j.gameserver.idfactory.IdFactory;
    import net.sf.l2j.gameserver.model.actor.Creature;
    import net.sf.l2j.gameserver.model.actor.Playable;
    import net.sf.l2j.gameserver.model.actor.Player;
    import net.sf.l2j.gameserver.model.actor.instance.Door;
    import net.sf.l2j.gameserver.model.actor.instance.Fence;
    import net.sf.l2j.gameserver.model.location.Location;
    import net.sf.l2j.gameserver.model.location.SpawnLocation;
    import net.sf.l2j.gameserver.model.zone.type.subtype.ZoneType;
    import net.sf.l2j.gameserver.network.serverpackets.ActionFailed;
    
    /**
     * Mother class of all interactive objects in the world (PC, NPC, Item...)
     */
    public abstract class WorldObject
    {
    	public static final CLogger LOGGER = new CLogger(WorldObject.class.getName());
    	
    	private String _name;
    	private int _objectId;
    	
    	private final SpawnLocation _position = new SpawnLocation(0, 0, 0, 0);
    	private WorldRegion _region;
    	
    	private boolean _isVisible;
    	
    	public WorldObject(int objectId)
    	{
    		_objectId = objectId;
    	}
    	
    	private int _instanceId;
    	
    	/**
    	 * @param instanceId Specify the instance id
    	 * @param silent If silent is true, it will just set the instance id, and await a knowlist change(like teleport), if false it will force instance teleportation
    	 */
    	public void setInstanceId(int instanceId, boolean silent)
    	{
    		int oldInstance = _instanceId;
    		
    		_instanceId = instanceId;
    		
    		if (instanceId != 0)
    		{
    			
    			if (oldInstance != 0 && this instanceof Player)
    			{
    				Instance ins = InstanceManager.getInstance().getInstanceId(oldInstance);
    				
    				if (ins != null) // Destroyed already.
    					ins.remove((Player) this, false, false);
    			}
    			
    			Instance ins = InstanceManager.getInstance().getInstanceId(instanceId);
    			
    			if (ins == null)
    			{
    				LOGGER.info("Cannot find instance with id[" + instanceId + "]. Aborting!");
    				_instanceId = 0;
    				return;
    			}
    			ins.addObject(this);
    		}
    		
    		if (!silent)
    		{
    			decayMe();
    			spawnMe();
    		}
    	}
    	
    	public int getInstanceId()
    	{
    		return _instanceId;
    	}
    	
    	public boolean isAttackableBy(Creature attacker)
    	{
    		return false;
    	}
    	
    	public boolean isAttackableWithoutForceBy(Playable attacker)
    	{
    		return false;
    	}
    	
    	@Override
    	public String toString()
    	{
    		return (getClass().getSimpleName() + ":" + getName() + "[" + getObjectId() + "]");
    	}
    	
    	public void onAction(Player player, boolean isCtrlPressed, boolean isShiftPressed)
    	{
    		player.sendPacket(ActionFailed.STATIC_PACKET);
    	}
    	
    	public void onSpawn()
    	{
    	}
    	
    	/**
    	 * Remove this {@link WorldObject} from the world.
    	 */
    	public void decayMe()
    	{
    		setRegion(null);
    		
    		World.getInstance().removeObject(this);
    	}
    	
    	public void refreshID()
    	{
    		World.getInstance().removeObject(this);
    		IdFactory.getInstance().releaseId(getObjectId());
    		_objectId = IdFactory.getInstance().getNextId();
    	}
    	
    	/**
    	 * Spawn this {@link WorldObject} and add it in the world as a visible object.
    	 */
    	public final void spawnMe()
    	{
    		_isVisible = true;
    		
    		setRegion(World.getInstance().getRegion(_position));
    		
    		World.getInstance().addObject(this);
    		
    		onSpawn();
    	}
    	
    	/**
    	 * Initialize the position of this {@link WorldObject} and add it in the world as a visible object.
    	 * @param loc : The location used as reference X/Y/Z.
    	 */
    	public final void spawnMe(Location loc)
    	{
    		spawnMe(loc.getX(), loc.getY(), loc.getZ());
    	}
    	
    	/**
    	 * Initialize the position of this {@link WorldObject} and add it in the world as a visible object.
    	 * @param loc : The location used as reference X/Y/Z.
    	 * @param heading : The heading position to set.
    	 */
    	public final void spawnMe(Location loc, int heading)
    	{
    		spawnMe(loc.getX(), loc.getY(), loc.getZ(), heading);
    	}
    	
    	/**
    	 * Initialize the position of this {@link WorldObject} and add it in the world as a visible object.
    	 * @param loc : The location used as reference X/Y/Z.
    	 */
    	public final void spawnMe(SpawnLocation loc)
    	{
    		spawnMe(loc.getX(), loc.getY(), loc.getZ(), loc.getHeading());
    	}
    	
    	/**
    	 * Initialize the position of this {@link WorldObject} and add it in the world as a visible object.
    	 * @param x : The X position to set.
    	 * @param y : The Y position to set.
    	 * @param z : The Z position to set.
    	 */
    	public final void spawnMe(int x, int y, int z)
    	{
    		_position.set(MathUtil.limit(x, World.WORLD_X_MIN, World.WORLD_X_MAX), MathUtil.limit(y, World.WORLD_Y_MIN, World.WORLD_Y_MAX), z);
    		
    		spawnMe();
    	}
    	
    	/**
    	 * Initialize the position of this {@link WorldObject} and add it in the world as a visible object.
    	 * @param x : The X position to set.
    	 * @param y : The Y position to set.
    	 * @param z : The Z position to set.
    	 * @param heading : The heading position to set.
    	 */
    	public final void spawnMe(int x, int y, int z, int heading)
    	{
    		_position.set(MathUtil.limit(x, World.WORLD_X_MIN, World.WORLD_X_MAX), MathUtil.limit(y, World.WORLD_Y_MIN, World.WORLD_Y_MAX), z, heading);
    		
    		spawnMe();
    	}
    	
    	/**
    	 * @return the visibilty state of this {@link WorldObject}.
    	 */
    	public final boolean isVisible()
    	{
    		return _region != null && _isVisible;
    	}
    	
    	public final void setIsVisible(boolean value)
    	{
    		_isVisible = value;
    		
    		if (!_isVisible)
    			setRegion(null);
    	}
    	
    	public final String getName()
    	{
    		return _name;
    	}
    	
    	public void setName(String value)
    	{
    		_name = value;
    	}
    	
    	public final int getObjectId()
    	{
    		return _objectId;
    	}
    	
    	public Player getActingPlayer()
    	{
    		return null;
    	}
    	
    	/**
    	 * Sends the Server->Client info packet for this {@link WorldObject}.
    	 * @param player : The packet receiver.
    	 */
    	public void sendInfo(Player player)
    	{
    	}
    	
    	/**
    	 * Check if this {@link WorldObject} has charged shot.
    	 * @param type : The type of the shot to be checked.
    	 * @return true if the object has charged shot.
    	 */
    	public boolean isChargedShot(ShotType type)
    	{
    		return false;
    	}
    	
    	/**
    	 * Charging shot into this {@link WorldObject}.
    	 * @param type : The type of the shot to be (un)charged.
    	 * @param charged : true if we charge, false if we uncharge.
    	 */
    	public void setChargedShot(ShotType type, boolean charged)
    	{
    	}
    	
    	/**
    	 * Try to recharge a shot.
    	 * @param physical : The skill is using Soulshots.
    	 * @param magical : The skill is using Spiritshots.
    	 */
    	public void rechargeShots(boolean physical, boolean magical)
    	{
    	}
    	
    	/**
    	 * Check if this {@link WorldObject} is in the given {@link ZoneId}.
    	 * @param zone : The ZoneId to check.
    	 * @return true if the object is in that ZoneId.
    	 */
    	public boolean isInsideZone(ZoneId zone)
    	{
    		return false;
    	}
    	
    	/**
    	 * Set the position of this {@link WorldObject} and if necessary modify its _region.
    	 * @param x : The X position to set.
    	 * @param y : The Y position to set.
    	 * @param z : The Z position to set.
    	 */
    	public final void setXYZ(int x, int y, int z)
    	{
    		_position.set(x, y, z);
    		
    		if (!isVisible())
    			return;
    		
    		final WorldRegion region = World.getInstance().getRegion(_position);
    		if (region != _region)
    			setRegion(region);
    	}
    	
    	/**
    	 * Set the position of this {@link WorldObject} and if necessary modify its _region.
    	 * @param loc : The SpawnLocation used as reference.
    	 */
    	public final void setXYZ(SpawnLocation loc)
    	{
    		_position.set(loc);
    		
    		if (!isVisible())
    			return;
    		
    		final WorldRegion region = World.getInstance().getRegion(_position);
    		if (region != _region)
    			setRegion(region);
    	}
    	
    	/**
    	 * Set the position of this {@link WorldObject} using a WorldObject reference position, and if necessary modify its _region.
    	 * @param object : The WorldObject used as reference.
    	 */
    	public final void setXYZ(WorldObject object)
    	{
    		setXYZ(object.getPosition());
    	}
    	
    	/**
    	 * Set the position of this {@link WorldObject} and make it invisible.
    	 * @param x : The X position to set.
    	 * @param y : The Y position to set.
    	 * @param z : The Z position to set.
    	 */
    	public final void setXYZInvisible(int x, int y, int z)
    	{
    		_position.set(MathUtil.limit(x, World.WORLD_X_MIN, World.WORLD_X_MAX), MathUtil.limit(y, World.WORLD_Y_MIN, World.WORLD_Y_MAX), z);
    		
    		setIsVisible(false);
    	}
    	
    	public final void setXYZInvisible(Location loc)
    	{
    		setXYZInvisible(loc.getX(), loc.getY(), loc.getZ());
    	}
    	
    	public final int getX()
    	{
    		return _position.getX();
    	}
    	
    	public final int getY()
    	{
    		return _position.getY();
    	}
    	
    	public final int getZ()
    	{
    		return _position.getZ();
    	}
    	
    	public final int getHeading()
    	{
    		return _position.getHeading();
    	}
    	
    	public final SpawnLocation getPosition()
    	{
    		return _position;
    	}
    	
    	public final WorldRegion getRegion()
    	{
    		return _region;
    	}
    	
    	/**
    	 * Update current and surrounding {@link WorldRegion}s, based on both current region and region set as parameter.
    	 * @param newRegion : null to remove the {@link WorldObject}, or the new region.
    	 */
    	public void setRegion(WorldRegion newRegion)
    	{
    		List<WorldRegion> oldAreas = Collections.emptyList();
    		
    		if (_region != null)
    		{
    			_region.removeVisibleObject(this);
    			oldAreas = _region.getSurroundingRegions();
    		}
    		
    		List<WorldRegion> newAreas = Collections.emptyList();
    		
    		if (newRegion != null)
    		{
    			newRegion.addVisibleObject(this);
    			newAreas = newRegion.getSurroundingRegions();
    		}
    		
    		// For every old surrounding area NOT SHARED with new surrounding areas.
    		for (WorldRegion region : oldAreas)
    		{
    			if (!newAreas.contains(region))
    			{
    				// Refresh infos related to zones.
    				for (ZoneType zone : region.getZones())
    					zone.removeKnownObject(this);
    				
    				// Update all objects.
    				for (WorldObject obj : region.getObjects())
    				{
    					if (obj == this)
    						continue;
    					// if not same instance don't add to knownlist
    					if (obj.getInstanceId() != getInstanceId())
    						continue;
    					
    					obj.removeKnownObject(this);
    					removeKnownObject(obj);
    				}
    				
    				// Desactivate the old neighbor region.
    				if (this instanceof Player && region.isEmptyNeighborhood())
    					region.setActive(false);
    			}
    			
    		}
    		
    		// For every new surrounding area NOT SHARED with old surrounding areas.
    		for (WorldRegion region : newAreas)
    		{
    			if (!oldAreas.contains(region))
    			{
    				// Refresh infos related to zones.
    				for (ZoneType zone : region.getZones())
    					zone.addKnownObject(this);
    				
    				// Update all objects.
    				for (WorldObject obj : region.getObjects())
    				{
    					if (obj == this)
    						continue;
    					
    					// if not same instance don't add to knownlist
    					if (obj.getInstanceId() != getInstanceId())
    						continue;
    					
    					obj.addKnownObject(this);
    					addKnownObject(obj);
    				}
    				
    				// Activate the new neighbor region.
    				if (this instanceof Player)
    					region.setActive(true);
    			}
    		}
    		
    		_region = newRegion;
    		
    		for (WorldObject obj : getDifferentInstanceObjects())
    		{
    			if (obj == this)
    				continue;
    			
    			obj.removeKnownObject(this);
    			removeKnownObject(obj);
    			
    		}
    	}
    	
    	/**
    	 * Add a {@link WorldObject} to knownlist.
    	 * @param object : An object to be added.
    	 */
    	public void addKnownObject(WorldObject object)
    	{
    	}
    	
    	/**
    	 * Remove a {@link WorldObject} from knownlist.
    	 * @param object : An object to be removed.
    	 */
    	public void removeKnownObject(WorldObject object)
    	{
    	}
    	
    	/**
    	 * @param target : The WorldObject to check.
    	 * @return true if the {@link WorldObject} set as parameter is registered in same grid of regions than this WorldObject.
    	 */
    	public final boolean knows(WorldObject target)
    	{
    		// Object doesn't exist, return false.
    		if (target == null)
    			return false;
    		
    		// No region set for the current WorldObject, return false.
    		final WorldRegion region = _region;
    		if (region == null)
    			return false;
    		
    		// No region set for the target, return false.
    		final WorldRegion targetRegion = target.getRegion();
    		if (targetRegion == null)
    			return false;
    		
    		// Return instantly true if one surrounding WorldRegions of this WorldObject matches with target WorldRegion.
    		for (WorldRegion reg : region.getSurroundingRegions())
    		{
    			if (reg == targetRegion)
    				return true;
    		}
    		return false;
    	}
    	
    	/**
    	 * Return the knownlist of this {@link WorldObject} for a given object type.
    	 * @param <A> : The object type must be an instance of WorldObject.
    	 * @param type : The class specifying object type.
    	 * @return List<A> : The knownlist of given object type.
    	 */
    	@SuppressWarnings("unchecked")
    	public final <A> List<A> getKnownType(Class<A> type)
    	{
    		final WorldRegion region = _region;
    		if (region == null)
    			return Collections.emptyList();
    		
    		final List<A> result = new ArrayList<>();
    		
    		for (WorldRegion reg : region.getSurroundingRegions())
    		{
    			for (WorldObject obj : reg.getObjects())
    			{
    				if (obj == this || !type.isAssignableFrom(obj.getClass()))
    					continue;
    				
    				if (obj.getInstanceId() != getInstanceId() && !(obj instanceof Fence))
    					continue;
    				result.add((A) obj);
    			}
    		}
    		
    		return result;
    	}
    	
    	/**
    	 * Return the knownlist of this {@link WorldObject} for a given object type.
    	 * @param <A> : The object type must be an instance of WorldObject.
    	 * @param type : The class specifying object type.
    	 * @param predicate : The predicate to match.
    	 * @return List<A> : The knownlist of given object type.
    	 */
    	@SuppressWarnings("unchecked")
    	public final <A> List<A> getKnownType(Class<A> type, Predicate<A> predicate)
    	{
    		final WorldRegion region = _region;
    		if (region == null)
    			return Collections.emptyList();
    		
    		final List<A> result = new ArrayList<>();
    		
    		for (WorldRegion reg : region.getSurroundingRegions())
    		{
    			for (WorldObject obj : reg.getObjects())
    			{
    				if (obj == this || !type.isAssignableFrom(obj.getClass()) || !predicate.test((A) obj))
    					continue;
    				
    				result.add((A) obj);
    			}
    		}
    		
    		return result;
    	}
    	
    	private final List<WorldObject> getDifferentInstanceObjects()
    	{
    		final WorldRegion region = _region;
    		if (region == null)
    			return Collections.emptyList();
    		
    		final List<WorldObject> result = new ArrayList<>();
    		
    		for (WorldRegion reg : region.getSurroundingRegions())
    		{
    			for (WorldObject obj : reg.getObjects())
    			{
    				if (obj == this || obj.getInstanceId() == getInstanceId() || obj instanceof Door || obj instanceof Fence)
    					continue;
    				
    				result.add(obj);
    			}
    		}
    		
    		return result;
    	}
    	
    	/**
    	 * Return the knownlist of this {@link WorldObject} for a given object type within specified radius.
    	 * @param <A> : The object type must be an instance of WorldObject.
    	 * @param type : The class specifying object type.
    	 * @param radius : The radius to check in which object must be located.
    	 * @return List<A> : The knownlist of given object type.
    	 */
    	@SuppressWarnings("unchecked")
    	public final <A> List<A> getKnownTypeInRadius(Class<A> type, int radius)
    	{
    		final WorldRegion region = _region;
    		if (region == null)
    			return Collections.emptyList();
    		
    		final List<A> result = new ArrayList<>();
    		
    		for (WorldRegion reg : region.getSurroundingRegions())
    		{
    			for (WorldObject obj : reg.getObjects())
    			{
    				if (obj == this || !type.isAssignableFrom(obj.getClass()) || !MathUtil.checkIfInRange(radius, this, obj, true))
    					continue;
    				if (obj.getInstanceId() != getInstanceId() && !(obj instanceof Fence))
    					continue;
    				
    				result.add((A) obj);
    			}
    		}
    		
    		return result;
    	}
    	
    	/**
    	 * Return the knownlist of this {@link WorldObject} for a given object type within specified radius.
    	 * @param <A> : The object type must be an instance of WorldObject.
    	 * @param type : The class specifying object type.
    	 * @param radius : The radius to check in which object must be located.
    	 * @param predicate : The predicate to match.
    	 * @return List<A> : The knownlist of given object type.
    	 */
    	@SuppressWarnings("unchecked")
    	public final <A> List<A> getKnownTypeInRadius(Class<A> type, int radius, Predicate<A> predicate)
    	{
    		final WorldRegion region = _region;
    		if (region == null)
    			return Collections.emptyList();
    		
    		final List<A> result = new ArrayList<>();
    		
    		for (WorldRegion reg : region.getSurroundingRegions())
    		{
    			for (WorldObject obj : reg.getObjects())
    			{
    				if (obj == this || !type.isAssignableFrom(obj.getClass()) || !MathUtil.checkIfInRange(radius, this, obj, true) || !predicate.test((A) obj))
    					continue;
    				if (obj.getInstanceId() != getInstanceId() && !(obj instanceof Fence))
    					continue;
    				result.add((A) obj);
    			}
    		}
    		
    		return result;
    	}
    	
    	/**
    	 * Refresh the knownlist for this {@link WorldObject}. Only used by teleport process.
    	 */
    	public final void refreshKnownlist()
    	{
    		final WorldRegion region = _region;
    		if (region == null)
    			return;
    		
    		for (WorldRegion reg : region.getSurroundingRegions())
    		{
    			for (WorldObject obj : reg.getObjects())
    			{
    				if (obj == this)
    					continue;
    				
    				if (obj.getInstanceId() != getInstanceId())
    					continue;
    				
    				obj.addKnownObject(this);
    				addKnownObject(obj);
    			}
    		}
    	}
    	
    	/**
    	 * Fire actions related to region activation.<br>
    	 * <br>
    	 * A region activation occurs when one {@link Player} enters for the first time in this {@link WorldObject}'s {@link WorldRegion} surroundings (self region included).<br>
    	 * <br>
    	 * Additional Player entrances don't activate it. This state is verified by {@link WorldRegion#isActive()}.
    	 */
    	public void onActiveRegion()
    	{
    	}
    	
    	/**
    	 * Fire actions related to region desactivation.<br>
    	 * <br>
    	 * A region desactivation occurs when the last {@link Player} left this {@link WorldObject}'s {@link WorldRegion} surroundings (self region included).<br>
    	 * <br>
    	 * This state is verified by {@link WorldRegion#isActive()}.
    	 */
    	public void onInactiveRegion()
    	{
    	}
    	
    	/**
    	 * @param object : The {@link WorldObject} to test.
    	 * @param radius : The radius to test.
    	 * @return True is this {@link WorldObject} is inside the given radius around the {@link WorldObject} set as parameter.
    	 */
    	public final boolean isIn3DRadius(WorldObject object, int radius)
    	{
    		return _position.isIn3DRadius(object.getPosition(), radius);
    	}
    	
    	/**
    	 * @param loc : The {@link Location} to test.
    	 * @param radius : The radius to test.
    	 * @return True is this {@link WorldObject} is inside the given radius around the {@link Location} set as parameter.
    	 */
    	public final boolean isIn3DRadius(Location loc, int radius)
    	{
    		return _position.isIn3DRadius(loc, radius);
    	}
    	
    	/**
    	 * @param x : The X coord to test.
    	 * @param y : The Y coord to test.
    	 * @param z : The Z coord to test.
    	 * @param radius : The radius to test.
    	 * @return True is this {@link WorldObject} is inside the given radius around the {@link Location} set as parameter.
    	 */
    	public final boolean isIn3DRadius(int x, int y, int z, int radius)
    	{
    		return _position.isIn3DRadius(x, y, z, radius);
    	}
    	
    	/**
    	 * @param object : The {@link WorldObject} to test.
    	 * @return The distance between this {WorldObject} and the {@link WorldObject} set as parameter.
    	 */
    	public final double distance3D(WorldObject object)
    	{
    		return _position.distance3D(object.getPosition());
    	}
    	
    	/**
    	 * @param loc : The {@link Location} to test.
    	 * @return The distance between this {WorldObject} and the {@link Location} set as parameter.
    	 */
    	public final double distance3D(Location loc)
    	{
    		return _position.distance3D(loc);
    	}
    	
    	/**
    	 * @param object : The {@link WorldObject} to test.
    	 * @param radius : The radius to test.
    	 * @return True is this {@link WorldObject} is inside the given radius around the {@link WorldObject} set as parameter.
    	 */
    	public final boolean isIn2DRadius(WorldObject object, int radius)
    	{
    		return _position.isIn2DRadius(object.getPosition(), radius);
    	}
    	
    	/**
    	 * @param loc : The {@link Location} to test.
    	 * @param radius : The radius to test.
    	 * @return True is this {@link WorldObject} is inside the given radius around the {@link Location} set as parameter.
    	 */
    	public final boolean isIn2DRadius(Location loc, int radius)
    	{
    		return _position.isIn2DRadius(loc, radius);
    	}
    	
    	/**
    	 * @param x : The X coord to test.
    	 * @param y : The Y coord to test.
    	 * @param radius : The radius to test.
    	 * @return True is this {@link WorldObject} is inside the given radius around the {@link Location} set as parameter.
    	 */
    	public final boolean isIn2DRadius(int x, int y, int radius)
    	{
    		return _position.isIn2DRadius(x, y, radius);
    	}
    	
    	/**
    	 * @param object : The {@link WorldObject} to test.
    	 * @return The distance - without counting Z - between this {WorldObject} and the {@link WorldObject} set as parameter.
    	 */
    	public final double distance2D(WorldObject object)
    	{
    		return _position.distance2D(object.getPosition());
    	}
    	
    	/**
    	 * @param loc : The {@link Location} to test.
    	 * @return The distance - without counting Z - between this {WorldObject} and the {@link Location} set as parameter.
    	 */
    	public final double distance2D(Location loc)
    	{
    		return _position.distance2D(loc);
    	}
    	
    	/**
    	 * @param target : The {@link WorldObject} target to check.
    	 * @return True if this {@link WorldObject} is behind the {@link WorldObject} target.
    	 */
    	public final boolean isBehind(WorldObject target)
    	{
    		return _position.isBehind(target);
    	}
    	
    	/**
    	 * @param target : The {@link WorldObject} target to check.
    	 * @return True if this {@link WorldObject} is in front of the {@link WorldObject} target.
    	 */
    	public final boolean isInFrontOf(WorldObject target)
    	{
    		return _position.isInFrontOf(target);
    	}
    	
    	/**
    	 * @param target : The {@link WorldObject} target to check.
    	 * @param maxAngle : The angle to check.
    	 * @return True if this {@link WorldObject} is facing the {@link WorldObject} target.
    	 */
    	public final boolean isFacing(WorldObject target, int maxAngle)
    	{
    		return _position.isFacing(target, maxAngle);
    	}
    	
    	/**
    	 * @param player
    	 */
    	public void onInteract(Player player)
    	{
    		
    	}
    	
    }

     

  6. ======================================================
    Index config.java
    =======================================================
    
    	/** Auto-loot */
    	public static boolean AUTO_LOOT;
    	public static boolean AUTO_LOOT_HERBS;
    	public static boolean AUTO_LOOT_RAID;
    	
    +	public static boolean ENABLE_KETRA_VARKAS_DROP;
    +	public static List<RewardHolder> KETRA_ORC_DROP_MANAGER = new ArrayList<>();
    +	public static List<RewardHolder> KETRA_ORC_DROP_VIP_MANAGER = new ArrayList<>();
    
    
    		AUTO_LOOT = server.getProperty("AutoLoot", false);
    		AUTO_LOOT_HERBS = server.getProperty("AutoLootHerbs", false);
    		AUTO_LOOT_RAID = server.getProperty("AutoLootRaid", false);
    		
    +		ENABLE_KETRA_VARKAS_DROP = server.getProperty("EnableSettingsDROP", true);
    +		KETRA_ORC_DROP_MANAGER = parseReward(server, "KETRA_VARKA_DROP_LIST");
    +		KETRA_ORC_DROP_VIP_MANAGER = parseReward(server, "KETRA_VARKA_DROP_LIST_VIP");
    
    
    		public List<IntIntHolder> getRequiredItems(int job)
    		{
    			return _claimItems.get(job);
    		}
    	}
    
    +	private static List<RewardHolder> parseReward(ExProperties propertie, String configName)
    +	{
    +		List<RewardHolder> auxReturn = new ArrayList<>();
    +		
    +		String aux = propertie.getProperty(configName).trim();
    +		for (String randomReward : aux.split(";"))
    +		{
    +			final String[] infos = randomReward.split(",");
    +			if (infos.length > 2)
    +				auxReturn.add(new RewardHolder(Integer.valueOf(infos[0]), Integer.valueOf(infos[1]), Integer.valueOf(infos[2])));
    +			else
    +				auxReturn.add(new RewardHolder(Integer.valueOf(infos[0]), Integer.valueOf(infos[1])));
    +		}
    +		return auxReturn;
    +	}
    
    ========================================================================
    Index RewardHolder.java
    ========================================================================
    +package net.sf.l2j.gameserver.model.holder;
    +
    +public class RewardHolder
    +{
    +	private int _id;
    +	private int _count;
    +	private int _chance;
    +	
    +	/**
    +	 * @param rewardId
    +	 * @param rewardCount
    +	 */
    +	public RewardHolder(int rewardId, int rewardCount)
    +	{
    +		_id = rewardId;
    +		_count = rewardCount;
    +		_chance = 100;
    +	}
    +	
    +	/**
    +	 * @param rewardId
    +	 * @param rewardCount
    +	 * @param rewardChance
    +	 */
    +	public RewardHolder(int rewardId, int rewardCount, int rewardChance)
    +	{
    +		_id = rewardId;
    +		_count = rewardCount;
    +		_chance = rewardChance;
    +	}
    +	
    +	public int getRewardId()
    +	{
    +		return _id;
    +	}
    +	
    +	public int getRewardCount()
    +	{
    +		return _count;
    +	}
    +	
    +	public int getRewardChance()
    +	{
    +		return _chance;
    +	}
    +	
    +	public void setId(int id)
    +	{
    +		_id = id;
    +	}
    +	
    +	public void setCount(int count)
    +	{
    +		_count = count;
    +	}
    +	
    +	public void setChance(int chance)
    +	{
    +		_chance = chance;
    +	}
    +}
    
    ========================================================================================================================
    Index: Attackable.java
    ========================================================================================================================
    
    	private boolean _isReturningToSpawnPoint;
    	private boolean _seeThroughSilentMove;
    	private boolean _isNoRndWalk;
    +	private static boolean _canReward = false;
    +	private static HashMap<String, Integer> _playerHwids = new HashMap<>();
    	
    	
    	
    	@Override
    	public boolean doDie(Creature killer)
    	{
    		if (!super.doDie(killer))
    			return false;
    		
    		// Test the ON_KILL ScriptEventType.
    		for (Quest quest : getTemplate().getEventQuests(ScriptEventType.ON_KILL))
    			ThreadPool.schedule(() -> quest.notifyKill(this, killer), 3000);
    			
    +	if (Config.ENABLE_KETRA_VARKAS_DROP)
    +		{
    +			// Check if player is an allied Varka. Reward
    +			if (ArraysUtil.contains(getTemplate().getClans(), "varka_silenos_clan"))
    +				addReward(killer);
    +	
    +			// Check if player is an allied Ketra. Reward
    +			if (ArraysUtil.contains(getTemplate().getClans(), "ketra_orc_clan"))
    +				addReward(killer);
    +		}
    		
    		
    	/**
    	 * @param target : The targeted {@link Creature}.
    	 * @param range : The range to check.
    	 * @param allowPeaceful : If true, peaceful {@link Attackable}s are able to auto-attack.
    	 * @return True if the {@link Creature} used as target is autoattackable, or false otherwise.
    	 */
    	public boolean canAutoAttack(Creature target, int range, boolean allowPeaceful)
    	{
    			if (target instanceof Attackable && isConfused())
    				return GeoEngine.getInstance().canSeeTarget(this, target);
    			
    			if (target instanceof Npc)
    				return false;
    			
    			// Depending on Config, do not allow mobs to attack players in PEACE zones, unless they are already following those players outside.
    			if (!Config.MOB_AGGRO_IN_PEACEZONE && target.isInsideZone(ZoneId.PEACE))
    				return false;
    			
    			// Check if the actor is Aggressive
    			return ((allowPeaceful || isAggressive()) && GeoEngine.getInstance().canSeeTarget(this, target));
    		}
    	}
    	
    +	public final static void addReward(Creature killer)
    +	{
    +		if (killer instanceof Playable)
    +		{
    +			Player player = killer.getActingPlayer();
    +			
    +			if (player.isInParty())
    +			{
    +				List<Player> party = player.getParty().getMembers();
    +				
    +				for (Player member : party)
    +				{
    +					final String pIp = member.getClient().getConnection().getInetAddress().getHostAddress();
    +					
    +					if (!_playerHwids.containsKey(pIp))
    +					{
    +						_playerHwids.put(pIp, 1);
    +						_canReward = true;
    +					}
    +					else
    +					{
    +						int count = _playerHwids.get(pIp);
    +						
    +						if (count < 1)
    +						{
    +							_playerHwids.remove(pIp);
    +							_playerHwids.put(pIp, count + 1);
    +							_canReward = true;
    +						}
    +						else
    +						{
    +							member.sendMessage("Already 1 member of your PC have been rewarded, so this character won't be rewarded.");
    +							_canReward = false;
    +							
    +						}
    +					}
    +					if (_canReward)
    +					{
    +						if (member.isIn3DRadius(killer, 1000))
    +							RandomReward(member);
    +						else
    +							member.sendMessage("You are too far from your party to be rewarded.");
    +					}
    +				}
    +				_playerHwids.clear();
    +			}
    +			else
    +			{
    +				RandomReward(player);
    +			}
    +		}
    +	}
    
    +	public static void RandomReward(Player player)
    +	{
    +		if (player.isVip())
    +		{
    +			for (RewardHolder reward : Config.KETRA_ORC_DROP_VIP_MANAGER)
    +			{
    +				if (Rnd.get(100) <= reward.getRewardChance())
    +				{
    +					if (player.isVip())
    +					{
    +						player.getInventory().addItem("Cube Reward", reward.getRewardId(), reward.getRewardCount(), player, null);
    +						
    +						if (reward.getRewardCount() > 1)
    +							player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.EARNED_S2_S1_S).addItemName(reward.getRewardId()).addItemNumber(reward.getRewardCount()));
    +						else
    +							player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.EARNED_ITEM_S1).addItemName(reward.getRewardId()));
    +					}
    +				}
    +			}
    +		}
    +		else
    +		for (RewardHolder reward : Config.KETRA_ORC_DROP_MANAGER)
    +		{
    +			if (Rnd.get(100) <= reward.getRewardChance())
    +			{
    +			
    +					player.getInventory().addItem("Cube Reward", reward.getRewardId(), reward.getRewardCount(), player, null);
    +					
    +					if (reward.getRewardCount() > 1)
    +						player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.EARNED_S2_S1_S).addItemName(reward.getRewardId()).addItemNumber(reward.getRewardCount()));
    +					else
    +						player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.EARNED_ITEM_S1).addItemName(reward.getRewardId()));
    +				
    +			}
    +		}
    +	}
    
    ========================================================================================================================
    Index: server.properties
    ========================================================================================================================
    # AutoLoot, don't lead herbs behavior. False by default.
    AutoLoot = False
    
    # AutoLoot from raid boss. False by default.
    AutoLootRaid = False
    
    # If False, herbs will drop on ground even if AutoLoot is enabled. False by default.
    AutoLootHerbs = False
    
    +#=============================================================
    +#  VARKAS/KETRA
    +# Monster Clan template = varka_silenos_clan | ketra_orc_clan 
    +# Default = False
    +EnableSettingsDROP = True
    +#=============================================================
    +# for Memeber Party Reward all Items give reward Check Hwid Block Reward same/ip
    +# Format: itemId,count,chance(%);itemId,count,(chance(%)(optional));....
    +KETRA_VARKA_DROP_LIST = 57,1000000,20;9311,75,80;
    +KETRA_VARKA_DROP_LIST_VIP = 57,3000000,40;9311,150,80;

     

  7. seus comando nada abre eu tentei refazer-lo mais nao adianto nao abre html nem funciona no st

     

    DmgSim

    package DamageSimulator;
    
    import java.util.ArrayList;
    import java.util.List;
    
    import net.sf.l2j.commons.lang.StringUtil;
    
    import net.sf.l2j.gameserver.communitybbs.manager.BaseBBSManager;
    import net.sf.l2j.gameserver.data.cache.HtmCache;
    import net.sf.l2j.gameserver.enums.items.WeaponType;
    import net.sf.l2j.gameserver.enums.skills.ShieldDefense;
    import net.sf.l2j.gameserver.model.actor.Player;
    import net.sf.l2j.gameserver.skills.Formulas;
    import net.sf.l2j.gameserver.skills.L2Skill;
    
    /**
     * @author BAN L2JDEV
     *
     */
    public class DmgSim
    {
    	private final List<L2Skill> _skills = new ArrayList<>();
    	private int _skillID = 0;
    	private Player _target = null;
    	private String _attackType = "";
    	protected static final String CB_PATH = "config/Dev/Html/";
    	public DmgSim(){
    		
    	}
    	
    	public void showSimPage(Player player){
    		getPlayerskills(player);
    		final StringBuilder sb = new StringBuilder();
    		int i = 0;
    		
    		StringUtil.append(sb, "<font color=b09979>Available Skills</font> <br><center><table width=260>");
    		for(L2Skill skill : _skills){
    			final boolean isNextLine = i % 6 == 0;
    			if (isNextLine)
    				sb.append("<tr>");
    			StringUtil.append(sb,displayIcons(skill));
    			if (isNextLine)
    				sb.append("</tr>");
    			i++;
    		}
    		StringUtil.append(sb, "</center></table><br>");
    		StringUtil.append(sb, selectedSkill(_skillID));
    		StringUtil.append(sb, "<table width=170><tr><td><center><font color=b09979>Target</font></center></td><td><font color=b09979>Attack Type</font></td></tr>" +
    			"<tr><td><edit var=target width=80 height=10></td><td><combobox width=70 height=10 var=atktype list=AUTOHIT;MAGICAL;PHYSICAL</td></tr></table><br><br>");
    		StringUtil.append(sb, damageDisplay(player,_target));
    		StringUtil.append(sb, "<button value=\"Simulate\" action=\"bypass -h _menuDoSim ", _skillID, " $atktype $target\" width=55 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\">");
    		
    		String html = HtmCache.getInstance().getHtm(CB_PATH + "admin/simulation.htm");
    		html = html.replaceAll("%simpage%", sb.toString());
    		BaseBBSManager.separateAndSend(html, player);
    	}
    	
    	
    	private L2Skill idToSkillConv(int skillID){
    		for(L2Skill skill : _skills){
    			if(skill.getId() == skillID){
    				return skill;
    			}
    		}
    		return null;
    	}
    	
    	private static String calcDamage(Player activePlayer,L2Skill skill,Player target,String atkType){
    		String dmgMsg = "";
    		int damage = 0;
    		
    		boolean pCrit = Formulas.calcCrit(activePlayer.getStatus().getCriticalHit(target, null));
    		ShieldDefense shld = Formulas.calcShldUse(activePlayer, target, skill, true);
    		boolean mCrit = Formulas.calcCrit(activePlayer.getStatus().getMCriticalHit(target, skill));
    		final WeaponType weapon = activePlayer.getAttackType();
    		
    		
    		switch(atkType){
    			case "AUTOHIT":
    				damage = getAutohitDmg(activePlayer,target,shld,pCrit, weapon);
    				if(pCrit)
    					dmgMsg = "<font color=b09979>You used</font> <font color=LEVEL>Normal Hit</font><br1> <font color=LEVEL> Critical</font> <font color=26BEF5>" + damage + "</font> <font color=b09979>damage to</font> <font color=26BEF5>" + target.getName() + "</font><br>";
    				else if(shld != null)
    					dmgMsg = "<font color=b09979>You used</font> <font color=LEVEL>Normal Hit</font><br1> <font color=D02B2B> Shield Block</font> <font color=26BEF5>" + damage + "</font> <font color=b09979>damage to</font> <font color=26BEF5>" + target.getName() + "</font><br>";
    				else
    					dmgMsg = "<font color=b09979>You used</font> <font color=LEVEL>Normal Hit</font><br1> <font color=26BEF5> " + damage + "</font> <font color=b09979>damage to</font> <font color=26BEF5>" + target.getName() + "</font><br>";
    				break;
    			case "MAGICAL":
    				if(skill == null)
    					dmgMsg = "<font color=b09979>You need to select a skill.</font><br>";
    				else
    					if(skill.isMagic()) {
    						damage = getMagicalDmg(activePlayer,target,skill,shld,mCrit,weapon);
    						if(mCrit)
    							dmgMsg = "<font color=b09979>You used</font> <font color=LEVEL>" + skill.getName() + "</font><br1><font color=LEVEL> Critical</font> <font color=26BEF5>" + damage + "</font> <font color=b09979>damage to</font> <font color=26BEF5>" + target.getName() + "</font><br>";
    						else if(shld != null)
    							dmgMsg = "<font color=b09979>You used</font> <font color=LEVEL>" + skill.getName() + "</font><br1><font color=D02B2B> Shield Block</font> <font color=26BEF5>" + damage + "</font> <font color=b09979>damage to</font> <font color=26BEF5>" + target.getName() + "</font><br>";
    						else
    							dmgMsg = "<font color=b09979>You used</font> <font color=LEVEL>" + skill.getName() + "</font><br1><font color=26BEF5>" + damage + "</font> <font color=b09979>damage to</font> <font color=26BEF5>" + target.getName() + "</font><br>";
    					}else
    						dmgMsg = "<font color=b09979>Wrong type of skill.</font><br>";
    				break;
    			case "PHYSICAL":
    				if(skill == null)
    					dmgMsg = "<font color=b09979>You need to select a skill.</font><br>";
    				else
    					if(!skill.isMagic()) {
    						damage = getPhysicalDmg(activePlayer,target,skill,shld,pCrit,weapon);
    						if(pCrit)
    							dmgMsg = "<font color=b09979>You used</font> <font color=LEVEL>" + skill.getName() + "</font><br1><font color=LEVEL> Critical</font> <font color=26BEF5> " + damage + "</font> <font color=b09979>damage to</font> <font color=26BEF5>" + target.getName() + "</font><br>";
    						else if(shld != null)
    							dmgMsg = "<font color=b09979>You used</font> <font color=LEVEL>" + skill.getName() + "</font><br1><font color=D02B2B> Shield Block</font> <font color=26BEF5> " + damage + "</font> <font color=b09979>damage to</font> <font color=26BEF5>" + target.getName() + "</font><br>";
    						else
    							dmgMsg = "<font color=b09979>You used</font> <font color=LEVEL>" + skill.getName() + "</font><br1><font color=26BEF5> " + damage + "</font> <font color=b09979>damage to</font> <font color=26BEF5>" + target.getName() + "</font><br>";
    					}else
    						dmgMsg = "<font color=b09979>Wrong type of skill.</font><br>";
    				break;
    		}
    		return dmgMsg;
    	}
    	
    	private void getPlayerskills(Player player){
    		for(L2Skill skill : player.getSkills().values()){
    			if(skillCondition(skill))
    				_skills.add(skill);
    		}
    	}
    	
    	/**
    	 * Calculate simple hits depending on worn weapon
    	 * Currently checking naked hands, duals , dual fists
    	 * @param attacker 
    	 * @param target 
    	 * @param shld 
    	 * @param crit 
    	 * @param wtype 
    	 * @return damage
    	 */
    	private static int getAutohitDmg(Player attacker,Player target,ShieldDefense shld,boolean crit, WeaponType wtype){
    		int damage = 0;
    		
    		switch(wtype){
    			case DUAL:
    			case DUALFIST:
    				damage = (int) Formulas.calcPhysicalAttackDamage(attacker, target, shld, crit, true) / 2;
    				break;
    			case FIST:
    				damage = (int) Formulas.calcPhysicalAttackDamage(attacker, target, shld, crit, true) / 2;
    				break;
    			default:
    				damage = (int) Formulas.calcPhysicalAttackDamage(attacker, target, shld, crit, true);
    				break;
    		}
    		return damage;
    	}
    	
    	private static int getMagicalDmg(Player attacker,Player target,L2Skill skill,ShieldDefense shield,boolean crit, WeaponType wtype){
    		int damage = 0;
    		if(wtype == WeaponType.FIST)
    			damage = (int) Formulas.calcPhysicalSkillDamage(attacker, target, skill, shield, crit, true);
    		else
    			damage = (int) Formulas.calcPhysicalSkillDamage(attacker, target, skill, shield, crit, true);
    		
    		return damage;
    	}
    	/**
    	 * Todo Add condition checks for all physical skill usages ex. dagger for blow type skills etc..etc..
    	 * @param attacker 
    	 * @param target 
    	 * @param skill 
    	 * @param shield 
    	 * @param crit 
    	 * @param wtype 
    	 * @return 
    	 */
    	private static int getPhysicalDmg(Player attacker,Player target,L2Skill skill,ShieldDefense shield,boolean crit, WeaponType wtype){
    		int damage = 0;
    		if(wtype == WeaponType.FIST)
    			damage = 0;
    		else
    			damage = (int) Formulas.calcPhysicalSkillDamage(attacker, target, skill, shield, crit, true);
    		
    		return damage;
    	}
    	
    	public String displayIcons(L2Skill skill){
    		String tempHolder = "";
    		if(skill.getId() < 10)
    			tempHolder = "<td><button action=\"bypass -h _menuSelectSkill "+ skill.getId()+ "\" width=32 height=32 back=\"icon.skill000"+skill.getId()+"\" fore=\"icon.skill000"+skill.getId()+"\"></td>";
    		else if(skill.getId() < 100)
    			tempHolder = "<td><button action=\"bypass -h _menuSelectSkill "+ skill.getId()+ "\" width=32 height=32 back=\"icon.skill00"+skill.getId()+"\" fore=\"icon.skill00"+skill.getId()+"\"></td>";
    		else if(skill.getId() < 1000)
    			tempHolder = "<td><button action=\"bypass -h _menuSelectSkill "+ skill.getId()+ "\" width=32 height=32 back=\"icon.skill0"+skill.getId()+"\" fore=\"icon.skill0"+skill.getId()+"\"></td>";
    		else
    			tempHolder = "<td><button action=\"bypass -h _menuSelectSkill "+ skill.getId()+ "\" width=32 height=32 back=\"icon.skill"+skill.getId()+"\" fore=\"icon.skill"+skill.getId()+"\"></td>";
    		
    		return tempHolder;
    	}
    	
    	/**
    	 * Check for the selected skill to display, 0 for the default display msg which is word empty
    	 * @param skillid to make the checks
    	 * @return the message to display
    	 */
    	public String selectedSkill(int skillid){
    		String result = "";
    		if(skillid == 0)
    			result = "<font color=b09979>Selected Skill</font> [Empty]<br1>";
    		else
    			result = "<font color=b09979>Selected Skill</font> [<font color=LEVEL>"+idToSkillConv(skillid).getName()+"</font>]<br1>";
    		
    		return result;
    	}
    	
    	
    	/**
    	 * Simple checks for target
    	 * @param attacker 
    	 * @param target
    	 * @return the damage to display if the field is not empty
    	 */
    	public String damageDisplay(Player attacker,Player target){
    		String result = "";
    		if(target != null && target instanceof Player){
    			result = calcDamage(attacker,idToSkillConv(_skillID),target,_attackType);
    		}else
    			result = "<br1><font color=b09979>Target field is Empty.</font><br>";
    		
    		return result;
    	}
    	
    	/**
    	 * Which skills to allow for display
    	 * @param skill to make checks on
    	 * @return true or false
    	 */
    	public boolean skillCondition(L2Skill skill){
    		boolean tempHolder = false;
    		switch(skill.getSkillType()){
    			case CHARGEDAM:
    			case PDAM:
    			case MDAM:
    			case BLOW:
    			case DRAIN:
    			case DRAIN_SOUL:
    				tempHolder = true;
    				break;
    			case BLEED:
    			case MANADAM:
    			case POISON:
    			case PASSIVE:
    			case DEBUFF:
    			case BUFF:
    			case WARRIOR_BANE:
    			case MAGE_BANE:
    			case CANCEL:
    			case SUMMON:
    			case EXTRACTABLE_FISH:
    			case EXTRACTABLE:
    			case CREATE_ITEM:
    			case DWARVEN_CRAFT:
    			case COMMON_CRAFT:
    			case GIVE_SP:
    			case MANAHEAL_PERCENT:
    			case HEAL_PERCENT:
    			case MANARECHARGE:
    			case HEAL_STATIC:
    			case BALANCE_LIFE:
    			case MPHOT:
    			case HOT:
    			case COMBATPOINTHEAL:
    			case MANAHEAL:
    			case HEAL:
    			case WEAKNESS:
    			case PARALYZE:
    			case MUTE:
    			case SLEEP:
    			case FEAR:
    			case CONFUSION:
    			case ROOT:
    			case STUN:
    				tempHolder = false;
    				break;
    		}
    		return tempHolder;
    	}
    	
    	public void setTarget(Player target){
    		_target = target;
    	}
    	
    	public void setAttackType(String atktyp){
    		_attackType = atktyp;
    	}
    	public void setskillIDD(int skillid){
    		_skillID = skillid;
    	}
    	
    	public int getskillID(){
    		return _skillID;
    	}
    	
    	public Player getTarget(){
    		return _target;
    	}
    	
    }

    fiz commando admin handler /  voiced handler byass

    nada funciona

    nao mostra erro em gs

  8. Index: aCis_datapack/data/xml/zones/ArenaZone.xml
    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
    ===================================================================
    diff --git a/aCis_datapack/data/xml/zones/ArenaZone.xml b/aCis_datapack/data/xml/zones/ArenaZone.xml
    --- a/aCis_datapack/data/xml/zones/ArenaZone.xml	(revision fe710a9694c725982e80c3db5037128ed3f0ca02)
    +++ b/aCis_datapack/data/xml/zones/ArenaZone.xml	(revision c59220ae01b62d03a4f1394ba1ce52853868bbab)
    @@ -6,18 +6,21 @@
     		<node x="12937" y="183019"/>
     		<node x="12943" y="184010"/>
     		<node x="11941" y="184010"/>
    +		<spawn type="NORMAL" x="12661" y="181687" z="-3560"/>
     	</zone>
     	<zone shape="NPoly" minZ="-3752" maxZ="-3352"><!-- gludin_pvp -->
     		<node x="-88411" y="141732"/>
     		<node x="-87429" y="141733"/>
     		<node x="-87429" y="142708"/>
     		<node x="-88408" y="142708"/>
    +		<spawn type="NORMAL" x="-86979" y="142402" z="-3643"/>
     	</zone>
     	<zone shape="NPoly" minZ="-3850" maxZ="-3350"><!-- giran_pvp_battle -->
     		<node x="72493" y="142263"/>
     		<node x="73493" y="142264"/>
     		<node x="73493" y="143261"/>
     		<node x="72495" y="143258"/>
    +		<spawn type="NORMAL" x="73890" y="142656" z="-3778"/>
     	</zone>
     	<zone shape="NPoly" minZ="-3498" maxZ="-3298"><!-- colosseum_battle -->
     		<node x="150948" y="46483" />
    @@ -36,5 +39,6 @@
     		<node x="151220" y="47493" />
     		<node x="151216" y="47259" />
     		<node x="150947" y="46960" />
    +		<spawn type="NORMAL" x="147451" y="46728" z="-3298"/>
     	</zone>
     </list>
    \ No newline at end of file
    Index: aCis_gameserver/java/net/sf/l2j/gameserver/data/xml/MapRegionData.java
    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
    ===================================================================
    diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/data/xml/MapRegionData.java b/aCis_gameserver/java/net/sf/l2j/gameserver/data/xml/MapRegionData.java
    --- a/aCis_gameserver/java/net/sf/l2j/gameserver/data/xml/MapRegionData.java	(revision fe710a9694c725982e80c3db5037128ed3f0ca02)
    +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/data/xml/MapRegionData.java	(revision 1ff70bc80187be81e9301b350b234e26f781a3d9)
    @@ -22,6 +22,8 @@
     import net.sf.l2j.gameserver.model.entity.Castle;
     import net.sf.l2j.gameserver.model.entity.Siege;
     import net.sf.l2j.gameserver.model.location.Location;
    +import net.sf.l2j.gameserver.model.zone.ZoneForm;
    +import net.sf.l2j.gameserver.model.zone.type.ArenaZone;
     import net.sf.l2j.gameserver.model.zone.type.TownZone;
     
     import org.w3c.dom.Document;
    @@ -46,7 +48,7 @@
     	private static final int REGIONS_Y = 16;
     	
     	private static final Location MDT_LOCATION = new Location(12661, 181687, -3560);
    -	
    +
     	private final int[][] _regions = new int[REGIONS_X][REGIONS_Y];
     	
     	protected MapRegionData()
    @@ -228,7 +230,15 @@
     		// The player is in MDT, move him out.
     		if (player.isInsideZone(ZoneId.MONSTER_TRACK))
     			return MDT_LOCATION;
    -		
    +
    +		// The player is in Arena zone type, move him out.
    +		if (player.isInsideZone(ZoneId.ARENA)) {
    +			ArenaZone arenaZone = ZoneManager.getInstance().getZone(player, ArenaZone.class);
    +			if(arenaZone != null && !arenaZone.getSpawns(SpawnType.NORMAL).isEmpty()){
    +				return arenaZone.getRndSpawn(SpawnType.NORMAL);
    +			}
    +		}
    +
     		if (teleportType != TeleportType.TOWN && player.getClan() != null)
     		{
     			if (teleportType == TeleportType.CLAN_HALL)
    Index: aCis_gameserver/java/net/sf/l2j/gameserver/enums/ZoneId.java
    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
    ===================================================================
    diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/enums/ZoneId.java b/aCis_gameserver/java/net/sf/l2j/gameserver/enums/ZoneId.java
    --- a/aCis_gameserver/java/net/sf/l2j/gameserver/enums/ZoneId.java	(revision fe710a9694c725982e80c3db5037128ed3f0ca02)
    +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/enums/ZoneId.java	(revision 1ff70bc80187be81e9301b350b234e26f781a3d9)
    @@ -21,7 +21,8 @@
     	CAST_ON_ARTIFACT(16),
     	NO_RESTART(17),
     	SCRIPT(18),
    -	BOSS(19);
    +	BOSS(19),
    +	ARENA(20);
     	
     	private final int _id;
     	
    Index: aCis_gameserver/java/net/sf/l2j/gameserver/model/zone/type/ArenaZone.java
    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
    ===================================================================
    diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/model/zone/type/ArenaZone.java b/aCis_gameserver/java/net/sf/l2j/gameserver/model/zone/type/ArenaZone.java
    --- a/aCis_gameserver/java/net/sf/l2j/gameserver/model/zone/type/ArenaZone.java	(revision fe710a9694c725982e80c3db5037128ed3f0ca02)
    +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/model/zone/type/ArenaZone.java	(revision 1ff70bc80187be81e9301b350b234e26f781a3d9)
    @@ -3,13 +3,14 @@
     import net.sf.l2j.gameserver.enums.ZoneId;
     import net.sf.l2j.gameserver.model.actor.Creature;
     import net.sf.l2j.gameserver.model.actor.Player;
    +import net.sf.l2j.gameserver.model.zone.type.subtype.SpawnZoneType;
     import net.sf.l2j.gameserver.model.zone.type.subtype.ZoneType;
     import net.sf.l2j.gameserver.network.SystemMessageId;
     
     /**
      * A zone extending {@link ZoneType}, where summoning is forbidden. The place is considered a pvp zone (no flag, no karma). It is used for arenas.
      */
    -public class ArenaZone extends ZoneType
    +public class ArenaZone extends SpawnZoneType
     {
     	public ArenaZone(int id)
     	{
    @@ -24,6 +25,7 @@
     		
     		character.setInsideZone(ZoneId.PVP, true);
     		character.setInsideZone(ZoneId.NO_SUMMON_FRIEND, true);
    +		character.setInsideZone(ZoneId.ARENA, true);
     	}
     	
     	@Override
    @@ -31,7 +33,8 @@
     	{
     		character.setInsideZone(ZoneId.PVP, false);
     		character.setInsideZone(ZoneId.NO_SUMMON_FRIEND, false);
    -		
    +		character.setInsideZone(ZoneId.ARENA, false);
    +
     		if (character instanceof Player)
     			((Player) character).sendPacket(SystemMessageId.LEFT_COMBAT_ZONE);
     	}

     

  9. PT-BR

    Spoiler

    Venho trazer pra vocês um pequeno esquema em java para o jogador ganhar determinados items de Grad D não e grande coisa mais você pode alterar pra outros grad sem problemas.
    bom eu fiz esse item no intuito que quando o jogador fizer sua primeira jobº usando o gato de classes ele ganha esse item que ao abrir dará todos os Items equipados para continuar sua jornada. 

     

     

    EN

    Spoiler

    I come to bring you a small scheme in java for the player to win certain items from Grad D is not big thing but you can change to other grad without problems.
    well I made this item in order that when the player does his first task using the class cat he gets this item that when opening all equipped items to continue his journey.

    image.png

    https://pastebin.com/yfBeK9r0

    • Like 1
    • Upvote 1
    • Dungeon Event Instancia
    • ItemsHandler ClanItem, NobleItem, HeroItem7Days, HeroItem30Days, HeroItemEternal,
    • Add Ant-Zerg BossZone Max Clan/Ally Member Permanence Zone
    • Add Send Donate Admin Command Reward Player/name Online and Offline Player.
    • Add Premium/VIP and XP | SP | DROP | DROP-ADENA |
    • Add IconTable data/xml/icons.xml
    • Block Class Use Equipe Bow
    • Check HP Title Type Monster

     

     

    Spoiler
    
    Download Compiled Filles: https://mega.nz/file/BRYQQDzL#r7Bw4sp-3h8RtsOMFOeQU-adoEVi1rNHVvOxlZRsh2U
    
    Trunk_399 Edit Soucer : https://mega.nz/file/pNhX3SqY#jA7_Nm8CIfstZ628fEdczTSgjFq4aDOckxdvtEZqp5o
    
    MariaDB: https://mega.nz/file/YBIXXSgY#9xqdkVMXAXY3VPNkBs6R05rnzJ9bH6aU47y2WNLfri4 
    JDK-11: https://mega.nz/file/JBYDDKJL#09VBtDqAepkTXkqnqRIsnOilEH4NJypEThHgr5fXbpY 
    Navicat: https://mega.nz/file/IUhwVLCb#hv3Ak3U_s_mR66XcsXRx1EMjxE7-O6vrSj-wmxMAdcg Geodata: https://mega.nz/file/1IJjRYKI#NWsguWD4uAc3DmUB23nSxSTBRk2ipVlLFVHMki3SETc

     

    • Thanks 1
×
×
  • Create New...