prontera,150,150,1 script PutBack 987,{
mes "Hi. Can i help you?";
if(select("Put coins back to CP:Close") == 2) close;
if (countitem(677) < 100){
mes "I'm sorry, you need at least 100 coins because 100 is equal to 1 credit.";
close;
}
mes "Input amount:";
input .@a,100,1000;
if(!(.@a%100)) {
mes "Can't transfer that much";
mes "Because your amount of coins ins't dividable by 100";
close;
}
.@cp_credits = .@a/100;
query_sql("UPDATE `cp_credits` SET `balance` + .@cp_credits WHERE `account_id` = '"+getcharid(3)+"'"); (is this right?)
delitem 677, .@a;
sleep2 10;
dispbottom "Coins converted back to site credits.";
}
close;
end;
}