Jump to content

Recommended Posts

Posted

it doesn't sort the database pvp kills

it just sorts a map's values.

It's simple.

 

 

yes but they CAN'T REFRESH since you dont have task man. Are we speaking the same language?

 

let go that you should use SQL ORDER BY, at least understand what Im telling you

Posted (edited)

yes but they CAN'T REFRESH since you dont have task man. Are we speaking the same language?

 

let go that you should use SQL ORDER BY, at least understand what Im telling you

Please read better the code , in every sendData it sorts the maps , that's all what is needed. you can't understand this?

Edited by Lioy
Posted

dude since you read from db once you store static data on the maps. If I get a pvp it will still send the pvp amount I had once the server started so it doesnt refresh. 

 

Thats what im trying to explain you, you cant have self-refreshing data without db connection if theres no task to reschedule data read.

Posted

Please read better the code , in every sendData it sorts the maps , that's all what is needed. you can't understand this?

 whats the point of sorting the same map every time? it holds static data

Posted

dude since you read from db once you store static data on the maps. If I get a pvp it will still send the pvp amount I had once the server started so it doesnt refresh. 

 

Thats what im trying to explain you, you cant have self-refreshing data without db connection if theres no task to reschedule data read.

You are wrong again , maybe you didn't understand how it works.

playersPvpKills.put(charName, pvpKills) replaces pvpKills if key is same..

 

Realy why you insist since I tested it?

Posted

You are wrong again , maybe you didn't understand how it works.

playersPvpKills.put(charName, pvpKills) replaces pvpKills if key is same..

 

Realy why you insist since I tested it?

 

can u explain me how you refresh the data dude? What you say makes no sense

Posted (edited)

can u explain me how you refresh the data dude? What you say makes no sense

lol

 

When server starts , data is retrieving into map. So the map has all charnames,pvps . Every time a player's pvp's count changes , it's putted in the map.

If the server restart again, 1 more database connection and it's repeating. Simple enough

Edited by Lioy
Posted

How you do this?

 

 public void setPkKills(int pkKills)
    {
        _pkKills = pkKills;
+       Top.addDataPk(getName(), getPkKills());
    }
    
    /**
@@ -1917,6 +1919,7 @@
    public void setPvpKills(int pvpKills)
    {
        _pvpKills = pvpKills;
+       Top.addDataPvp(getName(),getPvpKills());
    }
    
Posted

Okay I understand now, but why you choose the shitiest way to do it? You make things too complicated for no reason at all.

 

Just put a task reading from the database every x seconds like everybody does, and use that goddamn ORDER BY. You will get rid of those retarded maps and methods and a 100 lines shorter and cleaner code all in one class..

 

 

 

Its too sad that I have to be the bad guy telling you what to do with your code but the rest few with knowledge on this forum won't even bother to support what I tell you or help you improve your code. Anyway 

Posted

Okay I understand now, but why you choose the shitiest way to do it? You make things too complicated for no reason at all.

 

Just put a task reading from the database every x seconds like everybody does, and use that goddamn ORDER BY. You will get rid of those retarded maps and methods and a 100 lines shorter and cleaner code all in one class..

 

 

 

Its too sad that I have to be the bad guy telling you what to do with your code but the rest few with knowledge on this forum won't even bother to support what I tell you or help you improve your code. Anyway 

 

That's the main question man , if this code is better or worst than continuously database connection like others , your opinion is 'NO IT SUCKS' , but I want more opinions from more ppl :P 

We are not here to fight :P

Posted

I would still use the one that makes connections every time a bypass is cought though, because the code seems more simple and i use more values like: clan name, hero, etc :D

Posted (edited)

I would still use the one that makes connections every time a bypass is cought though, because the code seems more simple and i use more values like: clan name, hero, etc :D

Simplest things are not always the best. Maybe this one yes (?) , still dont know. I won't comment about this one about clan name , heroes you said ;/

Edited by Lioy
Guest Elfocrash
Posted

Okay I understand now, but why you choose the shitiest way to do it? You make things too complicated for no reason at all.

 

Just put a task reading from the database every x seconds like everybody does, and use that goddamn ORDER BY. You will get rid of those retarded maps and methods and a 100 lines shorter and cleaner code all in one class..

 

 

 

Its too sad that I have to be the bad guy telling you what to do with your code but the rest few with knowledge on this forum won't even bother to support what I tell you or help you improve your code. Anyway 

Performance wise this way is way better. As this comparing to a sql connection is probably 10 times liter. However i would trust more a sql connection every x minutes to refresh this rather than on click or on pvp kill.

Posted

Performance wise this way is way better. As this comparing to a sql connection is probably 10 times liter. However i would trust more a sql connection every x minutes to refresh this rather than on click or on pvp kill.

Still better than continuously sql connection on every time that a player talking to npc,press o command or whatever, right? It's a question :P

Guest
This topic is now closed to further replies.



  • Posts

    • Inventory restock: Premium business accounts are now available.   ✔ Wallester Business EU 🇪🇺|💳 Unlimited virtual cards, physical cards, 🏦 multi-currency IBAN, ₿ crypto & stablecoin deposits. ✔ Stripe Business UK 🇬🇧|💳 Instant virtual cards (Visa/Mastercard), high-conversion checkout, multi-currency payouts, ₿ crypto payments, no-code payment links. ✔ Mercury Business US 🇺🇸|🏦 US checking & savings, 💳 unlimited virtual cards, domestic & International wires, native stablecoin settlement. ✔ Payset Business EU 🇪🇺|🏦 Multiple IBANs, UK sort code, SEPA Instant, 💳 unlimited virtual cards, multi-currency accounts. ✔ Novo Business US 🇺🇸|🏦 Business checking account, ACH payments & invoicing, 💳 virtual & physical cards, novo boost.
    • Let me see if I understand correctly, older gentlemen, when a newcomer shows up to create modern things with the help of AI, doing what you charge them to do, you point the finger and laugh. I believe that's why everything is stagnant. The product isn't for programming experts, it's for newcomers. Don't buy from you if they can do it themselves using this base. You're going to deliver a similar product, maybe even worse than this one, so why are you complaining? PowerShell, as you well know, started with it, then came new platforms and new apps, new creation models, all with different languages; I chose the simplest one for my taste. This is about being organized and knowing how to choose the right words for each situation. It's not 100%, but it already gives a good impression. Nothing is 100%, so a topic written by AI, and all the code that you charge an absurd amount for to prohibit and sell hacks, could be open source so that everyone can create new practices, new models, new information for passing packets, prohibiting the use of cheats that cause server owners to break so much. Let's remember that the Admin doesn't always shut down the server; it's the players who find problems and take advantage by buying and reselling items, and they say that the GM shuts down the server every week, but that's a lie. What they do is duplicate items with packages and sell them, but perhaps this could give some future developers a starting point to create their own protection following the model in the initial documentation. Because none of you answer a question from a newbie, you think you're superior because you have knowledge, but with AI, people like that can have the same knowledge as you, but with less practice. And if they practice a lot, 10,000 hours, they can be as good as all of you older developers in the L2J field.
    • ✨ Exclusive Offer for Marketplace Growth 🔥 Elevate your performance with a premium bonus. 💲 Top up your balance with $100 or more and receive an additional $5 credit — seamlessly added to your account. ⭐️ Designed for those who value efficiency, scale, and results. ⚡️ Effortless. Refined. Effective. 💥 Enhance your strategy today 💥
  • Topics

×
×
  • 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..