Hi, sorry for the late respond, i was trying to work your request this morning however my boss call me at work so i couldn't finished it
So here's the friendly script u can use, easy to manage please see OnInit:
prontera,155,184,4 script Card Trader 871,{
mes .n$;
mes rand(2) ? "How may i help you today?" : "Take a look maybe you can check something interesting?";
next;
.@i = select("- Information:- Exchange Item:- Cancel");
switch(.@i) {
case 1:
mes .n$;
mes "Normal Cards Rate: 100%";
mes "Mini-Boss Cards Rate: 30%";
mes "MvP Cards Rate: 1%";
close;
case 2:
if ( countitem(.itemRequired) < 15 ) {// Blank Card
mes .n$;
mes "I'm sorry you don't have the ^0000FF"+ getitemname(.itemRequired) +"^000000 to exchanged.";
mes "Please come back to me if you have it already.";
close;
}
mes .n$;
mes "Would you like to exchange your ^0000FF"+ getitemname(.itemRequired) +"^000000?";
next;
progressbar "0x11CC99",1;
set .@size, getarraysize( .reward );
for( set .@i, 1; .@i < .@size; .@i += 2 ) {
.@percent[.@i] = .@total + .reward[.@i];
.@total += .reward[.@i];
}
.@r = rand( .@total +1 );
for( set .@i, 1; .@i < .@size; .@i += 2 )
if( .@percent[.@i] > .@r )
break;
getitem .reward[ .@i-1 ], 1;
delitem .itemRequired,15; // Blank Card
announce "Player, "+ strcharinfo(0) +" recieved "+ getitemname(.reward[ .@i-1 ]) +" (1).",0;
end;
case 3:
mes .n$;
mes "Come back anytime you want.";
close;
}
OnInit:
.n$ = "[ Card Trader ]";// NPC Name
.itemRequired = 6187; // Blank Card
setarray .reward, // <item_id>,<chances rate%>;
// Normal Cards: 100%
4001,100, // Poring Card
4002,100, // Fabre Card
// Mini Boss Cards: 30%
4174,30, // Deviling Card
4054,30, // Angeling Card
// MvP Cards: 1%
4399,1, // Thanatos Card
4302,1; // Tao Gunka Card
end;
}
RAW Link: http://immortalsro.com/rAScripts/card_trader.txt
Tested ingame.