Jump to content

12 Anos Online! 🎂


⭐ Links Úteis




⚔️ Servers Apoiadores



🎁 Ofertas







  • 0

ERRO EVENT PARTY


Question

7 answers to this question

Recommended Posts

  • 0

 

Olá! Parece que você colocou o spawn na tabela comum da lista de spawn. se for um raidboss, você deve colocá-lo na tabela raidboss_spawnlist Eu não uso Acis, mas isso pode ser lido no erro gs.

       Facebook friend: https://www.facebook.com/serious.development
         Facebook page: https://www.facebook.com/DevelopmentLineage2/

 

Desenvolvimento e venda de servidores privados, designs, banners, botões, logotipos, planos de fundo html, npcs, criptografia de arquivos, sites. Contate-me!

 

123.png

Link to post
Share on other sites
  • 0

Type desse evento tem que criar uma nova instancia com Nome PartyFarmInstance

Para Configurar o Drop Especifico na Class.
Com essa class Jogadores em Party ganha o mesmo item é se os membros da Party Tiverem o Mesmo IP dropa apenas para 1 conta online Espero ter ajudado

Exemplo:

/*
 * This program is free software: you can redistribute it and/or modify it under
 * the terms of the GNU General Public License as published by the Free Software
 * Foundation, either version 3 of the License, or (at your option) any later
 * version.
 * 
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
 * details.
 * 
 * You should have received a copy of the GNU General Public License along with
 * this program. If not, see <http://www.gnu.org/licenses/>.
 */
package l2j.dev.gameserver.model.actor.instance;

import java.util.HashMap;
import java.util.List;

import l2j.dev.Config;
import l2j.dev.commons.util.Rnd;
import l2j.dev.gameserver.datatables.ItemTable;
import l2j.dev.gameserver.model.actor.Creature;
import l2j.dev.gameserver.model.actor.templates.NpcTemplate;
import l2j.dev.gameserver.network.serverpackets.PlaySound;

public class PartyFarmInstance extends MonsterInstance
{
	public PartyFarmInstance(int objectId, NpcTemplate template)
	{
		super(objectId, template);
	}
	
	@Override
	public boolean doDie(Creature killer)
	{
		
		boolean _canReward = false;
		HashMap<String, Integer> playerIps = new HashMap<>();
		
		if (!super.doDie(killer))
		{
			return false;
		}
		PlayerInstance player = killer.getActingPlayer();
		
		if (player.isInParty())
		{
			List<PlayerInstance> party = player.getParty().getPartyMembers();
			
			for (PlayerInstance member : party)
			{
				String pIp = member.getClient().getConnection().getInetAddress().getHostAddress();
				
				if (!playerIps.containsKey(pIp))
				{
					playerIps.put(pIp, 1);
					_canReward = true;
				}
				else
				{
					int count = playerIps.get(pIp);
					
					if (count < 1)
					{
						playerIps.remove(pIp);
						playerIps.put(pIp, count + 1);
						_canReward = true;
					}
					else
					{
						member.sendMessage("Already 1 member of your ip have been rewarded, so this character won't be rewarded.");
						_canReward = false;
					}
				}
				if (_canReward)
				{
					if (member.isInsideRadius(player, 1600, false, false))
					{
						if (Rnd.get(100) < Config.PARTY_FARM_CHANGE_DROP)
						{
							if (player.isOnline())
							{
								for (int[] reward : Config.PARTY_FARM_ITEM_ID02)
								{
									if (ItemTable.getInstance().createDummyItem(reward[0]).isStackable())
									{
										
										player.addItem("PartyFarm Drop List", reward[0], reward[1], null, true);
									}
									else
									{
										for (int i = 0; i < reward[1]; ++i)
										{
											player.addItem("PartyFarm Drop List", reward[0], 1, null, true);
										}
									}
								}
								player.broadcastPacket(new PlaySound("ItemSound.quest_finish"));
							}
						}
						
					}
					else
					{
						member.sendMessage("You are too far to be rewarded.");
					}
				}
			}
			playerIps.clear();
		}
		else
		{
			if (Rnd.get(100) < Config.PARTY_FARM_CHANGE_DROP)
			{
				if (player.isOnline())
				{
					for (int[] reward : Config.PARTY_FARM_ITEM_ID02)
					{
						if (ItemTable.getInstance().createDummyItem(reward[0]).isStackable())
						{
							
							player.addItem("PartyFarm Drop List", reward[0], reward[1], null, true);
						}
						else
						{
							for (int i = 0; i < reward[1]; ++i)
							{
								player.addItem("PartyFarm Drop List", reward[0], 1, null, true);
							}
						}
					}
					player.broadcastPacket(new PlaySound("ItemSound.quest_finish"));
				}
			}
		}
		
		return true;
	}
}
Edited by BAN - L2JDev

