viewing paste test daily variable reset | Athena

Posted on the | Last edited on
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
prontera,150,180,5      script  test1   1_F_MARIA,{
        mes "now your #BOSSNIAPOINTS is "+ #BOSSNIAPOINTS;
        mes "tomorow your #BOSSNIAPOINTS will automatically become 0";
        next;
        input #BOSSNIAPOINTS, 0, 100;
        close;
 
OnClock0000: // this thing can kill your server if your server has large population
        query_sql "delete from `acc_reg_num` where `key` = '#BOSSNIAPOINTS';";
        addrid 0;
        #BOSSNIAPOINTS = 0;
        end;
}
 
prontera,155,180,5      script  test2   1_F_MARIA,{
        .@today = atoi( gettime(DT_YEAR) +""+ gettime(DT_DAYOFYEAR) ); // this command only run on 1 player at a time
        if ( #BOSSNIATODAY != .@today ) {
                #BOSSNIATODAY = .@today;
                #BOSSNIAPOINTS = 0;
        }
        mes "now your #BOSSNIAPOINTS is "+ #BOSSNIAPOINTS;
        mes "tomorow your #BOSSNIAPOINTS will automatically become 0";
        next;
        input #BOSSNIAPOINTS, 0, 100;
        close;
}
Viewed 55 times, submitted by AnnieRuru.