Jump to content

Recommended Posts

Posted

Hello!

When a player put .daggeritems, then take Dagger weapon,armor,jewls.

Commands: .daggeritems / .bowitems / .tankitems / .mageitems

 

config:
# Specified reward item rnd qty
ChampionRewardItemQty = 1
+
+#------------------------------------------------------------------
+# Class Items.
+# .daggeritems / .bowitems / .tankitems / .mageitems                
+#------------------------------------------------------------------
+ClassItemsCmd = false
+#
+FighterItemsPirce = 50000000
+#
+MageItemsPirce = 50000000
+
=====
Index: sf/l2j/config.java
       public static int L2JMOD_CHAMPION_REWARD_QTY;
+    public static boolean CLASS_ITEMS_ENABLE;
+    public static int FIGHTER_ITEMS_PRICE;
+    public static int MAGE_ITEMS_PRICE;


                  L2JMOD_CHAMPION_REWARD_QTY            = Integer.parseInt(L2JModSettings.getProperty("ChampionRewardItemQty", "1"));
+                CLASS_ITEMS_ENABLE             = Boolean.parseBoolean(L2JModSettings.getProperty("ClassItemsCmd", "false"));
+                FIGHTER_ITEMS_PRICE            = Integer.parseInt(L2JModSettings.getProperty("FighterItemsPirce", "50000000"));
+                MAGE_ITEMS_PRICE            = Integer.parseInt(L2JModSettings.getProperty("MageItemsPirce", "50000000"));


=====
Index: net.sf.l2j.gameserver.handler.VoicedCommandHandler.java

import java.util.logging.Logger;

+import net.sf.l2j.gameserver.handler.voicedcommandhandlers.LevelZones;

import javolution.util.FastMap;


private VoicedCommandHandler()
{
	_datatable = new FastMap<String, IVoicedCommandHandler>();
+
+	if(Config.CLASS_ITEMS_ENABLE)
+		{
+			registerVoicedCommandHandler(new ClassItems());
+		}
}

public void registerVoicedCommandHandler(IVoicedCommandHandler handler)

 

Here you have to create a New Class with name ClassItems.java

=====
Index: net.sf.l2j.gameserver.handler.voicedcommandhandlers.ClassItems.java

/*
* 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.serverpackets.ItemList;

public class ClassItems implements IVoicedCommandHandler
{
private static String[] _voicedCommands =
{
		"daggeritems", "bowitems", "tankitems", "mageitems"
};

/**
 * @see net.sf.l2j.gameserver.handler.IVoicedCommandHandler#useVoicedCommand(java.lang.String,
 *      net.sf.l2j.gameserver.model.actor.instance.L2PcInstance, java.lang.String)
 */
