| Setokaiba |
01-10-2013 05:46 PM |
Teleportar Para Local de PvP (.pvp)
Descrição: Comando .pvp
Teleporta o player para a coordenada definida, bastanto ele digitar o comando no seu chat.
Aplique o patch manualmente:
Crie um arquivo (PvPTeleport) com o conteúdo aludido posteriomente:
Código:
/*
* 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 net.sf.l2j.gameserver.handler.voicedcommandhandlers;
import net.sf.l2j.Config;
import net.sf.l2j.gameserver.handler.IVoicedCommandHandler;
import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
public class PvPTeleport implements IVoicedCommandHandler
{
private static final String[] _voicedCommands =
{
"pvp",
};
public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target)
{
if (command.equalsIgnoreCase("pvp"))
{
if(activeChar.atEvent)
{
activeChar.sendMessage("You are an Event.");
return false;
}
else if(activeChar.isInDuel())
{
activeChar.sendMessage("You are on Duel.");
return false;
}
else if(activeChar.isInOlympiadMode())
{
activeChar.sendMessage("You are in Olympiad");
return false;
}
else if(activeChar.isInCombat())
{
activeChar.sendMessage("You can't teleport in Combat Mod");
return false;
}
else if(activeChar.getParty().isInDimensionalRift())
{
activeChar.sendMessage("You cant do this because you are in Dimensional Rift");
return false;
}
else if (activeChar.isFestivalParticipant())
{
activeChar.sendMessage("You are in a festival.");
return false;
}
else if (activeChar.isInJail())
{
activeChar.sendMessage("You are in Jail.");
return false;
}
else if (activeChar.inObserverMode())
{
activeChar.sendMessage("You are in Observ Mode.");
return false;
}
else if (activeChar.isDead())
{
activeChar.sendMessage("You Dead. Can't Teleport");
return false;
}
else if (activeChar.isFakeDeath())
{
activeChar.sendMessage("You are Dead? week up :D");
return false;
}
if(activeChar.getInventory().getItemByItemId(3470) == null)
{
activeChar.sendMessage("You Need One Gold Bar To Use This.");
return false;
}
activeChar.teleToLocation(Config.PVP_X, Config.PVP_Y, Config.PVP_Z);
activeChar.destroyItemByItemId("Gold Bar", 3470, 1, activeChar, true);
activeChar.sendMessage("You have teleport in PvP Area");
}
return true;
}
public String[] getVoicedCommandList()
{
return _voicedCommands;
}
}
Registre o comando:
Código:
registerVoicedCommandHandler(new PvPTeleport());
Insira essas configurações em Config.Java:
Código:
Index: C:/Documents and Settings/Albion/workspace/Gracia Core/java/net/sf/l2j/Config.java
===================================================================
--- C:/Documents and Settings/Albion/workspace/Gracia Core/java/net/sf/l2j/Config.java (revision 2787)
+++ C:/Documents and Settings/Albion/workspace/Gracia Core/java/net/sf/l2j/Config.java (working copy)
@@ -559,18 +564,45 @@
public static boolean L2JMOD_WEDDING_SAMESEX;
public static boolean L2JMOD_WEDDING_FORMALWEAR;
public static int L2JMOD_WEDDING_DIVORCE_COSTS;
public static boolean L2JMOD_ENABLE_WAREHOUSESORTING_CLAN;
public static boolean L2JMOD_ENABLE_WAREHOUSESORTING_PRIVATE;
public static boolean L2JMOD_ENABLE_WAREHOUSESORTING_FREIGHT;
+ public static int PVP_X;
+ public static int PVP_Y;
+ public static int PVP_Z;
@@ -1776,6 +1810,25 @@
L2JMOD_ENABLE_WAREHOUSESORTING_PRIVATE = Boolean.valueOf(L2JModSettings.getProperty("EnableWarehouseSortingPrivate", "False"));
L2JMOD_ENABLE_WAREHOUSESORTING_FREIGHT = Boolean.valueOf(L2JModSettings.getProperty("EnableWarehouseSortingFreight", "False"));
+ PVP_X = Integer.parseInt(L2JModSettings.getProperty("LocationX", "0"));
+ PVP_Y = Integer.parseInt(L2JModSettings.getProperty("LocationY", "0"));
+ PVP_Z = Integer.parseInt(L2JModSettings.getProperty("LocationZ", "0"));
+
CTF_EVEN_TEAMS = L2JModSettings.getProperty("CTFEvenTeams", "BALANCE");
CTF_ALLOW_INTERFERENCE = Boolean.parseBoolean(L2JModSettings.getProperty("CTFAllowInterference", "false"));
CTF_ALLOW_POTIONS = Boolean.parseBoolean(L2JModSettings.getProperty("CTFAllowPotions", "false"));
CTF_ALLOW_SUMMON = Boolean.parseBoolean(L2JModSettings.getProperty("CTFAllowSummon", "false"));
CTF_ON_START_REMOVE_ALL_EFFECTS = Boolean.parseBoolean(L2JModSettings.getProperty("CTFOnStartRemoveAllEffects", "true"));
@@ -2296,7 +2375,12 @@
else if (pName.equalsIgnoreCase("ChampionRewardHigherLvlItemChance")) L2JMOD_CHAMPION_REWARD_HIGHER_LVL_ITEM_CHANCE = Integer.parseInt(pValue);
else if (pName.equalsIgnoreCase("ChampionRewardItemID")) L2JMOD_CHAMPION_REWARD_ID = Integer.parseInt(pValue);
else if (pName.equalsIgnoreCase("ChampionRewardItemQty")) L2JMOD_CHAMPION_REWARD_QTY = Integer.parseInt(pValue);
-
+
+ //L2JMOD PvP Area (.pvp)
+ else if (pName.equalsIgnoreCase("LocationX")) PVP_X = Integer.parseInt(pValue);
+ else if (pName.equalsIgnoreCase("LocationY")) PVP_Y = Integer.parseInt(pValue);
+ else if (pName.equalsIgnoreCase("LocationZ")) PVP_Z = Integer.parseInt(pValue);
+
// L2JMOD Wedding System
else if (pName.equalsIgnoreCase("AllowWedding")) L2JMOD_ALLOW_WEDDING = Boolean.parseBoolean(pValue);
else if (pName.equalsIgnoreCase("WeddingPrice")) L2JMOD_WEDDING_PRICE = Integer.parseInt(pValue);
else return false;
return true;
}
Insira esse código no arquivo l2jmods.properties:
Código:
#----------------------------------
# PvP Location - (.pvp)
# Put your PvP Location ( x,y,z ) (
# Example (2750, 14762, -7601)
#----------------------------------
LocationX = 0
LocationY = 0
LocationZ = 0
E edite o X, Y, Z dando /loc in game e após definindo o local onde você deseja que seja a área de PvP.
Atenção
Algumas ações podem ser tomadas por jogadores.
Podem utilizar tal comando para escapar das Olimpíadas.
Podem utilizar tal comando para escapar de um evento.
Podem utilizar tal comando quando estiverem com o HP baixo, fungindo assim da possibilidade de morte.
|