Modified Hourly Points

greenieken

New member
Messages
90
Points
0
Github
greenieken
Emulator
May I request for a modification.

Instead of every hour, make it every 10 minutes.

Instead of points, change to item.

Stop when vending and pub, but allows AFK.

 
Send / post the hourly script you had and i'll modify it.

 
I saw this script that annie used coz i've heard that the strcharinfo(0)+ may cause lag. I haven't tried this yet in my server, can you check if this is compatible with the latest herc? thanks! @Happy

-    script    ksdfskjfhs    -1,{
OnPCLoginEvent:
    dispbottom "Your timer starts now. You will receive 10 minute tickets after being online for 10 minutes";
    while (1) {
        if ( checkvending() != 2 ) {
            .@hourpointtick++;
            if ( .@hourpointtick > .tick ) {
                dispbottom "You have received 10 minute tickets";
                getitem 7227, 10;
                .@hourpointtick = 0;
            }
        }
        sleep2 .sleeploop;
    }
    end; // doesn't read
OnInit:
    .sleeploop = 10000; // every 30 seconds
    .tick = 1; // loop 60 times of 30 seconds == 30 minutes
    end;
}

 
Instead of every hour, make it every 10 minutes.

Instead of points, change to item.

Stop when vending and pub, but allows AFK.

Code:
/*
Instead of every hour, make it every 10 minutes.

Instead of points, change to item.

Stop when vending and pub, but allows AFK.
*/

-    script    ksdfskjfhs    -1,{
OnPCLoginEvent:
    dispbottom "Your timer starts now. You will receive 10 minute tickets after being online for 10 minutes";
    while (1) {
        if ( checkvending() != 2 && !checkchatting() ) {
            .@hourpointtick++;
            if ( .@hourpointtick > .tick ) {
                dispbottom "You have received 10 minute tickets";
                getitem 7227, 10;
                .@hourpointtick = 0;
            }
        }
        sleep2 .sleeploop;
    }
    end; // doesn't read
OnInit:
    .sleeploop = 30000; // every 30 seconds
    .tick = 20; // loop 60 times of 30 seconds == 30 minutes
    end;
}
There you go, I'll leave the testing to you though just post here again if there are errors :)

Might be better to use timers, i think there is already an hourly point reward somewhere with timers. Just try to search around.

 
Last edited by a moderator:
@Happy Hey it's working. Thank you so much. I have another request, can i tag you in my new post? lol

 
Back
Top