Você não é registrado, por favor registre-se para ter acesso ao conteúdo completo.
Caso seja registrado, efetue login.
Esqueceu sua senha? Clique aqui
Recomendamos o uso do Mozilla Firefox para uma melhor visualização.    


Início Postados Hoje Marcar Fóruns Como Lidos Álbums Banidos SE Team Medalhas
Voltar   Secret Experience > Área L2J > [L2J] Downloads > [Lineage] Java Mods
Registrar Loteria VIPStaff SERegras do fórum Membros Arcade Pesquisar Postados Hoje Marcar Fóruns Como Lidos Experience
   

Secret Experience.NET   Secret Experience Corporation - Welcome To The Real World
     Anúncios SE

Resposta
 
LinkBack Ferramentas do Tópico Modos de Exibição
Antigo 17-05-2010, 03:44 PM   #1 (permalink)
Membro - Veterano
 
Avatar de Guma
 
Registrado em: Sep 2009
Localização: Florianopolis (sc)
Posts: 591
Agradeceu: 72
Agradecido 724 Vezes em 241 Posts
Achei Ruim:
Acharam ruim Vezes em Posts
Meu Estado:
Enviar mensagem via Windows Live Messenger para Guma
Nome Real: i'm Guma

Inventório de Guma

Padrão .delevel command

Código: [Somente Usuários Registrados Podem Visualizar os Links Desta PáginaClique aqui para se Registrar]
/*
 * 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 com.l2emu.gameserver.handler.voicedcommandhandlers;

import com.l2emu.gameserver.handler.IVoicedCommandHandler;
import com.l2emu.gameserver.model.actor.instance.L2PcInstance;
import com.l2emu.gameserver.model.base.Experience;

/**
 * @author Intrepid
 */
public class delevel implements IVoicedCommandHandler
{
	private static final String[] VOICED_COMMANDS = {"delevel"};
	
	public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target)
	{
		if (command.equalsIgnoreCase("delevel"))
		{
			activeChar.destroyItemByItemId("Consume", 57, 10000000, activeChar, true);
			activeChar.getStat().removeExpAndSp((activeChar.getExp() - Experience.LEVEL[activeChar.getStat().getLevel() - 1]), 0);
		}
		return true;
		
	}
	public String[] getVoicedCommandList()
	{
		return VOICED_COMMANDS;
	}
}
creditos : Intrepid

Guma está offline  
Links Patrocinados
Antigo 19-05-2010, 12:00 AM   #2 (permalink)
Membro - Sargento
 
Avatar de UchihaItachI
 
Registrado em: Apr 2010
Posts: 31
Agradeceu: 21
Agradecido 11 Vezes em 2 Posts
Achei Ruim:
Acharam ruim Vezes em Posts
Meu Estado:

Inventório de UchihaItachI

Padrão

Como lhe falei em mp guma,
procurei procurei e não achei
sei que tem feito porem nao acho nem a pau
o comand voice
.xpon que abilita oa experiencia normalmente e o comand voice
.xpoff que restring o char de obter exp.
desde ja agrade
ate ++

UchihaItachI está offline   Responder com Citação
Antigo 09-12-2010, 07:21 PM   #3 (permalink)
Membro - Tenente
 
Avatar de Lanterna-Verde
 
Registrado em: Mar 2010
Posts: 106
Agradeceu: 43
Agradecido 140 Vezes em 45 Posts
Achei Ruim:
Acharam ruim Vezes em Posts
Meu Estado:

Inventório de Lanterna-Verde

Padrão

@UchihaItachi
Comando: .allow_xp_sp

Crie um documento em java/com/l2jserver/gameserver/handler/voicedcommandhandlers chamado AllowExpAndSp.java
e coloque isto nele:
Código: [Somente Usuários Registrados Podem Visualizar os Links Desta PáginaClique aqui para se Registrar]
package handlers.voicedcommandhandlers;

import com.l2jserver.gameserver.handler.IVoicedCommandHandler;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.network.serverpackets.CreatureSay;
import com.l2jserver.gameserver.network.clientpackets.Say2;

/**
 * Allow player to enable or disable Experience and SP Gain.
 */
public class AllowExpAndSp implements IVoicedCommandHandler
{
	private static final String[] VOICED_COMMANDS =
	{ 
		"allow_xp_sp" 
	};

	public boolean useVoicedCommand(String command, L2PcInstance player, String params)
	{
		if (command.equalsIgnoreCase("allow_xp_sp"))
		{
			if (player != null)
			{
				if (player.canGetExp() == true)
				{
					player.setCanGetExp(false);
					player.sendPacket(new CreatureSay(0, Say2.PARTY, "Server", "Exp and Sp Disabled."));
				}
				else
				{
					player.setCanGetExp(true);
					player.sendPacket(new CreatureSay(0, Say2.PARTY, "Server", "Exp and Sp Enabled."));
				}
			}
		}
		return true;
	}
	
	public String[] getVoicedCommandList()
	{
		return VOICED_COMMANDS;
	}
}
Finalização do Código:

Código: [Somente Usuários Registrados Podem Visualizar os Links Desta PáginaClique aqui para se Registrar]
Index: java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java
===================================================================
--- java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java	(revision 4422)
+++ java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java	(working copy)
@@ -828,6 +828,9 @@
 	
 	private long _pvpFlagLasts;
 	
+	/** Allow Player to receive Exp and Sp */
+	private boolean _canGetExpAndSp = true;
+	
 	public void setPvpFlagLasts(long time)
 	{
 		_pvpFlagLasts = time;
@@ -15162,4 +15165,14 @@
 			L2DatabaseFactory.close(con);
 		}
 	}
-}
+	
+    public final boolean canGetExpAndSp()
+	{
+		return _canGetExpAndSp;
+	}
+	
+	public final void setCanGetExpAndSp(boolean b)
+	{
+		_canGetExpAndSp = b;
+	}
+}
\ No newline at end of file
Index: java/com/l2jserver/gameserver/model/actor/L2Attackable.java
===================================================================
--- java/com/l2jserver/gameserver/model/actor/L2Attackable.java	(revision 4422)
+++ java/com/l2jserver/gameserver/model/actor/L2Attackable.java	(working copy)
@@ -681,6 +681,15 @@
 								sp *= Config.L2JMOD_CHAMPION_REWARDS;
 							}
 							
+							if (attacker instanceof L2PcInstance)
+							{
+								if (((L2PcInstance) attacker).canGetExpAndSp() == false)
+								{
+									exp = 0;
+									sp = 0;
+								}
+							}
+							
 							// Check for an over-hit enabled strike
 							if (attacker instanceof L2PcInstance)
 							{
Index: java/com/l2jserver/gameserver/model/L2Party.java
===================================================================
--- java/com/l2jserver/gameserver/model/L2Party.java	(revision 4422)
+++ java/com/l2jserver/gameserver/model/L2Party.java	(working copy)
@@ -694,7 +694,8 @@
 		{
 			for (L2Character member : rewardedMembers)
 			{
-				if(member.isDead()) continue;
+				if(member.isDead() || !((L2PcInstance) member).canGetExpAndSp()) 
+					continue;
 				
 				penalty = 0;

Lanterna-Verde está offline   Responder com Citação
O seguinte membro ao lado disse Obrigado(a) a : Lanterna-Verde por gostar deste Post :
ManoeL-ADM (09-12-2010)
Resposta

Ferramentas do Tópico
Modos de Exibição

Regras para Posts
Você não pode postar novos tópicos
Você não pode postar respostas
Você não pode postar anexos
Você não pode editar seus posts

Código [IMG] Sim
Código HTML Não
Trackbacks are Sim
Pingbacks are Sim
Refbacks are Sim



Horários baseados na GMT -3. Agora são 08:51 AM.