Jump to content
  • 0

[Help] Reuse on a quest ?


Question

Posted

Hey guys.i would like to find out how to set a reuse to a quest that allready exist and has unlimited time's to use it?

For example quest with name WatchingEyes has unlimited uses. when you complete it, you can get the quest again and use it unlimited times per day.

how am i going to set a cooldown to it? i want every 12 hours. here is the quest 

 

https://textuploader.com/1dmtt

 

thnx you for your help i appreceate it!

4 answers to this question

Recommended Posts

  • 0
Posted

Hi, you're asking in a wrong section (this section is for l2off, not java). I'm moving your topic to proper section :)

  • 0
Posted (edited)

Store the MS when the char is completing the q and check if 12 passed when the char is requesting a new one...

 

if (player.getQEndTime(601) + TimeUnit.HOURS.toMillis(12) <  System.currentTimeMillis())

       .... // 12 hours passed

else

       .... // Not passed

Edited by melron
  • 0
Posted

Quest completion, you mark it, store the time. Then, you compare the time on quest start. I guess it's obvious.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


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