The Accessibility function in the uo module.

Bug reports and feature requests. New features can only be added to the current development version. Bug-fixes may be back-ported.

Current release: 099 / Current development: 100
Post Reply
Yukiko
Distro Developer
Posts: 2480
Joined: Thu Feb 02, 2006 1:41 pm
Location: San Antonio, Texas
Contact:

The Accessibility function in the uo module.

Post by Yukiko » 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:

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.
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.

Code: Select all

if(Accessible(who, item) && Distance(who, item) < 3)
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.
Sincerely,
Yukiko

I would tell you a UDP joke but you might not get it.

Titus 2:13

Yukiko
Distro Developer
Posts: 2480
Joined: Thu Feb 02, 2006 1:41 pm
Location: San Antonio, Texas
Contact:

Re: The Accessibility function in the uo module.

Post by Yukiko » Thu Feb 15, 2018 9:55 am

This was fixed with the release of POL 099.1.
Sincerely,
Yukiko

I would tell you a UDP joke but you might not get it.

Titus 2:13

Post Reply