viewing paste getnameditem + item quest | 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
prontera,155,181,5      script  Sample#getnameitem      757,{
// reward item id
.@reward = 5001;
// requried item + amount
setarray .@item,
        512,1,
        607,2,
        608,3;
.@item_size = getarraysize( .@item ) - 1;
 
for( .@i = 0; .@i < .@item_size; .@i += 2 ){
        mes .@item[.@i+1]+"x "+getitemname( .@item[.@i];
        if( countitem( .@item[.@i] ) < .@item[.@i+1] ) .@fail++;
}
if( !.@fail )
        if( select( "Make "+getitemname( .@reward ),"Cancel" ) == 1 ){
                for( .@i = 0; .@i < .@item_size; .@i += 2 )
                        delitem .@item[.@i],.@item[.@i+1];
                getnameditem .@reward,strcharinfo(0);
                mes "Done";
        }
}
Viewed 583 times, submitted by Emistry.