Jump to content

LordPanic

Members
  • Posts

    638
  • Joined

  • Last visited

  • Days Won

    19
  • Feedback

    100%

Everything posted by LordPanic

  1. I didnt get offended dont worry. Nah i dont mean mindless bots who are been runned by scripts and do things like the ovc u mentioned. Well i play this shitty game for centuries and believe me i would love to see a server with this feature (PVE based). Where you can buy a bot lvl 1 exp it , gear it enchant his gear (basically like a pet but compared to a common pet u get all this options). Then ofc depending on what type of a bot a player buys (assister/healer/etc) it will behave like that (the sky is the limit) and build the whole server arround that.
  2. My initial idea was to create a multipurpose fake player. But compared to elfos thing. You can build a whole concept arround it. Like creating a PVE server where players can customize,gear,lvl up the bots and give a unique feature to the community. Since i dont plan to open a server ever. There you go i gave u ppl my idea (sth interesting to work on) and tbh i would play in such server. Obviously if ppl dont like my shitty share and got the skills to make it even better from scratch there u go.
  3. As title says fake player buffer. This mod is made so players can avoid using 4 different chars to buff themselves and also add something for admins to "sell" to players. Obviously inorder to sell such thing u have to add a simple npc buffer and use this premium feature for the rest. It can be triggered with item so players can buy this thing as an item but u have to buy it either with donation coin or whatever crap admins can think of (not included u have to make it). Since it's loading x numbers of bots from xml you have limited supplies of bots to sell it doesnt matter in the end if u are skilled dev u can optimise the code or fix whatever u dont like. It's a free share in the end. Buffer Conditions Bot only give buffs while it's within a party. You have to select the target to give buffs to (same with schemes). It has also radius conditions players must be close to the bot inorder to receive buffs. Player needs to be party leader or w.o party inorder to invite the bot in party. If player isnt in owners radius it will teleport to him. Missing Conditions I didnt add important conditions such if player is in oly/siege or whatever place u dont want the bot buffer to be (you have to add it). Screenshots / Vids This window is for admins only. Details window for the bot Main fake bot window Fake bot buffer solo buffs video Fake bot buffer scheme buffs video Follow / Unfollow behavior Fake bot party invite Pastebin pass: maxcheaters Code FakePcTables.java FakePc.java BotBufferAI.java Command Handlers <-- I believe at this point everyone got their own custom command handlers. If u want to spawn the bot with an item u have to make the right adjustments. HTML path: \data\html\mods\fakebots fakeBot.html fakeBotEditScheme.html mainBotsWindow.html solobuffpage.html XML path: \data\xml FakePcs bufferSkills Gameserver.java +StringUtil.printSection("Custom Mods"); +FakePcTables.getInstance(); PlayerMove.java +/** + * Ignore fake bot + */ +if(_actor instanceof FakePc) { +} +else if (!_actor.getClient().performAction(FloodProtector.MOVE)) { _actor.sendPacket(ActionFailed.STATIC_PACKET); return; } Player.java +private final Map<Integer, FakePc> _ownerFakePcs = new ConcurrentHashMap<>(); +boolean _setFakeBot = false; +/** +* Custom Bots +* @return the list of bots for this player +*/ +public Collection<FakePc> getOwnerFakePcs() +{ + return _ownerFakePcs.values(); +} +public void setOwnerFakePc(FakePc bot) +{ + _ownerFakePcs.put(bot.getObjectId(), bot); +} +public void setFakeBot(boolean bot) { + _setFakeBot = bot; +} +public boolean isFakeBot() { + return _setFakeBot; +} FloodProtector.java MOVE(13, Config.MOVE_TIME), +BOTBUFFS(14,500); I guess credits go to Tryskell too since i basically copy/paste all already existed scheme buffer methods and elfo for getting ideas from his code.
  4. Μετα το 12 ολα τα item id σου ειναι <item id="1">
  5. After all this years as a player i got this conclusion: Solo players: They do check the top sites to see which one fits their preferences. But it's one time thing. CP's: They go more with the flow and reputation of a server. Casual Clans: They prefer servers with reputation and high clan reward systems. Serious Clans. They join servers only if their rival is there. I believe top sites are unreliable and corrupted. Instead of giving you the best option for ur taste they force lead u to choose a server on whatever server they got deal with.
  6. Noted, it's not that i didnt understand it, it's simply due to the fact when i create a mod (out of interest) after that i simply lose interest and just leave it as it is (except serious issues). If u are ok with it , send me ur discord it would be better to communicate from there. It's always good to hear a second opinion before every mod share i make or maybe a few tips.
  7. Hey Melron , how are u ? Thanks again for ur useful tips as always. Well obviously it's up to ur taste if u want to optimize it or add extra features to it. I dont think that it's mendatory to add xp/sp especially for low rate servers (i dont think ppl will like it). As u said it's ur pov. Yeap you are right it's an old bad habit of mine working on to fix it, itemList is array not a List ( i rly need to fix this bad habit). intintHolder for ur case is right since u work with 2 int's. Yes i know, i made it this way inorder to make it more flexible let's say for example if u want to make this auto farm thing 2-3 times a month obviously u can do it while the class implements Runnable but i wanted to avoid using interrupts. As it's u can start / close it if u dont want to make it run everytime server starts. //start idle Engine IdleFarmManager.getInstance().start(); //stop idle Engine IdleFarmManager.getInstance().stop(); I might be wrong for this one but we make the same checks beside the fact u use interface to achieve it. Or u do sth else that u dont show on the code's. //Melrons example @Override public boolean meetTheConditions(Player player) { return isInTown(player) && levelIsBetween(player, MIN_LEVEL, MAX_LEVEL); } //LordPanic example if(getPlayer().getLevel() >= item._plrLvlMin && getPlayer().getLevel() <= item._plrLvlMax && item._chance > Rnd.get(100)) More security conditions needs to be implemented thats for sure. Still i rly appreciate ur help and if im wrong feel free to point it. P.s i prefer the way i create the IdleItems it might not be readable to the eye but everything is there.
  8. Idle Auto Farm aka giving rewards to AFK players. I also added an option for premium in case u want to give bonus to premium players. I dont suggest u to use the current threadpool timers it was just for tests. Ideally u have to set it to minutes. IdleFarmer.java IdleFarmManager.java pastebin pass : maxcheaters Video Video 2 It's up to u on how to trigger it for the player //To start the idle farm IdleFarmManager.getInstance().addIdleFarmer(activeChar); //To stop the idle farm IdleFarmManager.getInstance().removeIdleFarmer(activeChar); GameServer.java +StringUtil.printSection("Idle Engine"); +IdleFarmManager.getInstance().start(); Player.java +IdleFarmManager.getInstance().removeIdleFarmer(this); World.getInstance().removePlayer(this); // force remove in case of crash during teleport
  9. @melronThanks a lot for ur usefull tips ! I fixed most of the things u mentioned. I also added a win streak condition on soloRewards method it's up to u guys to add different rewards depending on the win streak About the setStarted,isStarted i use them on my chat handler to avoid ppl registering while event is running or not open for registrations. Edit: Since i made a few changes for the multiplier, check the updated versions of Mines.java and MinesEvent.java: Bonus Multiplier vid
  10. As title says, mines event generating box's each box has chance when u click on it if it's a coin u win if it's a torch u lose. I didnt include the .mines command handler (aka chat handler) to the share most of u have ur own. Requirements: Your own chat handler + menu handlers <-- i made a share for that. If u use my menu handler add this to UsermenuHandler.java else if(command.startsWith("_menuMinesSelect")){ MinesEventHandler.getInstance().parseCmd(command, activeChar); } Overview 1 Overview 2 Overview 3 Overview 4 MinesEventHandler.java Mines.java MinesEvent.java MinesManager.java minesMW.html pastebin pass : maxcheaters
  11. As title says, simulating the damage u make vs the target. Currently works only for players (self too) . It's up to you if u want to add more creature instances. By default all simulations use ss/bss except bare hand hits. Known Issues* Simulation for chargeable physical (ex.tyrant,duelist) skills is not precise (auto hits,magical skills work fine). Requirements: Your own menu + menu handlers ( i made a share for that). If u use my menu handler add this to UsermenuHandler.java +else if(command.startsWith("_menuSimulation") || command.startsWith("_menuSelectSkill") || +command.startsWith("_menuDoSim")){ + DamageSimulator.getInstance().parseCmd(command, activeChar); +} DamageSimulation.java DimSim.java SimManager.java simulation.html Video with normal hits Video with skills
  12. Wrong section my friend. As far as i can understand u want to make players flag whenever enter the zone. So ur first mistake starts here Wrong implementation See other zones for reference, because this code is just wrong to begin with.
  13. If you use Acis , otherwise u have to find the corresponding class. For the first one u have to be sure ur zone is combat zone like arenas. for example: @Override protected void onEnter(Creature character) { if (character instanceof Player){ activeChar.setPvpFlag(1); activeChar.setInsideZone(ZoneId.PVP,true); activeChar.setInsideZone(ZoneId.PVPZONE,true);// Your new custom zone } } For the second u have to add a new custom condition on ur MapRegionTable.java private static final Location MDT_LOCATION = new Location(12661, 181687, -3560); //Add ur respawn locs +private static final Location[] RESPAWN_LOCS = { + new Location(82360, 148344, -3464), + new Location(82760, 148296, -3464), + new Location(82536, 148536, -3464), + new Location(82552, 148104, -3464) + }; if (player.isInsideZone(ZoneId.MONSTER_TRACK)) return MDT_LOCATION; + if (player.isInsideZone(ZoneId.PVPZONE)) { + int rngHolder = Rnd.get(RESPAWN_LOCS.length); + return RESPAWN_LOCS[rngHolder]; + }
  14. Nope it's fine this is the reason why i use Iterator to begin with. For example this one will lead to CME public void removeluckyBox(int boxid) { for(Npc mob : _boxList) { if(mob.getObjectId() == boxid) { _boxList.remove(mob); Broadcast.announceToOnlinePlayers("[Lucky Chest]: ["+_boxList.size()+"] left.", true); } //TODO if(_boxList.isEmpty()){ teleport players back and end the event } } } Compared to: public void removeluckyBox(int boxid) { for(Iterator<Npc> iterator = _boxList.iterator(); iterator.hasNext();) { Npc mob = iterator.next(); if(mob.getObjectId() == boxid) { iterator.remove(); Broadcast.announceToOnlinePlayers("[Lucky Chest]: ["+_boxList.size()+"] left.", true); } //TODO if(_boxList.isEmpty()){ teleport players back and end the event } } } True i guess there is a more effective way to just ignore completely players who target the dead box's. This is the best i could figure out at that time. Im sure there is a packet requestcancelmytarget or whatever to do it the "right" way. Obviously i could Rnd.get(100) < 50 w.o variables to begin with. I dont even know why i didnt change it. True i dont know why i ignored this one. I did change it on source forgot to change it to pastebin aswell and yes u are right , just put the 10 which is the lvl of the skill Thanks for pointing out the mistakes , i will fix them.
  15. DISCLAIMER: I know this code is not complete , but it's something to begin with for those who want to create this specific event (if they find it useful) saving them some time. It ain't much but it's free. LuckyBoxNPC.java LuckyChests.java NPC XML Video
  16. @StinkyMadness another approach to that if u want the real time update and not using threadpools every x seconds is to store the pvp's,pk's in a temp List holder. Whenever a player gets a pvp,pk you update/store his incremented value along with his player info to the list. If user exists update his pvp or pk score with the new one ++ (pvp/pk) or add a new entry. On server start: Feed the List with the first top x players from the database. On requestbypass sort the list by highest values. If u want to avoid that u can use a sort algorithm and sort the list when adding new data and then u show the first x from the List as it is. I dont know how stressful this might be for the server.
  17. pretty much.
  18. Δες αν μπορει να δειξει την εικονα με img src (βαλε της σωστες διαστασεις της εικονας). Αν δεν την δειχνει παλι κατι εκανες λαθος στο client side. String html = "<html><body><center><br>"; html += "<img src=L2_Community.bg_new_index2 width=720 height=38>"; html += "<br><table border=0 cellpadding=0 cellspacing=0 width=770 height=38>"; Στην περιπτωση που δουλευει το πανω. Ξανα γραψε τo html αλλα με σωστη συνταξη. String html = "<html><body><center><br>"; html += "<table border=0 cellpadding=0 cellspacing=0 width=770 height=38 background=L2_Community.bg_new_index2>"; Γενικα στειλε ολες της γραμμες κωδικα που φτιαχνουν το Html packet για να ξερουμε τι γινεται εκει μεσα.
  19. Πρεπει να γινεις πιο σαφης σε αυτο που ζητας γτ δεν νομιζω να βγαζει κανεις νοημα απο αυτο που εγραψες. Θες να βαλεις background image μεσα στο CB ? Γραψε : 1)Τι project εχεις. 2)Τι θες να κανεις. 3)Τι προβλημα αντεμετωπιζεις. Παντως και να ηθελες να κανεις onBypassFeedback με αυτον τον τροπο ειναι λαθος. Ενδεικτικα σωστα παραδειγματα (για NPC): 1ος τροπος create-send html packet με περιεχομενο απευθειας στον player απο τον κωδικα. @Override public void onBypassFeedback(Player player, String command) { if(command.startsWith("paparia")) { NpcHtmlMessage html = new NpcHtmlMessage(1); StringBuilder tb = new StringBuilder(); StringUtil.append(tb, "<html><title></title><body>periexomeno</body></html>"); html.setHtml(tb.toString()); player.sendPacket(html); } } 2ος τροπος open-send html packet εμφανιζοντας περιεχομενο απο html αρχειο. @Override public void onBypassFeedback(Player player, String command) { if(command.startsWith("paparia")) { //oti allo thes na kaneis } } @Override public String getHtmlPath(int npcId, int val) { String filename = ""; if (val == 0) filename = "" + npcId; else filename = npcId + "-" + val; return "data/html/mods/paradigma/" + filename + ".htm"; } Οσο για το Community Board που κανει parse commands με διαφορετικο τροπο. Δες πως λειτουργει γενικα για να καταλαβεις γτ αλλιως δεν...
  20. Player.java , method ---> onKillUpdatePvPKarma() /* * Basic antidual box check to avoid dual box farming pvp rewards */ Boolean checkIP = getClient().getConnection().getInetAddress().getHostAddress().equals(targetPlayer.getClient().getConnection().getInetAddress().getHostAddress()); if(Config.ENABLE_PVP_FEATURES) { if (isInsideZone(ZoneId.CUSTOMPVP) && targetPlayer.isInsideZone(ZoneId.CUSTOMPVP) && !checkIP) { pvpReward(); }else return; }
  21. @haskovo go to net.sf.l2j.gameserver.model.actor.instance ---> RaidBoss.java add this block of code for (Player players : getKnownTypeInRadius(Player.class, 200)){ players.setPvpFlag(1); players.updatePvPStatus(); } in this method @Override public boolean doDie(Creature killer) { if (!super.doDie(killer)) return false; if (_maintenanceTask != null) { _maintenanceTask.cancel(false); _maintenanceTask = null; } if (killer != null) { final Player player = killer.getActingPlayer(); if (player != null) { /* Here you add the block of the code i gave you */ +for (Player players : getKnownTypeInRadius(Player.class, 200)) { + players.setPvpFlag(1); + players.updatePvPStatus(); +} If you are using older rev replace Player with L2Pcinstance
  22. @hasl I wrote this code for you it's very simple and not too shaby, it's working on 382 rev acis (you have to adapt it for ur project). inorder to deal with the issues for players who get dc or just log out while in the zone i decided to clean the whole pool of ips (line 44) im sure it's not the ideal so u can add ur own solution to that. Code is not the best but hey it's free. https://pastebin.com/YxkW2qSv
  23. It is also a requirement for my other share: Note: Inorder to get a better idea of what is happening check the above share to see how it works. credits: me. RequestBypassToServer.java else if (_command.startsWith("menu_") || _command.startsWith("_menu")) { UsermenuHandler.getInstance().handleCommands(getClient(), _command); } UsermenuHandler.java package net.sf.l2j.gameserver.custom.usermenu.managers; import net.sf.l2j.gameserver.custom.usermenu.menuhandlers.NewsHandler; import net.sf.l2j.gameserver.model.actor.instance.Player; import net.sf.l2j.gameserver.network.L2GameClient; /** * @author LordPanic * */ public class UsermenuHandler { protected UsermenuHandler(){ } public static UsermenuHandler getInstance() { return SingletonHolder._instance; } public void handleCommands(L2GameClient client, String command) { final Player activeChar = client.getActiveChar(); if (activeChar == null) return; if(command.startsWith("_menuNewsPage") || command.startsWith("_menuNewsPost")) { NewsHandler.getInstance().parseCmd(command, activeChar); } else { activeChar.sendMessage("The command: " + command + " isn't implemented."); activeChar.sendMessage("error KAPPA"); } } private static class SingletonHolder { protected static final UsermenuHandler _instance = new UsermenuHandler(); } }
  24. Updated: Added 3 categories [Important,Patch,Event], u can add as many u want it's up to you. Char limit is 255 - (length of command + length of category). I also decided to share custom command menu handlers Queries got fixed thanks to @Nightwolf.
  25. True, menu window is small compared to community board so it's better to keep it with 255 char limit otherwise it would be too much.
×
×
  • 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..