Skip to content

Command

Featured Replies

Hello everyone. How i can change the .farm1 .farm2 .pvp1 .pvp2 commands to something else? 

L2jFrozen  

 

Thank you.

Solved by DrenepiaWorld

  • Author

go to voicecommandhalndlers and change their names and ofc their content

Can you say me IF YOU DONT MIND PLEASE what i have to change and where? I dont realy know to change all of them cause is not only 1 part there.

Can you say me IF YOU DONT MIND PLEASE what i have to change and where? I dont realy know to change all of them cause is not only 1 part there.

first of all and the most important thing you have source right?

  • Author

first of all and the most important thing you have source right?

of course i got the source. :)

  • Solution

of course i got the source. :)

alright, go to gameserver/head-src/com/l2jfrozen/gameserver/handler/voicedcommandhandlers

and inside file FarmPvpCmd.java

change for example these

private static final String[] VOICED_COMMANDS =
	{
		"farm1",
		"farm2",
		"pvp1",
		"pvp2"
	};

to this

private static final String[] VOICED_COMMANDS =
	{
		"easy_farm",
		"hard_farm",
		"solo_pvp",
		"mass_pvp"
	};

and then go to

if (command.equalsIgnoreCase("farm1") && Config.ALLOW_FARM1_COMMAND)
		{
			placex = Config.FARM1_X;
			placey = Config.FARM1_Y;
			placez = Config.FARM1_Z;
			message = Config.FARM1_CUSTOM_MESSAGE;
		}
		else if (command.equalsIgnoreCase("farm2") && Config.ALLOW_FARM2_COMMAND)
		{
			placex = Config.FARM2_X;
			placey = Config.FARM2_Y;
			placez = Config.FARM2_Z;
			message = Config.FARM2_CUSTOM_MESSAGE;
		}
		else if (command.equalsIgnoreCase("pvp1") && Config.ALLOW_PVP1_COMMAND)
		{
			placex = Config.PVP1_X;
			placey = Config.PVP1_Y;
			placez = Config.PVP1_Z;
			message = Config.PVP1_CUSTOM_MESSAGE;
		}
		else if (command.equalsIgnoreCase("pvp2") && Config.ALLOW_PVP2_COMMAND)
		{
			placex = Config.PVP2_X;
			placey = Config.PVP2_Y;
			placez = Config.PVP2_Z;
			message = Config.PVP2_CUSTOM_MESSAGE;
		}

and change it for example to this

if (command.equalsIgnoreCase("easy_farm") && Config.ALLOW_FARM1_COMMAND)
		{
			placex = Config.FARM1_X;
			placey = Config.FARM1_Y;
			placez = Config.FARM1_Z;
			message = Config.FARM1_CUSTOM_MESSAGE;
		}
		else if (command.equalsIgnoreCase("hard_farm") && Config.ALLOW_FARM2_COMMAND)
		{
			placex = Config.FARM2_X;
			placey = Config.FARM2_Y;
			placez = Config.FARM2_Z;
			message = Config.FARM2_CUSTOM_MESSAGE;
		}
		else if (command.equalsIgnoreCase("solo_pvp") && Config.ALLOW_PVP1_COMMAND)
		{
			placex = Config.PVP1_X;
			placey = Config.PVP1_Y;
			placez = Config.PVP1_Z;
			message = Config.PVP1_CUSTOM_MESSAGE;
		}
		else if (command.equalsIgnoreCase("mass_pvp") && Config.ALLOW_PVP2_COMMAND)
		{
			placex = Config.PVP2_X;
			placey = Config.PVP2_Y;
			placez = Config.PVP2_Z;
			message = Config.PVP2_CUSTOM_MESSAGE;
		}
  • Author

 

alright, go to gameserver/head-src/com/l2jfrozen/gameserver/handler/voicedcommandhandlers

and inside file FarmPvpCmd.java

change for example these

private static final String[] VOICED_COMMANDS =
	{
		"farm1",
		"farm2",
		"pvp1",
		"pvp2"
	};

to this

private static final String[] VOICED_COMMANDS =
	{
		"easy_farm",
		"hard_farm",
		"solo_pvp",
		"mass_pvp"
	};

and then go to

