Jump to content
  • 0
LearningRO

reset quest at spesific time

Question

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

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

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

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.