Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Gaderian

Pages: [1]
1
Combat/Healing/Looting / Pet heal assistant
« on: May 29, 2022, 03:58:43 PM »
This will optionally command the pet to attack a monster (needs TYPE selections set), defaults to swoop.
It has different points where it applies bandages (veterinary/lore) or magery (greater heal). These can be adjusted.
It is not a fully AFK script, but more of an assistant. I am not going to support running around for this.

Gaderian

2
Scripting Tutorials / EasyUO tile init NoOverrides needed or not?
« on: February 28, 2022, 10:26:21 PM »
This was a question about 'tile init' vs. 'tile init NoOverrides' (caps doesn't matter, just easier to read). Here is some information on how what it does and whether one needs it. The general answer today is that yes you need the 'nooverrides' parameter, but more info for those interested...

The UO maps are 'drawn' originally in MUL files with a map and then a statics file for implemented changes. These are found in files like:
map0.MUL
map0x.MUL (this is an index file into the data map0 file above)
Then the sta*.MUL files have the statics. Think about add on changes to the map after the initial world release, like the changes which added stuff which may have existed only depending on a player's subscription expansions.

Anyway, there was a file named 'verdata.mul' (and an index file that I am too lazy to look up). Well, inside easyuo.exe's source it tries to open this 'verdata' file set and hangs waiting on the open. In the absence of this file, Cheffe added a option on the 'tile init' statement to skip opening these 'verdata' files.

I can think of a different way to implement that (test for the files' existence and setting an internal boolean flag to determine how to handle the file data) but it stands the way it was implemented. This override was specifically added for freeshards which initially were missing that file. Technically, the wiki write up on the 'tile' commands over on easyuo is confusing and actually explains it awkwardly (and I believe what that states is the opposite of the functionality in the source code) - it is an appropriate inclusion for easyuo. I am not being critical, because what Cheffe chose to do was to empower the player to control easyuo's behavior - since at the time it was closed source. Here is the url about the tile command, but when it states if you don't know what the VerData.mul file is then you don't need the 'nooverrides' option should instead state that you do need it. http://wiki.easyuo.com/index.php?title=Tile

Empowering the script writer was a theme to Cheffe's work and if you step back to consider it, it makes the most sense. His objectives can be seen with his blunt explanation that giving simple and direct control, where the script may have to include more statements to accomplish something, is more appropriate than making a bunch of commands to do lots of steps behind the scenes. Here is an example over at easyou where Cheffe mentions priority giving control to the script over the parser: http://www.easyuo.com/forum/viewtopic.php?f=2&t=53155&start=45#p431206

Fast forward to the UOP file era and nice tools like Neo's to extract MUL files from UOP files, but do not build the now missing verdata file set (there is no verdata*.uop files...) and even the production shard playing no longer has a verdata file. If you had a former copy of the installation to copy forward those files, then you would still have these superfluous files and would never notice the 'tile init' hanging without modifying the statement to now read 'tile init nooverrides'.

Gaderian

3
Crafting / Gaderian Simple BOD sorting
« on: January 01, 2022, 11:47:54 PM »
This is dependent on books setup named appropriately. There are 3 setup per craft skill. There are ways to get it to run through the sort with some manual effort and get it to end up fully sorting the book. It will sort if you empty 100 bods into your backpack - then it loads these into the book adding them in order - so there is some sorting element to the large and corresponding small bods.
There is a miscellaneous book for each skill. These are what I consider the junk bods - really these are just smalls that have no corresponding match for a large bod.

Books are named:
Alchemy Small to Large
Alchemy Small
Alchemy Miscellaneous
Blacksmith Small to Large
Blacksmith Small
Blacksmith Miscellaneous
Carpentry Small to Large
Carpentry Small
Carpentry Miscellaneous
Cooking Small to Large
Cooking Small
Cooking Miscellaneous
Fletching Small to Large
Fletching Small
Fletching Miscellaneous
Inscription Small to Large
Inscription Small
Inscription Miscellaneous
Tailor Small to Large
Tailor Small
Tailor Miscellaneous
Tinker Small to Large
Tinker Small
Tinker Miscellaneous

I stacked all these so I can stand in the middle and reach any.
This is the script I wanted to add more sophisticated sorting to so that it would use multiple intermediate books to complete a Merge-Sort operation. I doubt that will happen by me.

Some clever person could make that happen and front end these with a script and a pretty menu to drive all the scripts.

This has a very simple structure to accomplish the sort decisions, but it is not fast. Since I said that up front, it means no one else needs to say it.

I also know there is not one for Cooking. My opinion on Cooking BODS is reflected by that fact.

You have loose bods in your backpack and stand close enough to the books. Run the respective script for the skill.

The last attachment, BODPoints_Smith.txt is for calculating the points from turning in a Blacksmith BOD. This kind of evaluation can be the basis to sort by reward type. I only put that together for Blacksmith to assist another forum member, MeWonUO. It is just an idea for a different way to go about sorting. That doesn't run, but is simply a routine to be implemented in a BOD sorting script. It could be expanded to do other craft skill BOD point calculations.

4
Crafting / Bod Filler Expanded to Newer Craft Options
« on: September 05, 2021, 07:40:53 AM »
Well it is finally here, the BodFiller update to include other craft skills!

Knowing full well that users will just click to download and try to run it, I will put the warnings here at the top where no one will read it. ;)
  • Because of expanded resources, it was necessary to allow more than 1 open secure. There is a checkbox to allow this or not.
  • This has some functionality directly from Snicker7's bodfiller, where it would combine blacksmith and tailored items into SBods that are in your backpack. That is still true for most items, however there are a few exceptions.
  • The script will pull product to combine with the SBod from the primary secure that you select. That resource container is not safe for anything you DO NOT WANT to combine with an SBod.
  • Script prompts in game are different when you have reward cloth in your backpack. DO NOT store reward cloth in your secures where resources are pulled or the script will fail due to OSI extra prompts!

    To prevent combining your precious items, here are some hints:
    Tinkering:
    • Rings and bracelets you do not want combined from main backpack or secure into Ring/Bracelet SBods
    Inscription:
    You will need a full necromancy and mage spellbook in your main backpack level to scribe spells, so here is what prevents those 2 books from being combined with SBod for those:
    • Necromancer/Magery Spellbooks should be a non-default color or have at least 1 spell added to it.
    • Bulk Order Books should be named, be a non-default color, or have at least 1 bod added to it.
    • Runebooks should be a non-default color or be named.
    • Runic Atlas should be a non-default color or be named.

Code: easyuo
  1. ===================================================
  2. ; Script Name:  s7BodFillerX
  3. ; Author:  snicker7, Gaderian
  4. ; Version: 3.14.15.4
  5. ; Client Tested with: 7.0.90.16
  6. ; EUO version tested with: 1.5
  7. ; Shard OSI / FS:  OSI / FS
  8. ; Revision Date:  09/28/2021
  9. ; Public Release:  09/23/05
  10. ; Global Variables Used: no
  11. ; Purpose:  Fills all smith, tailor, carpentry, cooking, inscription, alchemy,
  12. ;                fletching and tinkering large BODs and small BODs.
  13. ;  Extremely easy setup, automatic. Also callable to fill a specific BOD from within another script
  14. ;  should you so wish to do that.
  15. ;  Works flawlessly on both EA shards AND RunUO Post-AOS freeshards!!
  16. ;  Packy support and dropping finished BODs to a container or BOD book.
  17. ;====================================================

Knowing full well that users will just click to download and try to run it, I will put the warnings here at the top where no one will read it. ;)