if (command.equalsIgnoreCase("farm1") && Config.ALLOW_FARM1_COMMAND)
		{
			placex = Config.FARM1_X;
			placey = Config.FARM1_Y;
			placez = Config.FARM1_Z;
			message = Config.FARM1_CUSTOM_MESSAGE;
		}
		else if (command.equalsIgnoreCase("farm2") && Config.ALLOW_FARM2_COMMAND)
		{
			placex = Config.FARM2_X;
			placey = Config.FARM2_Y;
			placez = Config.FARM2_Z;
			message = Config.FARM2_CUSTOM_MESSAGE;
		}
		else if (command.equalsIgnoreCase("pvp1") && Config.ALLOW_PVP1_COMMAND)
		{
			placex = Config.PVP1_X;
			placey = Config.PVP1_Y;
			placez = Config.PVP1_Z;
			message = Config.PVP1_CUSTOM_MESSAGE;
		}
		else if (command.equalsIgnoreCase("pvp2") && Config.ALLOW_PVP2_COMMAND)
		{
			placex = Config.PVP2_X;
			placey = Config.PVP2_Y;
			placez = Config.PVP2_Z;
			message = Config.PVP2_CUSTOM_MESSAGE;
		}

and change it for example to this

if (command.equalsIgnoreCase("easy_farm") && Config.ALLOW_FARM1_COMMAND)
		{
			placex = Config.FARM1_X;
			placey = Config.FARM1_Y;
			placez = Config.FARM1_Z;
			message = Config.FARM1_CUSTOM_MESSAGE;
		}
		else if (command.equalsIgnoreCase("hard_farm") && Config.ALLOW_FARM2_COMMAND)
		{
			placex = Config.FARM2_X;
			placey = Config.FARM2_Y;
			placez = Config.FARM2_Z;
			message = Config.FARM2_CUSTOM_MESSAGE;
		}
		else if (command.equalsIgnoreCase("solo_pvp") && Config.ALLOW_PVP1_COMMAND)
		{
			placex = Config.PVP1_X;
			placey = Config.PVP1_Y;
			placez = Config.PVP1_Z;
			message = Config.PVP1_CUSTOM_MESSAGE;
		}
		else if (command.equalsIgnoreCase("mass_pvp") && Config.ALLOW_PVP2_COMMAND)
		{
			placex = Config.PVP2_X;
			placey = Config.PVP2_Y;
			placez = Config.PVP2_Z;
			message = Config.PVP2_CUSTOM_MESSAGE;
		}

Do i need to change something from Config.java?

Example 

 

 

ALLOW_FARM1_COMMAND = Boolean.parseBoolean(L2JFrozenSettings.getProperty("AllowFarm1Command", "false"));
ALLOW_FARM2_COMMAND = Boolean.parseBoolean(L2JFrozenSettings.getProperty("AllowFarm2Command", "false"));
ALLOW_PVP1_COMMAND = Boolean.parseBoolean(L2JFrozenSettings.getProperty("AllowPvP1Command", "false"));
ALLOW_PVP2_COMMAND = Boolean.parseBoolean(L2JFrozenSettings.getProperty("AllowPvP2Command", "false"));
FARM1_X = Integer.parseInt(L2JFrozenSettings.getProperty("farm1_X", "81304"));
FARM1_Y = Integer.parseInt(L2JFrozenSettings.getProperty("farm1_Y", "14589"));
FARM1_Z = Integer.parseInt(L2JFrozenSettings.getProperty("farm1_Z", "-3469"));
PVP1_X = Integer.parseInt(L2JFrozenSettings.getProperty("pvp1_X", "81304"));
PVP1_Y = Integer.parseInt(L2JFrozenSettings.getProperty("pvp1_Y", "14589"));
PVP1_Z = Integer.parseInt(L2JFrozenSettings.getProperty("pvp1_Z", "-3469"));
FARM2_X = Integer.parseInt(L2JFrozenSettings.getProperty("farm2_X", "81304"));
FARM2_Y = Integer.parseInt(L2JFrozenSettings.getProperty("farm2_Y", "14589"));
FARM2_Z = Integer.parseInt(L2JFrozenSettings.getProperty("farm2_Z", "-3469"));
PVP2_X = Integer.parseInt(L2JFrozenSettings.getProperty("pvp2_X", "81304"));
PVP2_Y = Integer.parseInt(L2JFrozenSettings.getProperty("pvp2_Y", "14589"));
PVP2_Z = Integer.parseInt(L2JFrozenSettings.getProperty("pvp2_Z", "-3469"));
FARM1_CUSTOM_MESSAGE = L2JFrozenSettings.getProperty("Farm1CustomMeesage", "You have been teleported to Farm Zone 1!");
FARM2_CUSTOM_MESSAGE = L2JFrozenSettings.getProperty("Farm2CustomMeesage", "You have been teleported to Farm Zone 2!");
PVP1_CUSTOM_MESSAGE = L2JFrozenSettings.getProperty("PvP1CustomMeesage", "You have been teleported to PvP Zone 1!");
PVP2_CUSTOM_MESSAGE = L2JFrozenSettings.getProperty("PvP2CustomMeesage", "You have been teleported to PvP Zone 2!");
}

 

