Hourly Points Question

* Blaze *

New member
Messages
110
Points
0
Emulator
 
-    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??
 
 
-    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()

 
Back
Top