Yudax Posted February 16, 2013 Group: Members Topic Count: 57 Topics Per Day: 0.01 Content Count: 248 Reputation: 7 Joined: 11/27/12 Last Seen: July 21, 2016 Share Posted February 16, 2013 (edited) May I know where to edit this script to make it every 12 HOURS instead of 24 HOURS? 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 February 16, 2013 by Yudax Quote Link to comment Share on other sites More sharing options...
Capuche Posted February 17, 2013 Group: Developer Topic Count: 10 Topics Per Day: 0.00 Content Count: 2407 Reputation: 616 Joined: 07/05/12 Last Seen: March 20 Share Posted February 17, 2013 Try this one http://pastebin.com/raw.php?i=Bdrmzr1X Quote Link to comment Share on other sites More sharing options...
Yudax Posted February 17, 2013 Group: Members Topic Count: 57 Topics Per Day: 0.01 Content Count: 248 Reputation: 7 Joined: 11/27/12 Last Seen: July 21, 2016 Author Share Posted February 17, 2013 Try this one http://pastebin.com/raw.php?i=Bdrmzr1X Hi sir, Thank you so much for this. May I know which is which you have edited? Quote Link to comment Share on other sites More sharing options...
Capuche Posted February 17, 2013 Group: Developer Topic Count: 10 Topics Per Day: 0.00 Content Count: 2407 Reputation: 616 Joined: 07/05/12 Last Seen: March 20 Share Posted February 17, 2013 I change gettime(4) into gettime(4)*2 + ( gettime(3) > 12 ? 1 : 0 ) .@t = gettime(4)*2 + ( gettime(3) > 12 ? 1 : 0 ); else if ( gettime(4)*2 + ( gettime(3) > 12 ? 1 : 0 ) != .@t ) { else if( #the_day_today == gettime(4)*2 + ( gettime(3) > 12 ? 1 : 0 ) ) { #the_day_today = gettime(4)*2 + ( gettime(3) > 12 ? 1 : 0 ); And split each day to morning and evening setarray .week$, "Sunday", "Sunday PM", "Monday", "Monday PM", "Tuesday", "Tuesday PM", "Wednesday", "Wednesday PM", "Thursday", "Thursday PM", "Friday", "Friday PM", "Saturday", "Saturday PM"; setarray .req_item0, 501, 501,1, 502,1;// sunday setarray .req_item1, 501, 501,10, 502,20, 503,30, 504, 40;// sunday PM etc.. 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; setarray .req_item7, 501, 501,1, 502,1; setarray .req_item8, 501, 501,10, 502,20, 503,30, 504, 40; setarray .req_item9, 501, 501,1, 502,1; setarray .req_item10, 501, 501,1, 502,1; setarray .req_item11, 501, 501,1, 502,1; setarray .req_item12, 501, 501,1, 502,1; setarray .req_item13, 501, 501,1, 502,1; Example : gettime(4)*2 + ( gettime(3) > 12 ? 1 : 0 ) It's sunday 11:00 AM : gettime(4) is 0, gettime(3) is < 12, so .@t is 0 setarray .req_item0, 501, 501,1, 502,1;// sunday is called It's sunday 13:00 : gettime(4) is 0, gettime(3) is > 12, so .@t is 1 setarray .req_item1, 501, 501,10, 502,20, 503,30, 504, 40;// sunday PM etc.. is called... Quote Link to comment Share on other sites More sharing options...
Question
Yudax
May I know where to edit this script to make it every 12 HOURS instead of 24 HOURS?
Edited by YudaxLink to comment
Share on other sites
3 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.