xmaniacx Posted January 22, 2013 Group: Members Topic Count: 39 Topics Per Day: 0.01 Content Count: 110 Reputation: 1 Joined: 04/03/12 Last Seen: April 29, 2019 Share Posted January 22, 2013 (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 January 22, 2013 by xmaniacx Quote Link to comment Share on other sites More sharing options...
Capuche Posted January 22, 2013 Group: Developer Topic Count: 10 Topics Per Day: 0.00 Content Count: 2407 Reputation: 616 Joined: 07/05/12 Last Seen: Thursday at 08:49 PM Share Posted January 22, 2013 (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 January 22, 2013 by Capuche Quote Link to comment Share on other sites More sharing options...
xmaniacx Posted January 22, 2013 Group: Members Topic Count: 39 Topics Per Day: 0.01 Content Count: 110 Reputation: 1 Joined: 04/03/12 Last Seen: April 29, 2019 Author Share Posted January 22, 2013 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? Quote Link to comment Share on other sites More sharing options...
Capuche Posted January 22, 2013 Group: Developer Topic Count: 10 Topics Per Day: 0.00 Content Count: 2407 Reputation: 616 Joined: 07/05/12 Last Seen: Thursday at 08:49 PM Share Posted January 22, 2013 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; } Quote Link to comment Share on other sites More sharing options...
xmaniacx Posted January 22, 2013 Group: Members Topic Count: 39 Topics Per Day: 0.01 Content Count: 110 Reputation: 1 Joined: 04/03/12 Last Seen: April 29, 2019 Author Share Posted January 22, 2013 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? Quote Link to comment Share on other sites More sharing options...
Capuche Posted January 22, 2013 Group: Developer Topic Count: 10 Topics Per Day: 0.00 Content Count: 2407 Reputation: 616 Joined: 07/05/12 Last Seen: Thursday at 08:49 PM Share Posted January 22, 2013 (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 January 22, 2013 by Capuche Quote Link to comment Share on other sites More sharing options...
xmaniacx Posted January 23, 2013 Group: Members Topic Count: 39 Topics Per Day: 0.01 Content Count: 110 Reputation: 1 Joined: 04/03/12 Last Seen: April 29, 2019 Author Share Posted January 23, 2013 thank you so much capuche, [ PROBLEM SOLVED ] Quote Link to comment Share on other sites More sharing options...
Question
xmaniacx
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.
Bump............................ Anyone?
Edited by xmaniacxLink 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.