Thread: Food In PI

Results 1 to 8 of 8
  1. #1 Food In PI 
    Officially Retired


    Join Date
    Oct 2007
    Age
    30
    Posts
    5,454
    Thanks given
    558
    Thanks received
    122
    Rep Power
    1364
    when player fighting in my server,sunderly got a lagg on my server and they try to click food it not working..how do we fixed those?
    Reply With Quote  
     

  2. #2  
    Registered Member
    Join Date
    May 2010
    Posts
    217
    Thanks given
    0
    Thanks received
    2
    Rep Power
    1
    Well I'm having the same problem I heard the soulution was to relog?
    Reply With Quote  
     

  3. #3  
    Officially Retired


    Join Date
    Oct 2007
    Age
    30
    Posts
    5,454
    Thanks given
    558
    Thanks received
    122
    Rep Power
    1364
    yea it must relog..but i need to know which part of it that make player cant eat.
    Reply With Quote  
     

  4. #4  
    Registered Member
    Join Date
    May 2010
    Posts
    217
    Thanks given
    0
    Thanks received
    2
    Rep Power
    1
    I think this makes you not be able to pray either so its just not the food
    Reply With Quote  
     

  5. #5  
    Officially Retired


    Join Date
    Oct 2007
    Age
    30
    Posts
    5,454
    Thanks given
    558
    Thanks received
    122
    Rep Power
    1364
    pray?
    Reply With Quote  
     

  6. #6  
    Registered Member
    Join Date
    May 2010
    Posts
    217
    Thanks given
    0
    Thanks received
    2
    Rep Power
    1
    Yeah like if you cant eat then you cant pray either
    Reply With Quote  
     

  7. #7  
    Banned

    Join Date
    Sep 2009
    Posts
    3,245
    Thanks given
    195
    Thanks received
    255
    Rep Power
    0
    Complete guess but sounds like your clickitem / button packets aren't working when you lagg maybe in process refresh them? although I'm not sure if I'm correct at all or if it's possible ;P
    Reply With Quote  
     

  8. #8  
    Officially Retired


    Join Date
    Oct 2007
    Age
    30
    Posts
    5,454
    Thanks given
    558
    Thanks received
    122
    Rep Power
    1364
    Code:
    package server.model.players.packets;
    
    import server.model.players.Client;
    import server.model.players.PacketType;
    
    
    /**
     * Clicking an item, bury bone, eat food etc
     **/
    public class ClickItem implements PacketType {
    
    	@Override
    	public void processPacket(Client c, int packetType, int packetSize) {
    		int junk = c.getInStream().readSignedWordBigEndianA();
    		int itemSlot = c.getInStream().readUnsignedWordA();
    		int itemId = c.getInStream().readUnsignedWordBigEndian();
    		if (itemId != c.playerItems[itemSlot] - 1) {
    			return;
    		}
    		if (itemId >= 5509 && itemId <= 5514) {
    			int pouch = -1;
    			int a = itemId;
    			if (a == 5509)
    				pouch = 0;
    			if (a == 5510)
    				pouch = 1;
    			if (a == 5512)
    				pouch = 2;
    			if (a == 5514)
    				pouch = 3;
    			c.getPA().fillPouch(pouch);
    			return;
    		}
    		if (c.getHerblore().isUnidHerb(itemId))
    			c.getHerblore().handleHerbClick(itemId);
    		if (c.getFood().isFood(itemId))
    			c.getFood().eat(itemId,itemSlot);
    		//ScriptManager.callFunc("itemClick_"+itemId, c, itemId, itemSlot);
    		if (c.getPotions().isPotion(itemId))
    			c.getPotions().handlePotion(itemId,itemSlot);
    		if (c.getPrayer().isBone(itemId))
    			c.getPrayer().buryBone(itemId, itemSlot);
    		if (itemId == 952) {
    			if(c.inArea(3553, 3301, 3561, 3294)) {
    				c.teleTimer = 3;
    				c.newLocation = 1;
    			} else if(c.inArea(3550, 3287, 3557, 3278)) {
    				c.teleTimer = 3;
    				c.newLocation = 2;
    			} else if(c.inArea(3561, 3292, 3568, 3285)) {
    				c.teleTimer = 3;
    				c.newLocation = 3;
    			} else if(c.inArea(3570, 3302, 3579, 3293)) {
    				c.teleTimer = 3;
    				c.newLocation = 4;
    			} else if(c.inArea(3571, 3285, 3582, 3278)) {
    				c.teleTimer = 3;
    				c.newLocation = 5;
    			} else if(c.inArea(3562, 3279, 3569, 3273)) {
    				c.teleTimer = 3;
    				c.newLocation = 6;
    			}
    		}
    	}
    
    }
    here are my clickitem.java
    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
  •