Jump to content
goddameit

Online Gaming Time

Recommended Posts

Simple script Online exchange Point ?

 
prontera,150,180,4      script  OnlineGamingTime        100,{        .@tick = 0;        query_sql "UPDATE `onlinetime` SET `total_sec` = `total_sec` + TIMESTAMPDIFF(SECOND, `start_time`,  NOW()), `start_time` = NOW() WHERE `account_id` = "+getcharid(3);        query_sql "SELECT `total_sec` FROM `onlinetime` WHERE `account_id` = "+getcharid(3), .@tick;        mes "Your online time is:";        mes "[ "+callfunc("Time2Str", gettimetick(2)+.@tick)+" ]";        @tick = .@tick;        if(prompt("[100t ---> 1p]", "[close]") == 1 && @tick >= 100) {                @tick -= 100;                #CASHPINTS += 1;        }        query_sql "UPDATE `onlinetime` SET `total_sec` = "+@tick+" WHERE `account_id` = "+getcharid(3);        .@tick = 0;        @tick = 0;        close;
Edited by goddameit

Share this post


Link to post
Share on other sites

@@goddameit

 

Is it possible to capture a player's entire online time? Like it would help determine if a player has been playing for 20 hours (that could be used in a referral system where GMs need to check if the player has been active for a definite time before reward will be given to the referrer)

Share this post


Link to post
Share on other sites

hi.

i got this error 

[Debug]: script debug : 0 110012807 : [OnlineTime]: Auto-Backup player date.

can i know what the problem?

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.