viewing paste Lotti [mod] | 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
<header> {
    mes "[Lotti Girl]";
    mes "It costs "+.Price+" Zeny to play.";
    if (Zeny < .Price) close;
    next;
    if(select("Deal me in!:No way...")==2) close;
    mes "[Lotti Girl]";
    mes "Here we go...";
    progressbar "",2;
    set Zeny, Zeny-.Price;
    set .@i, rand(1,.Total);
    if (rand(1,100) > getd(".P"+.@i+"[0]")) {
        for(set .@j,0; .@j<getarraysize(.Default); set .@j,.@j+2) {
            getitem .Default[.@j], .Default[.@j+1];
            if (!.@k[0]) setarray .@k[0], .Default[.@j], .Default[.@j+1]; } }
    else {
        for(set .@j,1; .@j<getarraysize(getd(".P"+.@i)); set .@j,.@j+2) {
            getitem getd(".P"+.@i+"["+.@j+"]"), getd(".P"+.@i+"["+(.@j+1)+"]");
            if (!.@k[0]) setarray .@k[0], getd(".P"+.@i+"["+.@j+"]"), getd(".P"+.@i+"["+(.@j+1)+"]"); } }
    announce "Congratulations to "+strcharinfo(0)+" for getting "+.@k[1]+"x "+getitemname(.@k[0])+"!",0;
    specialeffect2 248;
    close;
 
OnInit:
// Format: <%>,<item ID>,<count>{,...};
    setarray .P1[0],70,607,25;
    setarray .P2[0],70,13710,1;
    setarray .P3[0],40,5471,1;
    setarray .P4[0],40,5210,1;
    setarray .P5[0],40,5224,1;
    setarray .P6[0],50,2357,1,2524,1,2421,1,2115,1;
    setarray .P7[0],25,2701,1;
    setarray .P8[0],5,2394,1;
    setarray .Default[0],12214,1;
    set .Price,10000000;
    set .Total,8;
    end;
}
Viewed 963 times, submitted by Guest.