Thread: Item Container Guide.

Results 1 to 5 of 5
  1. #1 Item Container Guide. 
    Discord Johnyblob22#7757


    Join Date
    Mar 2016
    Posts
    1,384
    Thanks given
    365
    Thanks received
    575
    Rep Power
    5000
    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):


    Attached image
    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.


    Attached image
    Reply With Quote  
     

  2. #2  
    Registered Member
    Join Date
    Jan 2013
    Posts
    610
    Thanks given
    292
    Thanks received
    120
    Rep Power
    39
    Ayee nice! Creds to me for the mystery box inter lolol
    Reply With Quote  
     

  3. #3  
    Discord Johnyblob22#7757


    Join Date
    Mar 2016
    Posts
    1,384
    Thanks given
    365
    Thanks received
    575
    Rep Power
    5000
    Quote Originally Posted by Lucifer_ View Post
    Ayee nice! Creds to me for the mystery box inter lolol
    not rlly, thats my interface lol
    Attached image
    Reply With Quote  
     

  4. #4  
    Registered Member
    Join Date
    Jan 2013
    Posts
    610
    Thanks given
    292
    Thanks received
    120
    Rep Power
    39
    Quote Originally Posted by Johnyblob22 View Post
    not rlly, thats my interface lol
    oh oops, the item list was identical xD nice job
    Reply With Quote  
     

  5. #5  
    Onyxia

    Sagacity's Avatar
    Join Date
    Dec 2012
    Age
    27
    Posts
    727
    Thanks given
    335
    Thanks received
    98
    Rep Power
    160
    Quote Originally Posted by Johnyblob22 View Post
    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):


    Attached image
    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
    Attached image
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. Item Container
    By PlebScapePK in forum Tutorials
    Replies: 19
    Last Post: 03-16-2014, 12:52 AM
  2. 718 Item contains?
    By Ynneh in forum Help
    Replies: 2
    Last Post: 04-17-2013, 11:21 PM
  3. [REQ] Custom items help guide.
    By resolationx in forum Help
    Replies: 1
    Last Post: 01-13-2012, 01:42 AM
  4. Item.cfg Guide [Very noobish >.<;;]
    By `Avoid` in forum Snippets
    Replies: 4
    Last Post: 03-20-2010, 02:31 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •