viewing paste tcg bank | Text

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 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
<header>,{
    set .@item, 7227;   //Item ID
    set .@n$,"["+strnpcinfo(0)+"]";
    mes .@n$;
    mes "Welcome to the "+getitemname(.@item)+" Bank!";
    mes " ";
    mes getitemname(.@item)+": "+asdf;
    if (select(getitemname(.@item)+" Transaction:View Ladder") == 2) {
        next;
        set .@z, query_sql("SELECT `char_id`,`value` FROM `global_reg_value` WHERE `str`='asdf' ORDER BY `value` DESC LIMIT 10",.@c,.@v);
        if (!.@z) {
            mes .@n$;
            mes "No records found.";
            close;
        }
        mes " - Top 10 - ";
        for (set .@i, 0; .@i < getarraysize(.@c); set .@i, .@i + 1) {
            query_sql("SELECT `name` FROM `char` WHERE `char_id`="+.@c[.@i],.@p$);
            mes "["+(.@i+1)+"] "+.@p$+" "+.@v[.@i];
        }
        close;
    }
    setarray .@m$, "Deposit","Widthdraw";
    set .@m, select(implode(.@m$,":")) - 1;
    next;
    mes .@n$;
    mes "Please insert the amount of "+getitemname(7227)+" you wish to "+.@m$[.@m]+".";
    input .@a;
    next;
    if (!.@a) close;
    if (!.@m && countitem(.@item) >= .@a) {
        set asdf, asdf + .@a;
        delitem .@item,.@a;
    } else if (.@m && asdf >= .@a) {
        set asdf, asdf - .@a;
        getitem .@item,.@a;
    } else {
        mes .@n$;
        mes "I'm sorry you have insufficient amount of "+getitemname(.@item)+" to "+.@m$[.@m]+".";
        close;
    }
    mes .@n$;
    mes .@m$[.@m]+" successful.";
    close;
}
Viewed 880 times, submitted by Joseph.