repair code

Support for the latest build of L2J Server, get help here with installations, upgrades, problems.
Do not post bugs reports here, use viewforum.php?f=77 instead.
There is no support for other server builds than the official provided by l2jserver.com
Forum rules
READ NOW: L2j Forums Rules of Conduct
Post Reply
SHoOcKkiron
Posts: 2
Joined: Sun Feb 14, 2010 12:53 pm

repair code

Post by SHoOcKkiron »

this code dont work. why??

Code: Select all

/* * 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 handlers.voicedcommandhandlers;  import net.sf.l2j.gameserver.handler.IVoicedCommandHandler;import net.sf.l2j.gameserver.instancemanager.CastleManager;import net.sf.l2j.gameserver.model.L2World;import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;import handlers.voicedcommandhandlers.wannapwn; public class wannapwn implements IVoicedCommandHandler{public static final String[] _voicedCommands = { "wannapwn" };/** *  * @see net.sf.l2j.gameserver.handler.IVoicedCommandHandler#useVoicedCommand(java.lang.String, net.sf.l2j.gameserver.model.actor.instance.L2PcInstance, java.lang.String) */public boolean wannapwn(String command, L2PcInstance activeChar, String target){ if (command.equalsIgnoreCase("wannapwn")){ if (activeChar == null){return false;} L2PcInstance player;String targetName = command.substring(17);player = L2World.getInstance().getPlayer(targetName); if(player == null){activeChar.sendMessage("Your target is not online.");return false;}else if(player.isInJail()){activeChar.sendMessage("Your target is in Jail.");return false;}else if(player.isInOlympiadMode()){activeChar.sendMessage("Your target is in the Olympiad now.");return false;}else if(player.atEvent){activeChar.sendMessage("Your target is in an event.");return false;}else if (player.isInDuel()){activeChar.sendMessage("Your target is in a duel.");return false;}else if (player.isFestivalParticipant()){activeChar.sendMessage("Your target is in a festival.");return false;}else if (player.isInParty() && player.getParty().isInDimensionalRift()){activeChar.sendMessage("Your target is in dimensional rift.");return false;}else if (player.inObserverMode()){activeChar.sendMessage("Your target is in the observation.");}else if(player.getClan() != null&& CastleManager.getInstance().getCastleByOwner(player.getClan()) != null&& CastleManager.getInstance().getCastleByOwner(player.getClan()).getSiege().getIsInProgress()){activeChar.sendMessage("Your target is in siege, you can't go to your leader.");return false;} else if(activeChar.isInJail()){activeChar.sendMessage("You are in Jail!");return false;}else if(activeChar.isInOlympiadMode()){activeChar.sendMessage("You are in the Olympiad now.");return false;}else if(activeChar.atEvent){activeChar.sendMessage("You are in an event.");return false;}else if (activeChar.isInDuel()){activeChar.sendMessage("You are in a duel!");return false;}else if (activeChar.inObserverMode()){activeChar.sendMessage("You are in the observation.");}else if(activeChar.getClan() != null&& CastleManager.getInstance().getCastleByOwner(activeChar.getClan()) != null&& CastleManager.getInstance().getCastleByOwner(activeChar.getClan()).getSiege().getIsInProgress()){activeChar.sendMessage("You are in siege, you can't go to your target.");return false;}else if (activeChar.isFestivalParticipant()){activeChar.sendMessage("You are in a festival.");return false;}else if (activeChar.isInParty() && activeChar.getParty().isInDimensionalRift()){activeChar.sendMessage("You are in the dimensional rift.");return false;}else if (activeChar == player){activeChar.sendMessage("You cannot teleport to yourself.");return false;} int playerx;int playery;int playerz; playerx = player.getX();playery = player.getY();playerz = player.getZ(); activeChar.teleToLocation(playerx,playery,playerz);activeChar.sendMessage("You have been teleported to fight!");}return true;}/** *  * @see net.sf.l2j.gameserver.handler.IVoicedCommandHandler#getVoicedCommandList() */public String[] getVoicedCommandList(){return _voicedCommands;;}public static void main(String[] args)	{		new wannapwn();	}@Overridepublic boolean useVoicedCommand(String command, L2PcInstance activeChar,		String target) {	// TODO Auto-generated method stub	return false;}}/* * 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 handlers.voicedcommandhandlers;  import net.sf.l2j.gameserver.handler.IVoicedCommandHandler;import net.sf.l2j.gameserver.instancemanager.CastleManager;import net.sf.l2j.gameserver.model.L2World;import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;import handlers.voicedcommandhandlers.wannapwn; public class wannapwn implements IVoicedCommandHandler{public static final String[] _voicedCommands = { "wannapwn" };/** *  * @see net.sf.l2j.gameserver.handler.IVoicedCommandHandler#useVoicedCommand(java.lang.String, net.sf.l2j.gameserver.model.actor.instance.L2PcInstance, java.lang.String) */public boolean wannapwn(String command, L2PcInstance activeChar, String target){ if (command.equalsIgnoreCase("wannapwn")){ if (activeChar == null){return false;} L2PcInstance player;String targetName = command.substring(17);player = L2World.getInstance().getPlayer(targetName); if(player == null){activeChar.sendMessage("Your target is not online.");return false;}else if(player.isInJail()){activeChar.sendMessage("Your target is in Jail.");return false;}else if(player.isInOlympiadMode()){activeChar.sendMessage("Your target is in the Olympiad now.");return false;}else if(player.atEvent){activeChar.sendMessage("Your target is in an event.");return false;}else if (player.isInDuel()){activeChar.sendMessage("Your target is in a duel.");return false;}else if (player.isFestivalParticipant()){activeChar.sendMessage("Your target is in a festival.");return false;}else if (player.isInParty() && player.getParty().isInDimensionalRift()){activeChar.sendMessage("Your target is in dimensional rift.");return false;}else if (player.inObserverMode()){activeChar.sendMessage("Your target is in the observation.");}else if(player.getClan() != null&& CastleManager.getInstance().getCastleByOwner(player.getClan()) != null&& CastleManager.getInstance().getCastleByOwner(player.getClan()).getSiege().getIsInProgress()){activeChar.sendMessage("Your target is in siege, you can't go to your leader.");return false;} else if(activeChar.isInJail()){activeChar.sendMessage("You are in Jail!");return false;}else if(activeChar.isInOlympiadMode()){activeChar.sendMessage("You are in the Olympiad now.");return false;}else if(activeChar.atEvent){activeChar.sendMessage("You are in an event.");return false;}else if (activeChar.isInDuel()){activeChar.sendMessage("You are in a duel!");return false;}else if (activeChar.inObserverMode()){activeChar.sendMessage("You are in the observation.");}else if(activeChar.getClan() != null&& CastleManager.getInstance().getCastleByOwner(activeChar.getClan()) != null&& CastleManager.getInstance().getCastleByOwner(activeChar.getClan()).getSiege().getIsInProgress()){activeChar.sendMessage("You are in siege, you can't go to your target.");return false;}else if (activeChar.isFestivalParticipant()){activeChar.sendMessage("You are in a festival.");return false;}else if (activeChar.isInParty() && activeChar.getParty().isInDimensionalRift()){activeChar.sendMessage("You are in the dimensional rift.");return false;}else if (activeChar == player){activeChar.sendMessage("You cannot teleport to yourself.");return false;} int playerx;int playery;int playerz; playerx = player.getX();playery = player.getY();playerz = player.getZ(); activeChar.teleToLocation(playerx,playery,playerz);activeChar.sendMessage("You have been teleported to fight!");}return true;}/** *  * @see net.sf.l2j.gameserver.handler.IVoicedCommandHandler#getVoicedCommandList() */public String[] getVoicedCommandList(){return _voicedCommands;;}public static void main(String[] args)	{		new wannapwn();	}@Overridepublic boolean useVoicedCommand(String command, L2PcInstance activeChar,		String target) {	// TODO Auto-generated method stub	return false;}}/* * 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 handlers.voicedcommandhandlers;  import net.sf.l2j.gameserver.handler.IVoicedCommandHandler;import net.sf.l2j.gameserver.instancemanager.CastleManager;import net.sf.l2j.gameserver.model.L2World;import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;import handlers.voicedcommandhandlers.wannapwn; public class wannapwn implements IVoicedCommandHandler{public static final String[] _voicedCommands = { "wannapwn" };/** *  * @see net.sf.l2j.gameserver.handler.IVoicedCommandHandler#useVoicedCommand(java.lang.String, net.sf.l2j.gameserver.model.actor.instance.L2PcInstance, java.lang.String) */public boolean wannapwn(String command, L2PcInstance activeChar, String target){ if (command.equalsIgnoreCase("wannapwn")){ if (activeChar == null){return false;} L2PcInstance player;String targetName = command.substring(17);player = L2World.getInstance().getPlayer(targetName); if(player == null){activeChar.sendMessage("Your target is not online.");return false;}else if(player.isInJail()){activeChar.sendMessage("Your target is in Jail.");return false;}else if(player.isInOlympiadMode()){activeChar.sendMessage("Your target is in the Olympiad now.");return false;}else if(player.atEvent){activeChar.sendMessage("Your target is in an event.");return false;}else if (player.isInDuel()){activeChar.sendMessage("Your target is in a duel.");return false;}else if (player.isFestivalParticipant()){activeChar.sendMessage("Your target is in a festival.");return false;}else if (player.isInParty() && player.getParty().isInDimensionalRift()){activeChar.sendMessage("Your target is in dimensional rift.");return false;}else if (player.inObserverMode()){activeChar.sendMessage("Your target is in the observation.");}else if(player.getClan() != null&& CastleManager.getInstance().getCastleByOwner(player.getClan()) != null&& CastleManager.getInstance().getCastleByOwner(player.getClan()).getSiege().getIsInProgress()){activeChar.sendMessage("Your target is in siege, you can't go to your leader.");return false;} else if(activeChar.isInJail()){activeChar.sendMessage("You are in Jail!");return false;}else if(activeChar.isInOlympiadMode()){activeChar.sendMessage("You are in the Olympiad now.");return false;}else if(activeChar.atEvent){activeChar.sendMessage("You are in an event.");return false;}else if (activeChar.isInDuel()){activeChar.sendMessage("You are in a duel!");return false;}else if (activeChar.inObserverMode()){activeChar.sendMessage("You are in the observation.");}else if(activeChar.getClan() != null&& CastleManager.getInstance().getCastleByOwner(activeChar.getClan()) != null&& CastleManager.getInstance().getCastleByOwner(activeChar.getClan()).getSiege().getIsInProgress()){activeChar.sendMessage("You are in siege, you can't go to your target.");return false;}else if (activeChar.isFestivalParticipant()){activeChar.sendMessage("You are in a festival.");return false;}else if (activeChar.isInParty() && activeChar.getParty().isInDimensionalRift()){activeChar.sendMessage("You are in the dimensional rift.");return false;}else if (activeChar == player){activeChar.sendMessage("You cannot teleport to yourself.");return false;} int playerx;int playery;int playerz; playerx = player.getX();playery = player.getY();playerz = player.getZ(); activeChar.teleToLocation(playerx,playery,playerz);activeChar.sendMessage("You have been teleported to fight!");}return true;}/** *  * @see net.sf.l2j.gameserver.handler.IVoicedCommandHandler#getVoicedCommandList() */public String[] getVoicedCommandList(){return _voicedCommands;;}public static void main(String[] args)	{		new wannapwn();	}@Overridepublic boolean useVoicedCommand(String command, L2PcInstance activeChar,		String target) {	// TODO Auto-generated method stub	return false;}}/* * 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 handlers.voicedcommandhandlers;  import net.sf.l2j.gameserver.handler.IVoicedCommandHandler;import net.sf.l2j.gameserver.instancemanager.CastleManager;import net.sf.l2j.gameserver.model.L2World;import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;import handlers.voicedcommandhandlers.wannapwn; public class wannapwn implements IVoicedCommandHandler{public static final String[] _voicedCommands = { "wannapwn" };/** *  * @see net.sf.l2j.gameserver.handler.IVoicedCommandHandler#useVoicedCommand(java.lang.String, net.sf.l2j.gameserver.model.actor.instance.L2PcInstance, java.lang.String) */public boolean wannapwn(String command, L2PcInstance activeChar, String target){ if (command.equalsIgnoreCase("wannapwn")){ if (activeChar == null){return false;} L2PcInstance player;String targetName = command.substring(17);player = L2World.getInstance().getPlayer(targetName); if(player == null){activeChar.sendMessage("Your target is not online.");return false;}else if(player.isInJail()){activeChar.sendMessage("Your target is in Jail.");return false;}else if(player.isInOlympiadMode()){activeChar.sendMessage("Your target is in the Olympiad now.");return false;}else if(player.atEvent){activeChar.sendMessage("Your target is in an event.");return false;}else if (player.isInDuel()){activeChar.sendMessage("Your target is in a duel.");return false;}else if (player.isFestivalParticipant()){activeChar.sendMessage("Your target is in a festival.");return false;}else if (player.isInParty() && player.getParty().isInDimensionalRift()){activeChar.sendMessage("Your target is in dimensional rift.");return false;}else if (player.inObserverMode()){activeChar.sendMessage("Your target is in the observation.");}else if(player.getClan() != null&& CastleManager.getInstance().getCastleByOwner(player.getClan()) != null&& CastleManager.getInstance().getCastleByOwner(player.getClan()).getSiege().getIsInProgress()){activeChar.sendMessage("Your target is in siege, you can't go to your leader.");return false;} else if(activeChar.isInJail()){activeChar.sendMessage("You are in Jail!");return false;}else if(activeChar.isInOlympiadMode()){activeChar.sendMessage("You are in the Olympiad now.");return false;}else if(activeChar.atEvent){activeChar.sendMessage("You are in an event.");return false;}else if (activeChar.isInDuel()){activeChar.sendMessage("You are in a duel!");return false;}else if (activeChar.inObserverMode()){activeChar.sendMessage("You are in the observation.");}else if(activeChar.getClan() != null&& CastleManager.getInstance().getCastleByOwner(activeChar.getClan()) != null&& CastleManager.getInstance().getCastleByOwner(activeChar.getClan()).getSiege().getIsInProgress()){activeChar.sendMessage("You are in siege, you can't go to your target.");return false;}else if (activeChar.isFestivalParticipant()){activeChar.sendMessage("You are in a festival.");return false;}else if (activeChar.isInParty() && activeChar.getParty().isInDimensionalRift()){activeChar.sendMessage("You are in the dimensional rift.");return false;}else if (activeChar == player){activeChar.sendMessage("You cannot teleport to yourself.");return false;} int playerx;int playery;int playerz; playerx = player.getX();playery = player.getY();playerz = player.getZ(); activeChar.teleToLocation(playerx,playery,playerz);activeChar.sendMessage("You have been teleported to fight!");}return true;}/** *  * @see net.sf.l2j.gameserver.handler.IVoicedCommandHandler#getVoicedCommandList() */public String[] getVoicedCommandList(){return _voicedCommands;;}public static void main(String[] args)	{		new wannapwn();	}@Overridepublic boolean useVoicedCommand(String command, L2PcInstance activeChar,		String target) {	// TODO Auto-generated method stub	return false;}}/* * 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 handlers.voicedcommandhandlers;  import net.sf.l2j.gameserver.handler.IVoicedCommandHandler;import net.sf.l2j.gameserver.instancemanager.CastleManager;import net.sf.l2j.gameserver.model.L2World;import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;import handlers.voicedcommandhandlers.wannapwn; public class wannapwn implements IVoicedCommandHandler{public static final String[] _voicedCommands = { "wannapwn" };/** *  * @see net.sf.l2j.gameserver.handler.IVoicedCommandHandler#useVoicedCommand(java.lang.String, net.sf.l2j.gameserver.model.actor.instance.L2PcInstance, java.lang.String) */public boolean wannapwn(String command, L2PcInstance activeChar, String target){ if (command.equalsIgnoreCase("wannapwn")){ if (activeChar == null){return false;} L2PcInstance player;String targetName = command.substring(17);player = L2World.getInstance().getPlayer(targetName); if(player == null){activeChar.sendMessage("Your target is not online.");return false;}else if(player.isInJail()){activeChar.sendMessage("Your target is in Jail.");return false;}else if(player.isInOlympiadMode()){activeChar.sendMessage("Your target is in the Olympiad now.");return false;}else if(player.atEvent){activeChar.sendMessage("Your target is in an event.");return false;}else if (player.isInDuel()){activeChar.sendMessage("Your target is in a duel.");return false;}else if (player.isFestivalParticipant()){activeChar.sendMessage("Your target is in a festival.");return false;}else if (player.isInParty() && player.getParty().isInDimensionalRift()){activeChar.sendMessage("Your target is in dimensional rift.");return false;}else if (player.inObserverMode()){activeChar.sendMessage("Your target is in the observation.");}else if(player.getClan() != null&& CastleManager.getInstance().getCastleByOwner(player.getClan()) != null&& CastleManager.getInstance().getCastleByOwner(player.getClan()).getSiege().getIsInProgress()){activeChar.sendMessage("Your target is in siege, you can't go to your leader.");return false;} else if(activeChar.isInJail()){activeChar.sendMessage("You are in Jail!");return false;}else if(activeChar.isInOlympiadMode()){activeChar.sendMessage("You are in the Olympiad now.");return false;}else if(activeChar.atEvent){activeChar.sendMessage("You are in an event.");return false;}else if (activeChar.isInDuel()){activeChar.sendMessage("You are in a duel!");return false;}else if (activeChar.inObserverMode()){activeChar.sendMessage("You are in the observation.");}else if(activeChar.getClan() != null&& CastleManager.getInstance().getCastleByOwner(activeChar.getClan()) != null&& CastleManager.getInstance().getCastleByOwner(activeChar.getClan()).getSiege().getIsInProgress()){activeChar.sendMessage("You are in siege, you can't go to your target.");return false;}else if (activeChar.isFestivalParticipant()){activeChar.sendMessage("You are in a festival.");return false;}else if (activeChar.isInParty() && activeChar.getParty().isInDimensionalRift()){activeChar.sendMessage("You are in the dimensional rift.");return false;}else if (activeChar == player){activeChar.sendMessage("You cannot teleport to yourself.");return false;} int playerx;int playery;int playerz; playerx = player.getX();playery = player.getY();playerz = player.getZ(); activeChar.teleToLocation(playerx,playery,playerz);activeChar.sendMessage("You have been teleported to fight!");}return true;}/** *  * @see net.sf.l2j.gameserver.handler.IVoicedCommandHandler#getVoicedCommandList() */public String[] getVoicedCommandList(){return _voicedCommands;;}public static void main(String[] args)	{		new wannapwn();	}@Overridepublic boolean useVoicedCommand(String command, L2PcInstance activeChar,		String target) {	// TODO Auto-generated method stub	return false;}}/* * 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 handlers.voicedcommandhandlers;  import net.sf.l2j.gameserver.handler.IVoicedCommandHandler;import net.sf.l2j.gameserver.instancemanager.CastleManager;import net.sf.l2j.gameserver.model.L2World;import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;import handlers.voicedcommandhandlers.wannapwn; public class wannapwn implements IVoicedCommandHandler{public static final String[] _voicedCommands = { "wannapwn" };/** *  * @see net.sf.l2j.gameserver.handler.IVoicedCommandHandler#useVoicedCommand(java.lang.String, net.sf.l2j.gameserver.model.actor.instance.L2PcInstance, java.lang.String) */public boolean wannapwn(String command, L2PcInstance activeChar, String target){ if (command.equalsIgnoreCase("wannapwn")){ if (activeChar == null){return false;} L2PcInstance player;String targetName = command.substring(17);player = L2World.getInstance().getPlayer(targetName); if(player == null){activeChar.sendMessage("Your target is not online.");return false;}else if(player.isInJail()){activeChar.sendMessage("Your target is in Jail.");return false;}else if(player.isInOlympiadMode()){activeChar.sendMessage("Your target is in the Olympiad now.");return false;}else if(player.atEvent){activeChar.sendMessage("Your target is in an event.");return false;}else if (player.isInDuel()){activeChar.sendMessage("Your target is in a duel.");return false;}else if (player.isFestivalParticipant()){activeChar.sendMessage("Your target is in a festival.");return false;}else if (player.isInParty() && player.getParty().isInDimensionalRift()){activeChar.sendMessage("Your target is in dimensional rift.");return false;}else if (player.inObserverMode()){activeChar.sendMessage("Your target is in the observation.");}else if(player.getClan() != null&& CastleManager.getInstance().getCastleByOwner(player.getClan()) != null&& CastleManager.getInstance().getCastleByOwner(player.getClan()).getSiege().getIsInProgress()){activeChar.sendMessage("Your target is in siege, you can't go to your leader.");return false;} else if(activeChar.isInJail()){activeChar.sendMessage("You are in Jail!");return false;}else if(activeChar.isInOlympiadMode()){activeChar.sendMessage("You are in the Olympiad now.");return false;}else if(activeChar.atEvent){activeChar.sendMessage("You are in an event.");return false;}else if (activeChar.isInDuel()){activeChar.sendMessage("You are in a duel!");return false;}else if (activeChar.inObserverMode()){activeChar.sendMessage("You are in the observation.");}else if(activeChar.getClan() != null&& CastleManager.getInstance().getCastleByOwner(activeChar.getClan()) != null&& CastleManager.getInstance().getCastleByOwner(activeChar.getClan()).getSiege().getIsInProgress()){activeChar.sendMessage("You are in siege, you can't go to your target.");return false;}else if (activeChar.isFestivalParticipant()){activeChar.sendMessage("You are in a festival.");return false;}else if (activeChar.isInParty() && activeChar.getParty().isInDimensionalRift()){activeChar.sendMessage("You are in the dimensional rift.");return false;}else if (activeChar == player){activeChar.sendMessage("You cannot teleport to yourself.");return false;} int playerx;int playery;int playerz; playerx = player.getX();playery = player.getY();playerz = player.getZ(); activeChar.teleToLocation(playerx,playery,playerz);activeChar.sendMessage("You have been teleported to fight!");}return true;}/** *  * @see net.sf.l2j.gameserver.handler.IVoicedCommandHandler#getVoicedCommandList() */public String[] getVoicedCommandList(){return _voicedCommands;;}public static void main(String[] args)	{		new wannapwn();	}@Overridepublic boolean useVoicedCommand(String command, L2PcInstance activeChar,		String target) {	// TODO Auto-generated method stub	return false;}}

this code is a wannapwn. it teleport a player to another player

test and repair please

help me :(
User avatar
theone
Posts: 1384
Joined: Tue Aug 12, 2008 2:28 am
Location: Quebec, Canada

Re: repair code

Post by theone »

Well, first of all your identations are all messed up...
But let me ask you this: Did you at least try to look at the code and find what's not working?
This is not a "debug me this" forum, it's a place to learn and share. Asking "test and repair please" wont convince anyone to help you, and I would be disappointed if anyone did.
First try to fix it yourself, then come back with pertinent questions, and also your complete console error code, then you will get help.
Running a L2J server should be a learning experience, if you dont want to learn then... use an un-modified version.
Nothing you get on these forums(scripts/code) is plug-and-play, but this is half the fun actually. :)
Image
User avatar
BiggBoss
L2j Veteran
L2j Veteran
Posts: 1104
Joined: Wed Apr 15, 2009 3:11 pm
Location: Spain

Re: repair code

Post by BiggBoss »

do you have the permission of the code owner to edit/use it?

//summon DrHouse
Image
User avatar
Mayhem
Posts: 144
Joined: Fri Dec 04, 2009 4:45 pm

Re: repair code

Post by Mayhem »

theone wrote:This is not a "debug me this" forum, it's a place to learn and share. Asking "test and repair please" wont convince anyone to help you, and I would be disappointed if anyone did.
Well that's like your opinion man.
If no one wants to help him no one will. If someone wants to help him, he will. You gave him an hint, that was maybe enough :)
Revolution burns within us all.
Image
_DS_
L2j Veteran
L2j Veteran
Posts: 3437
Joined: Wed Apr 30, 2008 8:53 am
Location: Russia

Re: repair code

Post by _DS_ »

Not a feature requests, moved to support.
Commiter of the shit
public static final int PI = 3.1415926535897932384626433832795;
SHoOcKkiron
Posts: 2
Joined: Sun Feb 14, 2010 12:53 pm

Re: repair code

Post by SHoOcKkiron »

I tried to fix it but I did not succeed as not what is wrong so I ask help directly.
I've been trying 3 months

I was using google tradutctor. sorry
User avatar
rocoder
Posts: 66
Joined: Thu Feb 04, 2010 8:52 am

Re: repair code

Post by rocoder »

SHoOcKkiron wrote: I've been trying 3 months
:lol: :lol:
Image
Post Reply