Thread: Making items KEPT ON DEATH 100%

Results 1 to 7 of 7
  1. #1 Making items KEPT ON DEATH 100% 
    Registered Member
    Join Date
    Jul 2012
    Posts
    205
    Thanks given
    20
    Thanks received
    0
    Rep Power
    10
    Hey guys, is there a tutorial or a simple guide I can follow with making items kept on death 100%? An example is having fire cape kept on death.

    Thanks
    Reply With Quote  
     

  2. #2  
    Registered Member

    Join Date
    Nov 2011
    Posts
    491
    Thanks given
    23
    Thanks received
    66
    Rep Power
    86
    Please give more details. Are you looking for the interface? What base you are using? And please search.
    Reply With Quote  
     

  3. #3  
    Quality over quantity


    Join Date
    Dec 2011
    Age
    28
    Posts
    1,318
    Thanks given
    74
    Thanks received
    157
    Rep Power
    110
    Do you mean like keep untraceable items in your inventory upon death? Or would going back and picking them up off the ground work fine?
    Reply With Quote  
     

  4. #4  
    Registered Member
    Join Date
    Jul 2012
    Posts
    205
    Thanks given
    20
    Thanks received
    0
    Rep Power
    10
    Well, i was following this tut, and I got one error, saying "cannot find symbol". I believe I have to declare it but how? And it says Class: ItemAssistant in my compiler so I suppose I declare it there?

    link to the tut i was following: http://www.rune-server.org/runescape...pon-death.html
    Reply With Quote  
     

  5. #5  
    Kneel before me.

    Join Date
    Sep 2012
    Posts
    200
    Thanks given
    202
    Thanks received
    91
    Rep Power
    125
    let me explain what he's trying to say in the most easy possible way. Copy Paste
    Code:
    /**
    	 * Check all slots and determine whether or
    	 * not a slot is accompanied by that item
    	 */
    	public boolean isWearingItem(int itemID) {
    		for(int i = 0; i < 12; i++) {
    			if(c.playerEquipment[i] == itemID) {
    				return true;
    			}
    		}
    		return false;
    	}
    	
    	/**
    	 * Check all slots and determine the amount
    	 * of said item worn in that slot
    	 */
    	public int getWornItemAmount(int itemID) {
    		for(int i = 0; i < 12; i++) {
    			if(c.playerEquipment[i] == itemID) {
    				return c.playerEquipmentN[i];
    			}
    		}
    		return 0;
    	}
    Place it somewhere in itemassistant.java

    Go to playerassistant.java

    Find
    Code:
    c.getItems().dropAllItems();
    					c.getItems().deleteAllItems();
    under that add
    Code:
    for(int item = 0; item < Config.ITEMS_KEPT_ON_DEATH.length; item++) {
    						int itemId = Config.ITEMS_KEPT_ON_DEATH[item];
    						int itemAmount = c.getItems().getItemAmount(itemId) + c.getItems().getWornItemAmount(itemId);
    						if(c.getItems().playerHasItem(itemId) || c.getItems().isWearingItem(itemId)) {
    							c.sendMessage("You kept "+itemAmount+" "+c.getItems().getItemName(itemId).toLowerCase()+", it was transferred to your bank.");
    							c.getItems().addItemToBank(itemId, itemAmount);
    						}
    					}
    then in config.java add

    Code:
    public static final int[] ITEMS_KEPT_ON_DEATH = {6570, 892};
    somewhere.

    Was dat so hard?
    Reply With Quote  
     

  6. #6  
    Registered Member
    Join Date
    Jul 2012
    Posts
    205
    Thanks given
    20
    Thanks received
    0
    Rep Power
    10
    Well now my items are dropped to the ground when I die (the ones that i put in the kept on death --> public static final int[] ITEMS_KEPT_ON_DEATH = {6570, 892};


    is there a way that can make it so their items stay on their body?
    Reply With Quote  
     

  7. #7  
    Registered Member
    Join Date
    May 2012
    Posts
    235
    Thanks given
    83
    Thanks received
    28
    Rep Power
    40
    add it in your givelife method.
    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. [667/728] Making Admins Keep Items on Death
    By OG KingFox in forum Snippets
    Replies: 14
    Last Post: 12-23-2012, 01:50 AM
  2. Items on death better way to sort items!
    By Spooky in forum Snippets
    Replies: 8
    Last Post: 09-05-2011, 02:07 AM
  3. Replies: 6
    Last Post: 01-03-2009, 07:42 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
  •