Thread: Laggy Inventory/Other

Results 1 to 9 of 9
  1. #1 (.GIF) Laggy Inventory/Other 
    Registered Member
    Join Date
    Mar 2012
    Posts
    35
    Thanks given
    0
    Thanks received
    6
    Rep Power
    11
    Hey rune-server,



    I'm having this problem and it's bugging the hell out of me... It's just like the "Deposit all" problem with the Deposit all to bank button.. All the items load really funny into the bank. This problem deals with the inventory. I don't even have to move my mouse to identify all the herbs and it's laggy as well. Any idea how to fix it?
    Reply With Quote  
     

  2. #2  
    Banned Laggy Inventory/Other Market Banned


    Join Date
    Jan 2011
    Age
    26
    Posts
    3,112
    Thanks given
    1,198
    Thanks received
    1,479
    Rep Power
    0
    Post the code to your first click item packet.
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Mar 2012
    Posts
    35
    Thanks given
    0
    Thanks received
    6
    Rep Power
    11
    Quote Originally Posted by lare96 View Post
    Post the code to your first click item packet.
    Post the identify herb code to public void firstClickObject?

    How can I fix this?

    Reply With Quote  
     

  4. #4  
    Ex Rune-Scaper

    Join Date
    Jun 2008
    Posts
    3,534
    Thanks given
    457
    Thanks received
    1,257
    Rep Power
    990
    Quote Originally Posted by Jayza92 View Post
    Post the identify herb code to public void firstClickObject?

    How can I fix this?

    He meant post the code from your first click item packet onto here so we can see it. Kinda hard to see what's going on without any code.
    Reply With Quote  
     

  5. #5  
    Registered Member
    Join Date
    Mar 2012
    Posts
    35
    Thanks given
    0
    Thanks received
    6
    Rep Power
    11
    Quote Originally Posted by lare96 View Post
    Post the code to your first click item packet.
    ClickItem code:

    Code:
    public class ClickItem implements PacketType {
    
    	@Override
    	public void processPacket(Client c, int packetType, int packetSize) {
    		c.getInStream().readSignedWordBigEndianA();
    		int itemSlot = c.getInStream().readUnsignedWordA();
    		int itemId = c.getInStream().readUnsignedWordBigEndian();
    
    		c.printPacketLog("Player clicked item " + ItemAssistant.getItemName(itemId) + " in item slot " + itemSlot);
    
    		if (itemId != c.playerItems[itemSlot] - 1) {
    			return;
    		}
    		
    		if (Prayer.IsABone(c, itemId)) {
    			Prayer.buryBone(c, itemId);
    		}
    		
    		if (c.getPotions().isPotion(itemId)) {
    			c.getPotions().handlePotion(itemId,itemSlot);
    		}
    		
    		if(Herblore.isHerb(itemId)) {
    			Herblore.cleanTheHerb(c, itemId);
    		}
    		
    		if (c.getFood().isFood(itemId)) {
    			c.getFood().eat(itemId,itemSlot);
    		}
    		
    		if (c.getPotions().isPotion(itemId)) {
    			c.getPotions().handlePotion(itemId,itemSlot);
    		}
    Herblore cleanTheHerb code:

    Code:
    	public static void cleanTheHerb(Client c, int itemId) {
    		for(int i = 0; i < CLEAN_DATA.length; i++) {
    			if(itemId == CLEAN_DATA[i][0]) {
    				if(c.playerLevel[c.playerHerblore] < CLEAN_DATA[i][2]) {
    					c.sendMessage("You haven't got high enough Herblore level to clean this herb!");
    					c.sendMessage("You need the Herblore level of "+ CLEAN_DATA[i][2] +" to clean this herb.");
    				//	PlayerAssistant.sendStatement(c, "You need the herblore level of "+ CLEAN_DATA[i][2] +" to clean this herb.");
    					resetHerblore(c);
    					return;
    				}
    			//	PlayerAssistant.addSkillXP(c, CLEAN_DATA[i][3], c.playerHerblore);
    			c.isGainingExp = true;
    			c.getPA().addSkillXP(CLEAN_DATA[i][3] * Config.HERBLORE_EXPERIENCE, c.playerHerblore);
    			c.isGainingExp = false;
    				c.getItems().deleteItem(CLEAN_DATA[i][0], c.getItems().getItemSlot(CLEAN_DATA[i][0]), 1);
    				c.getItems().addItem(CLEAN_DATA[i][1], 1);
    				c.sendMessage("You clean the herb.");
    			}
    		}
    	}
    Reply With Quote  
     

  6. #6  
    Owner of Dawntained

    Mgt Madness's Avatar
    Join Date
    Oct 2011
    Age
    28
    Posts
    3,380
    Thanks given
    1,429
    Thanks received
    958
    Rep Power
    2168
    The herb one, make sure it deletes and add the herb into the clicked slot and the bank one, update the inventory/bank visuals after the last item is banked
    Attached image
    Reply With Quote  
     

  7. #7  
    Registered Member
    Join Date
    Mar 2012
    Posts
    35
    Thanks given
    0
    Thanks received
    6
    Rep Power
    11
    Quote Originally Posted by Mgt Madness View Post
    The herb one, make sure it deletes and add the herb into the clicked slot and the bank one, update the inventory/bank visuals after the last item is banked
    I'm learning as I go, but could you help me by showing me what I would have to add? I know i'm asking you to spoon feed me, but it would be a great learning experience for me.
    Reply With Quote  
     

  8. #8  
    Owner of Dawntained

    Mgt Madness's Avatar
    Join Date
    Oct 2011
    Age
    28
    Posts
    3,380
    Thanks given
    1,429
    Thanks received
    958
    Rep Power
    2168
    Quote Originally Posted by Jayza92 View Post
    I'm learning as I go, but could you help me by showing me what I would have to add? I know i'm asking you to spoon feed me, but it would be a great learning experience for me.
    No point in spoon feeding, if you want "learning experience", go learn basic Java and it'll open up many opportunities to you such as fixing bugs/writing content w/o any help.
    Lesson: Language Basics (The Java™ Tutorials > Learning the Java Language)
    Attached image
    Reply With Quote  
     

  9. #9  
    Registered Member
    Join Date
    Mar 2012
    Posts
    35
    Thanks given
    0
    Thanks received
    6
    Rep Power
    11
    Quote Originally Posted by Mgt Madness View Post
    No point in spoon feeding, if you want "learning experience", go learn basic Java and it'll open up many opportunities to you such as fixing bugs/writing content w/o any help.
    Lesson: Language Basics (The Java™ Tutorials > Learning the Java Language)
    I appreciate the suggestion...
    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: 3
    Last Post: 11-26-2008, 05:14 PM
  2. Replies: 12
    Last Post: 08-15-2007, 05:13 PM
  3. Replies: 10
    Last Post: 08-07-2007, 02:27 PM
  4. How to make your own p server (other way)
    By Alex in forum Tutorials
    Replies: 13
    Last Post: 06-10-2007, 10:28 AM
  5. More of my sigs (Other Topic got full)
    By Aces in forum Showcase
    Replies: 12
    Last Post: 04-04-2007, 03:38 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
  •