@Override
public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target)
{

	if(command.equalsIgnoreCase("daggeritems"))
	{
		if(activeChar.getInventory().getInventoryItemCount(57, 0) >= Config.FIGHTER_ITEMS_PRICE)
		{
			activeChar.getInventory().reduceAdena("Adena", Config.FIGHTER_ITEMS_PRICE, activeChar, null);
			activeChar.getInventory().addItem("Angel Slayer", 6367, 1, activeChar, activeChar);
			activeChar.getInventory().addItem("Dragonic Light", 6379, 1, activeChar, activeChar );
			activeChar.getInventory().addItem("Dragonic Boots", 6380, 1, activeChar, activeChar);
			activeChar.getInventory().addItem("Dragonic Gloves", 6381, 1, activeChar, activeChar );
			activeChar.getInventory().addItem("Dragonic Helmet", 6382, 1, activeChar, activeChar);
			activeChar.getInventory().addItem("TEO Necklace", 920, 1, activeChar, activeChar );
			activeChar.getInventory().addItem("TEO Earring", 858, 2, activeChar, activeChar);
			activeChar.getInventory().addItem("TEO Ring", 889, 2, activeChar, activeChar );
			activeChar.getInventory().updateDatabase();
			activeChar.sendPacket(new ItemList(activeChar, true));
			activeChar.sendMessage("Now You Have Dagger Items On Your Invetory. Take a Look!.");
		}
		else
		{
			activeChar.sendMessage("You do not have enough Adena");
		}
		if(activeChar.isInOlympiadMode())
		{
			activeChar.sendMessage("Sorry,you are in the Olympiad now.");
			return false;
		}
		else if(activeChar.isInDuel())
		{
			activeChar.sendMessage("Sorry,you are in a duel!");
			return false;
		}
		else if(activeChar.atEvent)
		{
			activeChar.sendMessage("Sorry,you are on event now.");
			return false;
		}
		else if(!Config.ALT_GAME_KARMA_PLAYER_CAN_USE_GK && activeChar.getKarma() > 0)
		{
			activeChar.sendMessage("Sorry,PK player can't use this.");
			return false;
		}
		else if(activeChar.isDead())
		{
			activeChar.sendMessage("Sorry,Dead player can't take items.");			
                        return false;
		}
		else if(activeChar.isFakeDeath())
		{
			activeChar.sendMessage("Sorry,on fake death mode can't use this.");
			return false;
		}
	}
	if(command.equalsIgnoreCase("bowitems"))
	{
		if(activeChar.getInventory().getInventoryItemCount(57, 0) >= Config.FIGHTER_ITEMS_PRICE)
		{
			activeChar.getInventory().reduceAdena("Adena", Config.FIGHTER_ITEMS_PRICE, activeChar, null);
			activeChar.getInventory().addItem("Draconic Bow", 7577, 1, activeChar, activeChar);
			activeChar.getInventory().addItem("Draconic Light", 6379, 1, activeChar, activeChar );
			activeChar.getInventory().addItem("Draconic Boots", 6380, 1, activeChar, activeChar);
			activeChar.getInventory().addItem("Draconic Gloves", 6381, 1, activeChar, activeChar );
			activeChar.getInventory().addItem("Draconic Helmet", 6382, 1, activeChar, activeChar);
			activeChar.getInventory().addItem("TEO Necklace", 920, 1, activeChar, activeChar );
			activeChar.getInventory().addItem("TEO Earring", 858, 2, activeChar, activeChar);
			activeChar.getInventory().addItem("TEO Ring", 889, 2, activeChar, activeChar );
			activeChar.getInventory().updateDatabase();
			activeChar.sendPacket(new ItemList(activeChar, true));
			activeChar.sendMessage("Now You Have Bow Items On Your Invetory. Take a Look!.");
		}
		else
		{
			activeChar.sendMessage("You do not have enough Adena");
		}
		if(activeChar.isInOlympiadMode())
		{
			activeChar.sendMessage("Sorry,you are in the Olympiad now.");
			return false;
		}
		else if(activeChar.isInDuel())
		{
			activeChar.sendMessage("Sorry,you are in a duel!");
			return false;
		}
		else if(activeChar.atEvent)
		{
			activeChar.sendMessage("Sorry,you are on event now.");
			return false;
		}
		else if(!Config.ALT_GAME_KARMA_PLAYER_CAN_USE_GK && activeChar.getKarma() > 0)
		{
			activeChar.sendMessage("Sorry,PK player can't use this.");
			return false;
		}
		else if(activeChar.isDead())
		{
			activeChar.sendMessage("Sorry,Dead player can't take items.");			
                        return false;
		}
		else if(activeChar.isFakeDeath())
		{
			activeChar.sendMessage("Sorry,on fake death mode can't use this.");
			return false;
		}
	}
	if(command.equalsIgnoreCase("tankitems"))
	{
		if(activeChar.getInventory().getInventoryItemCount(57, 0) >= Config.FIGHTER_ITEMS_PRICE)
		{
			activeChar.getInventory().reduceAdena("Adena", Config.FIGHTER_ITEMS_PRICE, activeChar, null);
			activeChar.getInventory().addItem("Forgotten Blade", 6582, 1, activeChar, activeChar);
			activeChar.getInventory().addItem("Imperial Armor", 6373, 1, activeChar, activeChar );
			activeChar.getInventory().addItem("Imperial ArmorP2", 6374, 1, activeChar, activeChar);
			activeChar.getInventory().addItem("Imperial Gloves", 6375, 1, activeChar, activeChar );
			activeChar.getInventory().addItem("Imperial Boots", 6376, 1, activeChar, activeChar);
			activeChar.getInventory().addItem("Imperial Helmet", 6378, 1, activeChar, activeChar );
			activeChar.getInventory().addItem("TEO Necklace", 920, 1, activeChar, activeChar);
			activeChar.getInventory().addItem("TEO Earring", 858, 2, activeChar, activeChar);
			activeChar.getInventory().addItem("TEO Ring", 889, 2, activeChar, activeChar );
			activeChar.getInventory().updateDatabase();
			activeChar.sendPacket(new ItemList(activeChar, true));
			activeChar.sendMessage("Now You Have Tank Items On Your Invetory. Take a Look!.");
		}
		else
		{
			activeChar.sendMessage("You do not have enough Adena");
		}
		if(activeChar.isInOlympiadMode())
		{
			activeChar.sendMessage("Sorry,you are in the Olympiad now.");
			return false;
		}
		else if(activeChar.isInDuel())
		{
			activeChar.sendMessage("Sorry,you are in a duel!");
			return false;
		}
		else if(activeChar.atEvent)
		{
			activeChar.sendMessage("Sorry,you are on event now.");
			return false;
		}
		else if(!Config.ALT_GAME_KARMA_PLAYER_CAN_USE_GK && activeChar.getKarma() > 0)
		{
			activeChar.sendMessage("Sorry,PK player can't use this.");
			return false;
		}
		else if(activeChar.isDead())
		{
			activeChar.sendMessage("Sorry,Dead player can't take items.");			
                        return false;
		}
		else if(activeChar.isFakeDeath())
		{
			activeChar.sendMessage("Sorry,on fake death mode can't use this.");
			return false;
		}
	}
	else if(command.equalsIgnoreCase("mageitems"))
	{
		if(activeChar.getInventory().getInventoryItemCount(57, 0) >= Config.MAGE_ITEMS_PRICE)
		{
			activeChar.getInventory().destroyItemByItemId("Adena", 57, Config.MAGE_ITEMS_PRICE, activeChar, null);
			activeChar.getInventory().addItem("Arcana Mace Acumen", 6608, 1, activeChar, activeChar);
			activeChar.getInventory().addItem("DC Robe", 2407, 1, activeChar, activeChar );
			activeChar.getInventory().addItem("DC Gloves", 5767, 1, activeChar, activeChar);
			activeChar.getInventory().addItem("DC Boots", 5779, 1, activeChar, activeChar );
			activeChar.getInventory().addItem("DC Helmet", 512, 1, activeChar, activeChar);
			activeChar.getInventory().addItem("TEO Necklace", 920, 1, activeChar, activeChar );
			activeChar.getInventory().addItem("TEO Earring", 858, 2, activeChar, activeChar);
			activeChar.getInventory().addItem("TEO Ring", 889, 2, activeChar, activeChar );
			activeChar.getInventory().updateDatabase();
			activeChar.sendPacket(new ItemList(activeChar, true));
			activeChar.sendMessage("Now You Have Mage Items On Your Invetory. Take a Look!");
		}
		else
		{
			activeChar.sendMessage("You do not have enough Adena");
		}
		if(activeChar.isInOlympiadMode())
		{
			activeChar.sendMessage("Sorry,you are in the Olympiad now.");
			return false;
		}
		else if(activeChar.isInDuel())
		{
			activeChar.sendMessage("Sorry,you are in a duel!");
			return false;
		}
		else if(activeChar.atEvent)
		{
			activeChar.sendMessage("Sorry,you are on event now.");
			return false;
		}
		else if(!Config.ALT_GAME_KARMA_PLAYER_CAN_USE_GK && activeChar.getKarma() > 0)
		{
			activeChar.sendMessage("Sorry,PK player can't use this.");
			return false;
		}
		else if(activeChar.isDead())
		{
			activeChar.sendMessage("Sorry,Dead player can't take items.");			
                        return false;
		}
		else if(activeChar.isFakeDeath())
		{
			activeChar.sendMessage("Sorry,on fake death mode can't use this.");
			return false;
		}
	}
	return true;
}

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

  • 2 weeks later...
