The Accessibility function in the uo module.
Posted: Sat Feb 10, 2018 11:43 pm
ChronosKing on Discord (He goes by another name on the forums but I do not remember it) brought to our attention that there is a discrepancy between the documentation for the Accessibility function and how it actually works.
The documentation states:
The discrepancy is the range from object to character. It is not two (2) squares but is instead eighteen (18) squares. I am using the word "discrepancy" rather than "bug" because one of the Core developers brought up the point that maybe it is working the way it was intended and that the documentation may be in error.
I am posting this here to make shard developers aware that this could open up exploits by players if there is no Distance check along with your Accessibility check.
All you need to do is add a Distance function call to your 'if' statement to resolve this possible exploit.
This will get you the desired result.
Rest assured the developers have been discussing several ways to resolve this and will try to do it without disrupting or breaking our scripts.
The documentation states:
Code: Select all
Function: Determines if an item falls into one of the following categories for a character:
An item on the ground, within two squares
An item equipped by the character
An item inside the character's backpack
A temporarily accessible item
Notes: Does not check that character has line-of-sight to item.I am posting this here to make shard developers aware that this could open up exploits by players if there is no Distance check along with your Accessibility check.
All you need to do is add a Distance function call to your 'if' statement to resolve this possible exploit.
Code: Select all
if(Accessible(who, item) && Distance(who, item) < 3)Rest assured the developers have been discussing several ways to resolve this and will try to do it without disrupting or breaking our scripts.