Jump to content
  • 0
Sign in to follow this  
* Blaze *

Hourly Points Question

Question

 

 
-    script    hourly_point_main    -1,{
    
    OnInit:
        .max_hour = 8;
        .duration = 3600;
        .npc_name$ = strnpcinfo(3);
        bindatcmd "hourly", .npc_name$ + "::OnCheck";
        end;
        
    OnClock0000:
        deletearray $@hourly_tick;
        
    OnUpdate:
        .@aid = getcharid(3) & 0xFFFF;
        deltimer .npc_name$+"::OnUpdate";
        $@hourly_ticks[.@aid]++;
        #KAFRAPOINTS += $@hourly_ticks[.@aid] * 10;
        
    OnPCLoginEvent:
        .@aid = getcharid(3) & 0xFFFF;
        if ( $@hourly_ticks[.@aid] < .max_hour ) {
            @timer = gettimetick(2) + .duration;
            addtimer ( .duration * 1000 ), .npc_name$+"::OnUpdate";
        } else {
            dispbottom "[ Hourly Rewards ] You've reached the daily maximum of "+.max_hour+" hours played, well done!",0x9ae2d7;
            end;
        }
        if ( #reward && $@hourly_ticks[.@aid] )
            dispbottom "[ Hourly Rewards ] " + $@hourly_ticks[.@aid] + "/" + .max_hour + " hours played, "+#reward+" point(s)!",0x9ae2d7;
        end;
        
    OnCheck:
        .@min = (@timer - gettimetick(2))/60;
        .@sec = (@timer - gettimetick(2))%60;
        dispbottom "[ Hourly Rewards ] Your next reward will be achieved in " +
                    ((.@min)?            "[ " + .@min + " ] minute"         + ((.@min > 1)?"s":""):"") +
                    ((.@min && .@sec)?    " and ":"") +
                    ((.@sec)?            "[ " + .@sec + " ] second"    + ((.@sec > 1)?"s":""):"") +
                    "!",0x9ae2d7;
        end;            
}

 

Allows players who afk and pubbing to gain points except players who use @autotrade or Vending I see this script any one help me??

 

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0

 

 

 
-    script    hourly_point_main    -1,{
    
    OnInit:
        .max_hour = 8;
        .duration = 3600;
        .npc_name$ = strnpcinfo(3);
        bindatcmd "hourly", .npc_name$ + "::OnCheck";
        end;
        
    OnClock0000:
        deletearray $@hourly_tick;
        
    OnUpdate:
        .@aid = getcharid(3) & 0xFFFF;
        deltimer .npc_name$+"::OnUpdate";
        $@hourly_ticks[.@aid]++;
        #KAFRAPOINTS += $@hourly_ticks[.@aid] * 10;
        
    OnPCLoginEvent:
        .@aid = getcharid(3) & 0xFFFF;
        if ( $@hourly_ticks[.@aid] < .max_hour ) {
            @timer = gettimetick(2) + .duration;
            addtimer ( .duration * 1000 ), .npc_name$+"::OnUpdate";
        } else {
            dispbottom "[ Hourly Rewards ] You've reached the daily maximum of "+.max_hour+" hours played, well done!",0x9ae2d7;
            end;
        }
        if ( #reward && $@hourly_ticks[.@aid] )
            dispbottom "[ Hourly Rewards ] " + $@hourly_ticks[.@aid] + "/" + .max_hour + " hours played, "+#reward+" point(s)!",0x9ae2d7;
        end;
        
    OnCheck:
        .@min = (@timer - gettimetick(2))/60;
        .@sec = (@timer - gettimetick(2))%60;
        dispbottom "[ Hourly Rewards ] Your next reward will be achieved in " +
                    ((.@min)?            "[ " + .@min + " ] minute"         + ((.@min > 1)?"s":""):"") +
                    ((.@min && .@sec)?    " and ":"") +
                    ((.@sec)?            "[ " + .@sec + " ] second"    + ((.@sec > 1)?"s":""):"") +
                    "!",0x9ae2d7;
        end;            
}

 

Allows players who afk and pubbing to gain points except players who use @autotrade or Vending I see this script any one help me??

use checkvending()

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

×   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...
Sign in to follow this  

×
×
  • Create New...

Important Information

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