Jump to content
  • 0

How to change prize on Lotti Girl


Question

Posted

here's my script

 

 

// http://rathena.org/board/topic/83017-pro-lotti-girl-refine-master/
prontera,164,164,3    script    Lotti Girl    714,{
    mes "[Lotti Girl]";
    mes "Hello Sir! Are you out";
    mes "shopping in the city?!";
    next;
    mes "[Lotti Girl]";
    mes "I'm Lotti! I'll exchange cool";
    mes "random prizes for every";
    mes "^ff00001 Lottery Ticket^000000.";
    next;
    mes "[Lotti Girl]";
    mes "Our Grand prize is:";
    mes "^ff0000Costume Kirin Wing^000000";
    mes "Special prizes are:";
    mes "^ff0000Costume Flying Angel Wing^000000";
    mes "^ff0000____^000000";
    mes "and ^ff0000____^000000";
    next;
    mes "[Lotti Girl]";
    mes "You can still get random item";
    mes "if you failed to get the grand";
    mes "prize and special prizes.";
    if (countitem(7528) < 1)
        close;
    next;
    if(Weight >= MaxWeight/2) goto Low;

    Low:
    mes "You are Overweight!";
    close;

    next;
    if(select("Deal me in!:No way...")==2)
        close;
    mes "[Lotti Girl]";
    mes "Here we go...";
    delitem 7528,1;
    set .@Total,8;
    //<%>,<ItemID>,<Amount>
    setarray .@P1[0],0,8012,1;
    setarray .@P2[0],1,8011,1;
    setarray .@P3[0],5,8006,1;
    setarray .@P4[0],20,8010,1;
    setarray .@P5[0],90,13517,5;
    setarray .@P6[0],80,12080,10;
    setarray .@P7[0],90,30110,5;
    setarray .@P8[0],80,12075,10;
    setarray .@Default[0],30095,5;
    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])
            {
                set .@gz,.@i;
                setarray .@k[0], getd(".@P"+.@i+"["+.@j+"]"), getd(".@P"+.@i+"["+(.@j+1)+"]");
                break;
            }
        }
    }
    if(1<=.@gz&&.@gz<=4)
        announce "Congratulations! "+strcharinfo(0)+" just received "+getitemname(.@k[0])+" x "+.@k[1]+" from Lotti Girl (prontera 139 173)!",0;
    specialeffect2 248;
    close;
    
    OnInit:
    waitingroom "[Lotti Girl]",0;
    }
}

1 answer to this question

Recommended Posts

  • 0
Posted (edited)
Quote

prontera,164,164,3    script    Lotti Girl    714,{
    mes "[Lotti Girl]";
    mes "Hello Sir! Are you out";
    mes "shopping in the city?!";
    next;
    mes "[Lotti Girl]";
    mes "I'm Lotti! I'll exchange cool";
    mes "random prizes for every";
    mes "^ff00001 Lottery Ticket^000000.";
    next;
    mes "[Lotti Girl]";
    mes "Our Grand prize is:";
    mes "^ff0000Costume Kirin Wing^000000";
    mes "Special prizes are:";
    mes "^ff0000Costume Flying Angel Wing^000000";
    mes "^ff0000____^000000";
    mes "and ^ff0000____^000000";
    next;
    mes "[Lotti Girl]";
    mes "You can still get random item";
    mes "if you failed to get the grand";
    mes "prize and special prizes.";
    if (countitem(7528) < 1)
        close;
    next;
    if(Weight >= MaxWeight/2) goto Low;

    Low:
    mes "You are Overweight!";
    close;

    next;
    if(select("Deal me in!:No way...")==2)
        close;
    mes "[Lotti Girl]";
    mes "Here we go...";
    delitem 7528,1;
    set .@Total,8;
    //<%>,<ItemID>,<Amount>
    setarray .@P1[0],0,8012,1;           <-------------  The red text is prize
    setarray .@P2[0],1,8011,1;
    setarray .@P3[0],5,8006,1;
    setarray .@P4[0],20,8010,1;
    setarray .@P5[0],90,13517,5;
    setarray .@P6[0],80,12080,10;
    setarray .@P7[0],90,30110,5;
    setarray .@P8[0],80,12075,10;
    setarray .@Default[0],30095,5; 
     <------------- Ths is Default prize
    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])
            {
                set .@gz,.@i;
                setarray .@k[0], getd(".@P"+.@i+"["+.@j+"]"), getd(".@P"+.@i+"["+(.@j+1)+"]");
                break;
            }
        }
    }
    if(1<=.@gz&&.@gz<=4)
        announce "Congratulations! "+strcharinfo(0)+" just received "+getitemname(.@k[0])+" x "+.@k[1]+" from Lotti Girl (prontera 139 173)!",0;
    specialeffect2 248;
    close;
    
    OnInit:
    waitingroom "[Lotti Girl]",0;
    set .zeny,100000;
    }
}

 

Edited by jqkeric11

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...