Author Topic: Pulling the new point value from bods?  (Read 6720 times)

0 Members and 1 Guest are viewing this topic.

Offline GemviperTopic starter

  • Sr. Member
  • *
  • Posts: 481
  • Activity:
    0%
  • Reputation Power: 0
  • Gemviper hides in shadows.
  • Respect: +57
  • Referrals: 2
    • View Profile
Pulling the new point value from bods?
« on: December 03, 2016, 11:32:55 PM »
0
Hello,

I finally have some free time to sort out my bod sorting script but have a question. I know how to move and manipulate items, open and click on gumps, pull values off items etc but I just realized I haven't yet tried to pull a value directly from a gump! Unless there is some other way to find out how many points a bod is worth I need to figure this out before proceeding.

Is there an easy way of pulling the bod point value from any given bod? Obviously getting the property value of the bod itself is no help because the point value is in the gump, not on the bod. Sorting by craft type is easy thanks to each craft being a different color but by point?

Offline Crisis

  • Global Moderator
  • *
  • *
  • Posts: 3014
  • Activity:
    4%
  • Reputation Power: 41
  • Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.
  • Gender: Male
  • Scripting well enough to break things!
  • Respect: +206
  • Referrals: 2
    • View Profile
Re: Pulling the new point value from bods?
« Reply #1 on: December 04, 2016, 05:32:14 AM »
0
I think the only way to do that is with OCR which I am not familiar with. I know kal has Kalocr and maybe someone can advise you how to integrate it into your script but he has abandoned it so there won't be updates for it.

Kalocr: http://www.easyuo.com/forum/viewtopic.php?f=3&t=3891

Offline The Ghost

  • Elite
  • *
  • *
  • Posts: 1917
  • Activity:
    0%
  • Reputation Power: 25
  • The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.
  • Respect: +245
  • Referrals: 0
    • View Profile
Re: Pulling the new point value from bods?
« Reply #2 on: December 04, 2016, 09:02:26 AM »
0
You going to have to open all the gump to get the value, and OCR gump  .

Or you can rebuild a table   Order vs Point.     Going to hate BODS

Offline BobOzarius

  • Full Member
  • ***
  • Posts: 103
  • Activity:
    0%
  • Reputation Power: 2
  • BobOzarius has no influence.
  • Respect: +26
  • Referrals: 0
    • View Profile
Re: Pulling the new point value from bods?
« Reply #3 on: December 04, 2016, 10:49:57 AM »
0
Or you can associate bods to point values, and use #eventproperty. That's how I chose to do it, because it's less than a second to scan a bod and parse the info from it, and more than a second per bod if you have to click it. Getting info from bods needs to be as fast as you can possibly make it. Is the point value in the #property? I haven't looked. Maybe you have to click the bod? I haven't reached that point yet, I'm going to check now.
« Last Edit: December 04, 2016, 10:52:57 AM by BobOzarius »

Offline BobOzarius

  • Full Member
  • ***
  • Posts: 103
  • Activity:
    0%
  • Reputation Power: 2
  • BobOzarius has no influence.
  • Respect: +26
  • Referrals: 0
    • View Profile
Re: Pulling the new point value from bods?
« Reply #4 on: December 04, 2016, 02:43:20 PM »
0
Ok I had to go back and look at how I did it again. I just did an event property on each bod and associated it's data with it's point amount.

Offline manwinc

  • Elite
  • *
  • *
  • Posts: 2556
  • Activity:
    0%
  • Reputation Power: 32
  • manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!
  • Gender: Male
  • "The Devs Hard at Work"
  • Respect: +123
  • Referrals: 1
    • View Profile
Re: Pulling the new point value from bods?
« Reply #5 on: December 04, 2016, 03:36:21 PM »
0
Yes, easiest way would be to event Property and then simply step through all the things that give points.


Set %Points 0
if Exceptional in #property
set %Points %Points + XXX
if Large in #Property
set %Points %Points + XXX
if Dull , #spc , Copper in #Property
set %Points %Points + XXX


Monkeys and Typewriters!

" Oh I know, We'll make a Boss Encounter that requires 3 keys per player to enter, Then we'll make it not a closed instance so you never know if you are going to pop into a fresh room or a boss that has 1% Health left with 20 dudes smashing its face in, wasting your time and effort"

