Jump to content
  • 0

how to make this daily quest into daily


Question

Posted (edited)

this is the script of annie from another topic,

can anybody make this script non repeatable and can only be done 1 time a day.

prontera,153,189,5 script dksfjdsk 100,{
.@t = gettime(4);
mes "Hi, today is "+ .week$[.@t];
mes "The Daily Quest for today is ...";
mes getitemname( getd( ".req_item"+ .@t ) );
next;
mes "The Items that needed are :";
.@size = getarraysize( getd( ".req_item"+ .@t ) );
for ( .@i = 1; .@i < .@size; .@i += 2 )
mes getd( ".req_item"+ .@t +"["+( .@i +1 )+"]" ) +"x "+ getitemname( getd( ".req_item"+ .@t +"["+ .@i +"]" ) );
next;
if ( select ( "I want this Item", "Just walk around" ) == 2 ) {
mes "OK, please come again";
close;
}
else if ( gettime(4) != .@t ) {
mes "I'm sorry, today is a brand new day";
close;
}
for ( .@i = 1; .@i < .@size; .@i += 2 ) {
if ( countitem( getd( ".req_item"+ .@t +"["+ .@i +"]" ) ) < getd( ".req_item"+ .@t +"["+( .@i +1 )+"]" ) ) {
setarray .@not_enough[.@c], getd( ".req_item"+ .@t +"["+ .@i +"]" ), getd( ".req_item"+ .@t +"["+( .@i +1 )+"]" ) - countitem( getd( ".req_item"+ .@t +"["+ .@i +"]" ) );
.@c += 2;
}
}
if ( .@c ) {
mes "You didn't bring enough items";
for ( .@i = 0; .@i < .@c; .@i += 2 )
mes .@not_enough[ .@i +1 ] +"x "+ getitemname( .@not_enough[ .@i ] );
close;
}
for ( .@i = 1; .@i < .@size; .@i += 2 )
delitem getd( ".req_item"+ .@t +"["+ .@i +"]" ), getd( ".req_item"+ .@t +"["+( .@i +1 )+"]" );
getitem getd( ".req_item"+ .@t ), 1;
mes "Congratulations for getting";
mes getitemname( getd( ".req_item"+ .@t ) );
close;
OnInit:
setarray .week$, "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday";
setarray .req_item0, 501, 501,1, 502,1;
setarray .req_item1, 501, 501,10, 502,20, 503,30, 504, 40;
setarray .req_item2, 501, 501,1, 502,1;
setarray .req_item3, 501, 501,1, 502,1;
setarray .req_item4, 501, 501,1, 502,1;
setarray .req_item5, 501, 501,1, 502,1;
setarray .req_item6, 501, 501,1, 502,1;
end;
}

Bump............................ Anyone?

Edited by xmaniacx

6 answers to this question

Recommended Posts

Posted (edited)

can anybody make this script non repeatable and can only be done 1 time a day.

Repeatable in by account, non-repeatable by player the same day.

prontera,153,189,5	script	dksfjdsk	100,{
.@t = gettime(4);
mes "Hi, today is "+ .week$[.@t];
mes "The Daily Quest for today is ...";
mes getitemname( getd( ".req_item"+ .@t ) );
next;
mes "The Items that needed are :";
.@size = getarraysize( getd( ".req_item"+ .@t ) );
for ( .@i = 1; .@i < .@size; .@i += 2 )
	mes getd( ".req_item"+ .@t +"["+( .@i +1 )+"]" ) +"x "+ getitemname( getd( ".req_item"+ .@t +"["+ .@i +"]" ) );
next;
if ( select ( "I want this Item", "Just walk around" ) == 2 ) {
	mes "OK, please come again";
	close;
}
else if ( gettime(4) != .@t ) {
	mes "I'm sorry, today is a brand new day";
	close;
}
else if( the_day_today == gettime(4) ) {
	mes "You already finished the Daily Quest today.";
	close;
}
for ( .@i = 1; .@i < .@size; .@i += 2 ) {
	if ( countitem( getd( ".req_item"+ .@t +"["+ .@i +"]" ) ) < getd( ".req_item"+ .@t +"["+( .@i +1 )+"]" ) ) {
		setarray .@not_enough[.@c], getd( ".req_item"+ .@t +"["+ .@i +"]" ), getd( ".req_item"+ .@t +"["+( .@i +1 )+"]" ) - countitem( getd( ".req_item"+ .@t +"["+ .@i +"]" ) );
		.@c += 2;
	}
}
if ( .@c ) {
	mes "You didn't bring enough items";
	for ( .@i = 0; .@i < .@c; .@i += 2 )
		mes .@not_enough[ .@i +1 ] +"x "+ getitemname( .@not_enough[ .@i ] );
	close;
}
for ( .@i = 1; .@i < .@size; .@i += 2 )
	delitem getd( ".req_item"+ .@t +"["+ .@i +"]" ), getd( ".req_item"+ .@t +"["+( .@i +1 )+"]" );
getitem getd( ".req_item"+ .@t ), 1;
the_day_today = gettime(4);
mes "Congratulations for getting";
mes getitemname( getd( ".req_item"+ .@t ) );
close;
OnInit:
setarray .week$, "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday";
setarray .req_item0, 501, 501,1, 502,1;
setarray .req_item1, 501, 501,10, 502,20, 503,30, 504, 40;
setarray .req_item2, 501, 501,1, 502,1;
setarray .req_item3, 501, 501,1, 502,1;
setarray .req_item4, 501, 501,1, 502,1;
setarray .req_item5, 501, 501,1, 502,1;
setarray .req_item6, 501, 501,1, 502,1;
end;
}

