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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

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