viewing paste vip | Athena

Posted on the
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 27 28 29
prontera,164,169,3      script  Premium Trader  757,{
mes "Want to be Premium User for 1 week?";
mes "Then give me 7 x "+getitemname(7179);
if( countitem(7179) >= 7 ) {
        if( select("YES:NO") == 1 ){
                delitem 7179,7;
                callfunc "F_VIPstart",604800;
                mes "Done. enjoy your Premium Services for 1 Week.";
        }
}
}
 
function        script  F_VIPstart      {
        set .@ticks,getarg(0); // getarg(0) = ticks (seconds)
        if (.@ticks <= 0) {
                debugmes "F_VIPstart - tried a negative time";
                end;
        }
        // set a variable, #VIP_expire, as the Unixtime when this expires
        set #VIP_expire, gettimetick(2) + .@ticks;
        // add a timer with that tick (in case they stay logged in that long)
        if (.@ticks < 2147483) { // prevent overflow error
                addtimer .@ticks *1000, "vip_rental::OnVIPend";
        } else {
                addtimer 2147483000, "vip_rental::OnVIPcheck";
        }
}
Viewed 343 times, submitted by unknown.