Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * 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.usercommandhandlers;
- import net.sf.l2j.Config;
- import net.sf.l2j.gameserver.handler.IUserCommandHandler;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- public class ClassItems implements IUserCommandHandler
- {
- private static final int[] COMMAND_IDS =
- {
- 114,
- 115,
- 116,
- 117,
- 118,
- 119
- };
- @Override
- public boolean useUserCommand(int id, L2PcInstance activeChar)
- {
- if (activeChar.getInventory().getInventoryItemCount(57, 0) < Config.COMMANDS_ITEMS_PRICE)
- {
- activeChar.sendMessage("You do not have enough Adena to buy this Items!");
- return false;
- }
- if (activeChar.isInOlympiadMode())
- {
- activeChar.sendMessage("Sorry,you are in the Olympiad now.");
- return false;
- }
- if (activeChar.isInDuel())
- {
- activeChar.sendMessage("Sorry,you are in a duel!");
- return false;
- }
- if (activeChar.getKarma() > 0)
- {
- activeChar.sendMessage("Sorry,PK player can't use this.");
- return false;
- }
- if (activeChar.isDead())
- {
- activeChar.sendMessage("Sorry,Dead player can't take items.");
- return false;
- }
- if (id == 114)
- {
- activeChar.getInventory().destroyItemByItemId("Adena", 57, Config.COMMANDS_ITEMS_PRICE, activeChar, null);
- activeChar.getInventory().addItem("Angel Slayer", 6367, 1, activeChar, activeChar);
- activeChar.getInventory().addItem("Soulshots", 1467, 5000, 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.sendMessage("Now You Have Dagger Items On Your Invetory. Take a Look!.");
- }
- else if (id == 115)
- {
- activeChar.getInventory().destroyItemByItemId("Adena", 57, Config.COMMANDS_ITEMS_PRICE, activeChar, null);
- activeChar.getInventory().addItem("Draconic Bow", 7577, 1, activeChar, activeChar);
- activeChar.getInventory().addItem("Shining Arrows", 1345, 5000, activeChar, activeChar);
- activeChar.getInventory().addItem("Soulshots", 1467, 5000, 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.sendMessage("Now You Have Bow Items On Your Invetory. Take a Look!.");
- }
- else if (id == 116)
- {
- activeChar.getInventory().destroyItemByItemId("Adena", 57, Config.COMMANDS_ITEMS_PRICE, activeChar, null);
- activeChar.getInventory().addItem("Forgotten Blade", 6582, 1, activeChar, activeChar);
- activeChar.getInventory().addItem("Crusader Shield", 6680, 1, activeChar, activeChar);
- activeChar.getInventory().addItem("Soulshots", 1467, 5000, 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.sendMessage("Now You Have Tank Items On Your Invetory. Take a Look!.");
- }
- else if (id == 117)
- {
- activeChar.getInventory().destroyItemByItemId("Adena", 57, Config.COMMANDS_ITEMS_PRICE, activeChar, null);
- activeChar.getInventory().addItem("Duals", 6580, 1, activeChar, activeChar);
- activeChar.getInventory().addItem("Soulshots", 1467, 5000, 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.sendMessage("Now You Have Bow Items On Your Invetory. Take a Look!.");
- }
- else if (id == 118)
- {
- activeChar.getInventory().destroyItemByItemId("Adena", 57, Config.COMMANDS_ITEMS_PRICE, activeChar, null);
- activeChar.getInventory().addItem("Dualfist", 6372, 1, activeChar, activeChar);
- activeChar.getInventory().addItem("Soulshots", 1467, 5000, 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.sendMessage("Now You Have Bow Items On Your Invetory. Take a Look!.");
- }
- else if (id == 119)
- {
- activeChar.getInventory().destroyItemByItemId("Adena", 57, Config.COMMANDS_ITEMS_PRICE, activeChar, null);
- activeChar.getInventory().addItem("Arcana Mace Acumen", 6608, 1, activeChar, activeChar);
- activeChar.getInventory().addItem("B.Spirishots", 3952, 5000, 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.sendMessage("Now You Have Mage Items On Your Invetory. Take a Look!");
- }
- return true;
- }
- @Override
- public int[] getUserCommandList()
- {
- return COMMAND_IDS;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement