Jump to content

Banking.Properties modified!


Recommended Posts

Here's a modified Banking.Properties with the normal commands and one more added.

 

* 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;
import net.sf.l2j.gameserver.network.serverpackets.InventoryUpdate;

/**
* This class trades Gold Bars for Adena and vice versa.
*
* @author Ahmed
*/
public class Banking implements IVoicedCommandHandler
{
private static final String[] _voicedCommands =
{
	"bank",
	"withdraw",
	"deposit",
	"getvitality"
};

/**
 * 
 * @see net.sf.l2j.gameserver.handler.IVoicedCommandHandler#useVoicedCommand(java.lang.String, net.sf.l2j.gameserver.model.actor.instance.L2PcInstance, java.lang.String)
 */
public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target)
{
	if (command.equalsIgnoreCase("bank"))
	{
		activeChar.sendMessage(".deposit (" + Config.BANKING_SYSTEM_ADENA + " Adena = " + Config.BANKING_SYSTEM_GOLDBARS + " Goldbar) / .withdraw (" + Config.BANKING_SYSTEM_GOLDBARS + " Goldbar = " + Config.BANKING_SYSTEM_ADENA + " Adena)");
	}
	else if (command.equalsIgnoreCase("deposit"))
	{
		if (activeChar.getInventory().getInventoryItemCount(57, 0) >= Config.BANKING_SYSTEM_ADENA)
		{
			InventoryUpdate iu = new InventoryUpdate();
			activeChar.getInventory().reduceAdena("Goldbar", Config.BANKING_SYSTEM_ADENA, activeChar, null);
			activeChar.getInventory().addItem("Goldbar", 3470, Config.BANKING_SYSTEM_GOLDBARS, activeChar, null);
			activeChar.getInventory().updateDatabase();
			activeChar.sendPacket(iu);
			activeChar.sendMessage("Thank you, you now have " + Config.BANKING_SYSTEM_GOLDBARS + " Goldbar(s), and " + Config.BANKING_SYSTEM_ADENA + " less adena.");
		}
		else
		{
			activeChar.sendMessage("You do not have enough Adena to convert to Goldbar(s), you need " + Config.BANKING_SYSTEM_ADENA + " Adena.");
		}
	}
	else if (command.equalsIgnoreCase("withdraw"))
	{
		if (activeChar.getInventory().getInventoryItemCount(3470, 0) >= Config.BANKING_SYSTEM_GOLDBARS)
		{
			InventoryUpdate iu = new InventoryUpdate();
			activeChar.getInventory().destroyItemByItemId("Adena", 3470, Config.BANKING_SYSTEM_GOLDBARS, activeChar, null);
			activeChar.getInventory().addAdena("Adena", Config.BANKING_SYSTEM_ADENA, activeChar, null);
			activeChar.getInventory().updateDatabase();
			activeChar.sendPacket(iu);
			activeChar.sendMessage("Thank you, you now have " + Config.BANKING_SYSTEM_ADENA + " Adena, and " + Config.BANKING_SYSTEM_GOLDBARS + " less Goldbar(s).");
		}
		else
		{
			activeChar.sendMessage("You do not have any Goldbars to turn into " + Config.BANKING_SYSTEM_ADENA + " Adena.");
		}
	}
	else if (command.equalsIgnoreCase("getvitality"))
	{
		if (activeChar.getInventory().getInventoryItemCount(6673, 0) >= 5)
		{
			activeChar.setVitalityLevel(5);
			activeChar.sendMessage("Your vitality has been replenished!");
		}
		else
		{
			activeChar.sendMessage("You don't have enough Festival Adena.You need at least 5 Festival Adena.");
		}
	}
	return true;
}

/**
 * 
 * @see net.sf.l2j.gameserver.handler.IVoicedCommandHandler#getVoicedCommandList()
 */
public String[] getVoicedCommandList()
{
	return _voicedCommands;
}
}

 

This part which i have written takes 5 Festival Adena from you and gives you full vitality!

 

Dunno if this code is right i just started java so don't be bad with me :P

 

If any l2j dev sees this fix my mistakes plz , if you can.

 

THIS HAS NOT BEEN TESTED!

 

Thank you.

 

This is my part of the code

 

	else if (command.equalsIgnoreCase("getvitality"))
	{
		if (activeChar.getInventory().getInventoryItemCount(6673, 0) >= 5)
		{
			activeChar.setVitalityLevel(5);
			activeChar.sendMessage("Your vitality has been replenished!");
		}
		else
		{
			activeChar.sendMessage("You don't have enough Festival Adena.You need at least 5 Festival Adena.");
		}

 

 

* LOCKED * - Please any l2j dev pm me to unlock this if the code is right.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.


  • Posts

    • You are contradicting yourself! In your first message you clearly state "I want to create a GF server on the latest client." What this means is you want a GF server that is working on the latest client. You didn't say "not exactly like GF". You explicitly stated that the server would be GF and the client will be whichever new client you could find. You never asked for servers either. You asked how to do it, and more specifically: "to link Gracia Final Pack to that client. Do I just get a clean install and edit ini in the client", which brought me to the conclusion that you were completely oblivious and/or delusional, hense my EXTENSIVE and ON-POINT response, if I say so myself.      
    • oh, i didnt know that. I got everything i need. Thank you so much for your information and help!
    • In every mobius source there should be a readme file with all the links you need (system, client, IDEs etc). Best of luck!
    • I didnt say i dont know anything but i couldnt find a place to start. a guy here mentioned l2jmobius which is a good place to start. so i searched for it and its actually what i wanted. Now i just need to find a clean client to start. I know how to program and how to do changed to client but its hard to find clean clients. I dont really want to make my server exactly like gracia final. I just want to test out the clients and decide which one works better for me. I dont really like the awakening classes and the newest races. Can you please provide me with a couple of links of different clients so i can test them out before i start my project? As i said i cant really find any clean install client. Thank you in advance
    • OUR OFFICIAL WEBSITE / FORUM - MILLENNIUM-HOOK.NET CHEAT DESCRIPTION: Our cheat for Fortnite game has proven itself in the best way among players, the cheat has good optimization, a beautiful visual appearance and has extensive functionality. And reliable protection and HWID Spoofer give our cheat even more advantages over competitors! SUPPORTED ANTI-CHEATS: (read more on official website) - Easy Anti-Cheat (EAC): Undetected & Safe - BattlEye AC: Undetected & Safe - Hyperion AC: Undetected & Safe Our Fortnite cheat has a limited number of slots to ensure greater product security! (Available slots check on official website) FEATURES: AIMBOT: - Aim bone - Silent aim - Smooth - Fov - Distance - Key ESP: - Players - Loot - Vehicles - Traps - Other MISC: - No bloom - No spread - Vehicle flight - Instarevive - Aim while Jumping - Teleport to players within 4m (10m with pickaxe) or teleport downed players to you. - Teleport key - Fov changer REQUIREMENTS: - Included HWID Spoofer: Yes - Stream Bypass: No (Engineering works. Will be available again soon). - Supported game modes: Windowed, Borderless - Supported platforms: Steam / Uplay / Epic Games - Supported CPU: Intel & AMD - Supported OS: Windows 10 (1903,1909,2004,20H2,21H1, 22H2), Windows 11 (All version). Supported OS change and are added periodically. More check on official website.   IN-GAME SCREENSHOTS:   - Check on the official website.
  • Topics

×
×
  • Create New...