Posted

Use some arrays and for loops , instead of this way. It will be better and cleaner.

Thank you for sharing

For loops? At which part?
Posted

You must be kidding.

Why? You create a list and then you use loops.

In this way if you have to modify and add another item you will only have to write ", 14720" in the list, for example.

Posted

Maybe you must be kidding. Did you understand what I tell him to do?

I am really bored to explain to you. But anyway, I have to kill my time somehow.

 

You tell him to use for loops. You propably don't know what for loops do or you had in mind to tell something different and you got confused.

 

In this code, you cannot use for loops. Because you don't need to repeat any kind of action inside the code. That's why I asked you in which part of the code, you think that a for loop will fit?

Posted

I am really bored to explain to you. But anyway, I have to kill my time somehow.

 

You tell him to use for loops. You propably don't know what for loops do or you had in mind to tell something different and you got confused.

 

In this code, you cannot use for loops. Because you don't need to repeat any kind of action inside the code. That's why I asked you in which part of the code, you think that a for loop will fit?

Hey computer programmer,

private int[][] bow_items = { {x,y } }  //x id , y count

for(int[] it : bow_items)
{
int id = it[0];
int count = it[1];
player.addItem(........);
}

 

Are you serious?

Posted

Hey computer programmer,

private int[][] bow_items = { {x,y } }  //x id , y count