3rQnuhn.gif

Mensagens Pedindo Ajuda serão ignoradas
Caixa de PM não e central de Duvidas ou Pedidos

Meu Pastebin

Link to post
Share on other sites
  • 0
hace 10 minutos, BAN - L2JDev dijo:

Type desse evento tem que criar uma nova instancia com Nome PartyFarmInstance

Para Configurar o Drop Especifico na Class.
Com essa class Jogadores em Party ganha o mesmo item é se os membros da Party Tiverem o Mesmo IP dropa apenas para 1 conta online Espero ter ajudado

Exemplo:

/*
 * This program is free software: you can redistribute it and/or modify it under
 * the terms of the GNU General Public License as published by the Free Software
 * Foundation, either version 3 of the License, or (at your option) any later
 * version.
 * 
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
 * details.
 * 
 * You should have received a copy of the GNU General Public License along with
 * this program. If not, see <http://www.gnu.org/licenses/>.
 */
package l2j.dev.gameserver.model.actor.instance;

import java.util.HashMap;
import java.util.List;

import l2j.dev.Config;
import l2j.dev.commons.util.Rnd;
import l2j.dev.gameserver.datatables.ItemTable;
import l2j.dev.gameserver.model.actor.Creature;
import l2j.dev.gameserver.model.actor.templates.NpcTemplate;
import l2j.dev.gameserver.network.serverpackets.PlaySound;

public class PartyFarmInstance extends MonsterInstance
{
	public PartyFarmInstance(int objectId, NpcTemplate template)
	{
		super(objectId, template);
	}
	
	@Override
	public boolean doDie(Creature killer)
	{
		
		boolean _canReward = false;
		HashMap<String, Integer> playerIps = new HashMap<>();
		
		if (!super.doDie(killer))
		{
			return false;
		}
		PlayerInstance player = killer.getActingPlayer();
		
		if (player.isInParty())
		{
			List<PlayerInstance> party = player.getParty().getPartyMembers();
			
			for (PlayerInstance member : party)
			{
				String pIp = member.getClient().getConnection().getInetAddress().getHostAddress();
				
				if (!playerIps.containsKey(pIp))
				{
					playerIps.put(pIp, 1);
					_canReward = true;
				}
				else
				{
					int count = playerIps.get(pIp);
					
					if (count < 1)
					{
						playerIps.remove(pIp);
						playerIps.put(pIp, count + 1);
						_canReward = true;
					}
					else
					{
						member.sendMessage("Already 1 member of your ip have been rewarded, so this character won't be rewarded.");
						_canReward = false;
					}
				}
				if (_canReward)
				{
					if (member.isInsideRadius(player, 1600, false, false))
					{
						if (Rnd.get(100) < Config.PARTY_FARM_CHANGE_DROP)
						{
							if (player.isOnline())
							{
								for (int[] reward : Config.PARTY_FARM_ITEM_ID02)
								{
									if (ItemTable.getInstance().createDummyItem(reward[0]).isStackable())
									{
										
										player.addItem("PartyFarm Drop List", reward[0], reward[1], null, true);
									}
									else
									{
										for (int i = 0; i < reward[1]; ++i)
										{
											player.addItem("PartyFarm Drop List", reward[0], 1, null, true);
										}
									}
								}
								player.broadcastPacket(new PlaySound("ItemSound.quest_finish"));
							}
						}
						
					}
					else
					{
						member.sendMessage("You are too far to be rewarded.");
					}
				}
			}
			playerIps.clear();
		}
		else
		{
			if (Rnd.get(100) < Config.PARTY_FARM_CHANGE_DROP)
			{
				if (player.isOnline())
				{
					for (int[] reward : Config.PARTY_FARM_ITEM_ID02)
					{
						if (ItemTable.getInstance().createDummyItem(reward[0]).isStackable())
						{
							
							player.addItem("PartyFarm Drop List", reward[0], reward[1], null, true);
						}
						else
						{
							for (int i = 0; i < reward[1]; ++i)
							{
								player.addItem("PartyFarm Drop List", reward[0], 1, null, true);
							}
						}
					}
					player.broadcastPacket(new PlaySound("ItemSound.quest_finish"));
				}
			}
		}
		
		return true;
	}
}

Nel.

Link to post
Share on other 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.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

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

×   Your previous content has been restored.   Clear editor

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

Loading...
×
×
  • Create New...