viewing paste Unknown #21057 | Athena

Posted on the
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
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;
}
Viewed 678 times, submitted by Guest.