-
Posts
1,403 -
Credits
0 -
Joined
-
Last visited
-
Days Won
32 -
Feedback
0%
Content Type
Articles
Profiles
Forums
Store
Everything posted by melron
-
Code COMMUNITYBOARD - RankingSystem (Top 15 PVP/PK)
melron replied to StinkyMadness's topic in Server Shares & Files [L2J]
I would prefer to see some examples from your side by showing why you prefer that way instead of synchronize. To be honest, ive never used it in l2 scene but im using it a lot in my work. I'll show you an example. Lets say we have some dozens requests per minute from random users and the 'main' method that will be executed is the method named 'test' private void test(User user) { doSomething1(user); doSomething2(user); startUpdating(user); // here we need to prevent any other user to execute this method doSomething3(user); doSomething4(user); doSomething5(user); stopUpdating(user); // until this method take place. When that ends, we release the locked object. doSomething6(user); doSomething7(user); } As you can see, here, is a perfect example to use ReentrantLock just because we will start the lock case in 'startUpdating' and unlock in 'stopUpdating' while all the other users will stay at 'doSomething2' but also, the main user will continue on 3,4,5 methods and finally will be released after the stopUpdating method is fired. By using synchronize on the method structure or even with keyword and brackets {obj} , will cause big problems. We also using it just to lock something for a specific time periods. All i want to say is, its just 'too much' for this example.. Ofc it could work but again, is too much... Actually this is exactly what ReentrantLock is doing with its own way, with the main difference that you can 'prevent' the infinitely synchronization of the sync keyword which in this example would never happen. You can let it as it is, you wont have problems with that change of the 2nd pastebin. Nonetheless i said the same thing about the TP just in another manager. Im posting an optimized version of your code with my style with the difference that i used the same manager . Also, you dont have to care so much about the objects that have to be created up on the player's request just because it is java... GC is there... https://pastebin.com/NukMRMgj -
Code COMMUNITYBOARD - RankingSystem (Top 15 PVP/PK)
melron replied to StinkyMadness's topic in Server Shares & Files [L2J]
- public void showRakingList(Player player) + public synchronized void showRakingList(Player player) @Zake ReentrantLock is a bad way to solve this 'problem' and does not need to be placed here for many reasons. Indeed, it might be show different html content rarely even while StringBuilder is way faster than StringBuffer cause is fat since is syncing all of its methods, but all you have to do, is an object synchronization (if stinky still want to keep it as it is) but not by using the reentrantLock here, in this case... @StinkyMadness I would do the whole thing a bit different, like a manager which will storing the infos in custom classes and generate the content directly up on the player's request with a FloodProtector check. No sync at all -
Discussion GREAT SERVER PACK
melron replied to L2RAPTOR's topic in Server Development Discussion [L2J]
A scam is a term used to describe any fraudulent business or scheme that takes money or other goods from an unsuspecting person. I think you should STFU. -
<skill id="3081" levels="10" name="Item Skill: Charm"> <table name="#chance"> 2 2 2 3 3 3 4 4 5 5 </table> <table name="#triggeredLevel"> 1 2 3 4 5 6 7 8 9 10 </table> <set name="target" val="SELF" /> <set name="skillType" val="BUFF" /> <set name="operateType" val="PASSIVE" /> <set name="chanceType" val="ON_HIT" /> <set name="reuseDelay" val="30000" /> <set name="activationChance" val="#chance" /> <set name="triggeredId" val="5165" /> <set name="triggeredLevel" val="#triggeredLevel" /> </skill> The rest is up to you
-
https://prnt.sc/1didzoo
-
Topic σε offtopic και πρέπει να γίνει delete?
-
Για να ακούσω γνώμες... (Ήρεμα παιδιά...)
-
Help help geticon
melron replied to iAlreadyExist's question in Request Server Development Help [L2J]
IconTable.getInstance().getIcon(<item-id>); -
What's the issue? Btw, there's already a new version of that feature by stinkymadness.
-
Fun fact Fun fact 2 https://prnt.sc/198oc86
-
Help help only in pvp zone reward
melron replied to iAlreadyExist's question in Request Server Development Help [L2J]
Put the debug again. If both conditions are true, you have empty reward data -
Help help only in pvp zone reward
melron replied to iAlreadyExist's question in Request Server Development Help [L2J]
if(Config.ENABLE_PVP_FEATURES && isInsideZone(ZoneId.CustomPvPZone)) pvpReward(); Go ahead -
Help help only in pvp zone reward
melron replied to iAlreadyExist's question in Request Server Development Help [L2J]
Assuming your reward table is not empty, the problem is located at your zone file. Perhaps there is no setIsInsideZone(ZoneId.CUSTOMPVP) (onEnter method of the zone). Check it ... System.out.println(String.format("Player is inside zone %s, Config: %s", isInsideZone(ZoneId.CUSTOMPVP),Config.ENABLE_PVP_FEATURES)); if(Config.ENABLE_PVP_FEATURES && isInsideZone(ZoneId.CUSTOMPVP)) pvpReward(); -
Help help only in pvp zone reward
melron replied to iAlreadyExist's question in Request Server Development Help [L2J]
A correct code does not mean that it should work. Post the whole method -
At solutions page (if you have a lot posts that has been marked as 'solution') and you have more than 1 page, by clicking either Next Page or the number of the next page, you are redirecting to 'Reputation's' pages (instead of solutions) with null content. Buttons that have to be clicked: https://prnt.sc/17n6ud6 The link by pressing any 'next page': https://prnt.sc/17n71ti Result: https://prnt.sc/17n784d
-
Help change the max Value from P.atk,M.atk 2147483647
melron replied to l2animepvp's question in Request Server Development Help [L2J]
You need client modification to handle this thing. Even if you switch the int on buffer and add a long value, the client will crash. -
Try to open your file edit with Strings.exe to find out (maybe) all the possible arguments that an .exe can starts with. use If you do it right, you will get a lot of results. open it with notepad++ and play with regexes to find lines that starts with - or / etc. example ^[-].* for lines that starts with -. Keep in mind, that generally is hard to find out the exact commands just because you cant really know how the dev designed the params. GL
-
Project I Want to buy a Chronice 6 pack Custom items
melron replied to Kozi-G's topic in Server Development Discussion [Greek]
First of all, you can write in greek since you posted in a greek section. Since your custom things are mosty client edits and they are 'easy', its not worth to pay someone for them. You can pick for example, aCis or lucera files (whatever you choose, client modifications are the same) and then apply your changes on your client. There are plenty guides about how you add a custom item and how to set up your fresh sources. If you still believe/want someone to setup your sources and teach you 2-3 basic things, then the (minimum) payment that you mentioned is more than enough. Good luck -
C6 x1 without MP pots , without buffer, bot allow
-
Help Show HtmlWindow through UI Script?
melron replied to YulRun's topic in [Request] Client Dev Help
Yeah, I always using the bypass command to communicate / debug something. -
Help Show HtmlWindow through UI Script?
melron replied to YulRun's topic in [Request] Client Dev Help
Yeah you can use RBTS instead of the execute command (im not sure about that slash.) Also, keep in mind that in order to use execute command you have to register the new action (since you added a new one) to server side on UserCommandHandlers and set the correct ID -
Help Show HtmlWindow through UI Script?
melron replied to YulRun's topic in [Request] Client Dev Help
A) You dont need that slash when you calling ExecuteCommand (if i remember well) B) You can use RequestBypassToServer method from client and then code the server side part to send your html with the specific path -
Discussion GREAT SERVER PACK
melron replied to L2RAPTOR's topic in Server Development Discussion [L2J]
I got one question. What happened at 2020? https://gyazo.com/c827f0ca3ae9b20a75c2b1c90dda8748 You hadn't any reports to fix? By saying that, why you do mention the phrase "(Like L2OFF)" at your changeset list in some fixes and not at all OR why you do even mention that overall since all your fixes are based on l2 off? https://gyazo.com/77b53b838dd003fb2d893820859ed5f2 -
Help I need info about create an effect to be seen only by party
melron replied to GsL's question in Request Server Development Help [L2J]
The 50% of the solution is already posted before. The other 50% is located at your CharInfo.java. You have to edit this server packet too, just because after you done with this skill,effect ... The time you will user any other skill that is a 'normal' one like battle heal for example, it will broadcast all your abnormal effects to your knownlist.