viewing paste SpinWheel | 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 30 31 32 33 34 35 36 37 38 39 40 41 42
function    script  F_LuckSpin  {
    // Prizes ID, Prize Ammount
    // You can use IDs:
    //      0 - Nothing
    //      1 - Zeny
    setarray .@Prizes[0],       0, 0,       1, 100000,      502, 2,     503, 3,     504, 4,     505, 5,     506, 6,     507, 7,     508, 8,     509, 9,     510, 10,        511, 11,        512, 12,        513, 13,        514, 14,        515, 15,        516, 16,        517, 17,        518, 18,        519, 19,        520, 20,        521, 21,        522, 22,        523, 23;    
    .@size = getarraysize(.@Prizes)/2;
    .@fullSpins = rand(1, 3);
    .@stop = rand(0, .@size);
    for (.@i = 0; .@i < .@fullSpins; .@i++) {
        for (.@j = 0; .@j < .@size; .@j++) {
            cutin "spin_" + (.@j + 1), 4;
            sleep2 50;
        }
    }
    for (.@i = 0; .@i < .@stop; .@i++) {
        cutin "spin_" + (.@i + 1), 4;
        sleep2 50 + 30 * .@stop; // Makes it go slower each time
    }
    .@pId = .@Prizes[.@stop * 2];
    .@pAm = .@Prizes[(.@stop * 2 + 1)]; 
    if (.@pId == 0) 
        return;
    else if (.@pId == 1)
        Zeny += .@pAm;
    else
        getitem .@pId, .@pAm;
    sleep2 500;
    cutin "", 255;
    return;
}
 
-   script  DailyLuckSpin   -1,{
OnPCLoginEvent:
    .@today = atoi(gettimestr("%Y%m%d",10));
    if (#LastSpinDay < .@today) {
        callfunc "F_LuckSpin";
        #LastSpinDay = .@today;
    }
    end;
}
 
Viewed 1165 times, submitted by Dastgir.