`Rοmeο Posted January 9, 2010 Author Share Posted January 9, 2010 bigboss can you create that "LIST" ? couse i dont have any idea what are you talking about :D Quote Link to comment Share on other sites More sharing options...
xepimetheus Posted January 9, 2010 Share Posted January 9, 2010 Good amazing Share .. Keep up ;D Quote Link to comment Share on other sites More sharing options...
B1ggBoss Posted January 9, 2010 Share Posted January 9, 2010 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 Quote Link to comment Share on other sites More sharing options...
Razbojnik Posted January 11, 2010 Share Posted January 11, 2010 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! Quote Link to comment Share on other sites More sharing options...
B1ggBoss Posted January 11, 2010 Share Posted January 11, 2010 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 :) Quote Link to comment Share on other sites More sharing options...
takhs7 Posted January 11, 2010 Share Posted January 11, 2010 yes now its way better... min time between restars plus ip list and this can be actually used. Quote Link to comment Share on other sites More sharing options...
~Sensei~ Posted January 11, 2010 Share Posted January 11, 2010 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 Quote Link to comment Share on other sites More sharing options...
MrPerfect20 Posted January 12, 2010 Share Posted January 12, 2010 Very nice share dude ;) Very usefull if a GM or Admin is not online and it lagging I like this feature ;) Thank you for sharing it :) Quote Link to comment Share on other sites More sharing options...
Horus Posted January 12, 2010 Share Posted January 12, 2010 Just merge it all into 2classes. Some of those classes can be nested so it makes no sense. The more classes you make the more problems you'll have ^^ Quote Link to comment Share on other sites More sharing options...
Pariskimi Posted January 14, 2010 Share Posted January 14, 2010 very usefull share!!! thanks mate !!!! keep the good work ;) Quote Link to comment Share on other sites More sharing options...
gmakhs Posted April 24, 2010 Share Posted April 24, 2010 thanks Quote Link to comment Share on other sites More sharing options...
kuba90 Posted April 25, 2010 Share Posted April 25, 2010 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. Quote Link to comment Share on other sites More sharing options...
icshiba Posted January 3, 2011 Share Posted January 3, 2011 -Ignore my question :) now i saw the command :) .vote_restart Quote Link to comment Share on other sites More sharing options...
cta8ic Posted January 4, 2011 Share Posted January 4, 2011 hmm.. ok now the player who want to make vote............ what type to vote ?? :) Quote Link to comment Share on other sites More sharing options...
Μαθηματικός Posted January 5, 2011 Share Posted January 5, 2011 Ποτε δεν ειχα φανταστει εναν τετοιο code (θεμα φαντασιας). Απλα απιθανη δουλεια φιλε μου mossano. Τελεια δουλεια οταν Κολαει ο σερβερ και δεν ειναι μεσα ο game master. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.