Thread: [Emulous] Itemonitem.java

Results 1 to 3 of 3
  1. #1 [Emulous] Itemonitem.java 
    Registered Member
    sadgrills's Avatar
    Join Date
    Dec 2009
    Age
    24
    Posts
    1,418
    Thanks given
    119
    Thanks received
    191
    Rep Power
    315
    Well, I have emulous 1.7 by Hayzie, thing is, I always see these firemaking bases, fishing bases and they ALWAYS say go to itemonobject or itemonitem and I don't have them. Does anyone have them, or do I have to create them?
    Reply With Quote  
     

  2. #2  
    Registered Member
    Join Date
    Dec 2009
    Posts
    200
    Thanks given
    0
    Thanks received
    0
    Rep Power
    11
    Add this to PacketHandler:

    Code:
    		packetId.put(53, new ItemOnItem());
    		packetId.put(192, new ItemOnObject());

    ItemOnItem packet (save as ItemOnItem.java)

    Code:
    package server.model.players.packets;
    
    import server.model.players.Client;
    import server.model.players.PacketType;
    import server.model.players.packets.*;
    import server.model.players.*;
    import server.util.*;
    
    public class ItemOnItem implements PacketType {
    
    	@Override
    	public void processPacket(Client c, int packetType, int packetSize) {
    	
    		int usedWithSlot = c.inStream.readUnsignedWord();
    		int itemUsedSlot = c.inStream.readUnsignedWordA(); 
            int useWith = c.playerItems[usedWithSlot]-1;
            int itemUsed = c.playerItems[itemUsedSlot]-1;	
    
    
    }		
    }
    ItemOnObject packet (save as ItemOnObject.java)

    Code:
    package server.model.players.packets;
    
    import server.model.players.Client;
    import server.model.players.PacketType;
    import server.model.players.*;
    import server.util.*;
    import server.model.players.packets.*;
    import server.model.players.skills.*;
    import server.*;
    
    
    public class ItemOnObject implements PacketType {
    
    	
    	public void processPacket(Client c, int packetType, int packetSize) {
    		int j6 = c.inStream.readUnsignedWordA();
    		int objectId = c.inStream.readSignedWordBigEndian();
    		int objectY = c.inStream.readUnsignedWordBigEndianA();
    		int itemSlot = c.inStream.readUnsignedWordBigEndian();
    		int objectX = c.inStream.readUnsignedWordBigEndianA();
    		int itemId = c.inStream.readUnsignedWord();
    
    }	
    }
    Reply With Quote  
     

  3. #3  
    Registered Member
    sadgrills's Avatar
    Join Date
    Dec 2009
    Age
    24
    Posts
    1,418
    Thanks given
    119
    Thanks received
    191
    Rep Power
    315
    Quote Originally Posted by philby93 View Post
    Add this to PacketHandler:

    Code:
    		packetId.put(53, new ItemOnItem());
    		packetId.put(192, new ItemOnObject());

    ItemOnItem packet (save as ItemOnItem.java)

    Code:
    package server.model.players.packets;
    
    import server.model.players.Client;
    import server.model.players.PacketType;
    import server.model.players.packets.*;
    import server.model.players.*;
    import server.util.*;
    
    public class ItemOnItem implements PacketType {
    
    	@Override
    	public void processPacket(Client c, int packetType, int packetSize) {
    	
    		int usedWithSlot = c.inStream.readUnsignedWord();
    		int itemUsedSlot = c.inStream.readUnsignedWordA(); 
            int useWith = c.playerItems[usedWithSlot]-1;
            int itemUsed = c.playerItems[itemUsedSlot]-1;	
    
    
    }		
    }
    ItemOnObject packet (save as ItemOnObject.java)

    Code:
    package server.model.players.packets;
    
    import server.model.players.Client;
    import server.model.players.PacketType;
    import server.model.players.*;
    import server.util.*;
    import server.model.players.packets.*;
    import server.model.players.skills.*;
    import server.*;
    
    
    public class ItemOnObject implements PacketType {
    
    	
    	public void processPacket(Client c, int packetType, int packetSize) {
    		int j6 = c.inStream.readUnsignedWordA();
    		int objectId = c.inStream.readSignedWordBigEndian();
    		int objectY = c.inStream.readUnsignedWordBigEndianA();
    		int itemSlot = c.inStream.readUnsignedWordBigEndian();
    		int objectX = c.inStream.readUnsignedWordBigEndianA();
    		int itemId = c.inStream.readUnsignedWord();
    
    }	
    }
    Thanks )
    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
  •