try this
prontera,155,181,5 script Sample 757,{
switch( select( "Enter Greedy Points Room",
"Exchange Points to "+getitemname(.CoinID),
"Check Points",
"Exit" ) ){
Case 1: warp .Map$,0,0; end;
Case 2:
mes "You got "+#Points+" Points.";
mes "How many will be used to change into "+getitemname(.CoinID)+" ?";
mes "Each "+getitemname(.CoinID)+" = "+.Rate+" Points.";
if( #Points >= .Rate ){
input .@Amount,0,#Points;
set .@Calculation,( .@Amount / .Rate );
if( .@Calculation ){
set #Points,#Points - ( .@Calculation * .Rate );
getitem 673,.@Calculation;
mes "Gained "+.@Calculation+" x "+getitemname(.CoinID);
}
}
close;
Case 3: mes "You got "+#Points+" Points.";
default: break;
}
close;
OnInit:
set .Map$,"guild_vs5";
set .CoinID,673;
set .Rate,10;
monster .Map$,0,0,1002,100,strnpcinfo(0)+"::OnKilled";
end;
OnKilled:
set #Points,#Points + rand(1,2);
monster .Map$,0,0,1002,1,strnpcinfo(0)+"::OnKilled";
end;
}