Thread: Wearitem class doesnt work at all [PI]

Results 1 to 6 of 6
  1. #1 Wearitem class doesnt work at all [PI] 
    Registered Member rockarocka's Avatar
    Join Date
    May 2010
    Posts
    978
    Thanks given
    27
    Thanks received
    7
    Rep Power
    20
    my wearitem class
    Code:
    package server.model.players.packets;
    
    import server.model.players.Client;
    import server.model.players.PacketType;
    import server.util.Misc;
    
    /**
     * Wear Item
     **/
     
    public class WearItem implements PacketType {
    
    		@Override
    	public void processPacket(Client c, int packetType, int packetSize) {
    		c.wearId = c.getInStream().readUnsignedWord();
    		c.wearSlot = c.getInStream().readUnsignedWordA();
    		c.interfaceId = c.getInStream().readUnsignedWordA();
    		
    		int oldCombatTimer = c.attackTimer;
    		if(c.wearId == 4565) {
    		c.basket = true;
    		} else {
    		c.basket = false;
            }
    		if (c.playerIndex > 0 || c.npcIndex > 0)
    			c.getCombat().resetPlayerAttack();
    		if (c.wearId >= 5509 && c.wearId <= 5515) {
    			int pouch = -1;
    			int a = c.wearId;
    			if (a == 5509)
    				pouch = 0;
    			if (a == 5510)
    				pouch = 1;
    			if (a == 5512)
    				pouch = 2;
    			if (a == 5514)
    				pouch = 3;
    			c.getPA().emptyPouch(pouch);
    			return;
    		}
    if(c.wearId == 4024) {
    c.sendMessage("@red@do ::return to turn back to normal!");
    c.sendMessage("you transformed!");
    c.npcId2 = 1459;
    c.isNpc = true;
    c.updateRequired = true;
    c.appearanceUpdateRequired = true;
    }
    if(c.wearId == 4025) {
    c.sendMessage("@red@do ::return to turn back to normal!");
    c.sendMessage("you transformed!");
    c.npcId2 = 1481;
    c.isNpc = true;
    c.updateRequired = true;
    c.appearanceUpdateRequired = true;
    }
    if(c.wearId == 4026) {
    c.sendMessage("@red@do ::return to turn back to normal!");
    c.sendMessage("you transformed!");
    c.npcId2 = 1482;
    c.isNpc = true;
    c.updateRequired = true;
    c.appearanceUpdateRequired = true;
    }
    if(c.wearId == 4029) {
    c.sendMessage("@red@do ::return to turn back to normal!");
    c.sendMessage("you transformed!");
    c.npcId2 = 1465;
    c.isNpc = true;
    c.updateRequired = true;
    c.appearanceUpdateRequired = true;
    }
    if(c.wearId == 295) {
    c.sendMessage("@red@do ::return to turn back to normal!");
    c.sendMessage("As you put on the H'ween amulet you turn into Dracula!");
    c.npcId2 = 757;
    c.isNpc = true;
    c.updateRequired = true;
    c.appearanceUpdateRequired = true;
    }
    if(c.wearId == 6583) {
    		c.setSidebarInterface(1, 6014);
    		c.setSidebarInterface(2, 6014);
    		c.setSidebarInterface(3, 6014);
    		c.setSidebarInterface(4, 6014);
    		c.setSidebarInterface(5, 6014);
    		c.setSidebarInterface(6, 6014);
    		c.setSidebarInterface(7, 6014);
    		c.setSidebarInterface(8, 6014);
    		c.setSidebarInterface(9, 6014); 
    		c.setSidebarInterface(10, 6014);
    		c.setSidebarInterface(11, 6014);
    		c.setSidebarInterface(12, 6014);
    		c.setSidebarInterface(13, 6014);
    		c.setSidebarInterface(0, 6014);
    c.sendMessage("As you put on the ring you turn into a rock!");
    c.npcId2 = 2626;
    c.isNpc = true;
    c.updateRequired = true;
    c.appearanceUpdateRequired = true;
    }
    
    if(c.wearId == 7927) {
    		c.setSidebarInterface(1, 6014);
    		c.setSidebarInterface(2, 6014);
    		c.setSidebarInterface(3, 6014);
    		c.setSidebarInterface(4, 6014);
    		c.setSidebarInterface(5, 6014);
    		c.setSidebarInterface(6, 6014);
    		c.setSidebarInterface(7, 6014);
    		c.setSidebarInterface(8, 6014);
    		c.setSidebarInterface(9, 6014); 
    		c.setSidebarInterface(10, 6014);
    		c.setSidebarInterface(11, 6014);
    		c.setSidebarInterface(12, 6014);
    		c.setSidebarInterface(13, 6014);
    		c.setSidebarInterface(0, 6014);
    c.sendMessage("As you put on the ring you turn into an egg!");
    c.npcId2 = 3689 + Misc.random(5);
    c.isNpc = true;
    c.updateRequired = true;
    c.appearanceUpdateRequired = true;
    }
                            //c.attackTimer = oldCombatTimer;
    		c.getItems().wearItem(c.wearId, c.wearSlot);
    	}
    }
    No reactions.. any idea?
    Reply With Quote  
     

  2. #2  
    Registered Member rockarocka's Avatar
    Join Date
    May 2010
    Posts
    978
    Thanks given
    27
    Thanks received
    7
    Rep Power
    20
    anyone
    Reply With Quote  
     

  3. #3  
    Super Donator

    Batukka's Avatar
    Join Date
    Oct 2011
    Posts
    2,433
    Thanks given
    86
    Thanks received
    342
    Rep Power
    496
    what you mean? You cannot wear items? like platelegs?
    Reply With Quote  
     

  4. #4  
    Zaros Developer

    Nomac's Avatar
    Join Date
    Feb 2011
    Age
    29
    Posts
    1,068
    Thanks given
    318
    Thanks received
    200
    Rep Power
    1092
    First, use a switch. Second, is it even being called?
    Attached image


    Reply With Quote  
     

  5. #5  
    Extreme Donator


    Join Date
    Oct 2006
    Posts
    1,370
    Thanks given
    64
    Thanks received
    197
    Rep Power
    426
    check your packethandler to see if it actually redirects the wearing item packet to wearitem.java


    ~flow@hacking . rs
    Reply With Quote  
     

  6. #6  
    Registered Member rockarocka's Avatar
    Join Date
    May 2010
    Posts
    978
    Thanks given
    27
    Thanks received
    7
    Rep Power
    20
    Quote Originally Posted by 'Boss View Post
    what you mean? You cannot wear items? like platelegs?
    if you wear items nothing changes.. like youre not becoming n npc or anything..
    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. Why doesnt this work?
    By jordan641 in forum Help
    Replies: 0
    Last Post: 12-15-2010, 01:16 AM
  2. Why doesnt this work
    By peterbjornx in forum Application Development
    Replies: 17
    Last Post: 12-31-2009, 11:12 PM
  3. help me rs2hd doesnt work
    By hackerboy in forum Help
    Replies: 4
    Last Post: 06-08-2009, 10:43 PM
  4. c. doesnt work
    By Robin Spud in forum Help
    Replies: 4
    Last Post: 05-10-2009, 05:33 AM
  5. Doesnt seem to work
    By Cody. in forum Help
    Replies: 0
    Last Post: 03-12-2009, 11:36 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •