Jump to content
  • 0

How can i calculate respawn time ?


Question

15 answers to this question

Recommended Posts

  • 0
Posted

Can someone help me understand how that works ?

 

For example i have barakiel respawn_time : 1371557489832

 

How do i know when is that ?

 

Thats miliSeconds, it will respawn when system.currentTimeMilis() == 1371557489832

  • 0
Posted

Yeah, it should be miliseconds... anyway you can google it here are link that may help.

http://www.calculateme.com/Time/index.htm

 

nope, 1371557489832 cant be a countdown, it is very big so it can be a countdown, its just currentTimeMilis() , with some basic knowledge you can understand what I said above

  • 0
Posted

for some weird reason, couldnt edit my previous post,

 

so, to know how much time is left for the respawn, you have to use (1371557489832 - System.currentTimeMilis()) / 1000 to return how many seconds are left

  • 0
Posted

1371557489832 was an example.

You should try to divide this number, you're going to have a rest.

So the number was not used as default, developers use numbers without rest(in general).

  • 0
Posted

nope, 1371557489832 cant be a countdown, it is very big so it can be a countdown, its just currentTimeMilis() , with some basic knowledge you can understand what I said above

 

Well i don't have any basic knowledge

 

1.1574074074074074e - 8 Days

  • 0
Posted

Well i don't have any basic knowledge

 

We see, you're just copying someone's reply, in this case you agree with xdem.

  • 0
Posted

1371557489832 was an example.

You should try to divide this number, you're going to have a rest.

So the number was not used as default, developers use numbers without rest(in general).

 

dude, its obvius that this is not a countdown but the CurrentMilis which will trigger the spawn, 1371557489832  = 40 years so definetly its a feature System.currentTimeMilis(), so to get how much time remains you have to use the formula I gave before

  • 0
Posted

dude, its obvius that this is not a countdown but the CurrentMilis which will trigger the spawn, 1371557489832  = 40 years so definetly its a feature System.currentTimeMilis(), so to get how much time remains you have to use the formula I gave before

 

You didn't get my point.

  • 0
Posted

I don't know if I'm any help, but try this:

      long time = 1371557489832l;
      Calendar c = Calendar.getInstance();
      c.setTimeInMillis(time);
      System.out.println(c.getTime().toString());

If I'm not mistaken, all values in time in l2j are written like this: System.currentTimeMillis() + xTime

So with this I think you should get your answer.

Printed part:

Tue Jun 18 15:11:29 EEST 2013

Ps. if I'm mistaken please correct me! :D

  • 0
Posted

Wow thats a lot of answers!! Thanks guys and sorry i didnt reply earlier ..i was sleeping :P

 

So if i get this right the number in database is not a countdown .... its just the date and hour that the raid boss will respawn .

 

yeap its the same way as mine, but mine returns seconds left

 

he should rather use http://www.ruddwire.com/handy-code/date-to-millisecond-calculators/

 

to avoid java

 

That was really helpful thanks man :)

  • 0
Posted

Too late XD

 

I don't know if I'm any help, but try this:

      long time = 1371557489832l;
      Calendar c = Calendar.getInstance();
      c.setTimeInMillis(time);
      System.out.println(c.getTime().toString());

If I'm not mistaken, all values in time in l2j are written like this: System.currentTimeMillis() + xTime

So with this I think you should get your answer.

Printed part:Ps. if I'm mistaken please correct me! :D

Great example tho :)

 

Good job

Guest
This topic is now closed to further replies.


  • Posts

    • So what? Did i say anything wrong? You have no idea what source/compile is. I still wait for your .jar or source to be posted since you say i destroyed the compiled version of yours. Why you don't post it? Are you afraid that people will just see few addon lines and you did not even know that your source and compiled had different things? I should not even waste 2 minute to fix your raidboss_spawnlist thing.    Your mentally ill. What you posted is our primary deal nothing against me.  Because all he does is post whatever i write as if i hide and i did not say any mod to join and check my discord. i want him actual post something against me or any offenses i did. I also requested him several hours ago to post his .jar where my code "HACKED" his server but he wont post.    Nobody should allow open a random topic and cause issues to other's life without proofs. I demand punishment and soon unless he post evidence that i hurt his server or left him or did not make what he asked. 
    • guys it is probably a misunderstanding if it was windows he would have solve it since its not windows and from the paraphrasing of the developer who eventually fixed the server   the problem was from guessing the login server was not properly opening or already crashed, so the gameserver probably loaded because he was generating logs, and then stopped, my guess is still there was no login to connect and made exits, still this is a guess because i have only saw some logs and images   in one side nobody would destroy a server for this amount of money in the other side he had no experience with the operating system, and i find this logical, i am also still giving some tutorials in the topic owner so he can learn how to compile and not need the help of others, i still believe this can be solved for both parties if they behave   in the end nobody wants to cause bad to another so as i say in my starting point, it is probably a misunderstanding
    • Why you saying that when you have nothing to hide?
    • Keep posting prive messages like 15 years old kid and not answering actually like a grown up man. and yes ill try sue you for this. A chance to get money is always a chance if possible.
  • 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