Jump to content
  • 0

[Request] I Need Help With a Little Code (do not already exist)


Urbanhack

Question

I need a code to search the C3P0 library if there is any line then the server starts. for example:

this "code" there is only an explanation!

 

if getfrom c3p0 library example c3p0.com.mchange.util.AssertException

(

    line maxcheater don't exist

)

return;

 

if getform c3p0 library c3p0.com.mchange.util.AssertException

(

   lineage 2 maxcheaters

)

continue;

 

for start GS

 

anyway tx for read

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

First of all: GS wont start if C3P0 does not exist (will throw an error and will

end abnormally)

 

didnt understood the question clarify, but here we go:

 

check if the library exists:

 

try
{
File mainjar = new File("l2jserver.jar");
String libpath = mainjar.getAbsolutePath().split("gameserver")[0];
File c3p0 = new File(libpath + "lib/c3p0jarname.jar");
return c3p0.exists();
}
catch(Exception e)
{ }
return false;

 

check if any class inside c3p0 exists:

 

try
{	
Class<?> func = Class.forName("package.path.here");
Object obj = func.newInstance();
return obj != null;
}
catch(ClassNotFoundException cnfe)
{ 
}
return false;

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.


  • Posts

    • Lineage II Interlude: 💧Server Aqua x50💧 Check out L2Ember's new mid-rate project, carefully crafted for this summer! 🗓Opening — Beta Test: May 18th to 24th at 18:00 UTC+0 — Official Start: 25th May at 18:00 UTC+0 📦Key features The new game server "Aqua" is more comfortable and fun! — Epic Raids are now PvP areas — A new way to obtain Noblesse status without a quest — Heroes are changing every week — New ways to obtain Coin of Luck — Universal Shots for all grades — Increased buff slots and weight limit — Service to ride a Wyvern — A chance to win various special items through 🎁Fast Growth Pack And much more! Join the beta and win rewards for the opening! https://l2ember.online/
    • I did not understand what is meant, what exactly did we get from there?
    • Doesn't happen to me when i test with retail client (273) on PTS H5. (Also wasn't happening in their previous season with an older client, so I don't see how can this be a retail bug lol)
    • Hello everyone. I hope Im in the right place to post this. Im playing on a private l2off h5 server, as Admin says it is running on russian build of 152 client. There is one bug that makes the game unplayable and the Devs say its part of the official file and they cant really fix this. It has been like this for the last 4 months Here is a video of the desync:   It is happening every 2nd or 3rd rush, not to this extreme but I get ported back and forth and end up seeing my char elsewhere then it actually is. Did this happen on any other server? Is there a known fix for this? Any article I could read? If I try to get something out of Admins I get a timeout, I hope I can get some help here Here some info from dev:   My question is very simple, Is this really part of the off files and cant be fixed or are we getting lied to by incompetent devs ? 😄
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock