There's no mode, you send the ItemOnInterface packet.
Code:
/**
* The {@link OutgoingPacket} that sends an array of items on an interface.
*
* @author SeVen
*/
public class ItemOnInterfacePacket extends OutgoingPacket {
/**
* The id of the interface to display the items on.
*/
private final int interfaceId;
/**
* The items to display.
*/
private final Item[] items;
/**
* Creates a new {@link ItemOnInterfacePacket}.
*
* @param interfaceId
* The id of the interface to display the items on.
*
* @param items
* The items to display.
*/
public ItemOnInterfacePacket(int interfaceId, Item[] items) {
super(53, PacketHeader.VARIABLE_SHORT, 2048);
this.interfaceId = interfaceId;
this.items = items;
}
@Override
public PacketBuilder dispatch(Player player) {
player.getContext().prepare(this, builder);
builder.putShort(interfaceId);
builder.putShort(items.length);
for(Item item : items) {
if (item != null) {
if(item.getAmount() > 254) {
builder.putByte(255);
builder.putInt(item.getAmount(), ByteOrder.INVERSE);
} else {
builder.putByte(item.getAmount());
}
builder.putShort(item.getId() + 1, ByteValue.ADDITION, ByteOrder.LITTLE);
} else {
builder.putByte(0);
builder.putShort(0, ByteValue.ADDITION, ByteOrder.LITTLE);
}
}
builder.endVariableShortPacketHeader();
return builder;
}
}
opcode 53.
And you use the container interface to display items.
The interface client-sided has to be of type container (0) or inventory (2) to show items. 0 shows items with a scroll bar, 2 doesn't.
Here are some container interfaces in the 317 client.
Code:
public static final int STORE_BANK = 5064;
public static final int WITHDRAW_BANK = 5382;
public static final int DEPOSIT_BOX = 7423;
public static final int INVENTORY = 3214;