Welcome to another shitty guide
Im going to explain step by step how to use an item container. So gather around the campfire.
Spoiler for Step 1:
Creating our Container.
So to send an item container to a component we need an empty container (What your items will go in.)
Create a container inside an interface and have it empty.
Spoiler for Step 2:
Make the item container.
Code:
ItemsContainer<Item> Rewards = new ItemsContainer<Item>(Amount of items it can hold, false);
player.getPackets().sendItems(Item container key, false, Rewards);
(In this example i used item container 90)
Spoiler for Step 3:
Create an options method.
Code:
public static void sendOptions(Player player) {
player.getPackets().sendInterSetItemsOptionsScript(interfaceid, Container id that we are sending items to, item container key, 4, 9, "Examine");
the 4 and 9 args are the sizes that create the rows.
player.getPackets().sendUnlockIComponentOptionSlots(interfaceid, Container id that we are sending items to, 0, 160, 0);
}
The item container key needs to match for the items to be sent. I used item container 90 for this. But if the container is 90 it needs to be 90 in the sendInterSetItemsOptionsScript and inside the send items method in step 2
Spoiler for Result (if done correctly):
NOTE: the scroll bar and the rectangles in the background are not included.
Now if your still having trouble with this, a good example of item containers would be the price checker or the bank. they both use item containers.
Welcome to another shitty guide
Im going to explain step by step how to use an item container. So gather around the campfire.
Spoiler for Step 1:
Creating our Container.
So to send an item container to a component we need an empty container (What your items will go in.)
Create a container inside an interface and have it empty.
Spoiler for Step 2:
Make the item container.
Code:
ItemsContainer<Item> Rewards = new ItemsContainer<Item>(Amount of items it can hold, false);
player.getPackets().sendItems(Item container key, false, Rewards);
(In this example i used item container 90)
Spoiler for Step 3:
Create an options method.
Code:
public static void sendOptions(Player player) {
player.getPackets().sendInterSetItemsOptionsScript(interfaceid, Container id that we are sending items to, item container key, 4, 9, "Examine");
the 4 and 9 args are the sizes that create the rows.
player.getPackets().sendUnlockIComponentOptionSlots(interfaceid, Container id that we are sending items to, 0, 160, 0);
}
The item container key needs to match for the items to be sent. I used item container 90 for this. But if the container is 90 it needs to be 90 in the sendInterSetItemsOptionsScript and inside the send items method in step 2
Spoiler for Result (if done correctly):
NOTE: the scroll bar and the rectangles in the background are not included.
Now if your still having trouble with this, a good example of item containers would be the price checker or the bank. they both use item containers.
Saved, thanks
Check out my 667/718 Interfaces services, I have more than 25 vouches and will be happy to help you out for affordable prices