Offline GemviperTopic starter

  • Sr. Member
  • *
  • Posts: 481
  • Activity:
    0%
  • Reputation Power: 0
  • Gemviper hides in shadows.
  • Respect: +57
  • Referrals: 2
    • View Profile
Re: Pulling the new point value from bods?
« Reply #6 on: December 04, 2016, 05:54:02 PM »
0
I have that done for smithing and tailoring but haven't looked into the new bods values that way yet, I assumed getting the point value directly would be easy... I know, assume nothing right  ::) I'm Not looking forward to figuring out which 250pt bod is good and which 250pt bod is junk because some fit good larges and others fit crap larges...

Is there still a working bod sorter that placed smalls within their large bod counterpart, or has there ever been?

Offline GemviperTopic starter

  • Sr. Member
  • *
  • Posts: 481
  • Activity:
    0%
  • Reputation Power: 0
  • Gemviper hides in shadows.
  • Respect: +57
  • Referrals: 2
    • View Profile
Re: Pulling the new point value from bods?
« Reply #7 on: December 04, 2016, 07:23:45 PM »
0
OK, done outlining how I want to process bods... now to code it.  ;) This is what I came up with...

- The fastest way to sort, with the least headache, is not to sort at all!
- My bod filler will now use the book's own filter to look for whatever bod reward I specify in the menu(or pt value threshold)
- it will figure out what type of bod it is by the findcol and will adjust the filter based on specified pt value minimum

I collect all bods on each toon and dump them into a book and that book has sorting capability so it makes sense to just leave the bods in it and work the filter. By baking the sorting into the filling process I'm hoping to save some time, now to figure out what rewards I want to work on, and what to do with the bods that don't cut the mustard. I don't intend to do them all like some people do, this might not be the best way for them.


« Last Edit: December 04, 2016, 07:28:54 PM by Gemviper »

Offline BobOzarius

  • Full Member
  • ***
  • Posts: 103
  • Activity:
    0%
  • Reputation Power: 2
  • BobOzarius has no influence.
  • Respect: +26
  • Referrals: 0
    • View Profile
Re: Pulling the new point value from bods?
« Reply #8 on: December 04, 2016, 08:42:03 PM »
0
I assumed getting the point value directly would be easy... I know, assume nothing right  ::)

Parsing the point value is very easy, and very fast. But it's an in game action clicking a bod. It would end up being faster to just use #property and setting up variables with the info you need based on the property.

Offline The Ghost

  • Elite
  • *
  • *
  • Posts: 1917
  • Activity:
    0%
  • Reputation Power: 25
  • The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.
  • Respect: +245
  • Referrals: 0
    • View Profile
Re: Pulling the new point value from bods?
« Reply #9 on: December 05, 2016, 08:18:27 AM »
0
maybe if we use the same action as the SOS master to read  location.   Does the point/score  are location at the same place?

Offline KaliOfLS

  • That's "Dr." Kali to you!
  • Sr. Member
  • *
  • Posts: 406
  • Activity:
    0%
  • Reputation Power: 6
  • KaliOfLS has no influence.
  • Gender: Male
  • Respect: +33
  • Referrals: 2
    • View Profile
Re: Pulling the new point value from bods?
« Reply #10 on: December 06, 2016, 06:29:40 AM »
0
If you want to sort bods decently efficient without OCR, then here is the best way to do it that I have found.

Calculate how many you can hold and still hold your books to fill into.
Remove that many bods from the book and put book into secure.
"Evaulate Bods" using event property.  Parse the string storing information (I used values) for all the unique values (item, cnt, size, quality, material).  Use these values to create a code.  I hashed them, but you could simply concatenate all the values (I realized this much after I produced my sorter, you can find in oEUO scripts on this board). 
Keep a list of bods associated with same destination book.  Once all codes are evaluated, iterate the list of destination books needed, pulling it into your pack, dropping in ALL of the bods with that destination book, and then returning it. 

This has been the most efficient way to sort easily (the most efficient would be to OCR your source book only pulling bods with the same destination book to minimize drag/drops).
Remember, calculations are pretty fast, but an issued UO action is at least a 1 second delay in your script.  Inefficent book pulling could compound your times immensely. 

