mes "[ Room Helper ]";
if(countitem(604)<100) {
mes "You must have atleast 100 Dead Branches to make one Bloody Branch.";close;
}
callsub calc_sub;
set .@oi,@i;
mes "I'm able to make ^FF0000"+@i+"^000000 Bloody Branches.";
mes " ";
mes "How many would you like to exchange?";
set .@o,select("None","All","I Want to type it !");
if(.@o==1) close;
if(.@o==2) {
callsub calc_sub;
if(@i!=.@oi)
goto e;
next;
mes "[ Room Helper ]";
mes "Thank you !";
if(countitem(604)<@i*100)
goto e;
delitem 604,@i*100;//Dead Branch
getitem 12103,@i;//Bloody Branch
close;
} else {
callsub calc_sub;
if(@i!=.@oi)
goto e;
next;
mes "[ Room Helper ]";
input @inp;
if(@inp<0||@inp>@i)
goto e;
mes "Thank you !";
delitem 604,@inp*100;//Dead Branch
getitem 12103,@inp;//Bloody Branch
close;
}
e:
mes "Something went wrong...";
close;
calc_sub:
set @i,countitem(604)/100;
return @i;