Jump to content

[Share] Vote For The Server Restart


Recommended Posts

as i said before, use just one class. There, a static FastList<InetAddress> ips = new FastList<InetAddress>();

 

on cmd use

 

if(!YourEngineClass.ips.contains(player.getClient().getConnection().getInetAddress()) {

        YourEngineClass.ips.add(player.getClient().getConnection().getInetAddress());

        cmdstuff..

}

 

A List talking in java api terminology, is a Generic type, which implements the Collection interface

Link to comment
Share on other sites

its a good idea, but dumb at the same time... like takhs7 said... the server would be restarting all the time b'coz ppl would find that interesting and they would restart it just for fun... but thats not all, they could exploit this option for example: bosses or something...

 

i've got takhs7's back for auto restarts =)

 

regardless, thank you for sharing!

Link to comment
Share on other sites

on server start up

 

long minimunNonRestartTime = System.currentTimeMillis() + Config.MIN_RESTART_DELAY;

 

On cmd use:

 

if(System.currentTimeMillis() < YourEngineClass.minimunNonRestartTime) {

              player.sendMessage("Server restarted not much ago!");

              return false;

}

 

Fixed :)

 

Link to comment
Share on other sites

1) You better  create a diff

2) You can handle all this engine within one class, avoiding creating new objects (1 objects is not problem, but avoid it its better than create)

3) Ppl cry when L2PcInstance is modified (cause update conflicts). Just make a list where all players who voted get inside.

On cmd use, if (list.contains(player)) return false;

 

for everything else, nice idea, really usefull

 

 

4) maybe make the vote number depend on how much online ppl...

 

anyway.. im rlly surprised you had the guts to do it without logging ips in the first place =P

Link to comment
Share on other sites

  • 3 months later...

Nice dig-up. Another protection against stupid-restart from players, would be to introduced a derivative in the voting system. Votings can clear every 2 mins. Each 2 mins the system checks the votes/time, if that number is high, then it means that many people voted during that time. In other words it doesnt measure the "votes" in a long duration , but the votes/time. Usually votes/time will be high only when teh server starts lagging.

Link to comment
Share on other sites

  • 8 months later...

Ποτε δεν ειχα φανταστει εναν τετοιο code (θεμα φαντασιας).

Απλα απιθανη δουλεια φιλε μου mossano.

Τελεια δουλεια οταν Κολαει ο σερβερ και δεν ειναι μεσα ο game master.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.




  • Posts

    • Yes, it is, it's not hard to do (if you know what you're doing); just time consuming.   To make some things clear: 1. You can not create .ukx files with animated skeletalmeshes inside, by using any of the freeshared L2Editors (basically, no support for .psa files) 2. You need a patched UT2003/UT2004. You can either get your own ut2004 and download Gildor's patch from his web, or use any of these: When you use these, you should be able to import both .psk and .psa animations > link the skeletalmesh to the psa > save as .ukx > use ut2down to convert the file to l2 format > encrypt the .ukx with standard l2 encryption (you can use mxc encdec, you can find it in the folder of the l2editor i shared). Your best bet is to use pawnviewer (aka dev mode) to test that. If you have troubles with that process then leave a reply here, otherwise, if it works correctly, you can move on to adding missing animnotify classes to you unrealed, then proper animnotifies, sounds, effects or w/e is missing from your .ukx files. Keep in mind that this is overall not difficult but a huge amount of work (unless you're good at scripting/macros) since you'd need to manually re-create every single animnotify, by hand. If you have doubts or i wasn't clear enough let me know here. (in case you don't know what an animnotify is: UDN - Two - AnimNotifies (unrealengine.com) )  
    • Welcome to JewStor Service!!!   ❖Ready-made verified wallets, exchanges, business banks and to order accounts. ❖EU/UK/US/DE Stuff: 100% Verified! Reliable financial tools for your business. ❖Popular items available include: Stripe business + Payoneer, Deutshce Bank, BBVA ES, Xapo Bank, Revolut business / personal, Santander Bank, Wallester business, Bitsa EU, Binance EU, Qonto Business, Blackcatcard EU, Shopify Payments, ICard EU, N26 EU, Naga Pay EU, Paysera EU, Mistertango Business and many others.
    • Custom = everything that is not part of my H5 client, such as Aegis skin, Death Knight skin, Constructor skin, Golden Valakas skin, an example is the pack containing 3 Golden Valakas skins+cloaks, to give you an idea, this pack consumes almost 200MB within the system, another example of custom is the Hunter Head set made by Asuki, almost 100MB within the system, every custom item added to the client, specifically within the system folder will increase the consumption of your client's virtual ram memory, the more custom added there, the faster your client will close due to critical. Around 4 to 5 custom packs that I removed from the system and made my client reach the ram virtual limit only after more than 40 hours online, in other words; It is only worth adding custom items to the system folder if it is very well compressed, maximum up to 10MB per custom pack (This pack below in the photo, only it inside your client - system consumes almost 200MB, when I removed this pack inside the system it increased the game's lifespan by almost 4h during my tests)
    • ready pack for sale with lucera files made from scratch price is 350 euros without the license the server is x30 rate the server is there to see everything test ie.. there have been several changes everything works there will be support for everything for as long as possible please, can you send me a message here, there is complete transparency in everything
    • The author has been using an alternate account under the name @project166 to promote their services, which violates our RULES. Additionally, the author does not adhere to our guidelines regarding the inclusion of pricing information.     Topic Locked.
  • Topics

×
×
  • Create New...