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
  On 9/7/2012 at 7:29 PM, p0nyrider said:

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
  On 9/7/2012 at 7:33 PM, p0nyrider said:

To add the items in inventory smart ass. Huh;

You must be kidding.
Posted
  On 9/7/2012 at 7:35 PM, Pauler said:

You must be kidding.

Maybe you must be kidding. Did you understand what I tell him to do?
Posted
  On 9/7/2012 at 7:35 PM, Pauler said:

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
  On 9/7/2012 at 7:36 PM, p0nyrider said:

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
  On 9/7/2012 at 7:41 PM, Pauler said:

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
  On 9/7/2012 at 7:45 PM, p0nyrider said:

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
  On 9/7/2012 at 7:49 PM, Pauler said:

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
  On 9/7/2012 at 7:50 PM, p0nyrider said:

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
  On 8/29/2012 at 10:03 PM, 'Baggos' said:

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

    • Running ads or working with voice verification? We provide the essential tools for arbitrage, marketing, e-commerce, and anonymous operations! Ready-to-use Google Ads and Google Voice accounts — verified, warmed up, with logs and full access. Perfect for: ✔ Media buyers launching campaigns via Google ✔ Agencies and PPC specialists ✔ Businesses needing fast and safe ad launches without bans ✔ Users working with Google Voice (2nd-step verification, US numbers, etc.) ✔ Google Ads: accounts with budgets from €10 to $1000+, with or without verification ✔ All come with 2FA, backup email, cookies, and UserAgent Promo code: GOOGLE10 (10% discount) Payment: bank cards · crypto · other popular methods How to buy: ➡ Online Store: Click ➡ Telegram Bot: Click Other services: ➡ SMM Panel: Click Assortment: ➡Google Voice Accounts (GMAIL US NEW) | Year: 2024 (random) | Phone Verified | Price from: $9.00 ➡Google Voice Accounts (GMAIL US OLD) | Year: 2006–2018 | Phone Verified | Price from: $14.00 ➡Google Ads Account USA/EUROPE (UK, Germany, France, etc.) | Manually farmed 7+ days | Created ad account | Includes 2FA, backup codes, backup email, UserAgent, Cookies | Price from: $13.00 ➡Google Ads Account USA/EUROPE | VERIFICATION COMPLETED – €10 BILL | Manually farmed 7+ days | Ad created | Includes 2FA, backup email, UserAgent, Cookies | Price from: $55.00 ➡Google Ads Account EUROPE/USA with ad campaigns and spend $100/$500/$1000+ | Verification not completed | Full access & setup | Price from: $200.00 ➡Google Ads Account EUROPE/USA with ad campaigns and spend $100/$500/$1000+ | Verification completed | Full access & setup | Price from: $400.00 Regular buyers get extra discounts and promo codes! Support: ➡ Telegram: https://t.me/solomon_bog ➡ Discord: https://discord.gg/y9AStFFsrh ➡ WhatsApp: https://wa.me/79051904467 ➡ ✉ Email: solomonbog@socnet.store ➡ Telegram Channel: https://t.me/accsforyou_shop You can also use these contacts to: — Discuss wholesale orders — Propose partnerships (current partners: https://socnet.bgng.io/partners ) — Become a supplier SocNet — Digital Goods & Premium Subscriptions Store
    • Running ads or working with voice verification? We provide the essential tools for arbitrage, marketing, e-commerce, and anonymous operations! Ready-to-use Google Ads and Google Voice accounts — verified, warmed up, with logs and full access. Perfect for: ✔ Media buyers launching campaigns via Google ✔ Agencies and PPC specialists ✔ Businesses needing fast and safe ad launches without bans ✔ Users working with Google Voice (2nd-step verification, US numbers, etc.) ✔ Google Ads: accounts with budgets from €10 to $1000+, with or without verification ✔ All come with 2FA, backup email, cookies, and UserAgent Promo code: GOOGLE10 (10% discount) Payment: bank cards · crypto · other popular methods How to buy: ➡ Online Store: Click ➡ Telegram Bot: Click Other services: ➡ SMM Panel: Click Assortment: ➡Google Voice Accounts (GMAIL US NEW) | Year: 2024 (random) | Phone Verified | Price from: $9.00 ➡Google Voice Accounts (GMAIL US OLD) | Year: 2006–2018 | Phone Verified | Price from: $14.00 ➡Google Ads Account USA/EUROPE (UK, Germany, France, etc.) | Manually farmed 7+ days | Created ad account | Includes 2FA, backup codes, backup email, UserAgent, Cookies | Price from: $13.00 ➡Google Ads Account USA/EUROPE | VERIFICATION COMPLETED – €10 BILL | Manually farmed 7+ days | Ad created | Includes 2FA, backup email, UserAgent, Cookies | Price from: $55.00 ➡Google Ads Account EUROPE/USA with ad campaigns and spend $100/$500/$1000+ | Verification not completed | Full access & setup | Price from: $200.00 ➡Google Ads Account EUROPE/USA with ad campaigns and spend $100/$500/$1000+ | Verification completed | Full access & setup | Price from: $400.00 Regular buyers get extra discounts and promo codes! Support: ➡ Telegram: https://t.me/solomon_bog ➡ Discord: https://discord.gg/y9AStFFsrh ➡ WhatsApp: https://wa.me/79051904467 ➡ ✉ Email: solomonbog@socnet.store ➡ Telegram Channel: https://t.me/accsforyou_shop You can also use these contacts to: — Discuss wholesale orders — Propose partnerships (current partners: https://socnet.bgng.io/partners ) — Become a supplier SocNet — Digital Goods & Premium Subscriptions 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