viewing paste cloneequip part | 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 22 23 24 25 26 27 28 29
-   script  clone_equip -1,{
OnInit:
    bindatcmd "cloneequip",strnpcinfo(3)+"::OnAtcommand",99,99;
    end;
OnAtcommand:
    .@aid = getcharid( 3,.@atcmd_parameters$[0] );
    if( .@aid ){
        .@origin = getcharid(3);
        .@i = select( "Head Top","Armor","Hand L","Hand R","Garment","Shoe","Acc L","Acc R","Head Mid","Low" );
        attachrid( .@aid );
        .@equip = getequipid( .@i );
        if( .@equip != -1 ){
            .@refine = getequiprefinerycnt( .@i );
            .@slot = getequipcardcnt( .@i );
            for( .@x = 0; .@x < .@slot; .@x++ )
                .@card[.@x] = getequipcardid( .@i,.@x );
        }
        attachrid( .@origin );
        if( .@equip != -1 ){
            getitem2 .@equip,1,1,.@refine,0,.@card[0],.@card[1],.@card[2],.@card[3];
            equip .@equip[.@i];
            dispbottom "Cloned "+.@atcmd_parameters$[0]+" equipments.";
        }
        else{
            dispbottom "Nothing to clone on that equipment slot";
        }
    }
    close;
}
Viewed 1384 times, submitted by Emistry.