• 0

# can anyone edit this to put how many they need to craft

## Question

```prontera,155,181,5	script	YmirCoin	757,{

mes "[Ymir Coin Exchanger]";
mes "Just give me the required items and ill give you Coin of Ymir";
next;

// What Item you want to Make ?
set .GiveItem,7539;
// Item Requirements + Amounts
setarray .Item[0],
607,1,
608,1,
512,1;

for( set .@i,0; .@i < getarraysize( .Item ) - 1; set .@i,.@i + 2 )
if( countitem( .Item[.@i] ) < .Item[.@i + 1] ){
for( set .@i,0; .@i < getarraysize( .Item ) - 1; set .@i,.@i + 2 )
mes "Need "+.Item[.@i + 1]+" x "+getitemname( .Item[.@i] );
close;
}
if( select("Make ^FF0000"+getitemname( .GiveItem )+"^000000:Cancel") == 2 ) close;
for( set .@i,0; .@i < getarraysize( .Item ) - 1; set .@i,.@i + 2 )
delitem .Item[ .@i ],.Item[ .@i + 1 ];
getitem .GiveItem,1;
mes "You have Make ^FF0000"+getitemname( .GiveItem )+"^000000";
announce "["+strcharinfo(0)+"] has made ["+getitemname( .GiveItem )+"]",0;
close;
}```

its like need to set how many to craft coz this one is crafted 1 by 1

#TIA

## Recommended Posts

• 0
```prontera,155,181,5	script	YmirCoin	757,{

mes "[Ymir Coin Exchanger]";
mes "Just give me the required items and ill give you Coin of Ymir.";
mes "Required Mats per ^FF0000"+getitemname(.GiveItem)+"^000000:";
for( set [email protected],0; [email protected] < getarraysize( .Item ) - 1; set [email protected],[email protected] + 2 )
mes "- ^FF0000"+.Item[[email protected]+1]+" "+getitemname(.Item[[email protected]]);
next;
if( select("Make ^FF0000"+getitemname( .GiveItem )+"^000000:Cancel") == 2 ) end;
mes "[Ymir Coin Exchanger]";
mes "How many would you like to make?";
next;
input [email protected],1,999;
mes "[Ymir Coin Exchanger]";
mes [email protected]+"x ^FF0000"+getitemname(.GiveItem)+"^000000, is this correct?";
next;
if( select("Yes, Make ^FF0000"[email protected]+" "+getitemname( .GiveItem )+"^000000:Cancel") == 2 ) end;
for( set [email protected],0; [email protected] < getarraysize( .Item ) - 1; set [email protected],[email protected] + 2 )
if( countitem( .Item[[email protected]] ) < .Item[[email protected]+1]*[email protected] ){
mes "[Ymir Coin Exchanger]";
mes "Insufficient Materials";
for( set [email protected],0; [email protected] < getarraysize( .Item ) - 1; set [email protected],[email protected] + 2 )
mes "- Need ( "+countitem(.Item[[email protected]])+"/"+.Item[[email protected] + 1]*[email protected]+" ) "+getitemname( .Item[[email protected]] );
end;
}
if(!checkweight(.GiveItem,[email protected])){
mes "Insufficient inventory space or weight.";
end;
}
for( set [email protected],0; [email protected] < getarraysize( .Item ) - 1; set [email protected],[email protected] + 2 )
delitem .Item[ [email protected] ],.Item[ [email protected] + 1 ]*[email protected];
getitem .GiveItem,[email protected];
mes "[Ymir Coin Exchanger]";
mes "You have Made ^FF0000"[email protected]+"x "+getitemname( .GiveItem )+"^000000";
announce "["+strcharinfo(0)+"] has made "[email protected]+"x ["+getitemname( .GiveItem )+"]",0;
close;

OnInit:
// What Item you want to Make ?
set .GiveItem,7539;
// Item Requirements + Amounts
setarray .Item[0],
607,1,
608,1,
512,1;
end;
}```

It's much better to check the requirement before giving the item, instead of before selecting MAKE. also added checkweight if ever that the given item is heavier than required materials.

• 0

Thnx a lot

## Join the conversation

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

×   Pasted as rich text.   Paste as plain text instead

Only 75 emoji are allowed.

×   Your previous content has been restored.   Clear editor

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

×
• Forums