Jump to content

`Rοmeο

Legendary Member
  • Posts

    8,223
  • Joined

  • Last visited

  • Days Won

    1
  • Feedback

    0%

Everything posted by `Rοmeο

  1. meybe the way is wrong but it work perfect ;D
  2. please man test it !!! Im begging you !!! You will see that is correct if you whant we can make an deal ? do you ? if the code is correct you will set me +1 if is wrong you will set me -1 ... I test it so many times ... It work perfect
  3. I don't agree man ... test it first then tell me what is wrong ... couse I have been tested it before post here !
  4. thanks I will keep my good work :) but one question I deserve karma for my share ??? :P ?
  5. Thanks Orgyilkos For the Help :) I have been added config for rec reward too. Have fun :)
  6. Albion™ your code don't work too ;) but thanks for trying to help me :)
  7. Wizzy your way is not corect too :-X So I update it. Now you will earn only 1 rec :-\ I hope soon to fix it to more !
  8. AWESOME :O I have never even thing about this ;D Thanks for making and share this THING ;D
  9. Hello there ! I decide to make an new voiced command named Recomend Shop ! When you type .buyrec you earn 1 rec ! If you like it here is the code for the server core: Index: D:/Games/Lineage 2/L2 Kingdom of Heaven Server/WorkSpace/GameServer/java/config/Mods.properties =================================================================== --- D:/Games/Lineage 2/L2 Kingdom of Heaven Server/WorkSpace/GameServer/java/config/Mods.properties (revision 15) +++ D:/Games/Lineage 2/L2 Kingdom of Heaven Server/WorkSpace/GameServer/java/config/Mods.properties (working copy) @@ -63,3 +63,18 @@ #Enable Weight Penalty ? WeightPenalty = True + +#---------------------------------------# +# Custom Recomends System # +#---------------------------------------# +#.buyrec enable ? +AlowBuyRec = True + +#Whats the ID of item that is need to buy rec ? +RecItemID = 57 + +#How many it cost ? +RecPrice = 50000000 + +#How many recs will buy ? +RecReward = 1 + Index: D:/Games/Lineage 2/L2 Kingdom of Heaven Server/WorkSpace/GameServer/java/net/sf/l2j/Config.java =================================================================== --- D:/Games/Lineage 2/L2 Kingdom of Heaven Server/WorkSpace/GameServer/java/net/sf/l2j/Config.java (revision 15) +++ D:/Games/Lineage 2/L2 Kingdom of Heaven Server/WorkSpace/GameServer/java/net/sf/l2j/Config.java (working copy) @@ -893,6 +893,12 @@ // Grade & Weight Penalty public static boolean GRADE_PENALTY; public static boolean WEIGHT_PENALTY; + + // Buy Rec System + public static boolean REC_BUY; + public static int REC_ITEM_ID; + public static int REC_PRICE; + public static int REC_REWARD; + // Packet information /** Count the amount of packets per minute ? */ @@ -1992,6 +1998,12 @@ GRADE_PENALTY = Boolean.parseBoolean(Mods.getProperty("GradePenalty", "True")); WEIGHT_PENALTY = Boolean.parseBoolean(Mods.getProperty("WeightPenalty", "True")); + REC_BUY = Boolean.parseBoolean(Mods.getProperty("AlowBuyRec", "True")); + REC_ITEM_ID = Integer.parseInt(Mods.getProperty("RecItemID", "57")); + REC_PRICE = Integer.parseInt(Mods.getProperty("RecPrice", "50000000")); + REC_REWARD = Integer.parseInt(Mods.getProperty("RecReward", "1")); + } catch (Exception e) { Index: D:/Games/Lineage 2/L2 Kingdom of Heaven Server/WorkSpace/GameServer/java/net/sf/l2j/gameserver/GameServer.java =================================================================== --- D:/Games/Lineage 2/L2 Kingdom of Heaven Server/WorkSpace/GameServer/java/net/sf/l2j/gameserver/GameServer.java (revision 10) +++ D:/Games/Lineage 2/L2 Kingdom of Heaven Server/WorkSpace/GameServer/java/net/sf/l2j/gameserver/GameServer.java (working copy) @@ -198,6 +198,7 @@ import net.sf.l2j.gameserver.handler.usercommandhandlers.Time; import net.sf.l2j.gameserver.handler.voicedcommandhandlers.Wedding; import net.sf.l2j.gameserver.handler.voicedcommandhandlers.stats; +import net.sf.l2j.gameserver.handler.voicedcommandhandlers.BuyRec; import net.sf.l2j.gameserver.idfactory.IdFactory; import net.sf.l2j.gameserver.instancemanager.AuctionManager; import net.sf.l2j.gameserver.instancemanager.BoatManager; @@ -592,6 +593,9 @@ if(Config.ALLOW_WEDDING) _voicedCommandHandler.registerVoicedCommandHandler(new Wedding()); + + if(Config.REC_BUY) + _voicedCommandHandler.registerVoicedCommandHandler(new BuyRec()); _log.config("VoicedCommandHandler: Loaded " + _voicedCommandHandler.size() + " handlers."); Now create new file named BuyRec.java in net.sf.l2j.gameserver.handler.voicedcommandhandler and add this: /* * 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; /** * @author SkyLancer */ public class BuyRec implements IVoicedCommandHandler { private static final String[] VOICED_COMMANDS = {"buyrec"}; public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target) { if (command.equalsIgnoreCase("buyrec")) { if(activeChar.getInventory().getItemByItemId(Config.REC_ITEM_ID) != null && activeChar.getInventory().getItemByItemId(Config.REC_ITEM_ID).getCount() >= Config.REC_PRICE) { activeChar.getInventory().destroyItemByItemId("Rec", Config.REC_ITEM_ID, Config.REC_PRICE, activeChar, activeChar.getTarget()); activeChar.setRecomHave(activeChar.getRecomHave() + Config.REC_REWARD); activeChar.sendMessage("You Have Earned "+Config.REC_REWARD+" Recomends."); activeChar.broadcastUserInfo(); } else { activeChar.sendMessage("You don't have enought items"); return true; } } return false; } public String[] getVoicedCommandList() { return VOICED_COMMANDS; } } Hope its useful :) Have fun and enjoy it ;D Credits are fully mine ;)
  10. Agree but there are HUGE Noobs ... ;D if you have been seen when some Noob log in he ask Save +? Rate %? etc... ;D so thats why this info is only for new characters :P
  11. The message apear only for newbie players and its under announcements
  12. Here Some Screen About My Share: Here Is The Code For It: Index: D:/Games/Lineage 2/L2 Kingdom of Heaven Server/WorkSpace/GameServer/java/config/Mods.properties =================================================================== --- D:/Games/Lineage 2/L2 Kingdom of Heaven Server/WorkSpace/GameServer/java/config/Mods.properties (revision 11) +++ D:/Games/Lineage 2/L2 Kingdom of Heaven Server/WorkSpace/GameServer/java/config/Mods.properties (working copy) @@ -44,10 +50,7 @@ +#---------------------------------------# +# Quick Info For Newbies # +#---------------------------------------# +#Enable Quick Info Message For Newbies ? +EnableInfoMessage = False +ServerName = L2 Kingdom of Heaven Index: D:/Games/Lineage 2/L2 Kingdom of Heaven Server/WorkSpace/GameServer/java/net/sf/l2j/Config.java =================================================================== --- D:/Games/Lineage 2/L2 Kingdom of Heaven Server/WorkSpace/GameServer/java/net/sf/l2j/Config.java (revision 11) +++ D:/Games/Lineage 2/L2 Kingdom of Heaven Server/WorkSpace/GameServer/java/net/sf/l2j/Config.java (working copy) @@ -886,7 +889,6 @@ // Message for Newbies public static boolean NEWBIE_MESSAGE_ENABLE; public static String SERVER_NAME; // Packet information /** Count the amount of packets per minute ? */ @@ -1979,8 +1984,7 @@ CHAMPION_REWARD_ID = Integer.parseInt(Mods.getProperty("ChampionRewardItemID", "6393")); CHAMPION_REWARD_QTY = Integer.parseInt(Mods.getProperty("ChampionRewardItemQty", "1")); + NEWBIE_MESSAGE_ENABLE = Boolean.parseBoolean(Mods.getProperty("EnableInfoMessage", "False")); + SERVER_NAME = Mods.getProperty("ServerName", "L2 Kingdom of Heaven"); } catch (Exception e) Index: D:/Games/Lineage 2/L2 Kingdom of Heaven Server/WorkSpace/GameServer/java/net/sf/l2j/gameserver/clientpackets/EnterWorld.java =================================================================== --- D:/Games/Lineage 2/L2 Kingdom of Heaven Server/WorkSpace/GameServer/java/net/sf/l2j/gameserver/clientpackets/EnterWorld.java (revision 11) +++ D:/Games/Lineage 2/L2 Kingdom of Heaven Server/WorkSpace/GameServer/java/net/sf/l2j/gameserver/clientpackets/EnterWorld.java (working copy) @@ -255,6 +250,17 @@ SevenSigns.getInstance().sendCurrentPeriodMsg(activeChar); Announcements.getInstance().showAnnouncements(activeChar); + + if (activeChar.getLevel() <= 40 && Config.NEWBIE_MESSAGE_ENABLE) + { + activeChar.sendMessage("Welcome to "+Config.SERVER_NAME+" !"); + activeChar.sendMessage("RateXP: "+Config.RATE_XP+"x"); + activeChar.sendMessage("RateAdena: "+Config.RATE_DROP_ADENA+"x"); + activeChar.sendMessage("RateDrop: "+Config.RATE_DROP_ITEMS+"x"); + activeChar.sendMessage("SaveEnchant: +"+Config.ENCHANT_SAFE_MAX+""); + activeChar.sendMessage("MaxEnchant: +"+Config.ENCHANT_MAX_WEAPON+""); + activeChar.sendMessage("Have fun on our server and VOTE every day !"); + } Quest.playerEnter(activeChar); activeChar.sendPacket(new QuestList()); Hope you like it :) Credits to me :P
  13. it seems nice server I will give it a try :)
  14. loooooooooooooooool :X 1. Absulute easy to hack 2. buff time is retail like 3. buffers don't work I don't see fearure in this server ... :(
  15. great guide ! thanks for it :)
×
×
  • 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