Thread: RS3 Create items

Results 1 to 3 of 3
  1. #1 RS3 Create items 
    Registered Member
    Join Date
    Jun 2012
    Posts
    311
    Thanks given
    9
    Thanks received
    2
    Rep Power
    11
    Hello Rune-Server how can i do so i can create items like.. using a Barrows dye on nox
    Reply With Quote  
     

  2. #2  
    Registered Member omglolomghi's Avatar
    Join Date
    Oct 2013
    Posts
    708
    Thanks given
    184
    Thanks received
    118
    Rep Power
    22
    inventoryoptionshandler.java
    look for :
    Code:
     public static void handleItemOnItem
    Example

    Code:
      if (itemUsed.getId() == 11332 || usedWith.getId() == 946) {
                    if (player.getInventory().containsItem(946, 1)
                                    && player.getInventory().containsItem(11332, 1)) {
                            
                            player.getInventory().deleteItem(11332, 1);
                            player.getInventory().addItem(11324, 1);
                    }
                }
    It might be a bit different in matrix3, but won't be much
    Reply With Quote  
     

  3. #3  
    Banned

    Join Date
    Jun 2016
    Age
    19
    Posts
    1,621
    Thanks given
    256
    Thanks received
    529
    Rep Power
    0
    Quote Originally Posted by omglolomghi View Post
    inventoryoptionshandler.java
    look for :
    Code:
     public static void handleItemOnItem
    Example

    Code:
      if (itemUsed.getId() == 11332 || usedWith.getId() == 946) {
                    if (player.getInventory().containsItem(946, 1)
                                    && player.getInventory().containsItem(11332, 1)) {
                            
                            player.getInventory().deleteItem(11332, 1);
                            player.getInventory().addItem(11324, 1);
                    }
                }
    It might be a bit different in matrix3, but won't be much
    Das not a good way of doing it.
    If someone has the items (id 946, id 11332) in their inventory & uses some other item on for example id 946, this code would also launch.
    It should be like..
    Code:
    if (itemUsed.getId() == 11332 && usedWith.getId() == 946 || itemUsed.getId() == 946 && usedWith.getId() == 11332) {//Both ways, so that the code doesn't only work if you use item X on item Y, but otherwise too.
    if (!player.getInventory().containsItem(946, 1) || !player.getInventory().containsItem(11332, 1))//This is a check in case they're using a cheat client or something similar, to make sure the player actually has the items.
    return;
    player.getInventory().deleteItem(11332, 1);
    player.getInventory().deleteItem(946, 1);//Delete both items before giving the new item, otherwise you may have issues with space if the person has full inventory.
    player.getInventory().addItem(id, 1);//Add the given item.
    return;//Stop the code from going any further.
    }
    Note: I used omglolomghi's item IDs in this example, I've got no idea what these items actually are, it's just an example.
    Reply With Quote  
     

  4. Thankful user:



Thread Information
Users Browsing this Thread

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

Similar Threads

  1. Create ground item upon death? Where?
    By Crispytoast in forum Help
    Replies: 1
    Last Post: 02-25-2011, 03:21 AM
  2. Replies: 3
    Last Post: 07-10-2010, 11:11 AM
  3. How to create a item with a custom model
    By zachverbeek in forum Help
    Replies: 2
    Last Post: 07-17-2009, 11:27 PM
  4. How do you create/add your own items?
    By Rugby in forum Help
    Replies: 4
    Last Post: 02-19-2009, 09:35 AM
  5. Replies: 1
    Last Post: 02-07-2009, 03:33 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •