Jump to content

mikemaster

Members
  • Posts

    193
  • Credits

  • Joined

  • Last visited

  • Feedback

    0%

Everything posted by mikemaster

  1. okey no more duplicate message but i would like the message to be seen by all players and not only those that have the ammount of pvp Right now the message is Show globaly but only to those that have the pvp ammount
  2. While Adding This Code to my Server PvP Kills are no more added It should only disable same Ip/clan-party/summon kills/level difference but i doesn't count the other kills that do not violate anything Btw i am using acis // 'Both way war' -> 'PvP Kill' - increasePvpKills(targetPlayer); + if (addPvp((L2Playable)target)) + { + increasePvpKills(targetPlayer); + } return; } @@ -4419,13 +4594,65 @@ if (targetPlayer.getKarma() > 0) { if (Config.KARMA_AWARD_PK_KILL) - increasePvpKills(targetPlayer); + { + if (addPvp((L2Playable)target)) + { + increasePvpKills(targetPlayer); + } + } } else if (targetPlayer.getPvpFlag() == 0) increasePkKillsAndKarma(targetPlayer.getLevel()); } } + private boolean addPvp(L2Playable vp) + { + if (!Config.ANTI_FARM_ENALBED) + { + return true; + } + + if (Config.ANTI_FARM_SUMMON && vp instanceof L2Summon) + { + return false; + } + + L2PcInstance v = (L2PcInstance)vp; + + if (Config.ANTI_FARM_PARTY && v.getParty() == getParty()) + { + return false; + } + + if (Config.ANTI_FARM_CLAN_ALLY && (v.getClan() == getClan() || v.getAllyId() == getAllyId())) + { + return false; + } + + if (Config.ANTI_FARM_IP && v.getClient().getConnection().getInetAddress().getHostAddress() == getClient().getConnection().getInetAddress().getHostAddress()) + { + return false; + } + + if (Config.ANTI_FARM_LVL_DIFF && (v.getLevel()-getLevel() >= Config.ANTI_FARM_MAX_LVL_DIFF || getLevel()-v.getLevel() >= Config.ANTI_FARM_MAX_LVL_DIFF)) + { + return false; + } + + if (Config.ANTI_FARM_PATK_DIFF && (v.getStat().getPAtk(null)-getStat().getPAtk(null) >= Config.ANTI_FARM_MAX_PATK_DIFF || getStat().getPAtk(null)-v.getStat().getPAtk(null) >= Config.ANTI_FARM_MAX_PATK_DIFF)) + { + return false; + } + + if (Config.ANTI_FARM_PDEF_DIFF && (v.getStat().getPDef(null)-getStat().getPDef(null) >= Config.ANTI_FARM_MAX_PDEF_DIFF || getStat().getPDef(null)-v.getStat().getPDef(null) >= Config.ANTI_FARM_MAX_PDEF_DIFF)) + { + return false; + } + + return true; + }
  3. but is there a way to stop the duplicate message? I mean when he doesn't have the number of pvps that are required only to show the error message and not also the -(message he typed)
  4. so do i have to revert the changes that i already made and simply create a config that suits with this code that you gave me? :D
  5. But Tryskell is this enought? i mean i wanted to make it with a colour like one of the other chats for instance Dark Purple And also make it global Cause right now when i added the code that you kindly provided me the message is shown twice and in a way like normal chat :P
  6. So i found a code which was supposed to enable a custom chat only for players that had reached a certain ammount of pvps +++ java/net/sf/l2j/gameserver/network/clientpackets/Say2.java +import net.sf.l2j.gameserver.model.L2World; +import net.sf.l2j.gameserver.network.serverpackets.CreatureSay; if(Config.ENABLE_PVP_CHAT) + { + if(_text.startsWith("-")) + { + if(activeChar.getPvpKills() >= Config.PVP_CHAT_COUNT) + { + for(L2PcInstance p:L2World.getInstance().getAllPlayers().values()) + { + p.sendPacket(new CreatureSay(0,16,activeChar.getName(),_text)); + return; + } + } + else + activeChar.sendMessage("You don't have enough pvps in order to talk to this chat"); + } + } I think there are still lots to be done cause it pops the message when someone doesn't have enough pvps but when he does nothing happens so..
  7. Hey i followed a guide here that showed how to make all subs available in one npc i made the following changes but there is a problem :D When you press Add a subclass it gives the full sub class list but you can add classes that are available retail like in the Npc For Example Master Jurek where you can add mage classes does not allow you to become a gladiator and pops up the subclass error ( Mimir's Elixir etc) Also when i want to change into another subclass the Npc only desplays classes that are available only at that kind of Npc I wanna make it like that: When you want to add a class you can add everything from one single NpC except ( dominator and the dwarf class ) and also at the same Npc to be able to change in whatever subclass you like Changes i made in L2VillageMasterInstance.java: /** * If the race of your main class is Elf or Dark Elf, you may not select each class as a subclass to the other class, and you may not select Overlord and Warsmith class as a subclass. You may not select a similar class as the subclass. The occupations classified as similar classes are as * follows: Treasure Hunter, Plainswalker and Abyss Walker Hawkeye, Silver Ranger and Phantom Ranger Paladin, Dark Avenger, Temple Knight and Shillien Knight Warlocks, Elemental Summoner and Phantom Summoner Elder and Shillien Elder Swordsinger and Bladedancer Sorcerer, Spellsinger and * Spellhowler */ Set<PlayerClass> availSubs = PlayerClass.values()[baseClassId].getAvailableSubclasses(player); if (availSubs != null) { for (PlayerClass availSub : availSubs) { for (Iterator<SubClass> subList = iterSubClasses(player); subList.hasNext();) { SubClass prevSubClass = subList.next(); int subClassId = prevSubClass.getClassId(); if (subClassId >= 88) subClassId = ClassId.values()[subClassId].getParent().getId(); if (availSub.ordinal() == subClassId || availSub.ordinal() == player.getBaseClass()) availSubs.remove(PlayerClass.values()[availSub.ordinal()]); } } } return availSubs; } /* * Check new subclass classId for validity (villagemaster race/type is not contains in previous subclasses, but in allowed subclasses) Base class not added into allowed subclasses. */ private final boolean isValidNewSubClass(L2PcInstance player, int classId) { if (!checkVillageMaster(classId)) return false; final ClassId cid = ClassId.values()[classId]; for (Iterator<SubClass> subList = iterSubClasses(player); subList.hasNext();) { SubClass sub = subList.next(); ClassId subClassId = ClassId.values()[sub.getClassId()]; if (subClassId.equalsOrChildOf(cid)) return false; }
  8. Problem solved caused by wrong skill id in configs :P lock it
  9. Απρ 14, 2015 6:13:59 ΜΜ net.sf.l2j.gameserver.handler.admincommandhandlers.AdminAio doAio WARNING: Something went wrong, check log folder for details java.lang.NullPointerException at net.sf.l2j.gameserver.model.actor.instance.L2PcInstance.rewardAioSkills(L2PcInstance.java:10289) at net.sf.l2j.gameserver.handler.admincommandhandlers.AdminAio.doAio(AdminAio.java:175) at net.sf.l2j.gameserver.handler.admincommandhandlers.AdminAio.useAdminCommand(AdminAio.java:78) at net.sf.l2j.gameserver.network.clientpackets.SendBypassBuildCmd.runImpl(SendBypassBuildCmd.java:68) at net.sf.l2j.gameserver.network.clientpackets.L2GameClientPacket.run(L2GameClientPacket.java:64) at net.sf.l2j.gameserver.network.L2GameClient.run(L2GameClient.java:805) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) everything worked fine untill i started to do changes in L2PcInstance :D :D maybe some help pls i use the aio command everything works fine untill the part it should grand the new aio character dual swords and also grand him with the aio skills
  10. i am using acis and nop it's not included :P
  11. Hello i would like to know if there is code arround here that will enable hero skills in subclasses also Or if not a code a way to change that through the server files :)
  12. hellooo. When i try to enter full screen mode via pressing the button which is located at the right top side of the l2 window the game ends and i get a visual C++ error When i drag the window with my mouse and it automatically enters full mode i am not facing the error but i cannot change the resolution of the game
  13. i use acis interlude pack revision 310 and while i am trying to add this code: // 'Both way war' -> 'PvP Kill' - increasePvpKills(targetPlayer); + if (addPvp((L2Playable)target)) + { + increasePvpKills(targetPlayer); + } return; } @@ -4419,13 +4594,65 @@ if (targetPlayer.getKarma() > 0) { if (Config.KARMA_AWARD_PK_KILL) - increasePvpKills(targetPlayer); + { + if (addPvp((L2Playable)target)) + { + increasePvpKills(targetPlayer); + } + } } else if (targetPlayer.getPvpFlag() == 0) increasePkKillsAndKarma(targetPlayer.getLevel()); } } + private boolean addPvp(L2Playable vp) + { + if (!Config.ANTI_FARM_ENALBED) + { + return true; + } + + if (Config.ANTI_FARM_SUMMON && vp instanceof L2Summon) + { + return false; + } + + L2PcInstance v = (L2PcInstance)vp; + + if (Config.ANTI_FARM_PARTY && v.getParty() == getParty()) + { + return false; + } + + if (Config.ANTI_FARM_CLAN_ALLY && (v.getClan() == getClan() || v.getAllyId() == getAllyId())) + { + return false; + } + + if (Config.ANTI_FARM_IP && v.getClient().getConnection().getInetAddress().getHostAddress() == getClient().getConnection().getInetAddress().getHostAddress()) + { + return false; + } + + if (Config.ANTI_FARM_LVL_DIFF && (v.getLevel()-getLevel() >= Config.ANTI_FARM_MAX_LVL_DIFF || getLevel()-v.getLevel() >= Config.ANTI_FARM_MAX_LVL_DIFF)) + { + return false; + } + + if (Config.ANTI_FARM_PATK_DIFF && (v.getStat().getPAtk(null)-getStat().getPAtk(null) >= Config.ANTI_FARM_MAX_PATK_DIFF || getStat().getPAtk(null)-v.getStat().getPAtk(null) >= Config.ANTI_FARM_MAX_PATK_DIFF)) + { + return false; + } + + if (Config.ANTI_FARM_PDEF_DIFF && (v.getStat().getPDef(null)-getStat().getPDef(null) >= Config.ANTI_FARM_MAX_PDEF_DIFF || getStat().getPDef(null)-v.getStat().getPDef(null) >= Config.ANTI_FARM_MAX_PDEF_DIFF)) + { + return false; + } + + return true; + } i get errors in these sections public boolean addPvp(L2Playable vp) -----> illegal modifier for the variable addPvp; only final is permitted and the method addPvp(L2Playable vp) is undefined for the type L2PcInstance
  14. One of my friends gets this error when he changes from full screen with alt+enter Or when he tries to change the resolution or when he tries to enter in full screen He also had an error about Virtual C++ something like that 2015.4.10 15:11:14 OS : Windows XP 5.1 (Build: 2600) CPU : GenuineIntel Unknown processor @ 2796 MHz with 1022MB RAM Video : NVIDIA GeForce 7300 SE/7200 GS (783) Insufficient Memory. Please check the Virtual Memory Option and avilable hard drive space. You can check them by going to : Control Panel->System->Advanced->Performance->Settings->Advanced->Virtual memory. History: FMallocWindows::Malloc <- FMallocWindows::Realloc <- 00000000 2004901888 FArray <- FArray::Realloc <- -1145032704*2 <- UWindowsViewport::ViewportWndProc <- UWindowsViewport::ViewportWndProc <- WWindow::StaticProc <- WM_SYSCOMMAND <- UWindowsViewport::ViewportWndProc <- WWindow::StaticProc <- WM_UNKNOWN <- UWindowsViewport::ViewportWndProc <- WWindow::StaticProc <- DispatchMessage <- 0010026A 161 <- MessagePump <- MainLoop
  15. Anyone Can Help about another game guard error? error 122
  16. Hey can someone give me a solution in how to fix the Gameguard error 610? I have hunch that this might be showing cause i used a clean system patch
  17. When i player enters Antharas Nest for example without using the portal stone and teleporting with the GrandBoss Teleporter the server automatically teleports him to the nearest town Is it possible to disable it??
  18. in order to create a new zone i got to register it through eclipse? Zone Type i mean
×
×
  • Create New...