Q> How to make this into a daily based quest? like every 8:00 in the morning the npc reset and when it resets it announces "you can now take the daily quest" or something like that.
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;
}
Question
caspa
Q> How to make this into a daily based quest? like every 8:00 in the morning the npc reset and when it resets it announces "you can now take the daily quest" or something like that.
Edited by caspaLink to comment
Share on other sites
6 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.