-
Posts
1,405 -
Joined
-
Last visited
-
Days Won
32 -
Feedback
0%
Content Type
Articles
Profiles
Forums
Store
Everything posted by melron
-
Code Lineage 2 Vote Reward System
melron replied to TGSLineage2's topic in Server Shares & Files [L2J]
Hello, i'm not sure if you still updating your codes at all your revisions, but you could (at least for acis) review the whole thing in order to achieve a better performance ... Seems like you haven't review it long time ago. Auto-closable classes like Connection are out of try-with-resources, executing new thread with Thread class while ThreadPool is there, xml needs to be edited aswell, repeatable switches just to return a different piece of the main value etc. I'm suggesting you, to think about interfaces and abstract classes since you have a lot of vote sites. You could even get the same results way faster, with even half of the lines of your diff and ofcourse with a better readability. Don't let people to judge you for these kind of mistakes... -
Καλά Χριστούγεννα και καλή χρονιά σε όλους. Με υγεία και αγάπη …. Και πολύ κώδικα...
-
- 2
-
-
Can you explain it better? You need to move out of town 60 bots at different locations OR to 'create' 100 bots (30 spawn at town, 60 at not peace zones) ?
-
If you want only the count and not a list with all those fakes, change the return type to long (since you are looking for a value) and use the method .count() public long getFakePlayers() { return World.getInstance().getPlayers().stream().filter(x -> x instanceof FakePlayer && !x.isInsideZone(ZoneId.PEACE)).count(); }
-
Τόσο πήξιμο έφαγες εν έτη 2020;
-
Πλύνετε σχολαστικά το ποντίκι και το πληκτρολόγιο και αφήστε το σώμα σας να σαπίσει στον υπολογιστή μέχρι να φύγει ο covid. Σας χαλάει η καραντίνα;;;
-
-
Which one is the correct output? ==========<Raid Bosses>========== or ==========<Raid Bosses>========== ================================= ?
-
You should save somewhere the npc Filho when it will be spawned and when the mob Pai dies, you have to get the instance of the other npc... like: switch (npc.getNpcId()) { case Pai: YourData.getFilho().deleteMe(); break; }
-
Okey, lets see it again with examples: @Override public String onKill(L2Npc npc, L2PcInstance player, boolean isPet) { int Pai = 50; int Filho = 100; switch (npc.getNpcId()) // Get the id of the dead monster { case Pai: // We found it and the dead monster ID is 50 if (npc.getNpcId() == Filho) // We comparing if the dead monster's ID is 100. IT is not ... It is 50... { npc.deleteMe(); // This should never run.. } break; } return super.onKill(npc, player, isPet); } its like: int value = 50; switch (value) { case 50: if (value == 100) System.out.println("hi"); break; } We wont get any print at our console...
-
Discussion Grandboss Problem
melron replied to gkagklo's topic in Server Development Discussion [Greek]
Aposo thumamai to frozen exei 2 custom tabels gia spawnlists mazi me configs gia na rithmiseis pou paei pou otan o admin kanei spawn. Pithanon na mhn apothikeuei to respawn time - death time dioti to valakas exei enabled to script pou exei oristei ekei to respawn time kai sthn ousia ginete override to time apo to spawn command tou admin. @ontopic elenkse ta custom tables kai ta configs sou na deis kai kane delete to valakas script apo thn stigmh pou tha exeis ws custom auta ta raids. 2h pithanh lush, c/p ton valakas (kai client) kai ftiakse ena RAID (oxi grandboss) me ta idia stats ta panta kai apla orise tou to respawn time apo db 3h apotelesmatikh lush, peta to... -
Discussion Doubts about JAVA & HTML
melron replied to peipakoa1's topic in Server Development Discussion [L2J]
debug each action to see exactly what command is called. Debug: (your best friend) System.out.println -
Well, i do like the low rate gaming style but we are in 2k20... ppl haven't much time to sit in front of their pc to xp... Even if you will add customs in order to help them for the 'xp' case, they will play until the 1st siege (max until heroes) and then probably they will leave .... Not by your fault, its just the way that ppl are playing IL these days... So by me, no... Gl anyway
-
Help Community status for player
melron replied to 0flee's question in Request Server Development Help [L2J]
before the string parse, cast the value to long -
Its not working because you are teleporting the player who left the party. look at your code dude if (player.isInsideZone(L2Character.ZONE_UNUSED)) player.teleToLocation(81035,148614,-3464); You need to add a check (again) about the party size (< 4) and then teleport them all back.
-
Discussion Why Lineage 2 is DEAD
melron replied to LordPanic's topic in General Discussion [English]
L2 Isn't dead at all. If you are talking about interlude, what do you expecting in 2020 when C6 released at 2003? (17 fucking years old update) -
Share Party Teleporter L2jFrozen
melron replied to MoNsT3ReN4RgY's topic in Server Shares & Files [L2J]
change if (NumberPartyMembers < 5 && NumberPartyMembers > 9) to if (NumberPartyMembers < 5)- 1 reply
-
- 1
-
-
Help format html in a for() with int and string
melron replied to StarSCreams's question in Request Server Development Help [L2J]
Your code cant run that way, an int that starts with 09 is just not allowed in this specific example. If you need '0' at the begging of of any int, you should format it. ex: Arrays.asList(254,156,641,974,112).forEach(val -> html.append(String.format("<td width=30><img src=\"icon.customtex_%s\" width=32 height=32></td>",String.format("0%s", val)))); Arrays.asList("A","B","C","D","E").forEach(val -> html.append(String.format("<td align=\"center\" width=290>%s</td>",val))); -
Request How to disable skill_id 1 if skill_id 2 reusedelay > 1
melron replied to StarSCreams's question in Request Server Development Help [L2J]
write an example with typical values for better understanding -
Like @TGSLineage2 mentioned, you should replace "," with nothing. ""... also, you have to add the lineFound inside of the line check. so it should be while ((line = br.readLine()) != null) { if (line.contains("color:#e7ebf2")) { votes = Integer.parseInt(line.split(">")[2].split("<")[0].replace(",","")); lineFound = true; } }
-
Why @Nightw0lf and @DenArt Designs got banned?
-
if (character instanceof Player) { final Player player = (Player) character; final ItemInstance item = player.getInventory().getItems().stream().filter(item -> item.getEnchantLevel() > 6 && item.isEquipped()).findFirst().orElse(null); if (item != null) { player.sendMessage(String.format("Maximum enchant in this zone +6. You can't use the item %s", item.getName())); // Handle telportation here } } This code is written in acis. adapt it with the proper method names to fit on frozen Note: You MUST handle the equip case when the player is already in the zone. onEnter is not enough for this kind of feature
-
You probably wanted again free items by "advertising" his server with the excuse that you don't have time to farm and bla bla bla and he didn't accepted. Oh, again you?

