Jump to content
  • 0

Help how to create a daily mission with checkquest (7122, PLAYTIME);


Question

Posted

Hello guys. AND
I'm having difficulty creating a daily quest script, I've tried in several ways, I've been successful in quest's, but the team does not work, I wanted to use the time setting from within db / re / quest_db
can anybody help me?
And if possible explain the code, because I want to seize too.
  Thank you
Att: Hidan

Spoiler
Quote


prontera,150,170,5	script	Testing	98,{
	

//set .@i,3;
set .@quest,checkquest(7122,PLAYTIME); // 4 hours
switch(.@quest){
	
	case -1:
	mes "[Testing]";
	mes "Want to do some quest?";
	next;
			switch(select("Yes:No")){
			case 1:
			mes "Mission accepts";
			setquest 7122;
			close;
			
			case 2:
			mes "Bye bye";
			close;
			
			}
	
	case 1:
	mes "[Testing]";
	mes "Oh !! It seems like you did well.";
	getexp 150,150;
	dispbottom "You have been rewarded with 150 EXP";
	//erasequest 7122;	// remove the user's quest log.
	completequest 7122;	// Sets quest status to "complete.
	close;
	
	case 2:
	mes "[Testing]";
	mes "You are still in cooldown, wait 90 seconds";
	//dispbottom "You are still in cooldown, wait 90 seconds";
	//end;
	close;

	}
	OnPCLoadMapEvent:

if( strcharinfo(3) == strnpcinfo(4) )	
{
	//showevent(QTYPE_QUEST,0);
	showevent 0,0;
end;
}
else
{
	//showevent(QTYPE_QUEST2,1);
	showevent 1,2;
}
}
prontera	mapflag	loadevent

 

 

 

7 answers to this question

Recommended Posts

  • 0
Posted

i don't see what to explain

---------------------------------------

*checkquest(<ID>{,PLAYTIME|HUNTING{,<char_id>}})

If no additional argument supplied, return the state of the quest:
	-1 = Quest not started (not in quest log)
	0  = Quest has been given, but the state is "inactive"
	1  = Quest has been given, and the state is "active"
	2  = Quest completed

If parameter "PLAYTIME" is supplied:
	-1 = Quest not started (not in quest log)
	0  = the time limit has not yet been reached
	1  = the time limit has not been reached but the quest is marked as complete
	2  = the time limit has been reached

If parameter "HUNTING" is supplied:
	-1 = Quest not started (not in quest log)
	0  = you haven't killed all of the target monsters and the time limit has not been reached.
	1  = you haven't killed all of the target monsters but the time limit has been reached.
	2  = you've killed all of the target monsters

---------------------------------------

can you tell us what the errors you get or what wrong ? 

  • Upvote 1
  • 0
Posted

I do not receive any error, but when completing the quest, I put to redo the quest in 90 seconds, but I can not do it again, because it appears: You are still in cooldown, wait 90 seconds.
I wanted to do a daily quest, but I could not, I put 90 seconds to test if it was working.

 

aqui esta o meu quest_db

7122,60,1002,10,0,0,0,0,0,0,0,0,0,0,0,0,0,"Primeira batalha - caçando os Poring's"

Note: I used this just to test, please if anyone can help me, and explain where I went wrong. Thanks in advance

  • 0
Posted (edited)
5 minutes ago, Capuche said:

Your reasoning is flawed. When the time limit has been reached player should be able to redo the quest.

Tell me where did I go wrong? because I tested and I can not redo the quest.
Would you help me? please

Edited by Hidan
  • 0
Posted
	switch( checkquest(7122,PLAYTIME) ) {// 4 hours
	case -1:	// Quest not started (not in quest log)
	case 0:	// the time limit has not yet been reached -> cooldown
	case 1:	// the time limit has not been reached but the quest is marked as complete
	case 2:	// the time limit has been reached -> can redo the quest
	}
	end;

case 0 and case 1 should return the cooldown message. case 2 player can redo the quest

  • Upvote 1
  • 0
Posted

@Capuche Firstly, I wanted to thank you for trying to help me.

The script works normally, but if I do not kill the monsters and after the 90 seconds return to npc, it gives as a complete quest.
And by killing all the monsters and returning to npc, if you have not given the time of 90 seconds, I can not deliver the quest, only after 90 seconds.

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...