Thread: [Pi] Item drop doesn't work!

Results 1 to 3 of 3
  1. #1 [Pi] Item drop doesn't work! 
    Let the good times roll
    Eazy's Avatar
    Join Date
    Jun 2012
    Age
    27
    Posts
    1,234
    Thanks given
    90
    Thanks received
    223
    Rep Power
    70
    Just noticed that my "Drop Item" doesn't work, so I can't drop my items.

    I've been checking some files, and I guess the problem is in 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 = true;
    				break;
    			}
    		}

    This is my code on it, any ideas what could be wrong or something? Probably error can be on other file too, but I'm pretty sure its on the DropItem.java
    Also I do not have any errors on compile, it just won't drop items.
    Please help.
    Reply With Quote  
     

  2. #2  
    Donator

    Chief Sosa's Avatar
    Join Date
    Jun 2012
    Posts
    1,163
    Thanks given
    49
    Thanks received
    234
    Rep Power
    83
    Code:
    Server.itemHandler.createGroundItem(c, itemId, c.getX(), c.getY(), c.playerItemsN[slot], c.getId());
    c.getItems().deleteItem(itemId, slot, c.playerItemsN[slot]);
    PlayerSave.saveGame(c);

    Reply With Quote  
     

  3. #3  
    Let the good times roll
    Eazy's Avatar
    Join Date
    Jun 2012
    Age
    27
    Posts
    1,234
    Thanks given
    90
    Thanks received
    223
    Rep Power
    70
    Quote Originally Posted by Lean. View Post
    Code:
    Server.itemHandler.createGroundItem(c, itemId, c.getX(), c.getY(), c.playerItemsN[slot], c.getId());
    c.getItems().deleteItem(itemId, slot, c.playerItemsN[slot]);
    PlayerSave.saveGame(c);
    Tried, doesn't work.
    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. Replies: 1
    Last Post: 08-14-2013, 04:41 AM
  2. [PI] My client doesn't work need help
    By fabalisto in forum Help
    Replies: 4
    Last Post: 09-29-2010, 08:30 PM
  3. Pi - Fake item dropping.(dose mine work)
    By R4nger 0wnz in forum Help
    Replies: 0
    Last Post: 06-24-2010, 03:14 PM
  4. [PI] Item drop help
    By PaNiiC Joe in forum Help
    Replies: 12
    Last Post: 06-02-2010, 02:52 PM
  5. Item colouring doesn't work?
    By Jazz in forum Help
    Replies: 5
    Last Post: 10-26-2009, 12:45 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
  •