ScriptUO
Scripting Resources & Utilities => Orion UO Client => Orion UO Scripts => Topic started by: stryder on September 05, 2022, 11:11:01 AM
-
Hi,
I have been enjoying playing with Orion's UO Client.
I started a brand-new script for training blacksmithy.
I am 75.2 in blacksmithy. I have the script make platemail gorgets until iron is less than 20.
To smelt them there is a function that handles that counts the gorgets and then recycles each one.
I am planning to add automation downline to alternate between making blacksmith items and recycling ingots.
Right now, I am just use two hotkeys, one for making the gorgets and one for recycling.
I am new at scripting, btw, if the code is messy.
TY,
Scott
Updates 9/2/23
/*
* Blacksmithy Training Script for the Orion client in Ultima Online.
* This script assists players in leveling their blacksmithy skill
* by automating the process of item creation and smelting.
*
* Before running the script:
* 1. Ensure your character has sufficient resources and tools.
* 2. Make sure to stand next to a forge and anvil.
*
* Author: Stryder
* Date Created: 2022
* Last Modified: 9/1/2023
*/
/*
Changelog
Version 0.0.5 [2023-09-01]
[Feature] Weapon Crafting
Added Platemail gloves for skill level 106.6-108.9
Added Platemail arms for skill level 108.9-116.3
Added Platemail legs for skill level 116.4-118.8
Added Platemail tunics for skill level 118.9-120.0
[Feature] Improved anvil detection functionality.
[Improvement] Modified print statements to dynamically adjust based on tool count.
[Refactoring] Introduced `printBlacksmithySkill` function to standardize blacksmithy skill level print statements.
[Improvement] Enhanced the readability of the main while loop by incorporating the `printBlacksmithySkill` function.
[Documentation] Introduced more detailed comments for crafting items like mace, maul, cutlass, etc.
[Placeholder] Marked sections of the script related to crafting items like platemail gloves, platemail arms, platemail legs, and platemail tunics as "not yet built".
[Bugfix] Addressed an issue in `CreateBlacksmithItem` function where the while loop condition incorrectly checked the blacksmithy skill level. Adjusted the logical OR to logical AND for the skill range condition.
Version 0.0.4 [Unknown Date]
[Bugfix] Changed to use Tinker tool type instead of by serial.
[Bugfix] Fixed script to 'Create Hammer' instead of 'make last'.
[Feature] Weapon Crafting:
Added maces crafting for skill level 40-45.
Added maul crafting for skill level 45-50.
Added cutlass crafting for skill level 50-55.
Added katana crafting for skill level 55-59.5.
Added spear crafting for skill level 59.5-70.5.
Added platemail gorget for skill level 70.6-106.5
Version 0.0.3 [Unknown Date]
[Feature] Script will go into war mode to stop its execution.
[Usability] Prompts user to purchase skill up to 40 if tinkering skill is below 40.
Version 0.0.2 [Unknown Date]
[Improvement] Automated switch from creating to recycling.
[Bugfix] Fixed the issue of only trying to have 5 tools made when out of tools. Now correctly makes 5 hammers.
[Bugfix] Resolved call stack error caused by the program getting stuck in a loop when ingots are < 9 and recycling isn't possible.
*/
/*
---------------------------------
TODO LIST:
---------------------------------
===========================
= FUTURE ENHANCEMENTS =
===========================
- Implement statistics tracking:
• [COMMENT]: This will allow users to monitor their progress over time.
- Track successful vs unsuccessful attempts
- Monitor the number of iron ingots used
- Add an option for users:
• [COMMENT]: This is for users who may not have a high enough tinkering skill but still want to proceed.
- Option to purchase blacksmith hammers when their tinkering skill isn't sufficient
===========================
= REQUIRED FIXES =
===========================
- Noted that after smelting - script said not enough ores detected
- Implement the creation of tinker tool kits:
[COMMENT]: Essential for users who depend on these tool kits.
- Enhance setup:
[COMMENT]: Ensuring users have all the prerequisites before they start will enhance the user experience.
1. Would you like the option to purchase hammers instead of creating them using the tinkering skill?
- Expand the skill levels feature:
[COMMENT]: Expanding the skill levels will cater to a wider range of user proficiency.
===========================
= ADDITIONAL NOTES =
===========================
'Someday' features are longer-term goals and might not be addressed immediately. Considering prioritization is essential.
*/
Updates 9/12/22
I created a new character to test out using this script for leveling up a blacksmith from level 40. He has blacksmithy and tinkering only.
** Fixes needed **
Blacksmithy Trainer -
Version 0.04
WIP: Adding all skill levels
Fixed bug to use Tinker tool type instead of by serial.
Fixed bug to Create Hammer instead of make last
Added maces for level 40-45
Added maul for level 45-50
Added cutlass for 50-55
Added katana for 55-59.5
Added spear for 59.5-70.5
Version 0.03
Go into war mode to stop script from running
Below 40 tinkering skill level prompts user to purchase skill up to 40
Version 0.02
Now switches automatically from creating to recycyling
Trying to have 5 tools made when out of tools - need to debug that section - Fixed makes 5 hammers
Once ingots are < 9 and no more recycling - call stack error as program is stuck in a loop - fixed
To Dos and Someday
Someday: Statistics tracking - successful / unsuccessful, iron ingots Used, etc
Have setting where user can purchase blacksmith hammers instead of tinkering if tinkering is not high enough
** Fixes needed **
Make tinker tool kits
Flow between levels - smelt items before moving onto next new item
In setup:
Add: Are you near a forge?
Add: Do you have ingots?
Add: Option to purchase hammers instead of create them using tinkering skill
Create more skill levels -
70.5-106.4 platemail gorget DONE
106.4-108.9 platemail gloves
108.9-116.3 platemail arms
116.3-118.8 platemail legs
118.8-120 platemail tunics
-
I love Orion, will give this a go sometime this week if time permits. Thanks for sharing!
-
Thanks. I really am a newbie at creating these scripts.
I actually updated today. I automated more of this script for my level.
I attached the new version.
// Blacksmithy Trainer - Version 0.02
//Now switches automatically from creating to recycyling
//Trying to have 5 tools made when out of tools - need to debug that section
//Once ingots are < 9 and no more recycling - call stack error as program is stuck in a loop - try to fix
-
//Once ingots are < 9 and no more recycling - call stack error as program is stuck in a loop - try to fix
Is 9 ingots the most that will be used by anything being crafted? I usually set my crafting scripts to pull more once I am < 25 to make sure I do not run out and it is trying to craft over and over even though I do not have enough ingots.
-
As of right now yes. That will change once I get more setup.
Post Merge: September 07, 2022, 01:16:13 AM
Hi,
Fixed some issues so far and trying to clean up some code. Trying to make a main loop for the program.
Blacksmithy Trainer - Version 0.02
Now switches automatically from creating to recycyling
Trying to have 5 tools made when out of tools - need to debug that section - Fixed makes 5 hammers
Once ingots are < 9 and no more recycling - call stack error as program is stuck in a loop - fixed
Version 0.03
Go into WarMode to stop script from running
Below 40 skill level prompts user to purchase skill up to 40
To Do / Someday
Create more skill levels -
40-45 mace
45-50 maul
50-55 cutlass
55-59.5 katana
59.5-70.5 spear
70.5-106.4 platemail gorget DONE
106.4-108.9 platemail gloves
108.9-116.3 platemail arms
116.3-118.8 platemail legs
118.8-120 platemail tunics
Someday
Statistics tracking - successful / unsuccessful, iron ingots Used, etc
-
Looking good! Make sure to update the main post with the updates scripts so peeps know where to find it.
-
Will do.
TY,
Scott
-
Update script over the last few days. Updated the main post on this with the new version.
- I condensed the code down significantly to make it easier to code. Now only two main functions besides the mail loop. One for creating items and one for smelting.
- I tried testing on test center and it does not work for some reason, on production OSI servers this works fine. I didn't have time to figure out what the difference is, I figure it could be graphic id's maybe??
-Next plan is to finish for leveling a character, you can now automate through 106.4. But I can't test above that yet, due to issue testing on test center
- I also have to flesh out transitions between levels in the main loop, like recycling all the old created items before moving onto the new level.
-I am also planning to flesh out tinkering more in the future. Right now the program assumes you have enough tinkering to make hammers. Also, the program does not make tinker tools yet.
Thanks!!
Scott
-
Just a thought, when I made a bs script for EUO, I had it look for and smelt after each attempt so backpack would not get too full or heavy.
-
Just a thought, when I made a bs script for EUO, I had it look for and smelt after each attempt so backpack would not get too full or heavy.
Good idea. I will need to check weight. TY!!
-
will try it out!
-
Will try. Tanks
-
I was recently looking at this script and updated. :)
Hope it is helpful to others!!
-
I'm going to try. Thanks!
-
Hello from Japan.
I will try this.
-
Hi,
I have been enjoying playing with Orion's UO Client.
I started a brand-new script for training blacksmithy.
I am 75.2 in blacksmithy. I have the script make platemail gorgets until iron is less than 20.
To smelt them there is a function that handles that counts the gorgets and then recycles each one.
I am planning to add automation downline to alternate between making blacksmith items and recycling ingots.
Right now, I am just use two hotkeys, one for making the gorgets and one for recycling.
I am new at scripting, btw, if the code is messy.
TY,
Scott
May I kindly ask you if there is any fix for the smelting part? doesnt matter what i do the items are not being smelted at all.. thanks for the script btw.
**Edited to shorten quote**