Jump to content
  • 0

Account based


caspa

Question


  • Group:  Members
  • Topic Count:  194
  • Topics Per Day:  0.04
  • Content Count:  499
  • Reputation:   3
  • Joined:  03/11/12
  • Last Seen:  

how to make this into account based? not by character based?

 

mes "[ Reward Manager ]";
        if( Daily_Reward>gettimetick(2) ){
        set .@Time, Daily_Reward-gettimetick(2);
        set .@SecondLeft,( .@Time % 60 );
        set .@MinuteLeft,( .@Time / 60 % 60 );
        set .@HourLeft,( .@Time / ( 60 * 60 ) % 24 );
        set .@DayLeft,( .@Time / ( 24 * 60 * 60 ) );
        set .@TimeLeft$,(( .@DayLeft )?.@DayLeft+" Day ":"" ) +
(( .@HourLeft )?.@HourLeft+" hours ":"" ) +
(( .@MinuteLeft )?.@MinuteLeft+" minutes ":"" ) +
(( .@SecondLeft )?.@SecondLeft+" seconds":"" );
    mes "I'm sorry, but you have already received the ^009900Daily Rewards^000000.";
    mes "Please comeback later.";
    mes "       ";
    mes "^ff0000Next Reward^000000 :";
    mes "^0000ff"+.@TimeLeft$+"";
        close;
        }
    mes "            ";
    mes "~ ^009900Daily Rewards Acquired^000000";
    mes "       ";
    mes "^ff0000Received Items^000000 :";
    getitem 7539,100;
    getitem 7227,100;
    mes "• 100x Poring Coin";
    mes "• 100x TCG Card";
    set Daily_Reward,gettimetick(2)+43200;
    next;
    mes "[ Reward Manager ]";
    mes "Please talk to me again in the next ^ff000012 Hours^000000.";
    close;
Link to comment
Share on other sites

4 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  382
  • Reputation:   38
  • Joined:  01/17/12
  • Last Seen:  

This should work

 

 
mes "[ Reward Manager ]";
        if( #Daily_Reward>gettimetick(2) ){
        set .@Time, #Daily_Reward-gettimetick(2);
        set .@SecondLeft,( .@Time % 60 );
        set .@MinuteLeft,( .@Time / 60 % 60 );
        set .@HourLeft,( .@Time / ( 60 * 60 ) % 24 );
        set .@DayLeft,( .@Time / ( 24 * 60 * 60 ) );
        set .@TimeLeft$,(( .@DayLeft )?.@DayLeft+" Day ":"" ) +
(( .@HourLeft )?.@HourLeft+" hours ":"" ) +
(( .@MinuteLeft )?.@MinuteLeft+" minutes ":"" ) +
(( .@SecondLeft )?.@SecondLeft+" seconds":"" );
    mes "I'm sorry, but you have already received the ^009900Daily Rewards^000000.";
    mes "Please comeback later.";
    mes "       ";
    mes "^ff0000Next Reward^000000 :";
    mes "^0000ff"+.@TimeLeft$+"";
        close;
        }
    mes "            ";
    mes "~ ^009900Daily Rewards Acquired^000000";
    mes "       ";
    mes "^ff0000Received Items^000000 :";
    getitem 7539,100;
    getitem 7227,100;
    mes "• 100x Poring Coin";
    mes "• 100x TCG Card";
    set #Daily_Reward,gettimetick(2)+43200;
    next;
    mes "[ Reward Manager ]";
    mes "Please talk to me again in the next ^ff000012 Hours^000000.";
    close;
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  182
  • Reputation:   36
  • Joined:  01/26/12
  • Last Seen:  

Just change any unprefixed variable ( variable, character variable ) to a sharp-prefixed variable ( #variable, account variable ):


[same code as Bahmut managed to reply before I did]

 

There you go: try it.

Edited by jaBote
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  382
  • Reputation:   38
  • Joined:  01/17/12
  • Last Seen:  

Just change any unprefixed variable ( variable, character variable ) to a sharp-prefixed variable ( #variable, account variable ):

 
mes "[ Reward Manager ]";
        if( #Daily_Reward>gettimetick(2) ){
        set .@Time, #Daily_Reward-gettimetick(2);
        set .@SecondLeft,( .@Time % 60 );
        set .@MinuteLeft,( .@Time / 60 % 60 );
        set .@HourLeft,( .@Time / ( 60 * 60 ) % 24 );
        set .@DayLeft,( .@Time / ( 24 * 60 * 60 ) );
        set .@TimeLeft$,(( .@DayLeft )?.@DayLeft+" Day ":"" ) +
(( .@HourLeft )?.@HourLeft+" hours ":"" ) +
(( .@MinuteLeft )?.@MinuteLeft+" minutes ":"" ) +
(( .@SecondLeft )?.@SecondLeft+" seconds":"" );
    mes "I'm sorry, but you have already received the ^009900Daily Rewards^000000.";
    mes "Please comeback later.";
    mes "       ";
    mes "^ff0000Next Reward^000000 :";
    mes "^0000ff"+.@TimeLeft"";
        close;
        }
    mes "            ";
    mes "~ ^009900Daily Rewards Acquired^000000";
    mes "       ";
    mes "^ff0000Received Items^000000 :";
    getitem 7539,100;
    getitem 7227,100;
    mes "• 100x Poring Coin";
    mes "• 100x TCG Card";
    set #Daily_Reward,gettimetick(2)+43200;
    next;
    mes "[ Reward Manager ]";
    mes "Please talk to me again in the next ^ff000012 Hours^000000.";
    close;

There you go: try it.

 

That's what I have done.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  182
  • Reputation:   36
  • Joined:  01/26/12
  • Last Seen:  

Yes, but I was too late and didn't bother to edit my reply and remove it.

Link to comment
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
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  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.

×
×
  • Create New...