viewing paste Whotevas VIP system | 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 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
-   script  VIPServiceLogin -1,{
OnPCLoginEvent:
    if(#VIPSERVICE == 1 && VIP_Lasttime + $VIP_Cooldown > gettimetick(2) && VIP_Lasttime < gettimetick(2)) {
    dispbottom "Your VIP service is active!";
    sc_start SC_EXPBOOST,86400000,50;
    sc_start SC_ITEMBOOST,86400000,200;
    end;
    }
}
 
 
prontera,154,193,4  script  VIP Service 54,{
 
    // Configs
    //
    //
    set .itemID, 7539; // Set this number to the VIP ticket
    //
    set $VIP_Cooldown,2592000;
    //
    //
    // 2592000 is the amount of milliseconds in 30 days.
    // So the VIP ticket will last exactly 30 days.
    //
    // When a player logs in on any char on the account, they will get an item / exp drop rate buff.
    // The buff lasts 24 hours, but it is given every single time they login, so it will never run out until the 30 days are up.
    //
    // After giving in a VIP ticket, the player can talk to the NPC to see how much longer they have till the 30 days are over.
    //
    //
    
        if(#VIPSERVICE == 1 && VIP_Lasttime + $VIP_Cooldown > gettimetick(2) && VIP_Lasttime < gettimetick(2)) {
        set .@last,VIP_Lasttime + $VIP_Cooldown - gettimetick(2);
        set .@days,.@last / 60 / 60 / 24;
        set .@hours,.@last / 60 / 60 % 60;
        set .@minutes,.@last / 60 % 60;
        set .@seconds,.@last % 60;
        mes "You have: ";
        mes ""+.@days+" days "+.@hours+" hours "+.@minutes+" minutes "+.@seconds+" seconds";
        mes "in your VIP service remaining.";
        close;
        }
    mes "Hello!";
    mes "Would you like to redeem your VIP Service ticket?";
    switch(select("Yes!:No.")) {
    case 1:
        if (countitem(.itemID) > 0) {
        delitem .itemID,1;
        set #VIPSERVICE,1;
        mes "Congrats, you now have VIP service!";
        mes "You must relog for it to take effect.";
        set VIP_Lasttime,gettimetick(2);
        close;
        }
        else {
        mes "You do not have a VIP ticket!";
        mes "Come back when you get one.";
        close;
        }
    case 2:
        mes "Very well, I shall be here if you change your mind.";
        close;
    }
}
Viewed 2655 times, submitted by Whoteva.