Jump to content

An4rchy

Legendary Member
  • Posts

    2,656
  • Joined

  • Last visited

  • Days Won

    26
  • Feedback

    100%

Everything posted by An4rchy

  1. good drops are fixed. is server advertisd on hopzone?
  2. +100k. [gr]merikoi apo tous mod edo mesa(dn thelw na onomatisw), dn ipologizoun tipota. arxizw na pisteuw oti o maxtor to poulise to forum se autous. filika panta)[/gr] but as i can see the reason isn't bad so you have chance to get unbanned... but really too low
  3. se ti client to thes? gia freya kane oti s eipe WhiteBeard. ama einai gia alo pes mas gia pio...
  4. ports? ta anoikses sosta? loginserver.properties? server.properties?
  5. [gr]antraki iremise ligo. good luck dn einai kako na les. kai dn to leo se sena.[/gr]
  6. actually i know took a deep look at server. it's nice. but where we get boss jews? i have full s grade :P
  7. i want ppl to FULLY configure it. also when i used existing methods i had so many errors.... nm i made 2 new methods, 4 lines each, will they cause lags? :D
  8. i think he means that i could use increasePvpKills() method and not create a new one. anyway that works too, doesn't it?
  9. some ppl might not want :D i liked the idea, because i thought the pvp pk color.... it could be nice in some servers....
  10. are you sure? what if we walk to giran? :D joking. it's a nice server but too difficult to gather ppl. :@ i was talking to the guards :D i thought they were players. lol.
  11. hmm why will it ruin the gameplay?
  12. Hi guys. I(and i mean I) created a custom item(configurable id), that when you click it, it will give you pvp pk points of your choice(configurable) and it will delete the item(i didn't have to write this :P). It cannot be used during olympiad(configurable), during you are dead(non-configurable), if you are not nobless(configurable), if you are not hero(configurable), if you are not with a subclass(configurable) or if you are not at the required level(configurable). It was a bit tricky to make it, because i had to create(actually c/p and change sth) new methods in L2PcInstance. Anyway here: Index: gameserver/java/net/sf/l2j/Config.java =================================================================== --- gameserver/java/net/sf/l2j/Config.java (revision 29) +++ gameserver/java/net/sf/l2j/Config.java (working copy) @@ -42,6 +42,16 @@ { protected static final Logger _log = Logger.getLogger(Config.class.getName()); + public static boolean ALLOW_PVP_PK_ITEM; + public static int PVP_PK_ITEM_ID; + public static int PVP_PK_ITEM_LVL_NEEDED; + public static boolean PVP_PK_ITEM_IN_OLYMPIAD; + public static boolean PVP_PK_ITEM_SUBCLASS_NEEDED; + public static boolean PVP_PK_ITEM_HERO_NEEDED; + public static boolean PVP_PK_ITEM_NOBLE_NEEDED; + public static int PVP_PK_ITEM_PVPS_REWARD; + public static int PVP_PK_ITEM_PKS_REWARD; + /**-------------------------------------------------- // Property File Definitions //-------------------------------------------------*/ @@ -1058,6 +1068,15 @@ BUFFS_MAX_AMOUNT = Byte.parseByte(playersSettings.getProperty("maxbuffamount","24")); STORE_SKILL_COOLTIME = Boolean.parseBoolean(playersSettings.getProperty("StoreSkillCooltime", "true")); + ALLOW_PVP_PK_ITEM = Boolean.parseBoolean(playersSettings.getProperty("AllowPvpPkItem", "false")); + PVP_PK_ITEM_ID = Integer.parseInt(playersSettings.getProperty("PvpPkItemId", "6673")); + PVP_PK_ITEM_LVL_NEEDED = Integer.parseInt(playersSettings.getProperty("PvpPkItemLvlNeeded", "76")); + PVP_PK_ITEM_IN_OLYMPIAD = Boolean.parseBoolean(playersSettings.getProperty("PvpPkItemInOlympiad", "false")); + PVP_PK_ITEM_SUBCLASS_NEEDED = Boolean.parseBoolean(playersSettings.getProperty("PvpPkItemSubclassNedded", "true")); + PVP_PK_ITEM_HERO_NEEDED = Boolean.parseBoolean(playersSettings.getProperty("PvpPkItemHeroNeeded", "false")); + PVP_PK_ITEM_NOBLE_NEEDED = Boolean.parseBoolean(playersSettings.getProperty("PvpPkItemNobleNeeded", "true")); + PVP_PK_ITEM_PVPS_REWARD = Integer.parseInt(playersSettings.getProperty("PvpPkItemPvpsReward", "1000")); + PVP_PK_ITEM_PKS_REWARD = Integer.parseInt(playersSettings.getProperty("PvpPkItemPksReward", "1000")); } catch (Exception e) { Index: gameserver/java/net/sf/l2j/gameserver/handler/itemhandlers/PvpPkItem.java =================================================================== --- gameserver/java/net/sf/l2j/gameserver/handler/itemhandlers/PvpPkItem.java (revision 0) +++ gameserver/java/net/sf/l2j/gameserver/handler/itemhandlers/PvpPkItem.java (revision 0) @@ -0,0 +1,95 @@ +/* + * 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.itemhandlers; + +import net.sf.l2j.Config; +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.L2World; +import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance; +import net.sf.l2j.gameserver.model.actor.instance.L2PlayableInstance; +import net.sf.l2j.gameserver.model.actor.stat.PcStat; +import net.sf.l2j.gameserver.model.zone.type.L2BossZone; +import net.sf.l2j.gameserver.network.L2GameClient; +import net.sf.l2j.gameserver.network.serverpackets.CharInfo; +import net.sf.l2j.gameserver.network.serverpackets.ItemList; +import net.sf.l2j.gameserver.network.serverpackets.L2GameServerPacket; +import net.sf.l2j.gameserver.network.serverpackets.UserInfo; +import net.sf.l2j.gameserver.util.Broadcast; + +/** + * Beast SoulShot Handler + * + * @author Tempy + */ +public class PvpPkItem implements IItemHandler +{ + // All the item IDs that this handler knows. + private static final int[] ITEM_IDS = { Config.PVP_PK_ITEM_ID }; + + public void useItem(L2PlayableInstance playable, L2ItemInstance item) + { + if(!(playable instanceof L2PcInstance)) + return; + L2PcInstance activeChar = (L2PcInstance)playable; + if (activeChar.getLevel() < Config.PVP_PK_ITEM_LVL_NEEDED) + { + activeChar.sendMessage("You need to be over level " +Config.PVP_PK_ITEM_LVL_NEEDED+ " to use this item."); + return; + } + if (activeChar.isInOlympiadMode() && Config.PVP_PK_ITEM_IN_OLYMPIAD) + { + activeChar.sendMessage("You cannot use this item in Olympiad Mode!"); + return; + } + if (activeChar.isAlikeDead()) + { + activeChar.sendMessage("You cannot use this item while you are dead!"); + return; + } + if (!activeChar.isSubClassActive() && Config.PVP_PK_ITEM_SUBCLASS_NEEDED) + { + activeChar.sendMessage("You cannot use this item in your main class!"); + return; + } + if (!activeChar.isHero() && Config.PVP_PK_ITEM_HERO_NEEDED) + { + activeChar.sendMessage("You cannot use this item if you are not hero!"); + return; + } + if (!activeChar.isNoble() && Config.PVP_PK_ITEM_NOBLE_NEEDED) + { + activeChar.sendMessage("You cannot use this item if you are not noble!"); + return; + } + else + { + activeChar.addPvpKills(Config.PVP_PK_ITEM_PVPS_REWARD); + activeChar.addPkKills(Config.PVP_PK_ITEM_PKS_REWARD); + activeChar.sendMessage("Gratz! You have been rewarded with " +Config.PVP_PK_ITEM_PVPS_REWARD+ " pvps and " +Config.PVP_PK_ITEM_PKS_REWARD+ " pks!"); + playable.destroyItem("Consume", item.getObjectId(), 1, null, false); + } + } + + public int[] getItemIds() + { + return ITEM_IDS; + } +} Index: gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java =================================================================== --- gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java (revision 29) +++ gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java (working copy) @@ -344,8 +344,8 @@ private long _expBeforeDeath; private int _karma; - private int _pvpKills; - private int _pkKills; + public int _pvpKills; + public int _pkKills; private byte _pvpFlag; private byte _siegeState = 0; private int _curWeightPenalty = 0; @@ -4338,7 +4338,23 @@ // Send a Server->Client UserInfo packet to attacker with its Karma and PK Counter sendPacket(new UserInfo(this)); } + public void addPvpKills(int pvpKills) + { + // Add karma to attacker and increase its PK counter + setPvpKills(getPvpKills() + Config.PVP_PK_ITEM_PVPS_REWARD); + // Send a Server->Client UserInfo packet to attacker with its Karma and PK Counter + sendPacket(new UserInfo(this)); + } + public void addPkKills(int pkKills) + { + // Add karma to attacker and increase its PK counter + setPkKills(getPkKills() + Config.PVP_PK_ITEM_PKS_REWARD); + + // Send a Server->Client UserInfo packet to attacker with its Karma and PK Counter + sendPacket(new UserInfo(this)); + } + /** * Increase pk count, karma and send the info to the player * Index: gameserver/java/net/sf/l2j/gameserver/handler/ItemHandler.java =================================================================== --- gameserver/java/net/sf/l2j/gameserver/handler/ItemHandler.java (revision 29) +++ gameserver/java/net/sf/l2j/gameserver/handler/ItemHandler.java (working copy) @@ -18,6 +18,7 @@ */ package net.sf.l2j.gameserver.handler; +import net.sf.l2j.Config; import java.util.Map; import java.util.TreeMap; import net.sf.l2j.gameserver.handler.itemhandlers.*; @@ -60,6 +61,10 @@ registerItemHandler(new PaganKeys()); registerItemHandler(new Maps()); registerItemHandler(new Potions()); + if (Config.ALLOW_PVP_PK_ITEM) + { + registerItemHandler(new PvpPkItem()); + } registerItemHandler(new Recipes()); registerItemHandler(new RollingDice()); registerItemHandler(new MysteryPotion()); Index: gameserver/java/config/players.properties =================================================================== --- gameserver/java/config/players.properties (revision 29) +++ gameserver/java/config/players.properties (working copy) @@ -320,4 +320,30 @@ maxbuffamount = 24 # Store buffs/debuffs on user logout? -StoreSkillCooltime = True \ No newline at end of file +StoreSkillCooltime = True + +#============================================================= +# PVP - PK ITEM CONFIGS +#============================================================= + +# Explanation: When a character is in the right conditions to use this item, +# when he use it he will be rewarded with the pvps and pks amount you will choose. + +# Allow pvp pk item? Default: False +AllowPvpPkItem = False +# Item id for pvp pk item? Default: 6673 +PvpPkItemId = 6673 +# PvP Pk item level needed to use? Default: 76 +PvpPkItemLvlNeeded = 76 +# Allow to use pvp pk item in olympiad? Default: False +PvpPkItemInOlympiad = False +# Player must be in subclass to use pvp pk item? Default: True +PvpPkItemSubclassNeeded = True +# Player must be a server hero to use pvp pk item? Default: False +PvpPkItemHeroNeeded = False +# Player must be nobless to use pvp pk item? Default: True +PvpPkItemNobleNeeded = True +# How many pvps will the player be rewarded with if he use the item? Default: 1000 +PvpPkItemPvpsReward = 1000 +# How many pks will the player be rewarded with if he use the item? Default: 1000 +PvpPkItemPksReward = 1000 \ No newline at end of file I don't need feedback, it is tested. Credits are 100% mine. Have Fun! NOTE: It is coded on latest revision(29) of L2JaCis.
  13. ???? good luck.
  14. LOL. man he asks for someone to fix them, and you, as i have understood, tell him to pay you, so you can find him a dev and pay him too. qq? http://www.maxcheaters.com/forum/index.php?topic=180314.0 (sorry, fanky gave the link too)
  15. it's not possible. as i know, you can only hold a second gameserver from the same login server. i mean same ip, where you select server, there is going to be your second server. if you want a different chronicle, you can run a different ls and gs from same pc, but i don't really know how to seperate them, you will have errors on ls console.
  16. what's wrong with these? :D i wanted to make it look funny :P
  17. yeah i know it's not something special for some of mxc members, but for some others it is ... i thought it might be useful for a pvp server.
  18. dn epitrepontai ta warez.... psakse sto google.... egw ekei to katebasa. P.S Sorry, dn ida oti to katebases...
  19. oh rly? Coyote, please look at this, i think we've seen this before with my posts and it just caused useless spamming, it may seem extremely easy to you, but since it's not shared here before, and since it's not extremely easy to everyone on here, it's a useful(not for everyone) share. But it's a share. So please don't say the way i did it(specially lieing that i stole another share). It may be useful for someone ;)
  20. :@ show me the share. IT'S 100% MINE! Please don't ruin every post i make. You always reply saying things that might not be true. Please before post, check. loled. he is global moderator. why would he need adenas?
  21. 1) Na bebeotheis oti exeis balei sosta to user kai to pass. 2) Na bebeotheis oti to mysql s einai to 5.1 kai oxi alo pio palio i pio kainourgio version. 3) Na bebeotheis oti exeis ftiaksei kai tis 2 database, l2jdb kai l2jdb, sto navicat. Dokimase pali, logika kati apo afta einai lathos...
  22. Hi guys. I made a simple code, tested, which when a player kills another one, system will send a message to the killer and to the victim, which you will choose, either it is pk or pvp. See patch to understand better: Index: gameserver/java/net/sf/l2j/Config.java =================================================================== --- gameserver/java/net/sf/l2j/Config.java (revision 27) +++ gameserver/java/net/sf/l2j/Config.java (working copy) @@ -41,6 +41,11 @@ { protected static final Logger _log = Logger.getLogger(Config.class.getName()); + public static String PK_MESSAGE; + public static String PVP_MESSAGE; + public static String VICTIM_PK_MESSAGE; + public static String VICTIM_PVP_MESSAGE; + /**-------------------------------------------------- // Property File Definitions //-------------------------------------------------*/ @@ -1175,6 +1180,10 @@ BUFFS_MAX_AMOUNT = Byte.parseByte(playersSettings.getProperty("maxbuffamount","24")); STORE_SKILL_COOLTIME = Boolean.parseBoolean(playersSettings.getProperty("StoreSkillCooltime", "true")); + PK_MESSAGE = (playersSettings.getProperty("PkMessage", "Go play pvp instead of taking pks you nab!")); + PVP_MESSAGE = (playersSettings.getProperty("PvpMessage", "Good fight, you destroyed your enemy!")); + VICTIM_PK_MESSAGE = (playersSettings.getProperty("VictimPkMessage", "LOL? He pked you and you just stay and watch him?")); + VICTIM_PVP_MESSAGE = (playersSettings.getProperty("VictimPvpMessage", "Noob. Go make + your items.")); } catch (Exception e) { Index: gameserver/java/config/players.properties =================================================================== --- gameserver/java/config/players.properties (revision 27) +++ gameserver/java/config/players.properties (working copy) @@ -323,4 +323,9 @@ maxbuffamount = 24 # Store buffs/debuffs on user logout? -StoreSkillCooltime = True \ No newline at end of file +StoreSkillCooltime = True + +PkMessage = Go play pvp instead of taking pks you nab! +PvpMessage = Good fight, you destroyed your enemy! +VictimPkMessage = LOL? He pked you and you just stay and watch him? +VictimPvpMessage = Noob. Go make + your items. \ No newline at end of file Index: gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java =================================================================== --- gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java (revision 27) +++ gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java (working copy) @@ -4294,13 +4294,17 @@ if (isInDuel() && targetPlayer.isInDuel()) return; // If in Arena, do nothing - if (isInsideZone(ZONE_PVP) || targetPlayer.isInsideZone(ZONE_PVP)) - return; + if (isInsideZone(ZONE_PVP) || targetPlayer.isInsideZone(ZONE_PVP)){ + return; + } // Check if it's pvp if ((checkIfPvP(target) && targetPlayer.getPvpFlag() != 0) - || (isInsideZone(ZONE_PVP) && targetPlayer.isInsideZone(ZONE_PVP))) + || (isInsideZone(ZONE_PVP) && targetPlayer.isInsideZone(ZONE_PVP))){ increasePvpKills(); + sendMessage(Config.PVP_MESSAGE); + targetPlayer.sendMessage(Config.VICTIM_PVP_MESSAGE); + } // Target player doesn't have pvp flag set else { @@ -4313,6 +4317,8 @@ { // 'Both way war' -> 'PvP Kill' increasePvpKills(); + sendMessage(Config.PVP_MESSAGE); + targetPlayer.sendMessage(Config.VICTIM_PVP_MESSAGE); return; } @@ -4321,9 +4327,13 @@ { if (Config.KARMA_AWARD_PK_KILL) increasePvpKills(); + sendMessage(Config.PVP_MESSAGE); + targetPlayer.sendMessage(Config.VICTIM_PVP_MESSAGE); } else if (targetPlayer.getPvpFlag() == 0) increasePkKillsAndKarma(targetPlayer.getLevel()); + sendMessage(Config.PK_MESSAGE); + targetPlayer.sendMessage(Config.VICTIM_PK_MESSAGE); } } Credits are mine. I tested it, so i don't really need feedback. It is coded on latest revision(27) of l2jaCis project. Have Fun!
  23. mipos na mas edixnes to error? leo gw tora...
  24. xaxaxa epic duals have OVERPOWERED critical power(all weps, but this is too much...), i hit archer(me mage), with simple hits(not magic) 21k dmg :D
  25. 70% augment? ok i will join... (xaxaxa) good luck
×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..