Do i need to change something from Config.java?

Example 

 

 

ALLOW_FARM1_COMMAND = Boolean.parseBoolean(L2JFrozenSettings.getProperty("AllowFarm1Command", "false"));
ALLOW_FARM2_COMMAND = Boolean.parseBoolean(L2JFrozenSettings.getProperty("AllowFarm2Command", "false"));
ALLOW_PVP1_COMMAND = Boolean.parseBoolean(L2JFrozenSettings.getProperty("AllowPvP1Command", "false"));
ALLOW_PVP2_COMMAND = Boolean.parseBoolean(L2JFrozenSettings.getProperty("AllowPvP2Command", "false"));
FARM1_X = Integer.parseInt(L2JFrozenSettings.getProperty("farm1_X", "81304"));
FARM1_Y = Integer.parseInt(L2JFrozenSettings.getProperty("farm1_Y", "14589"));
FARM1_Z = Integer.parseInt(L2JFrozenSettings.getProperty("farm1_Z", "-3469"));
PVP1_X = Integer.parseInt(L2JFrozenSettings.getProperty("pvp1_X", "81304"));
PVP1_Y = Integer.parseInt(L2JFrozenSettings.getProperty("pvp1_Y", "14589"));
PVP1_Z = Integer.parseInt(L2JFrozenSettings.getProperty("pvp1_Z", "-3469"));
FARM2_X = Integer.parseInt(L2JFrozenSettings.getProperty("farm2_X", "81304"));
FARM2_Y = Integer.parseInt(L2JFrozenSettings.getProperty("farm2_Y", "14589"));
FARM2_Z = Integer.parseInt(L2JFrozenSettings.getProperty("farm2_Z", "-3469"));
PVP2_X = Integer.parseInt(L2JFrozenSettings.getProperty("pvp2_X", "81304"));
PVP2_Y = Integer.parseInt(L2JFrozenSettings.getProperty("pvp2_Y", "14589"));
PVP2_Z = Integer.parseInt(L2JFrozenSettings.getProperty("pvp2_Z", "-3469"));
FARM1_CUSTOM_MESSAGE = L2JFrozenSettings.getProperty("Farm1CustomMeesage", "You have been teleported to Farm Zone 1!");
FARM2_CUSTOM_MESSAGE = L2JFrozenSettings.getProperty("Farm2CustomMeesage", "You have been teleported to Farm Zone 2!");
PVP1_CUSTOM_MESSAGE = L2JFrozenSettings.getProperty("PvP1CustomMeesage", "You have been teleported to PvP Zone 1!");
PVP2_CUSTOM_MESSAGE = L2JFrozenSettings.getProperty("PvP2CustomMeesage", "You have been teleported to PvP Zone 2!");
}

 

you can do this in order to be more easy for you, for example change the farm1_x to safe_farm_x but if you change them you have to change them on the code as well, but it's not needed if you want you can keep them as it is it won't be problem

  • Author

you can do this in order to be more easy for you, for example change the farm1_x to safe_farm_x but if you change them you have to change them on the code as well, but it's not needed if you want you can keep them as it is it won't be problem

Thank you in deep Sophus. Im going to check that now if i have any problem i will reply here.

Again thank you in deep!

Thank you in deep Sophus. Im going to check that now if i have any problem i will reply here.

Again thank you in deep!

Alright, np :)

  • Author

Alright, np :)

Thank you very much Sophus. Done :)

Locked.

Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.