Thread: Item On Npc

Results 1 to 2 of 2
  1. #1 Item On Npc 
    Registered Member
    Core's Avatar
    Join Date
    Sep 2007
    Posts
    4,194
    Thanks given
    11
    Thanks received
    393
    Rep Power
    1985
    I'm trying to make Item on npc for sheep shearing and I tried making this and it doesn't seem to want to work, I put the packet Id as 57 I don't know if that is correct so tell me if it isn't.

    Her is what I am using.

    Code:
    public void processPacket(final Client c, int packetType, int packetSize) {
    		int itemUsedSlot = c.inStream.readUnsignedWordA(); 
    		int itemId = c.playerItems[itemUsedSlot]-1;	
    		int npcId = Server.npcHandler.npcs[c.npcIndex].npcType;
    		
    		System.out.println("Item: "+itemId);
    		System.out.println("Npc: "+npcId);
    		
    		if(npcId == 42 && itemId == 1735) {
    			c.getItems().addItem(1759, 1);
    		}
    		
    		if(itemId == 1735 && npcId == 42) {
    			c.getItems().addItem(1759, 1);
    		}
    
    	}
    Doesn't want to work so please help me.
    Reply With Quote  
     

  2. #2  
    Banned

    Join Date
    Dec 2008
    Posts
    12
    Thanks given
    162
    Thanks received
    62
    Rep Power
    0
    looks perfect/??? not sure why it isnt working
    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
  •