Author Topic: Handle UO Property  (Read 4024 times)

0 Members and 1 Guest are viewing this topic.

Offline Crome969Topic starter

  • Elite
  • *
  • *
  • Posts: 2098
  • Activity:
    0%
  • Reputation Power: 25
  • Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.
  • Gender: Male
  • UO Enthusiast
  • Respect: +211
  • Referrals: 10
    • View Profile
    • ScriptSDK
Handle UO Property
« on: September 10, 2011, 04:11:55 AM »
0
Hello Community,
today i would like to show you a small Snippet about handling Propertys of Wearable Items.
Maybe some of you know the Part of BMA Item Eval where he handle the Property to know if you have LRC 8 or 13 or Reptile Slayer on an Item.
In OpenUO itis a little bit different than in easyuo. it doesnt is saved with $ it uses \n what is the same meaning in end but dont showed up when u would print\Show the Property.
Iam currently working hard for the Heartwood Questmaker in Openuo and wanted to use Garaths Evaluator first, but noticed he uses loops over loops and when u need to get a score of many items it can be very very slow.
To Prepare for my own Evaluator i wrote a simple Handler\Helper to get the Property saved in a table + i can Check if a Property is on an Item. The following Code has 2 Functions:
-Scanning Property returning it as Table.
-Checking a "Property Table" if a Property is contained and return "true" if yes, a Number if its an Item like "Lower Reagent Cost" etc and false if it isnt found.

if you want to test the function for your own purpose, here is an example:
Code: [Select]
MyItem=GetProperty(UO.LLiftedID)
print(CheckProperty(MyItem,"Luck"))
Drag and Drop an Item with Propertys and insert the Name of it as second argument.
Example Print at me:
Code: [Select]
Lucky Necklace
Magnificent
Blessed
Weight: 1 Stone
Luck 200
Result:
Code: [Select]
200

Hope some of you will like and use it!

Crome

There are 1 attachment(s) in this post. You must register and post an acceptable introduction to download
property.lua