What works well:
The good news is that most bods work well on EA/OSI where it has been extensively tested. I have little feedback from the testers on freeshards yet - so if you want to run it there, I am including some helpful information in the next post.

What doesn't work:
Filling LBods when selecting a container to drop the finished BOD (because the SBods are no longer in your backpack!)

Carpentry:
Music Stand - there are tall and short music stands, both SBods are called 'Music Stand' with a picture of which one to fill. I am too busy to add a pixel check, so these are simply skipped. As of September 5, 2021 it is commented out in Craftinfo_2021.txt.

Anything from Alchemy, Carpentry, Cooking, Fletching, Tinkering that requires crafting the ingredient to make the SBod fill item.
Some skills only have a few that are easily handled by pre-crafting the components:

     Craft Skill          Product/Fill item          Components not crafted     
     Fletching          Arrows          Shafts
     Fletching          Crossbow-bolts          Shafts
     Carpentry          keg          barrel hoops, staves and lids
     Carpentry          Furniture items          Wrong orientation - see below
     Tinkering          clock     clock frame, clock parts
     Tinkering          axle with gears     axle, gears
     Tinkering          potion keg     keg, lid, barrel tap
     Tinkering          metal container engraving tool     gears, springs
     Tinkering          sextant     sextant parts
     Inscription          Runebook          gate travel, recall scrolls
     Inscription          RunicAtlas          gate travel, recall scrolls
     Cooking          Baking          unbaked preparation
     Cooking          many          open sack of flour - read note below
     Cooking          Dough, Sweet Dough          These stack and can be exceptional - not sure the script can grab exceptional.
     Cooking          Cookie mix, cake mix          These stack and can be exceptional - not sure the script can grab exceptional.

Carpentry: Note that many carpentry furniture items, the SBod only accepts one orientation. It is the default orientation when first crafted, so if these get shifted and the orientation changes, it may not fill the SBod. In all likelihood the items would accumulate in your backpack until your character is overweight if something causes this. There is no routine written to move the item around to bring it back to the correct orientation for you.

Cooking: Sack of Flour stacks, so it is convenient, but Open Sack of Flour does not stack. The script will not pull a Sack of Flour and open it. The script also pulls probably 30 of an ingredient as a minimum to try to craft enough for any SBod, so with Open Sack of Flour, these are good for several craft attempts (maybe 10? I did not count) before it will be depleted. The script will probably tell you there is not enough to make the SBod quantity. This is probably the logic I wish I had time to fix most, but it is a complete exception to all the other craftables - so it needs a unique fix. I will discuss it in the next post.

Cooking: Exceptional components with same graphic type, but different names are unique to this skill. Many of the graphics are resused but have different names. I did not code for pulling exceptional components and it probably fails the name test. It was reported as a bug, but I do not have time to address this now.

I will say that I have setup exactly the components for all 52 cooking items so the materials can just be pulled and the product created and it works. So in that sense the script does fill the SBod, but I do not consider cooking generally working as well as the other craft skills. It is not as smooth as the other skills.

My thanks goes out to many in the Scriptuo community who worked together to make this project come along.
Kandie
Moonbeast
Thargorff
REEFHAWK
Caines
Formerlyrara
Hitechs

Thargor and REEFHAWK tested everything and reported back or gave me copies of bods that did not work so I could test specific cases. This project would not exist beyond a base discussion without their relentless hours and excellent feedback.
Hitechs worked with the ServUO (trueuo/Heritage) to get inscription working.
Caines and Hitechs did the majority of the typing to expand the craftinfo script with all the different types. I worked on part of it and mostly cleaned it up, but my fingers would have fallen off this year if not for all the help by the team.

Configurable Options:
Code: [Select]
set %PullResourcesOpenCont #true ; Allow resources to come from multiple containers - any that are open
set %CharacterManaMeditation 30 ; this is the value when the script will attempt to meditate to full mana for Inscription
if #maxmana < 30
  set %CharacterManaMeditation 1
set %AdjInitMenuX 0 ; move initial menu left or right by setting negative or positive number
set %AdjInitMenuY 0 ; move initial menu up or down by setting negative or positive number
set %AdjCountMenuX 0 ; move counting menu while crafting left or right by setting negative or positive number
set %AdjCountMenuY 0 ; move counting menu while crafting up or down by setting negative or positive number
Combine slayer spellbooks that are crafted by changing
Code: easyuo
  1. set %SL[slayername] #true
