Author Topic: MeWon's Smith BOD Sorter-er  (Read 28230 times)

0 Members and 1 Guest are viewing this topic.

Offline Neo

  • Prime Program
  • Elite
  • *
  • *
  • Posts: 821
  • Activity:
    0%
  • Reputation Power: 13
  • Neo barely matters.Neo barely matters.
  • Respect: +155
  • Referrals: 3
    • View Profile
Re: MeWon's Smith BOD Sorter-er
« Reply #15 on: October 11, 2011, 02:31:28 PM »
0
It was me who suggested this part:

Code: [Select]
repeat
finditem EYM c_ , #backpackid
event property #findid
until weight in #property || #scnt > %findtimeout
In my view, a fixed wait of 10 isn't always enough to see if the bod was dropped in the backpack or not... If you have a high enough ping, that often won't be enough... I know this first hand, using the earlier versions of the sorter...

So, this snippet is actually meant to make sure the item is found, AND make sure that the #property is properly set, no matter what connection you have with the server... Adjustments apart could be made of course, but this is the best way I found to make sure both the item is found and the #property is properly set...

« Last Edit: October 11, 2011, 02:41:45 PM by Neo »
Never refuse an invitation.
Never resist the unfamiliar.
Never fail to be polite.
And never outstay your welcome.

Offline 12TimesOver

  • Another Day, Another Vendetta
  • Global Moderator
  • *
  • *
  • Posts: 3694
  • Activity:
    0%
  • Reputation Power: 41
  • 12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.
  • Gender: Male
  • Respect: +321
  • Referrals: 2
    • View Profile
Re: MeWon's Smith BOD Sorter-er
« Reply #16 on: October 11, 2011, 02:44:54 PM »
0
It was me who suggested this part:

Code: [Select]
repeat
finditem EYM c_ , #backpackid
event property #findid
until weight in #property || #scnt > %findtimeout
In my view, a fixed wait of 10 isn't always enough to see if the bod was dropped in the backpack or not... If you have a high enough ping, that often won't be enough... I know this first hand, using the earlier versions of the sorter...

So, this snippet is actually meant to make sure the item is found, AND make sure that the #property is properly set, no matter what connection you have with the server... Adjustments apart could be made of course, but this is the best way I found to make sure both the item is found and the #property is properly set...
Makes sense. I still like the idea of checkig for a BOD before outing to the Score sub but there are as many ways to code as there are coders so have at it.

X
When they come for me I'll be sitting at my desk
     with a gun in my hand wearing a bulletproof vest
My, my, my how the time does fly
     when you know you're gonna die by the end of the night

Offline Neo

  • Prime Program
  • Elite
  • *
  • *
  • Posts: 821
  • Activity:
    0%
  • Reputation Power: 13
  • Neo barely matters.Neo barely matters.
  • Respect: +155
  • Referrals: 3
    • View Profile
Re: MeWon's Smith BOD Sorter-er
« Reply #17 on: October 11, 2011, 02:54:13 PM »
0
It was me who suggested this part:

Code: [Select]
repeat
finditem EYM c_ , #backpackid
event property #findid
until weight in #property || #scnt > %findtimeout
In my view, a fixed wait of 10 isn't always enough to see if the bod was dropped in the backpack or not... If you have a high enough ping, that often won't be enough... I know this first hand, using the earlier versions of the sorter...

So, this snippet is actually meant to make sure the item is found, AND make sure that the #property is properly set, no matter what connection you have with the server... Adjustments apart could be made of course, but this is the best way I found to make sure both the item is found and the #property is properly set...
Makes sense. I still like the idea of checkig for a BOD before outing to the Score sub but there are as many ways to code as there are coders so have at it.

X
Actually, I totally agree with you on that one, checking for a bod before doing the score sub would definitely be a nice safety improvement....
Never refuse an invitation.
Never resist the unfamiliar.
Never fail to be polite.
And never outstay your welcome.

Offline MeWonUoTopic starter

  • Hero Member
  • *
  • Posts: 913
  • Activity:
    0%
  • Reputation Power: 11
  • MeWonUo barely matters.MeWonUo barely matters.
  • Gender: Male
  • Respect: +85
  • Referrals: 1
    • View Profile
Re: MeWon's Smith BOD Sorter-er
« Reply #18 on: October 11, 2011, 04:15:05 PM »
0
@12x - I'm ALWAYS open to suggestions.  I know I still have a lot to learn, and any feedback I can get is beyond appreciated.  I've got your ideas here in front of me now.  Looks like an added check to make sure a bod is in the pack before heading into the scoring section is in order.  I'll also do some testing with removing those waits.  For some reason, I'm thinking that I was having issues without those waits in there, but lots has changed over the time this thing has been evolving.   Thanks yet again for your help!

@Neo - As always man.. Thanks!  Where the hell you been lately anyway??  hah