for(int[] it : bow_items)
{
int id = it[0];
int count = it[1];
player.addItem(........);
}

 

Are you serious?

You still don't understand, do you?
Posted

You still don't understand, do you?

Explain then , I explained you about for loops. Don't be afraid , I won't leach your super codes.

Posted

Explain then , I explained you about for loops. Don't be afraid , I won't leach your super codes.

I explained to you some lines above.

 

That's why, I don't want people like you, to sell 'java' servicies.

 

I end this conversation here, because you are propably too immature to communicate.

 

Please, consider have a look here:

http://docs.oracle.com/javase/tutorial/java/nutsandbolts/for.html

 

I hope it helps you.

 

OnTopic: Keep sharing, Baggos.

Posted

Hello!

When a player put .daggeritems, then take Dagger weapon,armor,jewls.

Commands: .daggeritems / .bowitems / .tankitems / .mageitems

 

config:
# Specified reward item rnd qty
ChampionRewardItemQty = 1
+
+#------------------------------------------------------------------
+# Class Items.
+# .daggeritems / .bowitems / .tankitems / .mageitems                
+#------------------------------------------------------------------
+ClassItemsCmd = false
+#
+FighterItemsPirce = 50000000
+#
+MageItemsPirce = 50000000
+
=====
Index: sf/l2j/config.java
       public static int L2JMOD_CHAMPION_REWARD_QTY;
+    public static boolean CLASS_ITEMS_ENABLE;
+    public static int FIGHTER_ITEMS_PRICE;
+    public static int MAGE_ITEMS_PRICE;


                  L2JMOD_CHAMPION_REWARD_QTY            = Integer.parseInt(L2JModSettings.getProperty("ChampionRewardItemQty", "1"));
+                CLASS_ITEMS_ENABLE             = Boolean.parseBoolean(L2JModSettings.getProperty("ClassItemsCmd", "false"));
+                FIGHTER_ITEMS_PRICE            = Integer.parseInt(L2JModSettings.getProperty("FighterItemsPirce", "50000000"));
+                MAGE_ITEMS_PRICE            = Integer.parseInt(L2JModSettings.getProperty("MageItemsPirce", "50000000"));


=====
Index: net.sf.l2j.gameserver.handler.VoicedCommandHandler.java