The various slayer names are all listed. If you happen to craft a slayer book, it will accumulate in your backpack today. The default is to keep these aside because of the
Code: easyuo
  1. set %SL[slayername] #false
setting for each.

Known Issues:
  • Tailor cloth LBods can be satisfied with any material leather footwear. The script has no special logic to match a specific SBod footwear with a cloth LBod. What this means is if you have a footwear LBod that needs Exceptional & Barbed and a Cloth LBod where you expect it to fill with plain leather, the script will combine whatever match it finds first that works. If it does the Cloth LBod before doing the footwear LBod, it may satisfy it with the Barbed one that you do not want.
  • Tinkering: LBod Tools can be Normal only, while the SBods can be Exceptional - these will not be combined because Normal <> Exceptional
  • Carpentry: Music stand can be short or tall only which is matched by the picture on the gump, not by the name. Currently commented out (disabled) from craftinfo file.
  • Inscription: Meditates when mana falls below %CharacterManaMeditation and retries to meditate each 10.5 seconds - which can stop a successful meditation period. Defaults to 30 mana when it tries to meditate or mana required > your current mana.
  • Inscription: Combines plainly crafted mage and necromancer spellbooks, plain runebooks, runic atlas and bulk order books from your main backpack or primary secure.

Wish list for enhancements (but with no priority or timeline in sight):
  • Equip appropriate talisman to boost success rate (user would have to define those - maybe have them in a container)
  • Fix music stand determination
  • Open Sack of Flour from 'sack of flour' (double click one)
  • Open Sack of Flour - better resource calculation to have enough to craft 30 attempts = full stack
  • Move finished Bods after trying to fill LBods (currently moves SBods and then has none to fill LBod at the end)
  • Clean up freeshard determination logic to 1 place in the script
  • Clean up the script settings into a subroutine
  • Expand menu offering to include all the settings
  • Save settings by shard/character
  • Rather than trash some items, either unravel or drop into a bag to allow unravel later

Must Read!
  • Read the part at the top about how to name and color your personal spellbooks, necromancer spellbooks, runebooks, runic atlas and any BOD Books you may have in your backpack or in your primary secure.
  • This requires a trash can or venus flytrap in reach to dispose of items. Even if you are only doing blacksmith bods which can be recycled, for script efficiency it will demand you have the trash option in reach. It only trashes stuff it can't recycle which don't match the SBod.
  • The file 'craftinfo_2021.txt' must be stored in the same directory where you run Easyuo so it is found when called. (When the freeshard version is updated, it will have the same requirement.)
  • Script prompts in game are different when you have reward cloth in your backpack. DO NOT store reward cloth in your secures where resources are pulled or the script will fail due to OSI extra prompts!

Version 3.14.15.1 fix for named tinker items with resource in name
Version 3.14.15.4 fix for freeshard use with a new routine ShardOffsets where specific code for a shard can be added to adjust click locations
s7BodFillerX.euo V 3.14.15 (d/l 20 times)
s7BodFillerX.euo V 3.14.15.1 (d/l 2 times)
s7BodFillerX.euo V 3.14.15.2 (d/l 6 times)
s7BodFillerX.euo V 3.14.15.3 (d/l 36 times)
s7BodFillerX.euo V 3.14.15.4 (d/l 1 time)
craftinfo_2021.txt V 3.05 (d/l 30 times)

5
Crafting / Gaderian's Refinement Amalgamator
« on: November 13, 2020, 09:44:30 AM »
Here is my armor refinement amalgamator script.
Oracle and I had been collecting lots of refinements to apply to some armor. I don't really like doing all the combining manually, so I wrote this to help us. He generously gave of his time to test and provide feedback. In the end I feel it is worthy of sharing here.

Along the way The Ghost also ran it through testing and confirmed it worked for him.

What you need to do to run this?
1) stand within reach of a secure container with your refinements.
2) have an amalgamator either in your backpack or in the secure that is not partially combining refinements.

Run the script and target your container.
It takes some time to run, so be patient.

It will put the amalgamator tool back into the secure when it's done.
It asks you to target the container to get the refinements. That limits the usefulness to about 120 or so refinements. A future enhancement could add a menu and make the container selection allow more than 1 container.

Please report any issues and I'll see what I can do.

Gaderian

6
Script development tools / Armor Inherent Lower Mana Cost
« on: September 09, 2020, 11:29:00 PM »
These are the routine I use to calculate Inherent LMC on non-medable armor.
These LMC values do not need LMC as a distinct property on the armor, but are in addition to any LMC property on the equipped items for the character.

The really valuable piece is the documentation for which armor pieces grant 1 or 3%.

Gaderian

7
Script development tools / Gaderian's Gump script helper
« on: April 30, 2020, 08:01:23 AM »
So I wrote this recently and find it very useful. It will report the information about the gump with focus.

It makes for an easy way to read the relative click locations, some of the #CONT variables.

This is a menu based, so it sits off the side nicely tucked away when writing code.

There is a line in the beginning that is commented out in the attached version which can make all gumps visible (ignorecont reset). With that you can see lots of stuff that is normally hidden from script interaction.

Gaderian


8
Scripting Tutorials / EasyUO Documentation Updates
« on: January 22, 2020, 09:41:55 PM »
Here are changes to Easyuo that are not readily documented as of Easyuo 1.6.334 January 23, 2020.
Obsolete Commands
 event sleep
 menu image pixline - was rarely used, but can be accomplished with a subroutine
 menu hideeuo

Modified Commands
 event macro

Category/SkillParm1Parm2Parm3CastNotes/Power Words
Gump Control
820Open Mysticism Book
821Open Racial Abilities Book
823Open Global Chat
918Close Spellweaving Book
920Close Mysticism Book
921Close Racial Abilities Book
923Close Global Chat
1018Minimize Spellweaving Book
1020Minimize Mysticism Book
1021Minimize Racial Abilities Book
1023Minimize Global Chat
1118Maximize Spellweaving Book
1120Maximize Mysticism Book
1121Maximize Racial Abilities Book
1123Maximize Global Chat
Dress and Arm macros
610 to ??Save DressParm2 is a number to reference a saved dress (official doc shows 0-4, but I have used numbers from 0 up to 100)
620 to ??UndressParm2 value to reference a saved dress
630 to ??DressParm2 value to reference a saved dress
640 to ??Save Armed ItemsParm2 value to reference a saved armed weapons/shields/books
650 to ??DisarmParm2 value to reference a saved armed configuration
660 to ??ArmParm2 value to reference a saved armed configuration
Use Object
67parm1Parm1 is a value from 1 to 14
671Use Healing Potionconfirmed
672Use Cure Potionconfirmed:cure, lesser cure and greater cure in backpack - greater cure consumed
673Use Refresh PotionNeeds Confirmation
674Use Strength PotionNeeds Confirmation
675Use Agility PotionNeeds Confirmation
676Use Explosion PotionNeeds Confirmation
677Use Conflagration PotionNeeds Confirmation
678Use Enchanted AppleNeeds Confirmation
679Use Petals of Trinsicconfirmed
6710Use Orange Petalsconfirmed
6711Use Trapped BoxNeeds Confirmation
6712Use Smoke BombNeeds Confirmation
6713Use Healing Stoneconfirmed
6714Use Spell Triggerconfirmed
MasteriesCredit to Endless Night for these mastery definitions and showing how to find more
Provocation15701InspireUus_Por
15702InvigorateAn_Zu
Peacemaking15703ResilienceKal_Mani_Tym
15704PerseveranceUus_Jux_Sanct
Discordance15705TribulationIn_Jux_Hur_Rel
15706Despair Kal_Des_Mani_Tym
Magery15707Death RayIn_Grav_Corp
15708Ethereal BurstUus_Ort_Grav
Mysticism15709Nether BlastIn_Vas_Xen_Por
15710Mystic WeaponVas_Ylem_Wis
Necromancy15711Command UndeadIn_Corp_Xen_Por
15712ConduitUus_Corp_Grav
Spellweaving15713Mana ShieldFaerkulggen
15714Summon ReaperLartarisstree
Passive:Magery, Mysticism, Necromancy, Spellweaving15715Enchanted Summoning- passive
Bushido15716Anticipate Hit- passive
15717Warcry
Passive:Bushido, Chivalry, Ninjitsu15718Intuition- passive
Chivalry15719Rejuvenate
15720Holy Fist
Ninjitsu15721Shadow
15722White Tiger Form
Archery15723Flaming Shot
15724Playing the Odds
Fencing15725Thrust
15726Pierce
Mace Fighting15727Stagger
15728Toughness
Swordsmanship15729Onslaught
15730Focused Eye
Throwing15731Elemental Fury
15732Called Shot
Passive:Archery, Fencing, Mace Fighting, Swordsmanship, Throwing15733Warrior's Gifts- passive
Parrying15734Shield Bash
15735Bodyguard
15736Heighten Senses
Poisoning15737Tolerance
15738Injected Strike
15739Potency- passive
Wrestling15740Rampage
15741Fists of Fury
15742Knockout- passive
Animal Taming15743Whispering
15744Combat Training
15745Boarding- passive
Virtues
495Honesty(not activated this way)      npc merchant discount (return lost items/lost+found boxes  banks/forensic:2x@town,4x@npc, more in fel)
496Humility
498Spirituality

 exevent popup [id] {x offset} {y offset}
- X and Y pixel offset must be used - can't use an ordinal offset
 menu delete [element unique name]
      All elements below the chosen element are deleted as well.
      All elements on a form are deleted when the form is deleted.
      All elements with a panel as it's parent are deleted.
 menu Shape {name} {left} {top} {width} {height} {shapetype} {linetype} {linewidth} {linecolor} {filltype} {fillcolor}
      No more rounded corners or line effects. See the post about updating menu code for more information.

