Jump to content
  • 0

Hour Bonus Every 1 minute in a Map


Question

Posted (edited)

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

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

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...