Jump to content
  • 0

reset quest at spesific time


LearningRO

Question


  • Group:  Members
  • Topic Count:  107
  • Topics Per Day:  0.02
  • Content Count:  770
  • Reputation:   69
  • Joined:  02/10/12
  • Last Seen:  

Hi, All im was trying to make instance always reset every 4 AM

 

this is my quest_db
 

- Id: 9998
    Title: "Memorial Dungeon: Champion"
    TimeLimit: 4h
- Id: 9999
    Title: "Memorial Dungeon: Champion"
    TimeLimit: +4h


my script
 

if (checkquest(9998,PLAYTIME) == 2) {
		erasequest 9998;// Memorial Dungeon: Champion
		erasequest 9999;
	}
	else if (checkquest(9999,PLAYTIME) == 2) {// Memorial Dungeon: Champion
		mes "^ff0000Memorial Dungeon cannot be reentered within 8 hours after your last entrance.^000000";
		mes "Reset Every 04:00 AM";
		close;
	}

Create INSTANCE

 

but not working

The result if i use that setting
player didn't get any delay to create instance

so player can do instance unlimited

Edited by LearningRO
Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0

  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

The quest system already handle the timer. For example

  - Id: 9998
    Title: "Memorial Dungeon: Champion"
    TimeLimit: 4h
  - Id: 9999
    Title: "Memorial Dungeon: Champion"
    TimeLimit: +4h

9998 is reset at every 4:00, 9999 is reset 4h after the quest is given.

The issue of the topic owner was because he made some mistakes in the NPC script, the conditions on the timers were always false so the player could always recreate the instance.

Sample of correction

switch( checkquest(9998,PLAYTIME) ) {
case -1:
	break;
case 0:
case 1:
	mes "^ff0000Memorial Dungeon cannot be reentered within 8 hours after your last entrance.^000000";
	mes "Reset Every 04:00 AM";
	close;
case 2:
	erasequest 9998;// Memorial Dungeon: Champion
	break;
}
switch( checkquest(9999,PLAYTIME) ) {
case -1:
	break;
case 0:
case 1:
	mes "^ff0000Memorial Dungeon cannot be reentered within 8 hours after your last entrance.^000000";
	mes "Reset Every 04:00 AM";
	close;
case 2:
	erasequest 9999;
	break;
}
Create INSTANCE

 

Edited by Capuche
Link to comment
Share on other sites

  • 0

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2345
  • Joined:  10/28/11
  • Last Seen:  

you cant change the quest system expiry date.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  477
  • Reputation:   269
  • Joined:  06/13/17
  • Last Seen:  

OnClock0400:
addrid(0);
erasequest 9998;
erasequest 9999;
/*for offline players.. use sql_query.. too lazy to do that. rofl*/
end;

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  12
  • Reputation:   0
  • Joined:  08/12/13
  • Last Seen:  

On 4/25/2020 at 11:00 AM, Haruka Mayumi said:

OnClock0400:
addrid(0);
erasequest 9998;
erasequest 9999;
/*for offline players.. use sql_query.. too lazy to do that. rofl*/
end;

 

To be able to reset an instance, you have to go talk to the npc so that it applies erasequest xxxx;

The condition only applies if you are using the same char with which you entered the instance since, erasequest only delete the char_id in the "quest" table, in which case I need to delete the ID instance without having to enter with the same character as it would apply, I understand in the previous comment a query would have to be applied.

Anyone help?

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

  • 0

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  12
  • Reputation:   0
  • Joined:  08/12/13
  • Last Seen:  

But they need to interact with the npc to make it mandatory erasequest with the character which setquest took, there is a way to reset the time without having to go talk to the npc in this case as indicated previously being offline, a delete query would have to be applied for the corresponding line in the quest table which belongs to that instance and that char_id

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.

Guest
Answer this question...

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

×
×
  • Create New...