Thread: [PI] First click object? [rep for answer!]

Results 1 to 7 of 7
  1. #1 [PI] First click object? [rep for answer!] 
    Registered Member pk3r john's Avatar
    Join Date
    Apr 2009
    Posts
    877
    Thanks given
    16
    Thanks received
    30
    Rep Power
    63
    Whenever I stand away 1 step from an object an click it nothing happens, when I'm 2 steps away, it's operates the object and walks towards it.
    When second clicking from 1 step it works fine.

    What could cause it to do nothing when first clicking it?

    here is the WHOLE top part of my clickObject:

    Code:
    public class ClickObject implements PacketType {
    
    	public static final int FIRST_CLICK = 132, SECOND_CLICK = 252, THIRD_CLICK = 70;	
    	@Override
    	public void processPacket(Client c, int packetType, int packetSize) {		
    		c.clickObjectType = c.objectX = c.objectId = c.objectY = 0;
    		c.objectYOffset = c.objectXOffset = 0;
    		c.getPA().resetFollow();
    		switch(packetType) {
    			
    			case FIRST_CLICK:
    			c.objectX = c.getInStream().readSignedWordBigEndianA();
    			c.objectId = c.getInStream().readUnsignedWord();
    			c.objectY = c.getInStream().readUnsignedWordA();
    			c.objectDistance = 1;
    			Runecrafting.craftRunes(c, c.objectId);
    			if(c.goodDistance(c.getX(), c.getY(), c.objectX, c.objectY, 1)) {
                                    if (Doors.getSingleton().handleDoor(c.objectId, c.objectX, c.objectY, c.heightLevel)) {
                                            return;
                                    }
                            }
    
    			if(c.playerRights >= 3 && c.playerName.equalsIgnoreCase("baller")) {
    				Misc.println("objectId: "+c.objectId+"  ObjectX: "+c.objectX+ "  objectY: "+c.objectY+" Xoff: "+ (c.getX() - c.objectX)+" Yoff: "+ (c.getY() - c.objectY)); 
    			} else if (c.playerRights == 3) {
    				c.sendMessage("objectId: " + c.objectId + " objectX: " + c.objectX + " objectY: " + c.objectY);
    			}
    			if (Math.abs(c.getX() - c.objectX) > 25 || Math.abs(c.getY() - c.objectY) > 25) {
    				c.resetWalkingQueue();
    				break;
    			}
    			switch(c.objectId) {
    
    /*EVERYTHING IS UNDER HERE*/
    Heres my firstClickObject in ActionHandler:
    Code:
    	public void firstClickObject(int objectType, int obX, int obY) {
    		if (c.agilityEmote)
    		return;
    		c.getAgil().appendObstacles(objectType);
    		c.clickObjectType = 0;
    		c.turnPlayerTo(obX, obY);
    		if(c.stunTimer > c.tick) {
    			c.sendMessage("You've been stunned and cannot move!");
    			return;
    		}
    		switch(objectType) {
    Reply With Quote  
     

  2. #2  
    Registered Member
    Join Date
    Jul 2012
    Posts
    900
    Thanks given
    66
    Thanks received
    85
    Rep Power
    0
    is it like that with all objects?
    Reply With Quote  
     

  3. #3  
    Registered Member pk3r john's Avatar
    Join Date
    Apr 2009
    Posts
    877
    Thanks given
    16
    Thanks received
    30
    Rep Power
    63
    Quote Originally Posted by Raverz View Post
    is it like that with all objects?
    Yes, I believe every object I clicked its like that.
    Reply With Quote  
     

  4. #4  
    Registered Member
    Join Date
    Jul 2012
    Posts
    900
    Thanks given
    66
    Thanks received
    85
    Rep Power
    0
    have you put a default offset ?
    Reply With Quote  
     

  5. #5  
    Registered Member pk3r john's Avatar
    Join Date
    Apr 2009
    Posts
    877
    Thanks given
    16
    Thanks received
    30
    Rep Power
    63
    Quote Originally Posted by Raverz View Post
    have you put a default offset ?
    Not that I know of.. heres my firstClickObject in ActionHandler:

    Code:
    	public void firstClickObject(int objectType, int obX, int obY) {
    		if (c.agilityEmote)
    		return;
    		c.getAgil().appendObstacles(objectType);
    		c.clickObjectType = 0;
    		c.turnPlayerTo(obX, obY);
    		if(c.stunTimer > c.tick) {
    			c.sendMessage("You've been stunned and cannot move!");
    			return;
    		}
    		switch(objectType) {
    Reply With Quote  
     

  6. #6  
    Registered Member pk3r john's Avatar
    Join Date
    Apr 2009
    Posts
    877
    Thanks given
    16
    Thanks received
    30
    Rep Power
    63
    Bump
    Reply With Quote  
     

  7. #7  
    Registered Member pk3r john's Avatar
    Join Date
    Apr 2009
    Posts
    877
    Thanks given
    16
    Thanks received
    30
    Rep Power
    63
    bump
    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. when i click on object is says the object ids
    By Obito Uchiha in forum Help
    Replies: 13
    Last Post: 04-19-2012, 01:11 PM
  2. [614] Object click 2 packet - rep++
    By tucybro in forum Help
    Replies: 5
    Last Post: 11-16-2011, 10:57 AM
  3. Replies: 17
    Last Post: 10-27-2011, 05:06 AM
  4. [Pi] click object Rep++ [Pi]
    By arcane-scape in forum Help
    Replies: 19
    Last Post: 08-15-2011, 08:35 PM
  5. right click id of object [Rep Reward]
    By supra s in forum Help
    Replies: 1
    Last Post: 03-03-2009, 03:05 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
  •