Thread: Barrows Chest

Results 1 to 2 of 2
  1. #1 Barrows Chest 
    Registered Member
    Join Date
    Sep 2008
    Posts
    88
    Thanks given
    4
    Thanks received
    2
    Rep Power
    1
    hi i want to add this
    when you have full inventory and you click at Chest, it says
    not enough space in your inventory and your items will dissapear
    i want this
    when you have full inventory and you click at Chest, it says
    not enough space in your inventory and it wil DROP the items on ground
    using emulous

    Code:
    				case 10284:	
    				if (c.BarrowskillCount >= 6) {
    					c.BarrowskillCount = 0;
    					c.getBarrows().Verac = false;
    					c.getBarrows().Torag = false;
    					c.getBarrows().Ahrim = false;
    					c.getBarrows().Dharok = false;
    					c.getBarrows().Guthan = false;
    					int[] items = { 7462, 7462, 7462, 4708, 4710, 4712, 4714, 4716, 4718, 4720, 4722, 4724, 4726, 4728, 4730, 4732, 4734, 4736, 4738, 4745, 4747, 4749, 4751, 4753, 4755, 4757, 4759, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 };
    					int r = (int) (Math.random() * items.length);
    					if (items[r] != -1)
    						c.getItems().addItem(items[r], 1);
    						c.getItems().addItem(565, Misc.random(100));
    						c.getItems().addItem(558, Misc.random(800));
    						c.getItems().addItem(560, Misc.random(200));
    						c.getItems().addItem(562, Misc.random(300));
    						c.getItems().addItem(4740, Misc.random(80));
    						c.getItems().addItem(995, Misc.random(4000));
    						c.saveGame();
    }
    				break;
    this is the code for drop but can't handle it, gives error
    Code:
    if(c.freeSlots() >= 1)
    							c.addItem(items[r], 1);
    							else
    							Item.addItem(items[r], c.absX, c.absY, 1, c.playerId, false);
    }
    Reply With Quote  
     

  2. #2  
    Registered Member
    PSNB's Avatar
    Join Date
    Aug 2009
    Posts
    885
    Thanks given
    8
    Thanks received
    103
    Rep Power
    590
    How about you just loop through the bit that adds the item, check if an inventory spot is open, and add it to the inventory, otherwise drop it on the ground and wait for the person to teleport out?
    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

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •