Meister Posted April 1, 2013 Group: Members Topic Count: 280 Topics Per Day: 0.06 Content Count: 841 Reputation: 17 Joined: 04/16/12 Last Seen: March 4, 2024 Share Posted April 1, 2013 OnInit: bindatcmd("dailyreward",strnpcinfo(0)+"::OnAtCmd"); end; OnAtCmd: if (#dailyreward > gettimetick(2)) { message strcharinfo(0),"You must wait 24 hours before receiving more items."; end; } // getitem x,y; set #dailyreward, gettimetick(2)+86400; end; Player must be online first for 1 hour before he/she can use this command. Quote Link to comment Share on other sites More sharing options...
Emistry Posted April 1, 2013 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: Sunday at 05:32 PM Share Posted April 1, 2013 try this? http://pastebin.com/raw.php?i=NHwdEggH Quote Link to comment Share on other sites More sharing options...
Meister Posted April 1, 2013 Group: Members Topic Count: 280 Topics Per Day: 0.06 Content Count: 841 Reputation: 17 Joined: 04/16/12 Last Seen: March 4, 2024 Author Share Posted April 1, 2013 (edited) try this? http://pastebin.com/raw.php?i=NHwdEggH I'll try this thank you. Error: [Error]: Loading NPC file: npc/custom/gamestat.txt script error on npc/custom/gamestat.txt line 24 parse_callfunc: not enough arguments, expected ',' 19 : set .@m,.@time / 60 % 60; 20 : set .@s,.@time % 60; 21 : dispbottom "You have played "+.@d+"d "+.@h+"h "+.@m+"m and "+.@s +"s total."; 22 : end; 23 : OnDaily: * 24 : .@day = atoi( gettimestr("%Y%m%d"')' ); 25 : if( #dailyreward <= .@day ){ 26 : message strcharinfo(0),"You have take the item for today ."; 27 : }else if( @online > gettimetick(2) ){ 28 : message strcharinfo(0),"You must wait 24 hours before re ceiving more items."; 29 : }else{ Edited April 1, 2013 by Gnome Quote Link to comment Share on other sites More sharing options...
Capuche Posted April 1, 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 April 1, 2013 - script Sample -1,{ OnInit: bindatcmd "dailyreward",strnpcinfo(3)+"::OnAtCommand"; end; OnAtCommand: .@day = atoi( gettimestr("%Y%m%d",19) ); if( #dailyreward == .@day ){ message strcharinfo(0),"You have take the item for today."; }else if( @online > gettimetick(2) ){ message strcharinfo(0),"You must wait 24 hours before receiving more items."; }else{ #dailyreward = .@day; getitem 607,1; message strcharinfo(0),"You gained the item for today."; } end; OnPCLoginEvent: @online = 3600 + gettimetick(2); end; } 1 Quote Link to comment Share on other sites More sharing options...
Question
Meister
Player must be online first for 1 hour before he/she can use this command.
Link 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.