Jump to content

'Baggos'

Legendary Member
  • Posts

    3,874
  • Credits

  • Joined

  • Last visited

  • Days Won

    27
  • Feedback

    100%

Everything posted by 'Baggos'

  1. Τι πάει στραβά? EDIT: Σωστός... το άλλαξα σε: @Override public int[] getItemIds() { return ITEM_ID; } }
  2. Τι πάει στραβά? EDIT: Σωστός... το άλλαξα σε: @Override public int[] getItemIds() { return ITEM_ID; } }
  3. Δοκίμασε μία αυτό και πες μας! /* * 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.itemhandlers; import net.sf.l2j.Config; import net.sf.l2j.gameserver.cache.HtmCache; import net.sf.l2j.gameserver.handler.IItemHandler; import net.sf.l2j.gameserver.model.L2Character; import net.sf.l2j.gameserver.model.L2ItemInstance; import net.sf.l2j.gameserver.model.actor.instance.L2PlayableInstance; import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance; import net.sf.l2j.gameserver.serverpackets.NpcHtmlMessage; /** * @author UnSponsored * */ public class PopUpItem implements IItemHandler { private static final int[] ITEM_ID = { Config.AIO_ITEM_ID }; private L2Character activeChar; @Override public void useItem(L2PlayableInstance playable, L2ItemInstance item) { if (!(playable instanceof L2PcInstance)) return; String htmFile = "data/html/AIO/AIO.htm"; String htmContent = HtmCache.getInstance().getHtm(htmFile); NpcHtmlMessage infoHtml = new NpcHtmlMessage(1); infoHtml.setHtml(htmContent); activeChar.sendPacket(infoHtml); } public static int[] getItemId() { return ITEM_ID; } /* (non-Javadoc) * @see net.sf.l2j.gameserver.handler.IItemHandler#getItemIds() */ @Override public int[] getItemIds() { return ITEM_ID; } }
  4. Δοκίμασε μία αυτό και πες μας! /* * 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.itemhandlers; import net.sf.l2j.Config; import net.sf.l2j.gameserver.cache.HtmCache; import net.sf.l2j.gameserver.handler.IItemHandler; import net.sf.l2j.gameserver.model.L2Character; import net.sf.l2j.gameserver.model.L2ItemInstance; import net.sf.l2j.gameserver.model.actor.instance.L2PlayableInstance; import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance; import net.sf.l2j.gameserver.serverpackets.NpcHtmlMessage; /** * @author UnSponsored * */ public class PopUpItem implements IItemHandler { private static final int[] ITEM_ID = { Config.AIO_ITEM_ID }; private L2Character activeChar; @Override public void useItem(L2PlayableInstance playable, L2ItemInstance item) { if (!(playable instanceof L2PcInstance)) return; String htmFile = "data/html/AIO/AIO.htm"; String htmContent = HtmCache.getInstance().getHtm(htmFile); NpcHtmlMessage infoHtml = new NpcHtmlMessage(1); infoHtml.setHtml(htmContent); activeChar.sendPacket(infoHtml); } public static int[] getItemId() { return ITEM_ID; } /* (non-Javadoc) * @see net.sf.l2j.gameserver.handler.IItemHandler#getItemIds() */ @Override public int[] getItemIds() { return ITEM_ID; } }
  5. Δεν ήξερα καν ποιος το κλείδωσε! Τέλος πάντων. Ας κλειδωθεί αυτό. Ευχαριστώ και συγνώμη για το αναστάτωμα!!!
  6. Δεν ήξερα καν ποιος το κλείδωσε! Τέλος πάντων. Ας κλειδωθεί αυτό. Ευχαριστώ και συγνώμη για το αναστάτωμα!!!
  7. Ναι, επειδή έγραψα " κάντε κάτι σωστό " πιστεύω δεν χρειάζεται να απαντήσει έτσι. Όμως δε θέλω να κάνω θέμα το ΠΜ. Απλή απάντηση ήταν... Απλά Zake, δώστε λόγο όταν κλειδώνεται κάτι, όχι έτσι στα ξεκάρφωτα. Βέβαια δεν αναφέρομαι σε εσένα, είμαι λίγες μέρες εδώ μετά το unban, και έχουν αλλάξει πολύ τα πράγματα. Δεν το κάνω επίτηδες στο θέμα "κανόνες" ούτε έκατσα να τους ξαναδιαβάσω για να πω την αλήθεια, απλά αυτό που έκανα χθες, δεν νομίζω να είναι μέσα στους κανόνες. Το έβαλα απλά και στο Greek Section. Δεν ήθελα να ανοίξω θέμα με Report, ούτε έδωσα κάποιο άτομο, και αυτός που απάντησε έτσι σε ΠΜ απλά ας προσέχει την επόμενη φορά να μιλάει καλύτερα. Δεν ήμαστε ούτε τίποτα "βλάκες" ούτε πιστεύω έχω δώσει λόγο στο φόρουμ για να έχω τέτοιου είδους απάντηση. (Δεν κοκκίνισα, είπαμε, και η απάντηση για μένα φαίνεται "απλή" κάποιος άλλος όμως.... τέσπα) Εγώ πίστευα ήτανε επειδή "υπάρχει" ήδη αυτό που έκανα. Που πιστεύω βλέπετε αν είναι αντιγραφή ή όχι. Όμως θα κάνω ένα update στον κώδικα αφού πείραξε τόσο τον συγκεκριμένο που το κλείδωσε.
  8. Ναι, επειδή έγραψα " κάντε κάτι σωστό " πιστεύω δεν χρειάζεται να απαντήσει έτσι. Όμως δε θέλω να κάνω θέμα το ΠΜ. Απλή απάντηση ήταν... Απλά Zake, δώστε λόγο όταν κλειδώνεται κάτι, όχι έτσι στα ξεκάρφωτα. Βέβαια δεν αναφέρομαι σε εσένα, είμαι λίγες μέρες εδώ μετά το unban, και έχουν αλλάξει πολύ τα πράγματα. Δεν το κάνω επίτηδες στο θέμα "κανόνες" ούτε έκατσα να τους ξαναδιαβάσω για να πω την αλήθεια, απλά αυτό που έκανα χθες, δεν νομίζω να είναι μέσα στους κανόνες. Το έβαλα απλά και στο Greek Section. Δεν ήθελα να ανοίξω θέμα με Report, ούτε έδωσα κάποιο άτομο, και αυτός που απάντησε έτσι σε ΠΜ απλά ας προσέχει την επόμενη φορά να μιλάει καλύτερα. Δεν ήμαστε ούτε τίποτα "βλάκες" ούτε πιστεύω έχω δώσει λόγο στο φόρουμ για να έχω τέτοιου είδους απάντηση. (Δεν κοκκίνισα, είπαμε, και η απάντηση για μένα φαίνεται "απλή" κάποιος άλλος όμως.... τέσπα) Εγώ πίστευα ήτανε επειδή "υπάρχει" ήδη αυτό που έκανα. Που πιστεύω βλέπετε αν είναι αντιγραφή ή όχι. Όμως θα κάνω ένα update στον κώδικα αφού πείραξε τόσο τον συγκεκριμένο που το κλείδωσε.
  9. Να γράψουν ένα λόγο από κάτω πως αυτός είναι λόγος. Επίσης από Moderator, όταν είπα σε ΠΜ προσέχτε τι κάνετε, πήρα απάντηση: Σκάσε, 50 φορές το ίδιο Share. === Δε χρειάζεται να πω ποιος, απλά ας μάθει να μιλάει!!! Σίγουρα.... Την είδε πολύ κάπως! Σφάλμα του Μαχτορ αυτή του η κίνηση να τον βάλει εδώ!!!
  10. Να γράψουν ένα λόγο από κάτω πως αυτός είναι λόγος. Επίσης από Moderator, όταν είπα σε ΠΜ προσέχτε τι κάνετε, πήρα απάντηση: Σκάσε, 50 φορές το ίδιο Share. === Δε χρειάζεται να πω ποιος, απλά ας μάθει να μιλάει!!! Σίγουρα.... Την είδε πολύ κάπως! Σφάλμα του Μαχτορ αυτή του η κίνηση να τον βάλει εδώ!!!
  11. Στο παρακάτω σύνδεσμο, κλειδώσανε μία δουλειά, η οποία μου πήρε πολύ ώρα για να την κάνω. Δεν ήξερα ότι υπήρχε, αλλά ακόμη και να ήξερα, ποιος ο λόγος να κλειδωθεί? Αν είναι c/p φαίνεται πολύ καλά. Όμως ακόμη και c/p να τον έκανα, σεβαστείτε τον χρόνο που πήρε. Επίσης υπάρχουν πολλά Share εδώ μέσα τα οποία είναι ίδια. Κλειδώνουμε τι? Μία δουλειά που σίγουρα είναι διαφορετική από την ήδη υπάρχουσα? Αυτά, αν είμαι λάθος συγνώμη! http://maxcheaters.com/forum/index.php?topic=249645.0
  12. Στο παρακάτω σύνδεσμο, κλειδώσανε μία δουλειά, η οποία μου πήρε πολύ ώρα για να την κάνω. Δεν ήξερα ότι υπήρχε, αλλά ακόμη και να ήξερα, ποιος ο λόγος να κλειδωθεί? Αν είναι c/p φαίνεται πολύ καλά. Όμως ακόμη και c/p να τον έκανα, σεβαστείτε τον χρόνο που πήρε. Επίσης υπάρχουν πολλά Share εδώ μέσα τα οποία είναι ίδια. Κλειδώνουμε τι? Μία δουλειά που σίγουρα είναι διαφορετική από την ήδη υπάρχουσα? Αυτά, αν είμαι λάθος συγνώμη! http://maxcheaters.com/forum/index.php?topic=249645.0
  13. Hello! Όταν ένας player πατάει .daggeritems, τότε παίρνει 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) Εδώ δημιουργούμε ένα νέο Class με όνομα 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; } }
  14. 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; } }
  15. Ναι, θα προσπαθήσω μέχρι αύριο να είναι κάπως έτσι. Όμως, στο κώδικα πες βάζω levelcheck, η area όμως πως θα γίνει με levelcheck?
  16. Πες μου έναν low rate server, που έχει Protection στο θέμα των level up areas. :P Σπάνιο πιστεύω.... όμως αν το θέμα είναι το levelcheck, ας γίνει.
  17. Δουλεύει κανονικά ναι. Δοκιμασμένο, δοκίμασε το και εσύ. Όμως όσο για τα άλλα που είπες, δεν κατάλαβα γιατί να μπει levelcheck? Αυτό που έκανα απλά, από όπου και να είσαι, σε πάει στο χ location. Ακόμη και να μπει level check, σίγουρα στην Gatekeeper θα υπάρχουν αυτά τα Areas, θα τα βάλει ο Admin 100%. Δεν είναι κάτι, απλά είσαι στο χ μέρος και θέλεις να πας να exp στα 40lvl π.χ, απλά αντί για Gatekeeper, πας με το .lvl40
  18. Yes there is, but the problem? not stopping nor with esc. When player is on this mode, can't stop the teleport. And Thank you dude.
  19. Σαφώς και θα ήτανε καλύτερο, όμως αν χρησιμοποιήσει κάποιος τον κώδικα, θα έχει και τα ίδια areas στην Gatekeeper, οπότε τσάμπα το μπλοκάρουμε από εδώ.
  20. Καλησπέρα. Μοιράζομαι το εξής!!! Commands: .lvl20 / .lvl40 / .lvl60 / .lvl75 For Interlude. config: # Specified reward item rnd qty ChampionRewardItemQty = 1 + +# ---------------------------------------------- +# Level Up Areas +# ---------------------------------------------- +# Custom Level Zones. (.lvl20) +Lvl20CommandAllow = True +# Enter your spawn Location. +lvl20_X = x +lvl20_Y = y +lvl20_Z = z +Level20Messenge = You are in 20 Level Area. + +# Custom Level Zones. (.lvl40) +Lvl40CommandAllow = True # Enter your spawn Location. +lvl40_X = x +lvl40_Y = y +lvl40_Z = z +Level20Messenge = You are in 40 Level Area. + +# Custom Level Zones. (.lvl60) +Lvl60CommandAllow = True # Enter your spawn Location. +lvl60_X = x +lvl60_Y = y +lvl60_Z = z ++Level20Messenge = You are in 60 Level Area. + +# Custom Level Zones. (.lvl75) +Lvl75CommandAllow = True # Enter your spawn Location. +lvl75_X = x +lvl75_Y = y +lvl75_Z = z +Level20Messenge = You are in 75 Level Area. + ===== Index: sf/l2j/config.java public static int L2JMOD_CHAMPION_REWARD_QTY; + public static String LVL20_MESSAGE; + public static String LVL40_MESSAGE; + public static String LVL60_MESSAGE; + public static String LVL75_MESSAGE; + public static boolean LVL20_COMMAND_ALLOW; + public static boolean LVL40_COMMAND_ALLOW; + public static boolean LVL60_COMMAND_ALLOW; + public static boolean LVL75_COMMAND_ALLOW; + public static int LVL20_X; + public static int LVL20_Y; + public static int LVL20_Z; + public static int LVL40_X; + public static int LVL40_Y; + public static int LVL40_Z; + public static int LVL60_X; + public static int LVL60_Y; + public static int LVL60_Z; + public static int LVL75_X; + public static int LVL75_Y; + public static int LVL75_Z; L2JMOD_CHAMPION_REWARD_QTY = Integer.parseInt(L2JModSettings.getProperty("ChampionRewardItemQty", "1")); + LVL20_COMMAND_ALLOW = Boolean.parseBoolean(L2JModSettings.getProperty("Lvl20CommandAllow", "false")); + LVL40_COMMAND_ALLOW = Boolean.parseBoolean(L2JModSettings.getProperty("Lvl40CommandAllow", "false")); + LVL60_COMMAND_ALLOW = Boolean.parseBoolean(L2JModSettings.getProperty("Lvl60CommandAllow", "false")); + LVL75_COMMAND_ALLOW = Boolean.parseBoolean(L2JModSettings.getProperty("Lvl75CommandAllow", "false")); + LVL20_X = Integer.parseInt(L2JModSettings.getProperty("lvl20_X", "x)); + LVL20_Y = Integer.parseInt(L2JModSettings.getProperty("lvl20_Y", "y")); + LVL20_Z = Integer.parseInt(L2JModSettings.getProperty("lvl20_Z", "z")); + LVL40_X = Integer.parseInt(L2JModSettings.getProperty("lvl40_X", "x)); + LVL40_Y = Integer.parseInt(L2JModSettings.getProperty("lvl40_Y", "y")); + LVL40_Z = Integer.parseInt(L2JModSettings.getProperty("lvl40_Z", "z")); + LVL60_X = Integer.parseInt(L2JModSettings.getProperty("lvl60_X", "x")); + LVL60_Y = Integer.parseInt(L2JModSettings.getProperty("lvl60_Y", "y")); + LVL60_Z = Integer.parseInt(L2JModSettings.getProperty("lvl60_Z", "z")); + LVL75_X = Integer.parseInt(L2JModSettings.getProperty("lvl75_X", "x")); + LVL75_Y = Integer.parseInt(L2JModSettings.getProperty("lvl75_Y", "y")); + LVL75_Z = Integer.parseInt(L2JModSettings.getProperty("lvl75_Z", "z")); + LVL20_MESSAGE = L2JModSettings.getProperty("Level20Messenge", "You have been teleported to Farm Zone 1!"); + LVL40_MESSAGE = L2JModSettings.getProperty("Level40Messenge", "You have been teleported to Farm Zone 2!"); + LVL60_MESSAGE = L2JModSettings.getProperty("Level60Messenge", "You have been teleported to PvP Zone 1!"); + LVL75_MESSAGE = L2JModSettings.getProperty("Level75Messenge", "You have been teleported to PvP Zone 2!"); ===== 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.LVL20_COMMAND_ALLOW || Config.LVL40_COMMAND_ALLOW || Config.LVL60_COMMAND_ALLOW || Config.LVL75_COMMAND_ALLOW) + { + registerVoicedCommandHandler(new LevelZones()); + } } public void registerVoicedCommandHandler(IVoicedCommandHandler handler) Εδώ δημιουργούμε ένα καινούριο Class με όνομα LevelZone.java ===== Index: net.sf.l2j.gameserver.handler.voicedcommandhandlers.LevelZones.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.SetupGauge; import net.sf.l2j.gameserver.ThreadPoolManager; @SuppressWarnings("unused") public class LevelZones implements net.sf.l2j.gameserver.handler.IVoicedCommandHandler { private static final String[] VOICED_COMMANDS = { "lvl20", "lvl40", "lvl60", "lvl75" }; @Override public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target) { int placex; int placey; int placez; String message; if(command.equalsIgnoreCase("lvl20") && Config.LVL20_COMMAND_ALLOW) { placex = Config.LVL20_X; placey = Config.LVL20_Y; placez = Config.LVL20_Z; message = Config.LVL20_MESSAGE; } else if(command.equalsIgnoreCase("lvl40") && Config.LVL40_COMMAND_ALLOW) { placex = Config.LVL40_X; placey = Config.LVL40_Y; placez = Config.LVL40_Z; message = Config.LVL40_MESSAGE; } else if(command.equalsIgnoreCase("lvl60") && Config.LVL60_COMMAND_ALLOW) { placex = Config.LVL60_X; placey = Config.LVL60_Y; placez = Config.LVL60_Z; message = Config.LVL60_MESSAGE; } else if(command.equalsIgnoreCase("lvl75") && Config.LVL75_COMMAND_ALLOW) { placex = Config.LVL75_X; placey = Config.LVL75_Y; placez = Config.LVL75_Z; message = Config.LVL75_MESSAGE; } else return false; if(activeChar.isInJail()) { activeChar.sendMessage("Sorry,you are in Jail!"); return false; } else 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.inObserverMode()) { activeChar.sendMessage("Sorry,you are in the observation mode."); return false; } else if(activeChar.isFestivalParticipant()) { activeChar.sendMessage("Sorry,you are in a festival."); 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 teleport."); return false; } else if(activeChar.isFakeDeath()) { activeChar.sendMessage("Sorry,on fake death mode can't use this."); return false; } else if(activeChar.atEvent) { activeChar.sendMessage("Sorry,you are on event now."); return false; } SetupGauge sg = new SetupGauge(SetupGauge.BLUE, 15000); activeChar.sendPacket(sg); sg = null; activeChar.setIsImobilised(true); ThreadPoolManager.getInstance().scheduleGeneral(new teleportTask(activeChar, placex, placey, placez, message), 15000); return true; } @Override public String[] getVoicedCommandList() { return VOICED_COMMANDS; } class teleportTask implements Runnable { private final L2PcInstance _activeChar; private final int _x; private final int _y; private final int _z; private final String _message; teleportTask(L2PcInstance activeChar, int x, int y, int z, String message) { _activeChar = activeChar; _x = x; _y = y; _z = z; _message = message; } @Override public void run() { if(_activeChar == null) return; _activeChar.teleToLocation(_x, _y, _z); _activeChar.sendMessage(_message); _activeChar.setIsImobilised(false); } } }
  21. Commands: .lvl20 / .lvl40 / .lvl60 / .lvl75 config: # Specified reward item rnd qty ChampionRewardItemQty = 1 + +# ---------------------------------------------- +# Level Up Areas +# ---------------------------------------------- +# Custom Level Zones. (.lvl20) +Lvl20CommandAllow = True +# Enter your spawn Location. +lvl20_X = x +lvl20_Y = y +lvl20_Z = z +Level20Messenge = You are in 20 Level Area. + +# Custom Level Zones. (.lvl40) +Lvl40CommandAllow = True # Enter your spawn Location. +lvl40_X = x +lvl40_Y = y +lvl40_Z = z +Level20Messenge = You are in 40 Level Area. + +# Custom Level Zones. (.lvl60) +Lvl60CommandAllow = True # Enter your spawn Location. +lvl60_X = x +lvl60_Y = y +lvl60_Z = z ++Level20Messenge = You are in 60 Level Area. + +# Custom Level Zones. (.lvl75) +Lvl75CommandAllow = True # Enter your spawn Location. +lvl75_X = x +lvl75_Y = y +lvl75_Z = z +Level20Messenge = You are in 75 Level Area. + ===== Index: sf/l2j/config.java public static int L2JMOD_CHAMPION_REWARD_QTY; + public static String LVL20_MESSAGE; + public static String LVL40_MESSAGE; + public static String LVL60_MESSAGE; + public static String LVL75_MESSAGE; + public static boolean LVL20_COMMAND_ALLOW; + public static boolean LVL40_COMMAND_ALLOW; + public static boolean LVL60_COMMAND_ALLOW; + public static boolean LVL75_COMMAND_ALLOW; + public static int LVL20_X; + public static int LVL20_Y; + public static int LVL20_Z; + public static int LVL40_X; + public static int LVL40_Y; + public static int LVL40_Z; + public static int LVL60_X; + public static int LVL60_Y; + public static int LVL60_Z; + public static int LVL75_X; + public static int LVL75_Y; + public static int LVL75_Z; L2JMOD_CHAMPION_REWARD_QTY = Integer.parseInt(L2JModSettings.getProperty("ChampionRewardItemQty", "1")); + LVL20_COMMAND_ALLOW = Boolean.parseBoolean(L2JModSettings.getProperty("Lvl20CommandAllow", "false")); + LVL40_COMMAND_ALLOW = Boolean.parseBoolean(L2JModSettings.getProperty("Lvl40CommandAllow", "false")); + LVL60_COMMAND_ALLOW = Boolean.parseBoolean(L2JModSettings.getProperty("Lvl60CommandAllow", "false")); + LVL75_COMMAND_ALLOW = Boolean.parseBoolean(L2JModSettings.getProperty("Lvl75CommandAllow", "false")); + LVL20_X = Integer.parseInt(L2JModSettings.getProperty("lvl20_X", "x)); + LVL20_Y = Integer.parseInt(L2JModSettings.getProperty("lvl20_Y", "y")); + LVL20_Z = Integer.parseInt(L2JModSettings.getProperty("lvl20_Z", "z")); + LVL40_X = Integer.parseInt(L2JModSettings.getProperty("lvl40_X", "x)); + LVL40_Y = Integer.parseInt(L2JModSettings.getProperty("lvl40_Y", "y")); + LVL40_Z = Integer.parseInt(L2JModSettings.getProperty("lvl40_Z", "z")); + LVL60_X = Integer.parseInt(L2JModSettings.getProperty("lvl60_X", "x")); + LVL60_Y = Integer.parseInt(L2JModSettings.getProperty("lvl60_Y", "y")); + LVL60_Z = Integer.parseInt(L2JModSettings.getProperty("lvl60_Z", "z")); + LVL75_X = Integer.parseInt(L2JModSettings.getProperty("lvl75_X", "x")); + LVL75_Y = Integer.parseInt(L2JModSettings.getProperty("lvl75_Y", "y")); + LVL75_Z = Integer.parseInt(L2JModSettings.getProperty("lvl75_Z", "z")); + LVL20_MESSAGE = L2JModSettings.getProperty("Level20Messenge", "You have been teleported to Farm Zone 1!"); + LVL40_MESSAGE = L2JModSettings.getProperty("Level40Messenge", "You have been teleported to Farm Zone 2!"); + LVL60_MESSAGE = L2JModSettings.getProperty("Level60Messenge", "You have been teleported to PvP Zone 1!"); + LVL75_MESSAGE = L2JModSettings.getProperty("Level75Messenge", "You have been teleported to PvP Zone 2!"); ===== 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.LVL20_COMMAND_ALLOW || Config.LVL40_COMMAND_ALLOW || Config.LVL60_COMMAND_ALLOW || Config.LVL75_COMMAND_ALLOW) + { + registerVoicedCommandHandler(new LevelZones()); + } } public void registerVoicedCommandHandler(IVoicedCommandHandler handler) Create a New Class LevelZone.java ===== Index: net.sf.l2j.gameserver.handler.voicedcommandhandlers.LevelZones.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.SetupGauge; import net.sf.l2j.gameserver.ThreadPoolManager; @SuppressWarnings("unused") public class LevelZones implements net.sf.l2j.gameserver.handler.IVoicedCommandHandler { private static final String[] VOICED_COMMANDS = { "lvl20", "lvl40", "lvl60", "lvl75" }; @Override public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target) { int placex; int placey; int placez; String message; if(command.equalsIgnoreCase("lvl20") && Config.LVL20_COMMAND_ALLOW) { placex = Config.LVL20_X; placey = Config.LVL20_Y; placez = Config.LVL20_Z; message = Config.LVL20_MESSAGE; } else if(command.equalsIgnoreCase("lvl40") && Config.LVL40_COMMAND_ALLOW) { placex = Config.LVL40_X; placey = Config.LVL40_Y; placez = Config.LVL40_Z; message = Config.LVL40_MESSAGE; } else if(command.equalsIgnoreCase("lvl60") && Config.LVL60_COMMAND_ALLOW) { placex = Config.LVL60_X; placey = Config.LVL60_Y; placez = Config.LVL60_Z; message = Config.LVL60_MESSAGE; } else if(command.equalsIgnoreCase("lvl75") && Config.LVL75_COMMAND_ALLOW) { placex = Config.LVL75_X; placey = Config.LVL75_Y; placez = Config.LVL75_Z; message = Config.LVL75_MESSAGE; } else return false; if(activeChar.isInJail()) { activeChar.sendMessage("Sorry,you are in Jail!"); return false; } else 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.inObserverMode()) { activeChar.sendMessage("Sorry,you are in the observation mode."); return false; } else if(activeChar.isFestivalParticipant()) { activeChar.sendMessage("Sorry,you are in a festival."); 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 teleport."); return false; } else if(activeChar.isFakeDeath()) { activeChar.sendMessage("Sorry,on fake death mode can't use this."); return false; } else if(activeChar.atEvent) { activeChar.sendMessage("Sorry,you are on event now."); return false; } SetupGauge sg = new SetupGauge(SetupGauge.BLUE, 15000); activeChar.sendPacket(sg); sg = null; activeChar.setIsImobilised(true); ThreadPoolManager.getInstance().scheduleGeneral(new teleportTask(activeChar, placex, placey, placez, message), 15000); return true; } @Override public String[] getVoicedCommandList() { return VOICED_COMMANDS; } class teleportTask implements Runnable { private final L2PcInstance _activeChar; private final int _x; private final int _y; private final int _z; private final String _message; teleportTask(L2PcInstance activeChar, int x, int y, int z, String message) { _activeChar = activeChar; _x = x; _y = y; _z = z; _message = message; } @Override public void run() { if(_activeChar == null) return; _activeChar.teleToLocation(_x, _y, _z); _activeChar.sendMessage(_message); _activeChar.setIsImobilised(false); } } }
  22. I give 9euro paypal for 10euro paysafecard! Fast a Trade!
  23. Θέλω ένα Trade στα γρήγορα. Ευχαριστώ!!!
×
×
  • Create New...