Jump to content

LordPanic

Donator Member
  • Posts

    605
  • Joined

  • Last visited

  • Days Won

    3
  • Feedback

    100%

LordPanic last won the day on May 6

LordPanic had the most liked content!

2 Followers

About LordPanic

Contact Methods

  • Skype
    Devinegr

Profile Information

  • Current Mood
    Unsure
  • Gender
    Male
  • Country
    Greece

Recent Profile Visitors

2,014 profile views

LordPanic's Achievements

Apprentice

Apprentice (3/14)

  • Reacting Well Rare
  • Conversation Starter Rare
  • Dedicated Rare
  • First Post Rare
  • Collaborator Rare

Recent Badges

25

Reputation

  1. @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
  2. 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
  3. 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
  4. 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.
  5. 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]; + }
  6. 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.
  7. 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
  8. @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.
  9. Δες αν μπορει να δειξει την εικονα με 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 για να ξερουμε τι γινεται εκει μεσα.
  10. Πρεπει να γινεις πιο σαφης σε αυτο που ζητας γτ δεν νομιζω να βγαζει κανεις νοημα απο αυτο που εγραψες. Θες να βαλεις 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 με διαφορετικο τροπο. Δες πως λειτουργει γενικα για να καταλαβεις γτ αλλιως δεν...
  11. 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; }
  12. @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
  13. @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
  14. 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(); } }
×
×
  • 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 Disbaled AdBlock