import java.util.logging.Logger;

+import net.sf.l2j.gameserver.handler.voicedcommandhandlers.LevelZones;

import javolution.util.FastMap;


private VoicedCommandHandler()
{
	_datatable = new FastMap<String, IVoicedCommandHandler>();
+
+	if(Config.CLASS_ITEMS_ENABLE)
+		{
+			registerVoicedCommandHandler(new ClassItems());
+		}
}

public void registerVoicedCommandHandler(IVoicedCommandHandler handler)

 

Here you have to create a New Class with name ClassItems.java

=====
Index: net.sf.l2j.gameserver.handler.voicedcommandhandlers.ClassItems.java

/*
* 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.serverpackets.ItemList;

public class ClassItems implements IVoicedCommandHandler
{
private static String[] _voicedCommands =
{
		"daggeritems", "bowitems", "tankitems", "mageitems"
};

/**
 * @see net.sf.l2j.gameserver.handler.IVoicedCommandHandler#useVoicedCommand(java.lang.String,
 *      net.sf.l2j.gameserver.model.actor.instance.L2PcInstance, java.lang.String)
 */
@Override
public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target)
{

	if(command.equalsIgnoreCase("daggeritems"))
	{
		if(activeChar.getInventory().getInventoryItemCount(57, 0) >= Config.FIGHTER_ITEMS_PRICE)
		{
			activeChar.getInventory().reduceAdena("Adena", Config.FIGHTER_ITEMS_PRICE, activeChar, null);
			activeChar.getInventory().addItem("Angel Slayer", 6367, 1, activeChar, activeChar);
			activeChar.getInventory().addItem("Dragonic Light", 6379, 1, activeChar, activeChar );
			activeChar.getInventory().addItem("Dragonic Boots", 6380, 1, activeChar, activeChar);
			activeChar.getInventory().addItem("Dragonic Gloves", 6381, 1, activeChar, activeChar );
			activeChar.getInventory().addItem("Dragonic Helmet", 6382, 1, activeChar, activeChar);
			activeChar.getInventory().addItem("TEO Necklace", 920, 1, activeChar, activeChar );
			activeChar.getInventory().addItem("TEO Earring", 858, 2, activeChar, activeChar);
			activeChar.getInventory().addItem("TEO Ring", 889, 2, activeChar, activeChar );
			activeChar.getInventory().updateDatabase();
			activeChar.sendPacket(new ItemList(activeChar, true));
			activeChar.sendMessage("Now You Have Dagger Items On Your Invetory. Take a Look!.");
		}
		else
		{
			activeChar.sendMessage("You do not have enough Adena");
		}
		if(activeChar.isInOlympiadMode())
		{
			activeChar.sendMessage("Sorry,you are in the Olympiad now.");
			return false;
		}
		else if(activeChar.isInDuel())
		{
			activeChar.sendMessage("Sorry,you are in a duel!");
			return false;
		}
		else if(activeChar.atEvent)
		{
			activeChar.sendMessage("Sorry,you are on event now.");
			return false;
		}
		else if(!Config.ALT_GAME_KARMA_PLAYER_CAN_USE_GK && activeChar.getKarma() > 0)
		{
			activeChar.sendMessage("Sorry,PK player can't use this.");
			return false;
		}
		else if(activeChar.isDead())
		{
			activeChar.sendMessage("Sorry,Dead player can't take items.");			
                        return false;
		}
		else if(activeChar.isFakeDeath())
		{
			activeChar.sendMessage("Sorry,on fake death mode can't use this.");
			return false;
		}
	}
	if(command.equalsIgnoreCase("bowitems"))
	{
		if(activeChar.getInventory().getInventoryItemCount(57, 0) >= Config.FIGHTER_ITEMS_PRICE)
		{
			activeChar.getInventory().reduceAdena("Adena", Config.FIGHTER_ITEMS_PRICE, activeChar, null);
			activeChar.getInventory().addItem("Draconic Bow", 7577, 1, activeChar, activeChar);
			activeChar.getInventory().addItem("Draconic Light", 6379, 1, activeChar, activeChar );
			activeChar.getInventory().addItem("Draconic Boots", 6380, 1, activeChar, activeChar);
			activeChar.getInventory().addItem("Draconic Gloves", 6381, 1, activeChar, activeChar );
			activeChar.getInventory().addItem("Draconic Helmet", 6382, 1, activeChar, activeChar);
			activeChar.getInventory().addItem("TEO Necklace", 920, 1, activeChar, activeChar );
			activeChar.getInventory().addItem("TEO Earring", 858, 2, activeChar, activeChar);
			activeChar.getInventory().addItem("TEO Ring", 889, 2, activeChar, activeChar );
			activeChar.getInventory().updateDatabase();
			activeChar.sendPacket(new ItemList(activeChar, true));
			activeChar.sendMessage("Now You Have Bow Items On Your Invetory. Take a Look!.");
		}
		else
		{
			activeChar.sendMessage("You do not have enough Adena");
		}
		if(activeChar.isInOlympiadMode())
		{
			activeChar.sendMessage("Sorry,you are in the Olympiad now.");
			return false;
		}
		else if(activeChar.isInDuel())
		{
			activeChar.sendMessage("Sorry,you are in a duel!");
			return false;
		}
		else if(activeChar.atEvent)
		{
			activeChar.sendMessage("Sorry,you are on event now.");
			return false;
		}
		else if(!Config.ALT_GAME_KARMA_PLAYER_CAN_USE_GK && activeChar.getKarma() > 0)
		{
			activeChar.sendMessage("Sorry,PK player can't use this.");
			return false;
		}
		else if(activeChar.isDead())
		{
			activeChar.sendMessage("Sorry,Dead player can't take items.");			
                        return false;
		}
		else if(activeChar.isFakeDeath())
		{
			activeChar.sendMessage("Sorry,on fake death mode can't use this.");
			return false;
		}
	}
	if(command.equalsIgnoreCase("tankitems"))
	{
		if(activeChar.getInventory().getInventoryItemCount(57, 0) >= Config.FIGHTER_ITEMS_PRICE)
		{
			activeChar.getInventory().reduceAdena("Adena", Config.FIGHTER_ITEMS_PRICE, activeChar, null);
			activeChar.getInventory().addItem("Forgotten Blade", 6582, 1, activeChar, activeChar);
			activeChar.getInventory().addItem("Imperial Armor", 6373, 1, activeChar, activeChar );
			activeChar.getInventory().addItem("Imperial ArmorP2", 6374, 1, activeChar, activeChar);
			activeChar.getInventory().addItem("Imperial Gloves", 6375, 1, activeChar, activeChar );
			activeChar.getInventory().addItem("Imperial Boots", 6376, 1, activeChar, activeChar);
			activeChar.getInventory().addItem("Imperial Helmet", 6378, 1, activeChar, activeChar );
			activeChar.getInventory().addItem("TEO Necklace", 920, 1, activeChar, activeChar);
			activeChar.getInventory().addItem("TEO Earring", 858, 2, activeChar, activeChar);
			activeChar.getInventory().addItem("TEO Ring", 889, 2, activeChar, activeChar );
			activeChar.getInventory().updateDatabase();
			activeChar.sendPacket(new ItemList(activeChar, true));
			activeChar.sendMessage("Now You Have Tank Items On Your Invetory. Take a Look!.");
		}
		else
		{
			activeChar.sendMessage("You do not have enough Adena");
		}
		if(activeChar.isInOlympiadMode())
		{
			activeChar.sendMessage("Sorry,you are in the Olympiad now.");
			return false;
		}
		else if(activeChar.isInDuel())
		{
			activeChar.sendMessage("Sorry,you are in a duel!");
			return false;
		}
		else if(activeChar.atEvent)
		{
			activeChar.sendMessage("Sorry,you are on event now.");
			return false;
		}
		else if(!Config.ALT_GAME_KARMA_PLAYER_CAN_USE_GK && activeChar.getKarma() > 0)
		{
			activeChar.sendMessage("Sorry,PK player can't use this.");
			return false;
		}
		else if(activeChar.isDead())
		{
			activeChar.sendMessage("Sorry,Dead player can't take items.");			
                        return false;
		}
		else if(activeChar.isFakeDeath())
		{
			activeChar.sendMessage("Sorry,on fake death mode can't use this.");
			return false;
		}
	}
	else if(command.equalsIgnoreCase("mageitems"))
	{
		if(activeChar.getInventory().getInventoryItemCount(57, 0) >= Config.MAGE_ITEMS_PRICE)
		{
			activeChar.getInventory().destroyItemByItemId("Adena", 57, Config.MAGE_ITEMS_PRICE, activeChar, null);
			activeChar.getInventory().addItem("Arcana Mace Acumen", 6608, 1, activeChar, activeChar);
			activeChar.getInventory().addItem("DC Robe", 2407, 1, activeChar, activeChar );
			activeChar.getInventory().addItem("DC Gloves", 5767, 1, activeChar, activeChar);
			activeChar.getInventory().addItem("DC Boots", 5779, 1, activeChar, activeChar );
			activeChar.getInventory().addItem("DC Helmet", 512, 1, activeChar, activeChar);
			activeChar.getInventory().addItem("TEO Necklace", 920, 1, activeChar, activeChar );
			activeChar.getInventory().addItem("TEO Earring", 858, 2, activeChar, activeChar);
			activeChar.getInventory().addItem("TEO Ring", 889, 2, activeChar, activeChar );
			activeChar.getInventory().updateDatabase();
			activeChar.sendPacket(new ItemList(activeChar, true));
			activeChar.sendMessage("Now You Have Mage Items On Your Invetory. Take a Look!");
		}
		else
		{
			activeChar.sendMessage("You do not have enough Adena");
		}
		if(activeChar.isInOlympiadMode())
		{
			activeChar.sendMessage("Sorry,you are in the Olympiad now.");
			return false;
		}
		else if(activeChar.isInDuel())
		{
			activeChar.sendMessage("Sorry,you are in a duel!");
			return false;
		}
		else if(activeChar.atEvent)
		{
			activeChar.sendMessage("Sorry,you are on event now.");
			return false;
		}
		else if(!Config.ALT_GAME_KARMA_PLAYER_CAN_USE_GK && activeChar.getKarma() > 0)
		{
			activeChar.sendMessage("Sorry,PK player can't use this.");
			return false;
		}
		else if(activeChar.isDead())
		{
			activeChar.sendMessage("Sorry,Dead player can't take items.");			
                        return false;
		}
		else if(activeChar.isFakeDeath())
		{
			activeChar.sendMessage("Sorry,on fake death mode can't use this.");
			return false;
		}
	}
	return true;
}

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