Edited by Capuche
Posted

i still cant test the script becoz im here in my aunt house, but is the script non repeatable by player? like if char 1 from account 1already finish the quest, that mean char 2 from account 1 also cant do the quest right? but if i use account 2 i can do the quest?

Posted

It was not like that but... here an edit for you. It's now like you ask for.

Char 1 from account 1 finish the quest, char 2 from account 1 can't do the quest the same day.

Char from account 2 can do the quest. etc.

like if char 1 from account 1already finish the quest, that mean char 2 from account 1 also cant do the quest right? but if i use account 2 i can do the quest?

prontera,153,189,5    script    dksfjdsk    100,{
   .@t = gettime(4);
   mes "Hi, today is "+ .week$[.@t];
   mes "The Daily Quest for today is ...";
   mes getitemname( getd( ".req_item"+ .@t ) );
   next;
   mes "The Items that needed are :";
   .@size = getarraysize( getd( ".req_item"+ .@t ) );
   for ( .@i = 1; .@i < .@size; .@i += 2 )
       mes getd( ".req_item"+ .@t +"["+( .@i +1 )+"]" ) +"x "+ getitemname( getd( ".req_item"+ .@t +"["+ .@i +"]" ) );
   next;
   if ( select ( "I want this Item", "Just walk around" ) == 2 ) {
       mes "OK, please come again";
       close;
   }
   else if ( gettime(4) != .@t ) {
       mes "I'm sorry, today is a brand new day";
       close;
   }
   else if( #the_day_today == gettime(4) ) {
       mes "You already finished the Daily Quest today.";
       close;
   }
   for ( .@i = 1; .@i < .@size; .@i += 2 ) {
       if ( countitem( getd( ".req_item"+ .@t +"["+ .@i +"]" ) ) < getd( ".req_item"+ .@t +"["+( .@i +1 )+"]" ) ) {
           setarray .@not_enough[.@c], getd( ".req_item"+ .@t +"["+ .@i +"]" ), getd( ".req_item"+ .@t +"["+( .@i +1 )+"]" ) - countitem( getd( ".req_item"+ .@t +"["+ .@i +"]" ) );
           .@c += 2;
       }
   }
   if ( .@c ) {
       mes "You didn't bring enough items";
       for ( .@i = 0; .@i < .@c; .@i += 2 )
           mes .@not_enough[ .@i +1 ] +"x "+ getitemname( .@not_enough[ .@i ] );
       close;
   }
   for ( .@i = 1; .@i < .@size; .@i += 2 )
       delitem getd( ".req_item"+ .@t +"["+ .@i +"]" ), getd( ".req_item"+ .@t +"["+( .@i +1 )+"]" );
   getitem getd( ".req_item"+ .@t ), 1;
   #the_day_today = gettime(4);
   mes "Congratulations for getting";
   mes getitemname( getd( ".req_item"+ .@t ) );
   close;
OnInit:
   setarray .week$, "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday";
   setarray .req_item0, 501, 501,1, 502,1;
   setarray .req_item1, 501, 501,10, 502,20, 503,30, 504, 40;
   setarray .req_item2, 501, 501,1, 502,1;
   setarray .req_item3, 501, 501,1, 502,1;
   setarray .req_item4, 501, 501,1, 502,1;
   setarray .req_item5, 501, 501,1, 502,1;
   setarray .req_item6, 501, 501,1, 502,1;
   end;
}

Posted

Thank you capuche............. ive already tested it but...... i still have question..............

if take the quest at 11.51 tuesday and finish it at 11:59 tuesday the moment the time and date hits 12:00 and wednesday means i can do the quest again right? its not the type of npc that when you quest it at 11:51 you'll have to wait exactly 24 hours right? it gives you quest at every 12:00 a.m right?

Posted (edited)

if take the quest at 11.51 tuesday and finish it at 11:59 tuesday the moment the time and date hits 12:00 and wednesday means i can do the quest again right?

Yes it is.

Also if a player take the quest at 11:51 tuesday and finish it at 11:59 tuesday, on 00:01 wednesday he can do the quest again but he must wait 00:01 thursday to do it again. Finally it's the same as waiting 24h.

btw reward and items required switch with the day. It would be strange to do a tick when you must wait 24h.

Edited by Capuche

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