Jump to content

Łighto™

Members
  • Posts

    263
  • Credits

  • Joined

  • Last visited

    Never
  • Feedback

    0%

About Łighto™

Profile Information

  • Gender
    Male
  • Location
    Greece
  • Interests
    Discipline

Łighto™'s Achievements

Newbie

Newbie (1/16)

0

Reputation

  1. Hello people. Since i helped a guy here "http://www.maxcheaters.com/forum/index.php?topic=126391.0" with the same issue, i decided to share the admin command //mass_create. How it works? You type //mass_create itemID amount (e.g //mass_create 57 1 -> This will add 1 adena to every online player) Tested in L2J Interlude and works fine. package net.sf.l2j.gameserver.handler.admincommandhandlers; import java.util.StringTokenizer; import net.sf.l2j.Config; import net.sf.l2j.gameserver.datatables.ItemTable; import net.sf.l2j.gameserver.handler.IAdminCommandHandler; import net.sf.l2j.gameserver.model.GMAudit; import net.sf.l2j.gameserver.model.L2World; import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance; import net.sf.l2j.gameserver.serverpackets.ItemList; import net.sf.l2j.gameserver.templates.L2Item; public class AdminMassCreate implements IAdminCommandHandler { private static final String[] ADMIN_COMMANDS = { "admin_mass_create" }; private static final int REQUIRED_LEVEL = Config.GM_CREATE_ITEM; // you need the same access level as create_item. public boolean useAdminCommand(String command, L2PcInstance activeChar) { if (!Config.ALT_PRIVILEGES_ADMIN) { if (!(checkLevel(activeChar.getAccessLevel()) && activeChar.isGM())) return false; } GMAudit.auditGMAction(activeChar.getName(), command, (activeChar.getTarget() != null?activeChar.getTarget().getName():"no-target"), ""); if (command.startsWith("admin_mass_create")) { try { String val = command.substring(17); StringTokenizer st = new StringTokenizer(val); if (st.countTokens() == 2) { String id = st.nextToken(); int idval = Integer.parseInt(id); String num = st.nextToken(); int numval = Integer.parseInt(num); massCreate(activeChar, idval, numval); } else if (st.countTokens() == 1) { String id = st.nextToken(); int idval = Integer.parseInt(id); massCreate(activeChar, idval, 1); } } catch (StringIndexOutOfBoundsException e) { activeChar.sendMessage("Usage: //itemcreate <itemId> [amount]"); } catch (NumberFormatException nfe) { activeChar.sendMessage("Specify a valid number."); } } return true; } private void massCreate(L2PcInstance activeChar, int idval, int numval) { for (L2PcInstance _players : L2World.getInstance().getAllPlayers()) { if (_players == activeChar) continue; _players.getInventory().addItem("Admin", idval, numval, _players, null); ItemList il = new ItemList(_players, true); _players.sendPacket(il); _players.sendMessage("Admin award you " + numval + " item(s) number " + idval); activeChar.sendMessage("You have spawned " + numval + " item(s) number " + idval + " in all chars inventory."); } } public String[] getAdminCommandList() { return ADMIN_COMMANDS; } private boolean checkLevel(int level) { return (level >= REQUIRED_LEVEL); } }
  2. No problem try ItemList il = new ItemList(_players, true); _players.sendPacket(il); _players.sendMessage("Admin spawned " + numval + " item(s) number " + idval + " in your inventory");
  3. Here you are /* * 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 2, 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, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA * 02111-1307, USA. * * http://www.gnu.org/copyleft/gpl.html */ package net.sf.l2j.gameserver.handler.admincommandhandlers; import java.util.StringTokenizer; import net.sf.l2j.Config; import net.sf.l2j.gameserver.datatables.ItemTable; import net.sf.l2j.gameserver.handler.IAdminCommandHandler; import net.sf.l2j.gameserver.model.GMAudit; import net.sf.l2j.gameserver.model.L2World; import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance; import net.sf.l2j.gameserver.serverpackets.ItemList; import net.sf.l2j.gameserver.templates.L2Item; /** * This class handles following admin commands: * - itemcreate = show menu * - create_item <id> [num] = creates num items with respective id, if num is not specified, assumes 1. * * @version $Revision: 1.2.2.2.2.3 $ $Date: 2005/04/11 10:06:06 $ */ public class AdminCreateItem implements IAdminCommandHandler { private static final String[] ADMIN_COMMANDS = { "admin_itemcreate", "admin_create_item", "admin_mass_create" }; private static final int REQUIRED_LEVEL = Config.GM_CREATE_ITEM; public boolean useAdminCommand(String command, L2PcInstance activeChar) { if (!Config.ALT_PRIVILEGES_ADMIN) { if (!(checkLevel(activeChar.getAccessLevel()) && activeChar.isGM())) return false; } GMAudit.auditGMAction(activeChar.getName(), command, (activeChar.getTarget() != null?activeChar.getTarget().getName():"no-target"), ""); if (command.equals("admin_itemcreate")) { AdminHelpPage.showHelpPage(activeChar, "itemcreation.htm"); } else if (command.startsWith("admin_create_item")) { try { String val = command.substring(17); StringTokenizer st = new StringTokenizer(val); if (st.countTokens()== 2) { String id = st.nextToken(); int idval = Integer.parseInt(id); String num = st.nextToken(); int numval = Integer.parseInt(num); createItem(activeChar,idval,numval); } else if (st.countTokens()== 1) { String id = st.nextToken(); int idval = Integer.parseInt(id); createItem(activeChar,idval,1); } } catch (StringIndexOutOfBoundsException e) { activeChar.sendMessage("Usage: //itemcreate <itemId> [amount]"); } catch (NumberFormatException nfe) { activeChar.sendMessage("Specify a valid number."); } AdminHelpPage.showHelpPage(activeChar, "itemcreation.htm"); } else if (command.startsWith("admin_mass_create")) { try { String val = command.substring(17); StringTokenizer st = new StringTokenizer(val); if (st.countTokens()== 2) { String id = st.nextToken(); int idval = Integer.parseInt(id); String num = st.nextToken(); int numval = Integer.parseInt(num); massCreate(activeChar,idval,numval); } else if (st.countTokens()== 1) { String id = st.nextToken(); int idval = Integer.parseInt(id); massCreate(activeChar,idval,1); } } catch (StringIndexOutOfBoundsException e) { activeChar.sendMessage("Usage: //itemcreate <itemId> [amount]"); } catch (NumberFormatException nfe) { activeChar.sendMessage("Specify a valid number."); } } return true; } /** * @param activeChar * @param idval * @param numval */ private void massCreate(L2PcInstance activeChar, int idval, int numval) { for (L2PcInstance _players : L2World.getInstance().getAllPlayers()) { if (_players == activeChar) continue; _players.getInventory().addItem("Admin", idval, numval, _players, null); ItemList il = new ItemList(_players, true); _players.sendPacket(il); activeChar.sendMessage("You have spawned " + numval + " item(s) number " + idval + " in all chars inventory."); } } public String[] getAdminCommandList() { return ADMIN_COMMANDS; } private boolean checkLevel(int level) { return (level >= REQUIRED_LEVEL); } private void createItem(L2PcInstance activeChar, int id, int num) { if (num > 20) { L2Item template = ItemTable.getInstance().getTemplate(id); if (!template.isStackable()) { activeChar.sendMessage("This item does not stack - Creation aborted."); return; } } activeChar.getInventory().addItem("Admin", id, num, activeChar, null); ItemList il = new ItemList(activeChar, true); activeChar.sendPacket(il); activeChar.sendMessage("You have spawned " + num + " item(s) number " + id + " in your inventory."); } } Just tested in l2j interlude. It works great.
  4. gameserver/model/base/SubClass.java private PlayerClass _class; private long _exp = Experience.LEVEL[40]; private int _sp = 0; private byte _level = 40; private int _classIndex = 1; Allakse ekei p leei 40, me oti 8es.. Dn xreiazete n kaneis config gia ka8e ti..
  5. Allazoun suxna ta agapimena mou tragoudia.. Anyway aftin tin periodo m'aresei afto http://www.youtube.com/watch?v=SbQMXe0GfdY M aresoun poli oi stoixoi tou...simenoun polla..
  6. The problem is that monsters aren't dropping items/adena etc on ground? OR they do not drop nothing at all!?
  7. Firstly good luck with your project. I Wish you the best. Secondly, do not even thinking of opening a server in order only to make money from the donates. The server will die in max 2-3 months. Also make sure you have the money in order to keep it alive for at least ~3,4 months. About the donations, just give some gifts to players.. accessories etc. Not custom armors, enchants & shits. Also remember -> Unique events, make the server unique. Try to not make another server, like alll the others because it will fail. :)
  8. To Empire Total War einai poli kalo.. An 8es dl link pes mou to na sto steilw se pm :)
  9. Do something with the website. We can't understand it :/. Make it in english. Anyway let's hope, this time the project will stay alive.
  10. xaxaxaxaxaxaxaxa eleoooooooooooos. ti eipe i kopelia....x0ax0ax0a0x0a0xa0
  11. to prwto einai : 5epistoles- dust rhymes. to allo dn kcerw.
  12. Yeah. Not only one or two times. I have also tried other (not free of course) companies and i can say that securesignup.net is one of the best!
  13. Pisteueis eilikrina oti oi real developers, 8a exoun provlima sto na dior8osoune ta bugs sto Int? ...
  14. Den 8a vreis kanenan sovaro developer na sto kanei tzapa... An eisai dia8etimenos na pliroseis, tote zita se kanenan apo edw : www.l2jserver.com/forum
  15. Aftos den itan logos na kaneis 2 thread. Anyway koita edw http://www.maxcheaters.com/forum/index.php?topic=125668.0
×
×
  • Create New...