Thread: Npc's won't drop their items.

Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1 Npc's won't drop their items. 
    Registered Member
    Join Date
    Jan 2010
    Posts
    9
    Thanks given
    0
    Thanks received
    0
    Rep Power
    0
    Need help enabling drops.

    Npc's don't drop items.
    my npcdrops look all good, but nothing drops items.
    My dropitem.java
    Code:
    package server.model.players.packets;
    
    import server.Config;
    import server.Server;
    import server.model.players.Client;
    import server.model.players.PacketType;
    
    /**
     * Drop Item
     **/
    public class DropItem implements PacketType {
    
    	@Override
    	public void processPacket(Client c, int packetType, int packetSize) {
    		int itemId = c.getInStream().readUnsignedWordA();
    		c.getInStream().readUnsignedByte();
    		c.getInStream().readUnsignedByte();
    		int slot = c.getInStream().readUnsignedWordA();
    		if (System.currentTimeMillis() - c.alchDelay < 1800) {
    			return;
    		}
    		if(c.arenas()) {
    			c.sendMessage("You can't drop items inside the arena!");
    			return;
    		}
    		if(c.inTrade) {
    			c.sendMessage("You can't drop items while trading!");
    			return;
    			}
    
    		boolean droppable = true;
    		for (int i : Config.UNDROPPABLE_ITEMS) {
    			if (i == itemId) {
    				droppable = false;
    				break;
    			}
    		}
    		if(c.playerItemsN[slot] != 0 && itemId != -1 && c.playerItems[slot] == itemId + 1) {
    			if(droppable) {
    				if (c.underAttackBy > 0) {
    					if (c.getShops().getItemShopValue(itemId) > 1000) {
    						c.sendMessage("You may not drop items worth more than 1000 while in combat.");
    						return;
    					}
    				}
    				Server.itemHandler.createGroundItem(c, itemId, c.getX(), c.getY(), c.playerItemsN[slot], c.getId());
    				c.getItems().deleteItem(itemId, slot, c.playerItemsN[slot]);
    			} else {
    				c.sendMessage("This items cannot be dropped.");
    			}
    		}
    
    	}
    }
    If theres anything else you need to see to fix this, just ask I need to fix this as fast as possible so all help is good help.
    Reply With Quote  
     

  2. #2  
    Donator


    Join Date
    Jan 2010
    Age
    29
    Posts
    4,122
    Thanks given
    274
    Thanks received
    551
    Rep Power
    738
    This file is for players droppign items and are you using MTP?
    Reply With Quote  
     

  3. #3  
    Developer

    Holy Symbol's Avatar
    Join Date
    Dec 2011
    Age
    25
    Posts
    1,763
    Thanks given
    1,093
    Thanks received
    239
    Rep Power
    365
    Bump! Need this too, cause mine drops wont work either
    Spoiler for big sig:


    Reply With Quote  
     

  4. #4  
    Registered Member
    Join Date
    Jan 2010
    Posts
    9
    Thanks given
    0
    Thanks received
    0
    Rep Power
    0
    MTP? and I didn't know, Im just trying to fix npc drops, but player drops work.
    Reply With Quote  
     

  5. #5  
    Member
    Join Date
    Nov 2011
    Posts
    587
    Thanks given
    54
    Thanks received
    17
    Rep Power
    0
    if you are using MTP there s not a fix yet to enable drops. sorry buddy but you'd be on your own with this.
    Reply With Quote  
     

  6. #6  
    Registered Member
    Join Date
    Jan 2010
    Posts
    9
    Thanks given
    0
    Thanks received
    0
    Rep Power
    0
    What is MTP?
    Im using PI Explicity source...
    Reply With Quote  
     

  7. #7  
    Donator


    Join Date
    Jan 2010
    Age
    29
    Posts
    4,122
    Thanks given
    274
    Thanks received
    551
    Rep Power
    738
    Quote Originally Posted by Derrezed View Post
    if you are using MTP there s not a fix yet to enable drops. sorry buddy but you'd be on your own with this.
    There is, i had it fixed it has something to do with the server not seeing who the killer is
    Reply With Quote  
     

  8. #8  
    Registered Member
    Join Date
    Jan 2010
    Posts
    9
    Thanks given
    0
    Thanks received
    0
    Rep Power
    0
    Can anyone help or..?
    Reply With Quote  
     

  9. #9  
    Registered Member

    Join Date
    May 2012
    Age
    28
    Posts
    1,548
    Thanks given
    415
    Thanks received
    231
    Rep Power
    81
    Quote Originally Posted by lilchicken View Post
    What is MTP?
    Im using PI Explicity source...
    I have the same problem...and the SAME SOURCE. Explicity isnt that bad actually... just having problems with enabling drops and also running is kinda buggy.
    Reply With Quote  
     

  10. #10  
    Registered Member
    Join Date
    Apr 2012
    Posts
    26
    Thanks given
    0
    Thanks received
    0
    Rep Power
    11
    have you guys found out how to fix the skillcape and agility on explicity? im having trouble with those
    Reply With Quote  
     

Page 1 of 2 12 LastLast

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. Some NPC's don't drop items.
    By Shawn_ in forum Help
    Replies: 3
    Last Post: 06-30-2012, 09:34 AM
  2. PI NPC's don't drop items
    By kiefer in forum Help
    Replies: 4
    Last Post: 01-04-2011, 06:26 AM
  3. If killed by Npc Drop items
    By Delifed in forum Requests
    Replies: 0
    Last Post: 07-16-2009, 08:57 PM
  4. Make a npc drop 2 items...
    By Red1 in forum Tutorials
    Replies: 3
    Last Post: 05-11-2008, 12:36 AM
  5. Making a NPC drop random items.
    By Mafia in forum Tutorials
    Replies: 4
    Last Post: 12-04-2007, 05:56 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
  •