@anewbe4u - Can you possibly detail me on where in the script that is happening?  Do you have any tailor bods in the book?  Is the bod book filter cleared or set to smith bods only?  Any other info would be appreciated. I'd like to get it fixed up for you.


I will keep playing with this, and updating as I'm able to figure things out.  At my scripting level....one thing at a time.. :D


Offline madatu

  • Full Member
  • ***
  • Posts: 146
  • Activity:
    0%
  • Reputation Power: 2
  • madatu has no influence.
  • Respect: +11
  • Referrals: 1
    • View Profile
Re: MeWon's Smith BOD Sorter-er
« Reply #19 on: October 11, 2011, 06:25:59 PM »
0
Glad you posted this I will try to see if i can get my bods filtered and let you know how it goes. Thanks agqain !!!

Offline anewbe4u

  • Jr. Member
  • **
  • Posts: 25
  • Activity:
    0%
  • Reputation Power: 0
  • anewbe4u has no influence.
  • Respect: +6
  • Referrals: 0
    • View Profile
Re: MeWon's Smith BOD Sorter-er
« Reply #20 on: October 16, 2011, 08:17:40 AM »
0
Hey,

I think it might have just been me being stupid and not sorting the book correctly....

Offline Endless Night

  • Global Moderator
  • *
  • *
  • Posts: 5467
  • Activity:
    0%
  • Reputation Power: 62
  • Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!
  • Respect: +393
  • Referrals: 1
    • View Profile
Re: MeWon's Smith BOD Sorter-er
« Reply #21 on: October 18, 2011, 05:18:36 AM »
0
First off congratulations on a great script.  Here are some improvements i would like to see in order to get this lovely peice of work into the official script library. Please dont take any offense by below rather take it as a learning experience.

(1) you have subs without returns
   subs setup, bookscan   <-- not sure why no returns on these sub perhaps an oversight

(2) A clean exit from the script.   Your script halts in the middle of the sub GetBODScore.  I would recommend you create a Var for example called %ExitScript,  set it to false... and instead of halting in the middle of the sub have the code return to the main loop and exit thier.  Such modifications as below would achieve this.

Code: [Select]
if #scnt > %findtimeout
{
set %exitscript #true ; display No more BODs to sort
return  ; halt
}

and modify you base repeat loop to exit
Code: [Select]
set %exitscript #false
repeat
  gosub DropBod
  gosub GetBodScore
  if ! %exitscript
    {
    gosub EvalDrop
    gosub DropToBook
    }
until %Exitscript = #true
halt

(3) Property Scan: your property sometimes fails I would recommend you take the finditem out of the property loop. As and add a secondary loop that waits such as below...

Code: [Select]
finditem EYM c_ , #backpackid
set %findtimeout #scnt + 10
repeat
  event property #findid
  set %Proptimeout #scnt + 2
  repeat
     wait 1
  until weight in #property || #scnt > %proptimeout
until weight in #property || #scnt > %findtimeout

(4) Code Indentation: You may wish to consider Indenting your code; it makes it far easier to read  and maintian and catch errors such as missing returns...  standardly you indent x spaces for every block (for me x=2),   ie  this is easier to read than that

thjis
Code: [Select]
sub justdoit
  while w > p
    {
    repeat
      if x =a
        for y = 1 20
          set z z + 20
    until q < r
    }
return
that
Code: [Select]
sub justdoit
while w > p
{
repeat
if x =a
for y = 1 20
set z z + 20
until q < r
}
return

(5) CLoth Bods :  i did a simple mod to make it support cloth bods, you might wish to consider something like this as well... as its not appropriate my odd cloth bods end up in never fill  (each 2 line bit goes into diff section)

Code: [Select]
if Cloth in #property
  set %Cloth #findid

if cloth in #property
  set %score %score + 1000000

if %score >= 1000000
  set %DropBook %Cloth


Once again congratualtions on the script submission  ;D
« Last Edit: October 18, 2011, 08:46:45 AM by Endless Night »
Outlaw Josey Wales - "Manwink, A Long Gone Scripty, and Endless are always teasing us with their private sections lol. What there realy saying is scripters rule and users drool."
Briza - "Your a living breathing vortex of usefulness."

Offline TrailMyx

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13301
  • Activity:
    0%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: MeWon's Smith BOD Sorter-er
« Reply #22 on: October 18, 2011, 10:12:45 AM »
0
Alot of issues like EN is talking about can be caught by the SUO syntax checker.  Here's the sample output for your script:

Code: [Select]
Method count: 56
Command count: 56
*** Pass 1 - Label accounting:
*** Warning - Tag ClickLoop1: - Line 55 already exists.  First occurance: 43
*** Error - Subroutine BookScan - Line 66 nested without return.
Subroutine labels = 7
Tag labels = 1
7 Code block(s).
1 Warnings(s) encountered.
*** Pass 2 - Execution [SYNTAXCHECK]

There is also a nice indentation formatter --> /Tools/Auto Indent Script
« Last Edit: October 18, 2011, 10:19:05 AM by TrailMyx »
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline Endless Night

  • Global Moderator
  • *
  • *
  • Posts: 5467
  • Activity:
    0%
  • Reputation Power: 62
  • Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!
  • Respect: +393
  • Referrals: 1
    • View Profile
Re: MeWon's Smith BOD Sorter-er
« Reply #23 on: October 18, 2011, 05:04:47 PM »
0
Update.

The occasional script finishing before the bod book is empty.. isnt from not reading the property correctly as i previously throught but rather from the bod drop routine not being successful. 

great little script tho it nicely sorted over 600 bods for me.
Outlaw Josey Wales - "Manwink, A Long Gone Scripty, and Endless are always teasing us with their private sections lol. What there realy saying is scripters rule and users drool."
Briza - "Your a living breathing vortex of usefulness."

Offline holmedog

  • Jr. Member
  • **
  • Posts: 57
  • Activity:
    0%
  • Reputation Power: 2
  • holmedog has no influence.
  • Respect: +5
  • Referrals: 0
    • View Profile
Re: MeWon's Smith BOD Sorter-er
« Reply #24 on: November 02, 2011, 02:01:00 PM »
0
Works great.  I would add one note - it appears to go into an infinite loop if you select a bag with BOD books outside of your backpack. 

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: MeWon's Smith BOD Sorter-er
« Reply #25 on: November 30, 2011, 03:03:39 PM »
0
Did a book of 200 for test run.  only forget  15 BOD, maybe lag, all the Bod when where the are suppose too.   Question:  Why did you split all the Runic hammers, can have only 9 books instead of 13. This is gonna safe me lot of time. sure. I have lot of book to turn in, so I let you know how it turn. 

Offline slyone

  • Full Member
  • ***
  • Posts: 135
  • Activity:
    0%
  • Reputation Power: 2
  • slyone has no influence.
  • Gender: Male
  • Respect: +40
  • Referrals: 1
    • View Profile
Re: MeWon's Smith BOD Sorter-er
« Reply #26 on: February 11, 2012, 08:57:18 AM »
0
This is working great!  Thanks for the contribution!
Started playing back at the Second Age

Offline Man7dowN

  • Jr. Member
  • **
  • Posts: 31
  • Activity:
    0%
  • Reputation Power: 0
  • Man7dowN has no influence.
  • Respect: +1
  • Referrals: 0
    • View Profile
Re: MeWon's Smith BOD Sorter-er
« Reply #27 on: April 13, 2012, 04:36:25 PM »
0
testing

Offline Mythix

  • Jr. Member
  • **
  • Posts: 20
  • Activity:
    0%
  • Reputation Power: 1
  • Mythix has no influence.
  • Gender: Female
  • Respect: +1
  • Referrals: 0
    • View Profile
Re: MeWon's Smith BOD Sorter-er
« Reply #28 on: May 26, 2012, 10:55:55 PM »
0
Works great.  I did have the problem of it not dropping bods out of the book at times, and the script prematurely stopping, but other than that, works fine!
I really like your method of organizing the bods by assigning numbers.  It made it easy for me to adapt the script to how I wanted them organized.  I only have 3 books: Trash, Keepers, Recycle.  I then export the Keepers to an outside program which gives me a nice overview of the bods I have and how close I am to getting the needed sbods for the lbods I want to fill.
Keep up the great work!!!


Post Merge: May 27, 2012, 09:46:07 PM
I've used your script to create a sorting method for tailor bods and for taming bods.  While there are many tailor sorters out there, not many are as easy to customize as this one for the novice scripter.  Also, I don't believe I've seen a taming sorter out there that will sort from a bod book to other books. 

I'm not sure if I can post the changes here or not.  If a moderator says it's ok for me to do so, and if there's any interest, then I will gladly post my changes to make this script usable with tailor and taming bods. 
Cheers!
« Last Edit: May 27, 2012, 09:46:07 PM by Mythix »

Offline MeWonUoTopic starter

  • Hero Member
  • *
  • Posts: 913
  • Activity:
    0%
  • Reputation Power: 11
  • MeWonUo barely matters.MeWonUo barely matters.
  • Gender: Male
  • Respect: +85
  • Referrals: 1
    • View Profile
Re: MeWon's Smith BOD Sorter-er
« Reply #29 on: August 16, 2012, 12:44:29 PM »
0
Thanks to everyone that has used this over the past months, glad it was of some help to some of you. :)


I'm starting to get back into UO again and see that I will be needing to make some changes to how BODs are sorted now that bribing plays a part in the equation.  If anyone has suggestions as to how they would like to see things sorted, please let me know.

Also, I believe I will be doing a tailoring BOD version as well now that sewing kits are worth something. :D


Thanks again.

Tags: