Thread: 317 pi barrows box set

Results 1 to 5 of 5
  1. #1 317 pi barrows box set 
    Registered Member
    Join Date
    Jun 2012
    Posts
    159
    Thanks given
    11
    Thanks received
    3
    Rep Power
    11
    Ok so i was messing around and i thought it would be fun just to add the box sets like on runescape the diff barrows. Im sure you all know what i meen. I know this is easy but i just decided i would release for the lazy people that dont wanna make it. This makes it so if you use any of the barrows item with each other it makes the set. Ima only show you one but im sure you can do the rest of the sets with it. Ill also show you how to make it open and show them.

    basically go into your useitem.java and under itemonitem add this
    Code:
    if ((itemUsed == 4716) || (itemUsed == 4718) || (itemUsed == 4720) || (itemUsed == 4722) && (useWith == 4716) || (useWith == 4718) || (useWith == 4720) || (useWith == 4722)) {
        if (c.getItems().playerHasItem(4716, 1) && c.getItems().playerHasItem(4718, 1) && c.getItems().playerHasItem(4720, 1) && c.getItems().playerHasItem(4722, 1)){
    			c.getItems().addItem(11848, 1);
    			c.getItems().deleteItem(4716, 1);
    			c.getItems().deleteItem(4718, 1);
    			c.getItems().deleteItem(4720, 1);
    			c.getItems().deleteItem(4722, 1);
    			c.sendMessage("You put your Dh parts into a set.");
    		} else {
    			c.sendMessage("You dont have all parts to make this set.");
    			}
    		}
    Basically the first line is saying that any of those ids can be used with any of the useWith ids and itll make the box, so basically its saying any of the dh pieces used with the other dh pieces will make the box. The second line obviously checks to make sure you have that. And the rest i think you can figure out. So that will basically if you use any dh piece with the other itll make a box only if you have all them.

    Now for the second part, to make it open. Open up Itemdef.java in ur client and with the rest add this

    SOme people might need to add .getBytes(); if it doesnt work and u add that to the end of description
    Code:
    				 case 11848:
    		itemDef.itemActions = new String[5];
    		itemDef.itemActions[1] = "Open";
    		itemDef.name = "Barrows dharok's set";
    		itemDef.description = "A box containing full Dharoks";
    		itemDef.stackable = true;
    		break;
    Basically this will add a "open" option to it. But if you go and try that youll wield it, so you need to go to itemass.java and search this
    Code:
    				} else if(itemType(wearID).equalsIgnoreCase("ring")) {
    					targetSlot=12;
    				} else {
    					targetSlot = 3;
    				}
    Should see a bunch of those but with diff numbers ands stuff. Under the last one add this
    Code:
        if (wearID == 11848) {
             if (c.getItems().playerHasItem(11848, 1)) {
          c.getItems().addItem(4716, 1);
          c.getItems().addItem(4718, 1);
          c.getItems().addItem(4720, 1);
    c.getItems().addItem(4722, 1);
          c.getItems().deleteItem(11848, 1);
         }
    Now compile ur server and client and run and you should be able to open your boxes and make them.
    PS: I know this is easy but i was helping someone do it and decided to write a tut for it so ya.
    }

    if you want it so they need inventory spots though that way they dont lose items, (if they have 1 invy spot and they clcik it theyll lost 3 items) you can add this
    Code:
    		if (c.inWild() && c.isBanking) {
    		c.sendMessage("You cannot do this right now");
    		} else if(c.getItems().freeSlots() <= 10) {
    		c.sendMessage("You need atleast 10 free slot's to use this feature.");
    		}
    this also makes them not be able to do it in wild (it would help them, think about it, 4 items into 1 for prot or something). This goes in the item ass like below the wearitem id code
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  2. #2  
    ~! Legit ~!

    Join Date
    Nov 2010
    Posts
    1,973
    Thanks given
    183
    Thanks received
    211
    Rep Power
    237
    Simple af, but I think the server sided code could be a little cleaner.
    [Only registered and activated users can see links. ]
    Spoiler for My Vouches:
    Quote Originally Posted by mattsforeal View Post
    I paid $5 went first, he fixed my problem and it worked. 100% legit would do it again.
    Quote Originally Posted by Mythic View Post
    Vouch for him, very smooth and fast trade, purchased his last 4m. Have fun with your new membership
    Quote Originally Posted by Harlan View Post
    Vouch, trustworthy guy.
    Quote Originally Posted by iPhisher™ View Post
    Vouch for Super-Man, he is a very legit and trustable guy.
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Jun 2012
    Posts
    159
    Thanks given
    11
    Thanks received
    3
    Rep Power
    11
    Ya i said it was simple, and yes it could be cleaner and alot shorter lol, but i did this in like 5mnis and i just released for the people that wanted
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  4. #4  
    Registered Member
    Join Date
    Oct 2011
    Posts
    1
    Thanks given
    0
    Thanks received
    0
    Rep Power
    0
    Quote Originally Posted by pkingbandit View Post
    Ok so i was messing around and i thought it would be fun just to add the box sets like on runescape the diff barrows. Im sure you all know what i meen. I know this is easy but i just decided i would release for the lazy people that dont wanna make it. This makes it so if you use any of the barrows item with each other it makes the set. Ima only show you one but im sure you can do the rest of the sets with it. Ill also show you how to make it open and show them.

    basically go into your useitem.java and under itemonitem add this
    Code:
    if ((itemUsed == 4716) || (itemUsed == 4718) || (itemUsed == 4720) || (itemUsed == 4722) && (useWith == 4716) || (useWith == 4718) || (useWith == 4720) || (useWith == 4722)) {
        if (c.getItems().playerHasItem(4716, 1) && c.getItems().playerHasItem(4718, 1) && c.getItems().playerHasItem(4720, 1) && c.getItems().playerHasItem(4722, 1)){
    			c.getItems().addItem(11848, 1);
    			c.getItems().deleteItem(4716, 1);
    			c.getItems().deleteItem(4718, 1);
    			c.getItems().deleteItem(4720, 1);
    			c.getItems().deleteItem(4722, 1);
    			c.sendMessage("You put your Dh parts into a set.");
    		} else {
    			c.sendMessage("You dont have all parts to make this set.");
    			}
    		}
    Basically the first line is saying that any of those ids can be used with any of the useWith ids and itll make the box, so basically its saying any of the dh pieces used with the other dh pieces will make the box. The second line obviously checks to make sure you have that. And the rest i think you can figure out. So that will basically if you use any dh piece with the other itll make a box only if you have all them.

    Now for the second part, to make it open. Open up Itemdef.java in ur client and with the rest add this

    SOme people might need to add .getBytes(); if it doesnt work and u add that to the end of description
    Code:
    				 case 11848:
    		itemDef.itemActions = new String[5];
    		itemDef.itemActions[1] = "Open";
    		itemDef.name = "Barrows dharok's set";
    		itemDef.description = "A box containing full Dharoks";
    		itemDef.stackable = true;
    		break;
    Basically this will add a "open" option to it. But if you go and try that youll wield it, so you need to go to itemass.java and search this
    Code:
    				} else if(itemType(wearID).equalsIgnoreCase("ring")) {
    					targetSlot=12;
    				} else {
    					targetSlot = 3;
    				}
    Should see a bunch of those but with diff numbers ands stuff. Under the last one add this
    Code:
        if (wearID == 11848) {
             if (c.getItems().playerHasItem(11848, 1)) {
          c.getItems().addItem(4716, 1);
          c.getItems().addItem(4718, 1);
          c.getItems().addItem(4720, 1);
    c.getItems().addItem(4722, 1);
          c.getItems().deleteItem(11848, 1);
         }
    Now compile ur server and client and run and you should be able to open your boxes and make them.
    PS: I know this is easy but i was helping someone do it and decided to write a tut for it so ya.
    }

    if you want it so they need inventory spots though that way they dont lose items, (if they have 1 invy spot and they clcik it theyll lost 3 items) you can add this
    Code:
    		if (c.inWild() && c.isBanking) {
    		c.sendMessage("You cannot do this right now");
    		} else if(c.getItems().freeSlots() <= 10) {
    		c.sendMessage("You need atleast 10 free slot's to use this feature.");
    		}
    this also makes them not be able to do it in wild (it would help them, think about it, 4 items into 1 for prot or something). This goes in the item ass like below the wearitem id code


    At this part theres an error
    Code:
     if (wearID == 11848) {
             if (c.getItems().playerHasItem(11848, 1)) {
          c.getItems().addItem(4716, 1);
          c.getItems().addItem(4718, 1);
          c.getItems().addItem(4720, 1);
    c.getItems().addItem(4722, 1);
          c.getItems().deleteItem(11848, 1);
         }
    Has to be changed to
    Code:
     if (wearID == 11848) {}
             if (c.getItems().playerHasItem(11848, 1)) {
          c.getItems().addItem(4716, 1);
          c.getItems().addItem(4718, 1);
          c.getItems().addItem(4720, 1);
    c.getItems().addItem(4722, 1);
          c.getItems().deleteItem(11848, 1);
         }
    Reply With Quote  
     

  5. #5  
    Registered Member XxNinjaxX's Avatar
    Join Date
    Aug 2010
    Posts
    344
    Thanks given
    5
    Thanks received
    7
    Rep Power
    0
    I would like to know how to add the code with the "needs 4 free slots to open this box set" option or message, + the wilderness action. Becuase when I add both, I can spawn ::item 11848 27 and still open the box sets and only recieve a helmet, also it spamms the message "needs 10 spaces or w.e"

    Code:
     if (wearID == 11848) {}
        if (c.getItems().playerHasItem(11848, 1)) {
          c.getItems().addItem(4716, 1);
          c.getItems().addItem(4718, 1);
          c.getItems().addItem(4720, 1);
          c.getItems().addItem(4722, 1);
          c.getItems().deleteItem(11848, 1);
         }
    [Only registered and activated users can see links. ]
    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. Ninja Box-Set
    By G00dy in forum Models
    Replies: 18
    Last Post: 08-09-2010, 09:31 AM
  2. shard box set release.
    By Gary in forum Models
    Replies: 6
    Last Post: 09-10-2009, 02:12 PM
  3. Phat Boxset and Box Set Exchanger
    By Erosian V2 in forum Models
    Replies: 30
    Last Post: 05-16-2009, 06:03 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
  •