How I did it was with a hash function, but string building is an option:  For example

Iron = 0
DC   = 1

Ringmail   = 0
Chainmail = 1

Small = 0
Large = 1

Normal = 0
Exceptional = 1

If I had three bods:

Normal Chainmail Coif 20 Iron = 012000  (0, 1, 20, 0, 0)
Normal Ringmail Coif 20 Iron = 002000 (0,0, 20, 0, 0)
Exceptional Chainmail Coif 10 DC = 111001 (1, 1, 10, 0, 1)

hashing the values was unneeded.  I would keep these as strings unless you text more.  I'm not sure if leading 0's and considering them numbers will result in anything positive.
Of course, this item evaulation will keep over important differences between weapons and shields so you may need to keep track of those.  So an item designation is good to, and I used a single value or items of the same set value (i.e. Kite, Heaters have the same value, weapons do not).

Anyway, if you want to use anything from my bod sorter, feel free.  but writing an euox equivalent, it is certainly possible but I promise you, it won't be as easy.  I exploit the crap out of tables and their behavior which are sadly absent from euox. :)

R~~~~ B~~~~~~~~ 
^ real life signature for sure

Offline KaliOfLS

  • That's "Dr." Kali to you!
  • Sr. Member
  • *
  • Posts: 406
  • Activity:
    0%
  • Reputation Power: 6
  • KaliOfLS has no influence.
  • Gender: Male
  • Respect: +33
  • Referrals: 2
    • View Profile
Re: Pulling the new point value from bods?
« Reply #11 on: December 06, 2016, 06:56:54 AM »
0
Oh interesting, the bod system has been revamped.  I just read that. 

I think sorting mechanics are the same, evaluation is different.  The turning in would be significantly more complex.
R~~~~ B~~~~~~~~ 
^ real life signature for sure

Offline GemviperTopic starter

  • Sr. Member
  • *
  • Posts: 481
  • Activity:
    0%
  • Reputation Power: 0
  • Gemviper hides in shadows.
  • Respect: +57
  • Referrals: 2
    • View Profile
Re: Pulling the new point value from bods?
« Reply #12 on: December 06, 2016, 10:43:18 AM »
0
Turning isn't too bad, thankfully you can opt out of banked points and if you get 900 pts but pick a 450 pt item you lose the other 450 so no math is required.

I keep trying to simplify as much as possible, wherever possible and one way to do that is just to look at my needs. Blacksmithing for example, I need powder of fortification in bulk and not really anything else so I need 450 pts from my turnin bods, regardless of what they are. That's pretty simple with blacksmithing because any exceptional colored small bod gives 450pts or more, as do exeptional non-weapon iron bods if bribed once.

So for me the sort it simple, check the findcol to make sure the bod is the right color(they made them each different, thank god) and check to see if both exeptional and small are in the property... if so, it's a good bod. I sell the rest :)

This won't build a good for everyone sorter, everyone has different wants/needs but taking into consideration how you could make the scripts life easier sometimes makes your life easier.

Offline Kandie

  • Full Member
  • ***
  • Posts: 193
  • Activity:
    0.2%
  • Reputation Power: 3
  • Kandie has no influence.
  • Gender: Female
  • a.k.a "Granny"
  • Respect: +20
  • Referrals: 7
    • View Profile
Re: Pulling the new point value from bods?
« Reply #13 on: December 06, 2016, 11:28:38 AM »
0
http://uo.com/wiki/
maybe this will help everyone

Offline NObama

  • Everything I need to know, I learned from Miffy's Item Finder.
  • Elite
  • *
  • *
  • Posts: 3454
  • Activity:
    0%
  • Reputation Power: 43
  • NObama is a force to reckon with.NObama is a force to reckon with.NObama is a force to reckon with.NObama is a force to reckon with.NObama is a force to reckon with.NObama is a force to reckon with.NObama is a force to reckon with.NObama is a force to reckon with.
  • Respect: +161
  • Referrals: 2
    • View Profile
Re: Pulling the new point value from bods?
« Reply #14 on: December 24, 2016, 05:49:15 AM »
0
Another way might be to evaluate full BOD books.

1.  Take a full book and have the script filter it to the point value you're after
2.  Dump those BODs into another book
3.  Fill those BODs

Tags: