viewing paste Unknown #21580 | 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
prontera,147,167,0      script  Donation Buyback        4_F_HUWOMAN,{
        mes "[ Donation Buyback ]";
        mes "Here are the donation items that you can buyback.";
        next;
        setarray .@DItems[0],5420,5286,5359,5181,5431,5527,5421,5329,5288,5401,5358,5389,5361,5132,5594,5596,5462,5597,5377,5325,5463;
        setarray .@DPrice[0],120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,220,220,220;
        //setarray .Menu$[0],"test1","test2","test3","test4","test5";
        for(set .@i,0; .@i < getarraysize(.@DItems); set .@i,.@i+1) {
        set .@Menu$,.@Menu$ + getitemname(.@DItems[.@i]) + ":";
        }
        set .@selected, select(.@Menu$);
        set .@HG, .@selected - 1 ;
        mes "[ Donation Buyback ]";
        mes "Are you sure you want to exchange "+getitemname(.@DItems[.@HG])+"?";
        next;
        switch(select("No:Yes")) {
                case 1:
                mes "[ Donation Buyback ]";
                mes "Ok, just talk to me again";
                close;
 
                case 2:
                if (countitem(.@DItems[.@HG]) < 1) {
                        mes "[ Donation Buyback ]";
                        mes "Sorry but you don't have "+getitemname(.@DItems[.@HG])+".";
                        close;
                }
                if ((MaxWeight-Weight) < 2000 || checkweight(1201,1) == 0) {
                        mes "[ Donation Buyback ]";
                        mes "You're carrying too many items and don't have enough inventory space. Please make more inventory space available and talk to me again.";
                        close;
                }
                delitem .@DItems[.@HG],1;
                getitem 7929,.@DPrice[.@HG];
                mes "[ Donation Buyback ]";
                mes "Here you go!";
                close;
        }
        close;
}
Viewed 643 times, submitted by unknown.