Resolved it by applying what tokei corrected and by fixing a few close lines
Here's the full script :))
prt_in,63,69,3 script Rough Stones Exchanger 756,{
mes "[Leon]";
mes "Hi adventurer, I'm Leon and im trading";
mes "a whole ^0055FFOridecon^000000 or ^0055FFElunium^000000";
mes "For 5 ^0055FFRough Oridecon^000000 or ^0055FFRough Elunium^000000";
next;
mes "[Leon]";
mes "What would you like to exchange today?";
next;
switch(select("Rough Elu to Elunium:Rough Ori to Oridecon")) {
case 1:
set .@i, countitem(757);
if (.@i < 5) goto noelu;
next;
mes "[Leon]";
mes "How many Rough Elunium would you like to exchange?";
next;
input .@e = .@e / 5 * 5;
next;
if (.@e < 5 || .@e > countitem(757)) {
mes "[Leon]";
mes "That's an invalid amount of ^00FF00Rough Elunium^000000";
mes "The exchange rate is 5 Rough Elunium to 1 Elunium";
close;
}
mes "Are you sure you want to exchange ^0055FF" + .@e + " Rough Eluniums?^000000?";
if (select("Yes:No") == 2) close;
mes "[Leon]";
mes "Okay come to me again if you want to exchange";
delitem 757, .@e;
getitem 985, .@e/5;
end;
case 2:
set .@i2, countitem(756);
if (.@i2 < 5) goto noori;
next;
mes "[Leon]";
mes "How many Rough Oridecon would you like to exchange?";
next;
input .@r = .@r / 5 * 5;
next;
if (.@r < 5 || .@r > countitem(756)) {
mes "[Leon]";
mes "That's an invalid amount of Oridecon";
mes "The Exchange rate is 5 Rough Oridecon to 1 Oridecon";
mes "Make sure you input the right value";
close;
}
mes "Are you sure you want to exchange ^0055FF"+.@r+" Rough Oridecon?^000000?";
if(select("Yes:No")==2) close;
mes "[Leon]";
mes "Okay come to me again if you want to exchange";
delitem 756,.@r;
getitem 984,.@r/5;
end;
}
noori:
mes "[Leon]";
mes "You don't have enough ^00FF00Rough Oridecon^000000 to exchange";
close;
noelu:
mes "[Leon]";
mes "You dont have enough ^00FF00Rough Elunium^000000 to exchange";
close;
}