These menu commands only form0 (form name for classic menu window):
 menu clear
       [all child forms are deleted and #menubutton uninitialized (used to be initialized to N/A]
 menu font align { left|center|right }
 menu font bgcolor [color-descriptor]
 menu font color [color-descriptor]
 menu font name  [font-name]
 menu font size  {point-size}
 menu font style {b|i|u|s}
 menu font transparent [ #true|#false ]
 menu show
 menu window color  {color-descriptor}
 menu window transparent [ opacity percentile ]
 menu Window Size {width} {height}


New Commands
 exevent equip id id id ... ; instant dress
    This is a very fast way to equip items. It will replace items in that slot. It works with gargoyle items (exevent droppd doesn't work with gargoyle items)

 event statbar #charid
    Brings up the health bar for the character, npc, follower or monster. A maximimum of 9 status bars can be active at any one time.
    Once successful these will be set:
    #CONTNAME = status_gump
    #CONTID = ID of mobile
    #CONTTYPE = TYPE of mobile
    #CONTHP = percent of health

 menu form [form unique name] left top width height [text]
    Note:
    • menu setprop [form unique name] visible #true is required to make it viewable.
    • Values are not inherited from the default, so menu setprop [form unique name] color $BBGGRR is needed to set the form color.

 menu getdef [option name: will be returned in #menures]
 menu panel [panel unique name] left top height width
   A panel is a container for menu elements. Each menu element has a parent - which is either a form or a panel.
   When an menu element is created, whatever the current default parent is inherited, but can be reassigned using menu setprop [element unique name] parent [parent element name].
 menu popdef
   This restores all menu setdef settings to the values prior to menu pushdef command.
 menu pushdef
   This can be used to protect any current default settings for a temporary setting. The primary goal is for library routines to be able to protect their settings from interfering with the calling script's settings. It serves as a protection for the menu default settings similar to how namespace commands do not interfere with script/library variables.
 menu radio [radio_unique_name] left top width height [checked: #true/#false] [labeled text...]
   Radio buttons limit only one in the parent form or panel to have a #true value.
   This behavior matches a listbox, while typically taking up more screen space for a quicker and more direct user interaction.
 menu setdef [alignment|color|fontcolor|fontname|fontsize|fontstyle|parent] [value]

    setdef and getdef are used for the DEFAULT options that may be inherited by subsequent menu commands
 menu setprop [element's unique name] [option #spc value pair]
Parameters for GETDEF, SETDEF (the 7 listed below applying to "DEFAULT") and SETPROP (all listed options)
      OptionValuesThese can be applied to the following menu elements
      alignment [0=left|1=right|2=center]TEXTRADIOCHECKDEFAULT
      color     [hexadecimal $BBGGRR blue, green, red (Pascal format)] *See notes for menu form above.FORMPANELTEXTBUTTONEDITRADIOCHECKCOMBOLISTDEFAULT
      checked   [#true|#false]RADIOCHECK
      enabled   [#true|#false]FORMPANELTEXTBUTTONEDITRADIOCHECKCOMBOLISTIMAGE
      fontcolor [hexadecimal $BBGGRR blue, green, red (Pascal format)]TEXTBUTTONEDITRADIOCHECKCOMBOLISTDEFAULT
      fontname  [name of font]TEXTBUTTONEDITRADIOCHECKCOMBOLISTDEFAULT
      fontsize  [font size number]TEXTBUTTONEDITRADIOCHECKCOMBOLISTDEFAULT
      fontstyle {sum of style attributes} ; 1=bold, 2=italic, 4=underline, 8=strikeoutTEXTBUTTONEDITRADIOCHECKCOMBOLISTDEFAULT
      height    [# of pixels]FORMPANELTEXTBUTTONEDITRADIOCHECKCOMBOLISTIMAGE
      left      [# of pixels]FORMPANELTEXTBUTTONEDITRADIOCHECKCOMBOLISTIMAGE
      parent    [form or panel name where the element resides]PANELTEXTBUTTONEDITRADIOCHECKCOMBOLISTIMAGEDEFAULT
      text      [text]FORMTEXTBUTTONEDITRADIOCHECK
      tooltip   [text description used as tool tip when mouse hovers over element]FORMPANELTEXTBUTTONEDITRADIOCHECKCOMBOLISTIMAGE
      top       [# of pixels]FORMPANELTEXTBUTTONEDITRADIOCHECKCOMBOLISTIMAGE
      visible   [#true|#false]FORMPANELTEXTBUTTONEDITRADIOCHECKCOMBOLISTIMAGE
      width     [# of pixels]FORMPANELTEXTBUTTONEDITRADIOCHECKCOMBOLISTIMAGE


 ignorecont [#contid|#contype|#contname|reset]
    Ignorecont is used to ignore gumps. It is restricted to a single definition at a time, so each definition will have its own ignorecont statement.
    It can ignore by #contid or #conttype or #contname.
    Issuing "ignorecont reset" will remove all ignored gumps. The example routine "resetgumps" will restore the default ignored gumps at EUO startup.
[/list]
Code: easyuo
  1. sub resetgumps
  2.  ignorecont reset
  3.  ignorecont BARK_GUMP
  4.  ignorecont DAMAGENUMBERS_GUMP
  5.  ignorecont DUMB_GUMP
  6.  ignorecont GAMEAREAEDGEGUMP
  7.  ignorecont MAP_GUMP
  8.  ignorecont MENUBAR
  9.  ignorecont MISSILE_GUMP
  10.  ignorecont NEW_ITEM_PROP_GUMP
  11.  ignorecont RETICLE_GUMP
  12.  ignorecont TARGET_GUMP
  13.  ignorecont UNICODE_BARK_GUMP
  14. return

 event conttop [number]
    Event conttop will cycle through gumps. The number is simply an index for the command it has nothing to do with a number tied to any particular gump.
    When the command is issued, the gump will become the most recent gump in the access order. Running the same routine will reverse the order of gumps.
Code: easyuo
  1. for %i 0 100
  2.  {
  3.  event conttop %i
  4.  if #contname <> %lcontname || #conttype <> %lconttype || #contid <> %lcontid || #contsize <> %lcontsize || #contposx <> %lcontposx || #contposy <> %lcontposy
  5.   {
  6.   set %lcontname #contname
  7.   set %lconttype #conttype
  8.   set %lcontid #contid
  9.   set %lcontsize #contsize
  10.   set %lcontposx #contposx
  11.   set %lcontposy #contposy
  12.   }
  13.  else
  14.   break
  15.  }
  16. display ok How many gumps found: %i ; %i is 0 based so final value is the count

Some notes about the dress/arm macros
Event macro 61 and 64 (saved dress/arm respectively) uses a number to keep track of the dress. I ran it repeatedly to > 50 and it continued to swap my armed items.
Maybe there is an upper limit (255 might seem logical), but somewhere before 50 I run out of various outfits I can carry.

For my sampire, I use:
1) my PVM outfit
2) post resurrectiion high LRC, high MR, high LMC +skill (meditation, necromancy, focus) suit
3) 2 handed weapon (double axe) - double strike weapon, whirlwind
4) 2 handed weapon (bladed staff) - armor ignore
5) 1 handed weapon (radiant scimitar) - whirlwind allowing potions
I do have some setups with a variety of weapons for various hit spell (hit fireball, hit lightning, hit dispel) depending on the situation.
I also will engage various slayer type weapons.
I do not happen to, but could include a high luck suit for the kill moment.

I am still well short of 50+ configurations. While the client seems to indicate 4 saved slots, I am pushing it beyond that.

It needs at least a wait 15-16 (.75-.8 second) between each action as a cool down for my cable internet connection. Since about 1 second is the standard cool down for most "actions" - that gets my best recommendation unless you have a very slow connection. You just won't switch outfits/weapons that often that a .25 second difference will be that dramatic. That cool down may apply to 'USE" actions that immediately follow (event macro 17, etc.).

While exevent equip is also practically instant, these macros have the fast save and fast unequip options. If you have all 18 slots with something equipped, it will take many seconds to undress your former outfit with the forced cool down between drag/drop steps. The event macro 62 can strip 16 of the slots (non-hand slots) in < 1 second including cool down.

I only use the 62 (undress) and 65 (disarm) macros for specific things. 62 is excellent for removing a talisman (slayer) to avoid extra damage from opposing slayer group. 65 is excellent for swapping weapons/shield to prepare for anti-bloodoath and ready for potion drinking.



9
Scripting Tutorials / New Menu Code and how to adapt old scripts
« on: January 14, 2020, 05:58:26 PM »
This will have several parts to it which I will post below.
This is Part 1 with a general overview.
Part 2 will have code comparisons of the old vs. New code for menu's.
Part 3 will have "How To" examples to accomplish things.

I am not covering how to use the menu creation tool that Cerveza covered in the Sticky Menu post.

Menu: Part 1
It has been a while since the menu code was updated. At first it seemed a little confusing to implement because I had always used the Menu Designer and the old version of EUO. I made very few modifications without that tool.

There is no tool to create the new menus and it has 2 affects:
1) The nice new features are not being used by new scripts
2) Old scripts and styles are often broken

There are not a lot of examples on how to write good menu code now. I have been offering to modify old menu code that isn't working in scripts for others and decided that a simple guide might help.

What happens to old menu code? Does it still work or simply break scripts?

The old menu code can still work and most of it's features are still there. That is the good news. The bad part of this is that the rules are more strict now. If the original script didn't follow the current (revised) rules, then it is very easy for the menu to break. It will seem like a script will either not work or work intermittently and require stopping and restarting to get it to function again.

My goal is to make clear the rules that a programmer needs to follow and show some common ways to get around what used to be "the method" to have dynamic menus.

The old menu code would allow a single menu vs. the new menu code allows multiple menus.
This makes the new menu code more efficient and flexible than the old way.

There is 1 basic rule:
Each element on the menus must have a unique name. (Re-using names will cause it to break.)

Functional Changes with new menu system:
menu shape is really emulated via "menu image... "
Old menu creation commands vs. New menu creation commands
 New menu commands create forms that are 10 pixels larger in both the X and Y axis than the original commands. This leaves additional space on the right edge and bottom edge of menu's. If you are really dependent on screen real estate - this may affect your overall screen layout. Offsets for where everything is placed is correct, just that the form is larger.

Restrictions:
menu shape can't have dash lines or rounded corners
menu transparent only applies to old menu code
menu font transparent only applies to old menu code

A few commands no longer exist:
menu image pixline (this could be accomplished with a sub to process the data to draw the line with pixel/line statements)
menu hideeuo

New additions:
Panel
Radiobutton
pushdef
popdef
setdef
getdef
setprop
Every element has a parent (along with other new properties)


Logic changes:
If a script used multiple menu's in the past, it was done with "effects". Maybe it would create a menu for setup, then clear it and recreate the menu for running the script.
It could have a button to go to the setup and what would be done:
 -clear the running script menu
 -rewrite all the setup elements
 -get the information
 -clear the setup menu
 -rewrite the running script menu all fresh
Separate forms (menus) can be created now and simply use "setprop [formname] visible [#true|#false]" to hide one of the other to accomplish the former behavior. The good part is that the menus do not need to be recreated, but can simply be updated and change the visible setting.

The old system could change a Text element with 'menu set [text]', but all too often the script would delete the former element and create a new element in it's place with the same name. (This is the most common violation of the new rule to have unique element names, by the way, and usually makes the menu "break".)

If the old system needed to display some message, an ad hoc 'menu text' element was defined and then subsequently deleted. It would be recreated the next time the message
was displayed.
Similar code was in use often to make buttons, then change the button place function by deleting/creating a new button in it's place.

This method of delete/create violates the unique element name requirement now.

How to revise the delete/create code?

There are several functional examples in a post below, but here is the concept:

Create a subroutine to create all the menu elements  that will be used in the script.
This is nice because all restructure changes in one place, too.

Now set the visibility #false on each of the elements you want to use later, but don't want displayed all the time:
Code: easyuo
  1. menu button Mybutton 10 10 30 20 My Button
  2. menu setprop Mybutton visible #false

Later in the routine where you want to bring forward the element, you can set the element
you want to turn off to invisible, while changing the "hidden" element to be visible:
Code: easyuo
  1. menu setprop ActionButton visible #false
  2. menu setprop Mybutton visible #true
  3.  
  4. ... Do some stuff in your script ...
  5.  
  6. ; restore the buttons:
  7. menu setprop Mybutton visible #false
  8. menu setprop Actionbutton visible #true

Former "#menures = Closed" value only works for form0.
All other forms when the "X" at the top right is clicked will set #menures = [formname]

Old code anamolies:
menu clear
 Deletes all forms except for form0 (the classic menu)!
 sets #menubutton to nothing (used to be N/A)
 running old scripts require setting #menubutton to N/A after menu clear statements to behave the same as previously.
Menu delete/Menu [create] looks like it worked, but clicking on a button is unresponsive  use the visible #false/#true method to fix it

Color Rules and Changes:
Named colors of Windows 'Theme' only works with old method of creating windows and the Pascal named colors do not work with new menu
Attached to this post is a subroutine that can be called to set colors to variable names.
 -addresses many usable colors (including a direct correlation to the old color values).
 -creates all the windows 'theme' values as variables with settings for a default windows theme. If you want to change your theme colors you can adjust the
settings in the ColorNameSub.txt routine.
Save the attached file in your Easyuo directory and call it during script setup to make the color variables available to your script.
Where the Easyuo commands could reference "red" or "black", now you would reference a variable named "%red" or "%black" respectively. Many colors are included in the subroutine.

Groupings by new property Parent:
All elements have a parent. It could be a form or a panel.
The parent is inherited by the current default parent.
 -The default parent is either the most recently created form or panel or established using "setdef parent [form or panel name]"
 -Changed after element creation using "setprop [element] parent [form or panel name]"
All Radio buttons in the same parent - only 1 can be 'checked', others in the same parent are automatically turned off. So in order to use multiple groups of radio buttons, use panels to keep each group of radio buttons.

Menu font deprecated and defaults expanded to include other properties:
menu setdef replaces all but "menu font transparent"
menu getdef allows seeing the settings

Pushdef/Popdef allows protected logic elsewhere so you can have your own settings.
menu pushdef
menu popdef
If you will create your own menu to go with a routine, you would structure it enveloped inside the pushdef/popdef commands.
Instead of using Display, you could create a menu form that displays the message. This would work in called libraries and the menu can live after the library call is done.

10
Submit your Script / Powerscroll Organizing and Combining
« on: January 13, 2020, 06:22:36 PM »
This is my Powerscroll organizer.

It has some very specific requirements. There will be issues if those are not followed.

Setup:
  • 8 Powerscroll books locked down within reach (2 tiles of character)
      Note that levels 105, 115 and 120 need 1 (2 work better) while 110 requires 2 to guarantee enough scrolls to make matches available
  • 2 secure containers in reach:
    • holds scroll binders
    • holds unsorted Powerscroll books (These are called Raw in the script)
  • Start the script and the menu shows up.
  • There are a set of green books and red books. The button to the left of the green books or red books in the "Sorted" box are used to target the respective books. There is a green book for each PS level 105, 110, 115 & 120. Press the green small button then target the respective book you have locked down to use.
    Repeat these steps for the red books.
  • Press the button for Raw... then target the container with unsorted Powerscroll books in that container.
  • Press the button for Scroll Binders... then target the secure with fresh scroll binders.
Now that setup is complete, you can use it to process scrolls.
The setup options (check boxes) are not really dynamic - meaning if you uncheck/check one while Sort/Inventory/Combine is processing - it may/may-not be honored until the next time you choose a process.

Checkboxes:
These are described to the immediate right of each button:
Inventory:
  • Sort Finished - move scrolls from the sorted books into other categories or not?
  • Target When Book Full - not sure how well this works, but if unchecked it will try to automatically roll over to the red book (or green book) if the current book for that level is full. If you check it, then it is supposed to pause and wait for you to target which secured book you want to move scrolls into.
Sort:
  • Do you want to sort 105/110/115/120 scrolls? check them all. Want to only sort 120 scrolls into a book, then uncheck the others you don't want.
Combine:
  • Do you only want to combine 105/110/115 scrolls? Set as you wish.
  • Include Raw means do you want to go through the Raw books to see if any scrolls match the current skill and PS level. Unchecked by default because it is *slow*. I recommend sorting Raw into sorted and use only the sorted books to combine.
Buttons:
Inventory - Read the contents of all books
Sort - Move scrolls into Sorted books by category
Combine - If any inventory is sufficient to create a full binder and create the next higher level scroll, pull those from books, pull a scroll binder, combine these and place the resulting new scroll into the appropriate Sorted Level Book.

Pause - pauses the script operation and works in most routines after a reading the current OCR
Empty Book - removes as many scrolls as possible up to your weight/item limit
Fill Book - moves all scrolls in your back pack into the secured book of your choice

Quit - Quits the script operation...

Minimal Execution to Combine Scrolls:
  • Follow Setup steps above
  • Press Inventory
  • Press Combine

This requires KalOCR to read the book data. I will include the version here.

This is not the fastest way to process the data, but it does work with minimal house lockdowns. That was part of the criteria of this project. The original design was to keep item counts to a minimum. It is the old adage about you want speed/quality/cost ... pick any 2. ;)

Known Issues (Version 1.4):
  • Books become full - any scrolls in main backpack will be placed into the next book where scrolls are added
  • When a scroll is added, the current book closes and the script moves to the next skill (rather than complete the current skill to combine more scrolls)

Wish List of Enhancements/Fixes (Version 1.4):
  • Save Setup
  • Simple keep known data of books (if book count is same... assume contents are the same; if book count different... force re-Inventory book)

11
I have a script I worked on this past year that can organize and combine Power scrolls. It requires some locked down books to hold the PS and a secure with scroll binders already made.

It has a known issue that is modestly complex to fix - mostly because of how I got there in the design. If I had known it was an issue at the start, I could have done it differently, but I did not know that books get closed when you add a scroll. Basically, I need to add a routine that will open up the book again after adding scrolls to any book... not a big deal, but I would have done it differently if I had known that up front.

I am posting here to see if anyone has an interest in such a script. If there is interest, I will look at fixing the bug and getting it released.

The bug remaining only shows up once in a while... it is dependent on how many scrolls are getting processed. If a single scroll is being processed, then it will combine the first one, then proceed to the next skill - which looks very successful.
However, if there are 2 to combine, then it combines the first one and struggles to complete the second one. It sometimes adds the lower level (not yet combined) scrolls into the next PS book.

There is a second "bug" (notice in parentheses) that when the setup directions are not followed, it will not organize the scrolls correctly. The design setup was for 2 books to hold PS for each level (105, 110, 115, 120). The only level where 2 books are strictly required is for 110. My design to use the books was to keep the lock down requirement in a house to a minimum (8 lock downs, vs. upwards of 1000 lock downs of loose PS in secure containers).

So, is there any interest in such a tool? or is it just a pretty menu system on my PC EUO folder?

Gaderian

12
Character skill advancement / Gaderian's Remove Trap trainer
« on: October 04, 2019, 07:55:05 PM »
No one has a modern Remove Trap training script here, so I am cross posting mine from the other site. Someone may benefit from it.

Code: [Select]
;==================================================
; Script Name: Remove Trap Cylinder Training
; Author: Gaderian
; Version: 2.10
; Client Tested with: 7.0.85.15
; EUO version tested with: 1.60 ver. 335
; Shard OSI
; Revision Date: 06/16/20
; Public Release: 07/03/19
; Cylinder Trap Kits are available for purchase from the Oddities Trader at the Lycaeum.
; Start Script up to GM
; Credits to TM's journal scan, Onkelatze for kit open, wait and click routines
;
; version 1.0 7/3/2019 initial cylinder trap trainer
; version 2.0 12/21/19 significant speed enhancement:
;                        *version 1.0 average solve time per puzzle about 100 seconds
;                        *version 2.0 average solve time per puzzle 35-45 seconds
;                                 Note:average < 2 minutes on an initial reset of a partially solved puzzle
;                                      which could also apply to suffering very poor internet connection
;                     - only tests 7 colors - calculates 8th
;                     - only tests 2 to as many slots as needed to determine count
;                     - resets on partially solved puzzle (should improve any lag issues; fixes restarts)
;                     known issue: a puzzle with all 5 slots the same color may break the script, but with the
;                                  current reset it may continue. It can happen 1/32,768 puzzles - so too rare to test.
;                                  The work around if it doesn't self correct is to stop and restart the script.
;                                  If you encounter that, it is more rare than a Blaze Cu Sidhe - consider yourself
;                                  privileged. :)
; version 2.1 6/16/2020 added number of attempts to set each box to assist lag correction
;                       much slower than without it, but can cleanup the testing when the internet isn't playing nice ;)
;==================================================



This was inspired from work from Onkelatze's Remove Trap Circuit trainer. Along with The Ghost, the 3 of us tried to extend his original script to train above 75 skill. The solution finder script I had created gets too slow to work through all the possibilities, so I was searching for another way to train through a script. This was my solution.

I used it to train from 75 to 100.0. While this could train from 0 - GM, I recommend Onkelatze's script to get you to 75, because that is so much quicker than this method. I did test this to rerun it on another character from low levels successfully. I recommend buying up the skill to what is possible though to push it along - if your shard allows it (non-Siege ruleset).

The requirements are to have one of the Cylinder traps (purchase at the Lycaeum from the Oddities Trader) in the top of your backpack with your backpack open (the script does none of that for you. Press play.

I was working on streamlining some of the conditions to make it a little quicker, but ran into some weird states where it would get stuck never completing the puzzle. So I went back to this (the original) and it has been chugging along.

The script works through investigating the trap for clues and then assembles the answer.

I am uncertain how it would behave if a trap's solution was all the same color. It may choke on that or it may reset. If it chokes on it, then it would require stopping and restarting the script. The rarity of that happening though is 1/32768. That would happen approximately once in 800 hours. I am reaching GM in roughly 36-40 hours from 75 skill. So maybe every 20 characters that train might see it happen once. If it gets into a bad cycle... stop/restart works. ;) I did not experience the situation, but walked through the logic to predict what would happen.

Those hour calculations apply to Version 1 of the script.
Version 2 runs in about 1/3 the time. So 75-GM should take about 13-16 hours. The estimate for the 800 hour occurrence gets reduced to 320 hours.

Please give any feedback or success postings.

In order for this to function, it also requires the latest (ver 6.6 or higher) of KalOCR.txt which can be found here:
http://www.easyuo.com/forum/viewtopic.php?f=3&t=53735&p=434545#p434545
Alternatively, here is a non-maintained version of the KalOCR.txt script below that can be used (maybe someone wouldn't be able to access the other one, so I am including it here).

7/11/2020 I added the version 2.1 of the Remove Trap script and version 6.10 of kalOCR here.
The major difference from 2.0 to 2.1 was adding how many attempts it would go through the click settings - because with recent internet congestion while we live in Global Pandemic mode was causing clicks to be missed. In the script it is set to 1 which runs pretty much like 2.0 did, but if you find your clicks are being missed you can increase the number and it will repeat it's attempts to click and can cleanup some behavior to leave this as AFK as possible.

All the versions of the script use pixel scans to do OCR - so you can't run it minimized. If you run into problems, that is the first thing I would verify.

Gaderian

13
This script takes advantage of the masteries for gaining skill in taming.

It checks some basic setup requirements. If it all passes, then it will prompt you to target a pet and it proceeds.
Active meditation, and calculates your LMC at the start (if you need to swap out your suit properties, then restart the script), to keep track of how much mana you require when casting.

Seems to be pretty resilient, since I was able to click on various gumps without it breaking (changing current focus). I also noticed that when disconnected - I reconnected with the script running and it picked up where it left off. The one item is, it needs the status (for mana calculation) when you login again to work smoothly.

It expects you to be on the animal taming mastery (it will not switch mastery for you), and to have appropriate skills. It will verify your skill cap and skill lock status and give appropriate dialogue to match.

I ran this with a variety of meditation, focus, suit configurations and then partied up with my 4x legendary bard to run the peace mastery that boosts party members' regens. Performed well, so I thought I would share it.

14
New member introductions / Gaderian's intro
« on: November 26, 2011, 07:38:33 AM »
Hello!
I started playing UO initially during the T2A period. I played heavily till about 2002. I played a lot and was a member of 3 guilds of people I did not know initially on Catskills. One of my friends started playing on Pacific and upon his return to the game, he encouraged me to join him there which I did for a while. I have played a couple of freeshards, but never found anything that helped me stay there.

A few months back, another former guildmate contacted me about playing again. That got me started and I seem to be hooked once again. I have become keen on figuring out Imbuing, but I lack reagents. I used to gather much of my supplies with my stealth 'toon, but that was on a different account than the one I have active today. It took me 2 weeks back in the day to gm hiding and then reach 90 stealth with my UOA macro running all day and night.

I tend to PvM, but prior to Power Scrolls, I did PvP at times. For a while I had a small house near the island with the temple that spawns dragons and deamons. I worked for months to raise resist on one of my characters. I named my house "Resistance is Futile" due to the slow gains.

Times are a little different, but I have decided that there are easier methods available via various scripting tools. I stumbled upon this site via a Google search related to fixing a script issue and wanted to see what was available here.

I tend to come and go from time to time, but in the end really have enjoyed the game.

Thanks for reading.

Gaderian

Pages: [1]