Jump to content
  • 0

Hour Bonus Every 1 minute in a Map


PsyOps

Question


  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  148
  • Reputation:   10
  • Joined:  12/03/18
  • Last Seen:  

Hi guys! I have tried to use this script as a basis for a Prize Every Minute on a Map. I would only want to limit it from 7-8 PM. Any clues how to improve this script?

 

-    script    hjklm    -1,{
OnPCLoginEvent:
    while(1) {
        sleep2 5000;
        if ( strcharinfo(3) == .map_hourly$ && gettime(3) > 20 ) {
            .@loop++;
            if( .@loop == 3 ) {// 1h
                getitem .item_gain, .item_num;
                .@loop = 0;
            }
        }
        else
            .@loop = 0;
    }
OnInit:
    .item_gain = 501;            // Item ID gained
    .item_num = 1;                // number item gained
    .afk_time = 5;                // afk restriction 5 min
    .map_hourly$ = "payon";    // map restriction
    end;
}

 

Edited by Emistry
Please use codebox
Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  155
  • Topics Per Day:  0.03
  • Content Count:  535
  • Reputation:   23
  • Joined:  11/19/11
  • Last Seen:  

Just change the gettime(3) > 20 to gettime(3) == 19

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...