Thread: PI help with removing right click options

Results 1 to 5 of 5
  1. #1 PI help with removing right click options 
    Registered Member
    Join Date
    Nov 2014
    Posts
    17
    Thanks given
    1
    Thanks received
    1
    Rep Power
    11
    I'm trying to remove right click options like "follow", and "trade with" in a certain spot

    This is the code I'm using
    Code:
    				else if (Boundary.isIn(this, Boundary.())) { 		
    			getPA().showOption(4, 0, "null", 3);
    			getPA().showOption(5, 0, "null", 4);		
    		}
    		else if (!Boundary.isIn(this, Boundary.())) {
    			getPA().showOption(4, 0, "Follow", 3);
    			getPA().showOption(5, 0, "Trade with", 4);		
    		}
    It will only remove what ever option it calls first. For example, if i put the (5,0,null,4) above the (4,0,null,3), whenever I'm in the boundary it will only remove the "trade with" option and not the "follow".

    Why is it not removing both options?
    I've also tried just removing one, and then calling the same boundary again to remove the second one, and it still wont work, I'm stumped.

    Edit: Is there a way to just remove the right click option all together? I've looked through the client but cant figure out how to make it remove the option for only a certain boundary.
    Reply With Quote  
     

  2. #2  
    Registered Member
    Join Date
    Jan 2017
    Posts
    115
    Thanks given
    6
    Thanks received
    18
    Rep Power
    7
    go to playerassistant.java and replace ur showOption method with this:

    Code:
    	public void showOption(int i, int l, String s, int a) {
    		 synchronized(c) {
    		if (c.getOutStream() != null && c != null) {
    			if (!optionType.equalsIgnoreCase(s)) {
    				optionType = s;
    				c.getOutStream().createFrameVarSize(104);
    				c.getOutStream().writeByteC(i);
    				c.getOutStream().writeByteA(l);
    				c.getOutStream().writeString(s);
    				c.getOutStream().endFrameVarSize();
    				c.flushOutStream();
    			}
    		}
    
    		}
    	}
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Nov 2014
    Posts
    17
    Thanks given
    1
    Thanks received
    1
    Rep Power
    11
    Quote Originally Posted by socklol View Post
    go to playerassistant.java and replace ur showOption method with this:

    Code:
    	public void showOption(int i, int l, String s, int a) {
    		 synchronized(c) {
    		if (c.getOutStream() != null && c != null) {
    			if (!optionType.equalsIgnoreCase(s)) {
    				optionType = s;
    				c.getOutStream().createFrameVarSize(104);
    				c.getOutStream().writeByteC(i);
    				c.getOutStream().writeByteA(l);
    				c.getOutStream().writeString(s);
    				c.getOutStream().endFrameVarSize();
    				c.flushOutStream();
    			}
    		}
    
    		}
    	}
    The only thing different in my playerassistant is synchronized(c) was //'d out, but it still doesnt work with that code.
    Reply With Quote  
     

  4. #4  
    Registered Member
    Join Date
    Jan 2017
    Posts
    115
    Thanks given
    6
    Thanks received
    18
    Rep Power
    7
    how are you loading this code? in process of player.java ?
    Reply With Quote  
     

  5. #5  
    Registered Member
    Join Date
    Nov 2014
    Posts
    17
    Thanks given
    1
    Thanks received
    1
    Rep Power
    11
    Quote Originally Posted by socklol View Post
    how are you loading this code? in process of player.java ?
    I figured it out, I made the character completely invisible client sided except for the character model.
    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: 4
    Last Post: 02-25-2017, 06:23 PM
  2. [PI] Help with removing objects
    By Will_ in forum Help
    Replies: 11
    Last Post: 10-03-2013, 04:02 AM
  3. Right click option with hover help
    By PkzEvolution-rec in forum Help
    Replies: 5
    Last Post: 08-12-2012, 02:09 PM
  4. New Rs right click options PI help
    By poprocke75 in forum Help
    Replies: 2
    Last Post: 01-01-2012, 07:50 AM
  5. Replies: 1
    Last Post: 04-25-2008, 05:14 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
  •