Better add all of these commands in one html (.items) or  made an instance! I think will be more attractive for admins of pvp servers! :D

 

P.S: It's just an ideea! ;)

 

Guest
This topic is now closed to further replies.


  • Posts

    • 🎉 L2NeverPain StuckSub - GRAND OPENING 12 December 2025🎉 After beta, testing, mistakes, laughs and a lot of PvP, the moment has finally come. L2NeverPain StuckSub is officially opening its gates on 12 December 2025.   ⚔️What to expect: ✦Main Class +2 Stuck Sub system ✦Balanced PvP & custom party farm areas ✦Custom events, bosses and strong rewards ✦Competitive clan scene with castle rewards   📌Until the opening: ✦Create your clans and register them in the Clan-Register channel ✦Invite your friends / old parties / CPs ✦Stay tuned for more information (rates, events, siege times, etc.)   Get your setups ready, prepare your macros and your Discord/voice. On 12 December 2025 20:00 GMT+2, we write the first chapter of NeverPain together. 🔥 https://l2neverpain.com/ https://discord.gg/kNP3UXgkmN
    • Check my post where I shared Lucera pack, you can pick textures from there. Here is a link of datapack/srv  https://eu2.contabostorage.com/d4b39866f6bb4084b6c969ec8fe20063:kita/Lucera_Classic_Remaster/Lucera Classic Remaster Server and Datapack files.rar
    • Hi friends, does anyone have these Aden Classic textures for IL + geodata? Please ❤️  
    • New products in our store: ➡Telegram Ukraine +380 | NO USED BEFORE | CLEAR ACCOUNTS | TDATA | No Spam Block | 2FA included | Age: from 3 days | Price from $3.2 ➡Facebook OLD Account 2020–2023 | Geo: EU+ASIA | Age: 2020–2023 | Profile filled with real friends: 50+ | Email Included + 2FA included | Real accounts | Price from $4.5 ➡SORA 2 | Invite code for YOUR account or a READY ChatGPT account + Sora 2 (read the product description) | Price from $2 ➡Instagram REALLY OLD accounts (2010–2013) with/without 2FA access | Country: MIX | Submail included | Price from $4 ➡Reddit FOR ONLYFANS Karma OLD Accounts | 1,000–10,000 KARMA (your choice) | MIX IP Registered | High-Quality Accounts for ONLYFANS WORKERS | Price from $4 ➡Mail.tm (temporary mails) AutoReg Account | Mixed IPs and Mixed Gender | IMAP, POP3, and SMTP Enabled | Price from $0.005 ➡ShadowSocks, VLESS, Trojan VPN Client | Any Country of Your Choice | Works on All Devices and in Any Country (Including Russia!) | Duration: 30/90/180/360 days | Price from $3 ➡TIKTOK ADS VERIFIED ACCOUNTS | GEO: ASIA/USA/EUROPE, AFRICA, ARABIC COUNTRIES, SOUTH AMERICA | Business Verified On ASIA/USA/EUROPE Company + POSTPAY | FULL ACCESS | Price from: $20 ➡TIKTOK ADS ACCOUNTS | GEO: Europe + Australia (your choice) | Business Verified + POSTPAY + BONUS COUPON for $6000 | Manual Registration | Email access + Cookies + VAT Info | Price from: $6 ➡Telegram API/HASH USA +1 Autoreg 1+ month age TDATA + SESSION + JSON + 2FA + API/HASH ID | Price from: $0.95 ➡KYC Business Verification Services | Verification for any service | Available geo: EUROPE, USA, ASIA Companies | Price from $300 ➡Telegram USA/Canada +1 with ACTIVE PREMIUM UP TO 01.12.2025 Autoreg | Age: from 6+ months | TDATA + SESSION + JSON + 2FA + PREMIUM | Price from $0.65 ➡Telegram USA/Canada +1 with ACTIVE PREMIUM (30 DAYS) Autoreg | Age: from 6+ months | TDATA + SESSION + JSON + 2FA + PREMIUM for 30 DAYS | Price from $5 Available for purchase in our store on the website or via the Telegram bot! Active links: Digital goods store (Website): Go to Store Telegram bot: Go to – convenient access to the store through the Telegram messenger. Other services: Virtual numbers service: Go to Telegram bot for purchasing Telegram Stars: Go to – fast and profitable purchase of Stars in Telegram. SMM Panel: Go to – promotion of your social media accounts. We want to present you the current list of promotions and special offers for purchasing our service’s products and services: 1. You can use a promo code for your first purchase: SOCNET (15% discount) 2. Get $1 on your store balance or a 10–20% discount — simply send your username after registering on our website using the following template: "SEND ME BONUS, MY USERNAME IS..." — you need to write this in our forum thread! 3. Get $1 for the first trial start of the SMM Panel: just open a ticket with the subject “Get Trial Bonus” on our website (Support). 4. Weekly Telegram Stars giveaways in our Telegram channel and in our bot for purchasing stars! News: ➡ Telegram channel: https://t.me/accsforyou_shop ➡ WhatsApp channel: https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t ➡ Discord server: https://discord.gg/y9AStFFsrh Contacts and Support: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock