|
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 |
|
|||||||
| Registrar | Loteria VIP | Staff SE | Regras do fórum | Comunidade | Arcade | Postados Hoje | Pesquisar | Experience |
|
|
|
||||||||||||||||||||||||||||||||||||
|
|
![]() |
|
|
Ferramentas do Tópico | Modos de Exibição |
|
|
#1 |
|
Membro - Veterano
![]() Registrado em: Sep 2009
Localização: Florianopolis (sc)
Posts: 591
Agradeceu: 72
Agradecido 724 Vezes em 241 Posts
Nome Real: i'm Guma
|
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;
}
}
|
|
|
| Links Patrocinados |
|
|
#2 |
|
Membro - Sargento
![]() Registrado em: Apr 2010
Posts: 31
Agradeceu: 21
Agradecido 11 Vezes em 2 Posts
Achei Ruim:
Acharam ruim Vezes em Posts
Meu Estado:
![]()
|
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 ++ |
|
|
|
|
|
#3 |
|
Membro - Tenente
![]() Registrado em: Mar 2010
Posts: 106
Agradeceu: 43
Agradecido 140 Vezes em 45 Posts
Achei Ruim:
Acharam ruim Vezes em Posts
Meu Estado:
![]()
|
@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;
}
}
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;
|
|
|
|
| O seguinte membro ao lado disse Obrigado(a) a : Lanterna-Verde por gostar deste Post : |
ManoeL-ADM (09-12-2010)
|