viewing paste Unknown #858 | Text

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 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
// Euphy's Premium Account modified by shadowseph. Thanks to them! :))
 
prontera,149,284,5  script  Premium Setter  899,{
function getPremiumTime;
 
mes "Want to buy ^0055FFPremium Time^000000 ?";
if( select( "Purchase ^0055FFPremium Time^000000:Cancel" ) == 1 ){
    if( #Premium*1000 != 0 ){
        next;
        mes "Sorry but your ^0055FFPremium Time^000000 is currently activated which will end after "+getPremiumTime( #Premium );
        next;
        mes "You must wait for it to expire before purchasing ^0055FFPremium Time^000000 again";
        next;
        mes "Come back again next time! Thanks!";
        close;
    }
next;
mes "1 Day = "+.DayCost+" Cash Points";
mes "How many Day(s) you want to buy ?";
input .@Day;
if( .@Day || #CASHPOINTS < ( .@Day * .DayCost ) ){
    if( #CASHPOINTS < ( .@Day * .DayCost ) ){
        next;
        mes "You need more "+( ( .@Day * .DayCost ) - #CASHPOINTS )+" Cash Points.";
    }else{
        next;
        mes "You plan to purchase "+.@Day+" Day(s) which total cost is "+( .@Day * .DayCost )+" Cash Points.";
        if( select("Confirm:Cancel") == 1 ){
            set #CASHPOINTS,#CASHPOINTS - ( .@Day * .DayCost );
            set #Premium,#Premium + ( .@Day * 24 * 3600 );
            next;
            mes "You have purchased "+.@Day+" day(s) of Premium Time.";
            sc_start SC_PREM_EXP,(#Premium * 1000),100;
            sc_start SC_PREM_DROP,(#Premium * 1000),200;
        }
    }
}
 
}
close;
 
 
function    getPremiumTime( #Premium * 1000 )   {
set .@Time,getarg(0);
    set .@SecondLeft,( .@Time % 60 );
    set .@MinuteLeft,( .@Time / 60 % 60 );
    set .@HourLeft,( .@Time / ( 60 * 60 ) % 24 );
    set .@DayLeft,( .@Time / ( 24 * 60 * 60 ) );
    
    set .@TimeLeft$,(( .@DayLeft )?.@DayLeft+" Day(s) ":"" ) +
                    (( .@HourLeft )?.@HourLeft+" Hr(s) ":"" ) +
                    (( .@MinuteLeft )?.@MinuteLeft+" Min ":"" ) +
                    (( .@SecondLeft )?.@SecondLeft+" Sec":"" );
                    
return ""+.@TimeLeft$+"";
}
 
OnPCLoginEvent:
if( #Premium*1000 != 0 ){
    announce "Your Premium Time Left : "+getPremiumTime( #Premium * 1000 )+"",bc_self,0xFFFFFF;
}
end;
 
 
OnInit:
setarray .DayCost,500;
end;
}
Viewed 732 times, submitted by Guest.