hello everyone i would like to ask for your help.... in regards to this script.. i'm having real troulbe with gettime scripts this is the script
invek,136,148,5 script Daily Quest 733,{
mes "[ Daily Quest ]";
mes "Hello ^0000ff"+strcharinfo(0)+"^000000,";
mes "How can i help you?";
mes " ";
mes "^ff0000NOTE^000000 :";
mes "Daily quest starts every";
mes "1:00 A.M and 1:00 P.M";
next;
menu "Do the Daily Quest",doquest,"^ff0000Exit^000000",dontdodaily;
dontdodaily:
close;
doquest:
set .@t,gettime(4)*2 + ( gettime(3) > 12 ? 1 : 0 );
mes "[ Daily Quest ]";
mes ""+ .week$[.@t] + " Quest Detail :";
mes "^777777Required Items^000000 :";
set .@size,getarraysize( getd( ".req_item"+ .@t ) );
for ( set .@i,1; .@i < .@size; set .@i,.@i+2)
mes ""+((countitem( getd( ".req_item"+ .@t +"["+ .@i +"]" ) ) < getd( ".req_item"+ .@t +"["+( .@i +1 )+"]" ) ) ? "^ff0000":"^008800")+""+getd( ".req_item"+ .@t +"["+( .@i +1 )+"]" ) +"x "+ getitemname( getd( ".req_item"+ .@t +"["+ .@i +"]" ) )+" ("+countitem( getd( ".req_item"+ .@t +"["+ .@i +"]" ) )+"/"+getd( ".req_item"+ .@t +"["+( .@i +1 )+"]" ) +")";
mes "^777777Reward Items^000000 :";
mes "1x "+getitemname( getd( ".req_item"+ .@t ) );
mes "1x Refinement Card";
next;
if ( select ( "Submit ^0000ffDaily Quest Items", "^ff0000Exit^000000" ) == 2 ) {
close;
}
else if( #the_day_today == gettime(4)*2 + ( gettime(3) > 12 ? 1 : 0 ) ) {
mes "[ Daily Quest ]";
mes "I'm sorry, but you have completed";
mes "the ^ff0000"+( gettime(3) > 12 ? "P.M" : "A.M" )+"^000000 quest for today already.";
mes "Please comeback later for";
mes "the ^0000ff"+(gettime(3) > 12 ? "A.M" : "P.M" )+"^000000 quest.";
close;
}
else if ( gettime(4)*2 + ( gettime(3) > 12 ? 1 : 0 ) != .@t ) {
mes "[ Daily Quest ]";
mes "I'm sorry, but the daily quest has just been updated.";
mes "I now require a new set of quest items.";
close;
}
mes "[ Daily Quest ]";
mes "^ff0000*Checking Inventory*^000000";
mes "Please wait....";
sleep2 5000;
mes " ";
mes " ";
mes "• ^008800Inventory Check Complete^000000";
next;
for ( set .@i,1; .@i < .@size; set .@i,.@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 +"]" ) );
set .@c,.@c + 2;
}
}
if ( .@c ) {
mes "[ Daily Quest ]";
mes "You do not have enough ^ff0000Quest Items^000000.";
close;
}
for ( set .@i,1; .@i < .@size; set .@i,.@i + 2 )
delitem getd( ".req_item"+ .@t +"["+ .@i +"]" ), getd( ".req_item"+ .@t +"["+( .@i +1 )+"]" );
getitem getd( ".req_item"+ .@t ), 1;
set #the_day_today,gettime(4)*2 + ( gettime(3) > 12 ? 1 : 0 );
mes "[ Daily Quest ]";
mes "^777777Quest Completed^000000 :";
mes "^009900"+ .week$[.@t]+" Quest^000000";
mes " ";
mes "^777777Received Items^000000 :";
mes "• ^0000ff1x "+getitemname( getd( ".req_item"+ .@t ) );
mes "• ^0000ff1x Refinement card^000000";
getitem 21013,1;
close;
OnInit:
waitingroom "Daily Quest",0;
setarray .week$, "Sunday's (A.M)", "Sunday's (P.M)", "Monday's (A.M)", "Monday's (P.M)", "Tuesday's (A.M)", "Tuesday's (P.M)", "Wednesday's (A.M)", "Wednesday's (P.M)", "Thursday's (A.M)", "Thursday's (P.M)", "Friday's (A.M)", "Friday's (P.M)", "Saturday's (A.M)", "Saturday's (P.M)";
setarray .req_item0, 21010, rand( 901,1070 ),rand( 10,20 ), 502,1;// sunday
setarray .req_item1, 21010, rand( 901,1070 ),rand( 10,20 ), 502,20, 503,30, 504, 40;// sunday PM etc..
setarray .req_item2, 21010, rand( 901,1070 ),rand( 10,20 ), 502,1;
setarray .req_item3, 21010, rand( 901,1070 ),rand( 10,20 ), 502,1;
setarray .req_item4, 21010, rand( 901,1070 ),rand( 10,20 ), 502,1;
setarray .req_item5, 21010, rand( 901,1070 ),rand( 10,20 ), 502,1;
setarray .req_item6, 21010, rand( 901,1070 ),rand( 10,20 ), 502,1;
setarray .req_item7, 21010, rand( 901,1070 ),rand( 10,20 ), 502,1;
setarray .req_item8, 21010, rand( 901,1070 ),rand( 10,20 ), 502,20, 503,30, 504, 40;
setarray .req_item9, 21010, rand( 901,1070 ),rand( 10,20 ), 502,1;
setarray .req_item10, 21010, rand( 901,1070 ),rand( 10,20 ), 502,1;
setarray .req_item11, 21010, rand( 901,1070 ),rand( 10,20 ), 502,1;
setarray .req_item12, 21010, rand( 901,1070 ),rand( 10,20 ), 502,1;
setarray .req_item13, 21010, rand( 901,1070 ),rand( 10,20 ), 502,1;
end;
}
this is a a script made by CAPUCHE from the scripting request way back in 2013 or 2014 if i'm correct....... i can submit the daily quest if its morning however when it becomes 1 pm and above it's telling me directly that i completed the quest already. thank you so much
Question
caspa
hello everyone i would like to ask for your help.... in regards to this script.. i'm having real troulbe with gettime scripts this is the script
this is a a script made by CAPUCHE from the scripting request way back in 2013 or 2014 if i'm correct....... i can submit the daily quest if its morning however when it becomes 1 pm and above it's telling me directly that i completed the quest already. thank you so much
Link to comment
Share on other sites
4 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.