prontera,150,150,0 script Vote Trader 123,{
mes "You have ^000088"+ #CASHPOINTS +"^000000 Vote Points.";
mes "1 Vote Point is equal to 1 Voting Proof.";
mes "Do you want to trade your Vote Points into Voting Proof?";
menu "No!",-,"Yes!",Cash2VP;
next;
mes "Ok, just let me know.";
close;
Cash2VP:
next;
mes "How many Vote Points would you like to trade?";
input .@vps;
next;
if ( .@vps < 1) goto Zero;
if ( .@vps > 30000) goto Toomany;
if((countitem(30004)+.@vps) >= 30000) goto Toomany;
if ( #CASHPOINTS < .@vps) goto Tooless;
mes "Here you go!";
set #CASHPOINTS,(#CASHPOINTS-.@vps);
getitem 30004,.@vps;
next;
mes "Here's your Voting Proof.";
close;
Toomany:
next;
mes "You cannot hold more than 30,000 Vote Proof.";
close;
Tooless:
next;
mes "Insufficient Vote Points.";
close;
Zero:
next;
mes "0 means cancel!";
close;
}