viewing paste Items Trader | Athena

Posted on the | Last edited on
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
<header>,{
    setarray .@exc_1,671,673,674;   // Trade Away Items
    setarray .@exc_2,672,674;   // Available Items
    set .@n$,"["+strcharinfo(0)+"]";
    mes .@n$;
    mes "Hello!";
    mes "Which item would you like to trade away?";
    while (.@e!=2) {
        set .@e,(!.@e)?"1":"2";
        if (.@e==2) { mes .@n$; mes "Please pick an item."; }
        next;
        for (set .@i,0; .@i<getarraysize(getd(".@exc_"+.@e)); set .@i,.@i+1) setd ".@m"+.@e+"$",getd(".@m"+.@e+"$")+""+(((.@e==2||(.@e==1&&countitem(.@exc_1[.@i]))))?getitemname(getd(".@exc_"+.@e+"["+.@i+"]")):"")+":";
        setd ".@m"+.@e,select(getd(".@m"+.@e+"$")+":Cancel")-1;
        if (getd(".@m"+.@e)==getarraysize(getd(".@exc_"+.@e))) close;
    }
    delitem .@exc_1[.@m1],1;
    getitem .@exc_2[.@m2],1;
    mes .@n$;
    mes "Thanks!";
    close;
}
Viewed 1068 times, submitted by Joseph.