Thread: Interface Component Settings (A.K.A. Access Masks ) 100%

Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 23
  1. #11  
    Christ is King

    Makar's Avatar
    Join Date
    Jul 2011
    Age
    29
    Posts
    2,004
    Thanks given
    545
    Thanks received
    965
    Rep Power
    427
    Quote Originally Posted by Joris View Post
    Elaborate?
    Like he said in the first post on the thread, this will only be useful to people who know how to use component settings.
    Attached image
    The best open-source pre-eoc remake project that isn't in its early stages for once
    Darkan Client (727 Client Refactor)
    Darkan World Server
    “It would not be impossible to prove with sufficient repetition and a psychological understanding of the people concerned that a square is in fact a circle. They are mere words, and words can be molded until they clothe ideas and disguise.”
    Reply With Quote  
     

  2. #12  
    Donator


    Join Date
    Jan 2014
    Posts
    1,652
    Thanks given
    428
    Thanks received
    501
    Rep Power
    221
    Quote Originally Posted by Makar View Post
    Like he said in the first post on the thread, this will only be useful to people who know how to use component settings.
    Though, 'Using on minimap' using as in right click use?
    Reply With Quote  
     

  3. #13  
    Registered Member
    maffia-rpg's Avatar
    Join Date
    Jul 2011
    Posts
    2,775
    Thanks given
    587
    Thanks received
    759
    Rep Power
    120
    Quote Originally Posted by Joris View Post
    Though, 'Using on minimap' using as in right click use?
    Read the thread first before you post:
    Code:
    	/**
    	 * Sets use on settings.
    	 * By use on , I mean the options such as Cast in spellbook or use in inventory.
    	 * If nothing is allowed then 'use' option will not appear in right click menu.
    	 */
    	public void setUseOnSettings(
    Quote Originally Posted by Nando View Post
    why would I care about trying to get you to care about me homosexual?
    back to coding shit revisions
    1080% lost.
    Reply With Quote  
     

  4. #14  
    Reverse engineering enthousiast
    peterbjornx's Avatar
    Join Date
    Feb 2008
    Age
    29
    Posts
    1,910
    Thanks given
    88
    Thanks received
    539
    Rep Power
    1307
    it allows for the user to use an interface component (such as an item) on the minimap area
    Reply With Quote  
     

  5. Thankful user:


  6. #15  
    Registered Member
    Teemuzz's Avatar
    Join Date
    Oct 2009
    Posts
    2,755
    Thanks given
    1,212
    Thanks received
    422
    Rep Power
    934
    Just noticed the use flag shift in this is wrong. It overlaps with the option clicks. If i'm correct the correct shift is 11.

    EDIT: Also for anyone else wondering: Allowing item dragging is done by setting the interface event depth (as mgi125 originally said it is) into atleast 1.

    EDIT2:

    Code:
    public class ComponentSettings {
    
    	public static boolean hasContinueOption(int optionmask) {
    		Class14_Sub8_Sub39.anInt4742++;
    		return (0x1 & optionmask) != 0;
    	}
    
    	public static boolean hasOptionClickAccess(int accessFlag, int clickOption) {
    		Class14_Sub3.anInt2759++;
    		return ((accessFlag >> (1 + clickOption)) & 0x1) != 0;
    	}
    
    	public static int getAllowedUseTypeFlag(int optionmask) {
    		Class44.anInt727++;
    		return (optionmask >> 11) & 0x3F;
    	}
    
    	public static int getComponentEventDepth(int optionmask) {
    		Class14_Sub8.anInt2850++;
    		return (optionmask >> 17) & 0x7;
    	}
    
    	public static boolean bit20Toggled(int componentmask) {
    		return ((componentmask >> 20) & 0x1) != 0;
    	}
    
    	public static boolean bit21Toggled(int optionmask) {
    		Class36.anInt618++;
    		return ((optionmask >> 21) & 0x1) != 0;
    	}
    
    	public static boolean bit28Toggled(int optionmask) {
    		Class111.anInt1862++;
    		return ((optionmask >> 28) & 0x1) != 0;
    	}
    
    	public static boolean bit29Toggled(int optionMask) {
    		Class14_Sub6.anInt2818++;
    		return ((optionMask >> 29) & 0x1) != 0;
    	}
    
    	public static boolean bit30Toggled(int optionmask) {
    		Class14_Sub2_Sub5.anInt3811++;
    		return ((optionmask >> 30) & 0x1) != 0;
    	}
    
    	public static boolean bit31Toggled(int optionmask) {
    		Class81.anInt1322++;
    		return ((optionmask >> 31) & 0x1) != 0;
    	}
    
    	public static int getOptionMask(Class94 component) {
    		IntegerNode node = ((IntegerNode) (Class14_Sub8_Sub5.componentSettingContainer
    				.method1230(((long) component.widgetPointer << 32)
    						+ (long) component.widgetSlot, (byte) -18)));
    		if (node != null)
    			return node.value;
    		return component.defaultOptions;
    	}
    
    	public static Class94 allowDrag(Class94 component) {
    		int eventDepth = ComponentSettings
    				.getComponentEventDepth(getOptionMask(component));
    		if (eventDepth == 0)
    			return null;
    		for (int ix = 0; ix < eventDepth; ix++) {
    			component = Class55.method1233(component.anInt1540, 21803);
    			if (component == null)
    				return null;
    		}
    		return component;
    	}
    }
    These are the settings from the 508 client.
    Reply With Quote  
     

  7. #16  
    Registered Member

    Join Date
    Jan 2014
    Posts
    376
    Thanks given
    49
    Thanks received
    111
    Rep Power
    106
    Flags 21 and 23 appear to related to component dragging. 21 seems to be "can drag onto", while 23 is "can drag".
    Reply With Quote  
     

  8. Thankful user:


  9. #17  
    Developer


    Join Date
    Aug 2012
    Posts
    2,493
    Thanks given
    180
    Thanks received
    1,732
    Rep Power
    2487
    Quote Originally Posted by Teemuzz View Post
    Just noticed the use flag shift in this is wrong. It overlaps with the option clicks. If i'm correct the correct shift is 11.
    sorry for the bump but i can confirm that teemuzz is right on this one

    correct shift is 11 and in 731 the optionmask consists of 6 bits instead of 5 still figuring out what the last bit is used for will update when i find it

    proof (directly taken from 731 client)

    Code:
      static final int method5837(int var0) {
          return var0 >> 11 & 127;
       }
    Reply With Quote  
     

  10. #18  
    Registered Member

    Join Date
    Dec 2009
    Posts
    774
    Thanks given
    367
    Thanks received
    455
    Rep Power
    927
    Quote Originally Posted by Savions View Post
    sorry for the bump but i can confirm that teemuzz is right on this one

    correct shift is 11 and in 731 the optionmask consists of 6 bits instead of 5 still figuring out what the last bit is used for will update when i find it

    proof (directly taken from 731 client)

    Code:
      static final int method5837(int var0) {
          return var0 >> 11 & 127;
       }
    From the 742 client:
    Code:
    	public final int method12465() {
    		return method5041(permission);
    	}
    
    	static final int method5041(int i) {
    		return i >> 11 & 0x7f;
    	}
    
    	static String method533(InterfaceComponentDefinition interfaceComponentDefinition) {
    		if (client.getInterfaceComponentSetting(interfaceComponentDefinition).method12465() == 0) {
    			return null;
    		}
    		if (interfaceComponentDefinition.aString1728 == null || interfaceComponentDefinition.aString1728.trim().length() == 0) {
    			if (client.aBool8579) {
    				return "Hidden-use";
    			}
    			return null;
    		}
    		return interfaceComponentDefinition.aString1728;
    	}
    Looks like a hidden "use on/with" component or something. This is also the only thing which uses the second parameter of the InterfaceComponentSettings/AccessMasks class in the client.

    Code:
    		aString1728 = buffer.readString();
    		int setting = -1;
    		if (Class304.method5041(permission) != 0) {
    			setting = buffer.readUnsignedShort();
    			if (setting == 65535) {
    				setting = -1;
    			}
    			anInt1658 = buffer.readUnsignedShort();
    			if (anInt1658 == 65535) {
    				anInt1658 = -1;
    			}
    			anInt1659 = buffer.readUnsignedShort();
    			if (anInt1659 == 65535) {
    				anInt1659 = -1;
    			}
    		}
    		//some code...
    		this.setting = new InterfaceComponentSettings(permission, setting);
    Reply With Quote  
     

  11. Thankful user:


  12. #19  
    Registered Member
    Join Date
    Jun 2015
    Posts
    323
    Thanks given
    21
    Thanks received
    11
    Rep Power
    7
    Reply With Quote  
     

  13. #20  
    Developer


    Join Date
    Aug 2012
    Posts
    2,493
    Thanks given
    180
    Thanks received
    1,732
    Rep Power
    2487
    Quote Originally Posted by new2rsps View Post
    it does work ur just utilizing mask builder wrong

    also dont post ur help thread here
    Reply With Quote  
     

Page 2 of 3 FirstFirst 123 LastLast

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. Access Masks
    By Titandino in forum Help
    Replies: 5
    Last Post: 01-28-2011, 02:16 AM
  2. Settings/Features Interface
    By NICKname in forum Show-off
    Replies: 22
    Last Post: 10-17-2010, 08:11 AM
  3. [614] Withdraw Access Masks - Paying
    By .alycia in forum Help
    Replies: 2
    Last Post: 08-18-2010, 08:01 PM
  4. [614] Need Access Masks
    By Mr Bill in forum Help
    Replies: 3
    Last Post: 08-18-2010, 12:25 PM
  5. Access Masks
    By thedoom in forum Requests
    Replies: 0
    Last Post: 09-29-2009, 06:33 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
  •