Author Topic: New Blacksmithy Script  (Read 440 times)

0 Members and 1 Guest are viewing this topic.

Offline stryderTopic starter

  • Newbie
  • *
  • Posts: 9
  • Activity:
    1.2%
  • Reputation Power: 1
  • stryder has no influence.
  • Referrals: 0
    • View Profile
New Blacksmithy Script
« 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/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

There are 1 attachment(s) in this post. You must register and post an acceptable introduction to download
BlacksmithyTrainer v0.04.oajs
« Last Edit: September 12, 2022, 06:37:27 PM by stryder »

Offline Crisis

  • Global Moderator
  • *
  • *
  • Posts: 2724
  • Activity:
    1.6%
  • Reputation Power: 38
  • Crisis has a powerful will.Crisis has a powerful will.Crisis has a powerful will.Crisis has a powerful will.Crisis has a powerful will.Crisis has a powerful will.Crisis has a powerful will.
  • Gender: Male
  • Scripting well enough to break things!
  • Referrals: 2
    • View Profile
Re: New Blacksmithy Script
« Reply #1 on: September 05, 2022, 05:03:36 PM »
I love Orion, will give this a go sometime this week if time permits. Thanks for sharing!

Offline stryderTopic starter

  • Newbie
  • *
  • Posts: 9
  • Activity:
    1.2%
  • Reputation Power: 1
  • stryder has no influence.
  • Referrals: 0
    • View Profile
Re: New Blacksmithy Script
« Reply #2 on: September 05, 2022, 05:28:49 PM »
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

Offline Crisis

  • Global Moderator
  • *
  • *
  • Posts: 2724
  • Activity:
    1.6%
  • Reputation Power: 38
  • Crisis has a powerful will.Crisis has a powerful will.Crisis has a powerful will.Crisis has a powerful will.Crisis has a powerful will.Crisis has a powerful will.Crisis has a powerful will.
  • Gender: Male
  • Scripting well enough to break things!
  • Referrals: 2
    • View Profile
Re: New Blacksmithy Script
« Reply #3 on: September 06, 2022, 03:33:51 PM »
//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.

Offline stryderTopic starter

  • Newbie
  • *
  • Posts: 9
  • Activity:
    1.2%
  • Reputation Power: 1
  • stryder has no influence.
  • Referrals: 0
    • View Profile
Re: New Blacksmithy Script
« Reply #4 on: September 06, 2022, 11:57:04 PM »
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




There are 1 attachment(s) in this post. You must register and post an acceptable introduction to download
BlacksmithyTrainer.oajs
« Last Edit: September 07, 2022, 01:16:13 AM by stryder »

Offline Crisis

  • Global Moderator
  • *
  • *
  • Posts: 2724
  • Activity:
    1.6%
  • Reputation Power: 38
  • Crisis has a powerful will.Crisis has a powerful will.Crisis has a powerful will.Crisis has a powerful will.Crisis has a powerful will.Crisis has a powerful will.Crisis has a powerful will.
  • Gender: Male
  • Scripting well enough to break things!
  • Referrals: 2
    • View Profile
Re: New Blacksmithy Script
« Reply #5 on: September 07, 2022, 03:18:58 AM »
Looking good! Make sure to update the main post with the updates scripts so peeps know where to find it.

Offline stryderTopic starter

  • Newbie
  • *
  • Posts: 9
  • Activity:
    1.2%
  • Reputation Power: 1
  • stryder has no influence.
  • Referrals: 0
    • View Profile
Re: New Blacksmithy Script
« Reply #6 on: September 07, 2022, 04:52:33 PM »
Will do.

TY,

Scott

Offline stryderTopic starter

  • Newbie
  • *
  • Posts: 9
  • Activity:
    1.2%
  • Reputation Power: 1
  • stryder has no influence.
  • Referrals: 0
    • View Profile
Re: New Blacksmithy Script
« Reply #7 on: September 12, 2022, 06:41:33 PM »
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

Offline Crisis

  • Global Moderator
  • *
  • *
  • Posts: 2724
  • Activity:
    1.6%
  • Reputation Power: 38
  • Crisis has a powerful will.Crisis has a powerful will.Crisis has a powerful will.Crisis has a powerful will.Crisis has a powerful will.Crisis has a powerful will.Crisis has a powerful will.
  • Gender: Male
  • Scripting well enough to break things!
  • Referrals: 2
    • View Profile
Re: New Blacksmithy Script
« Reply #8 on: September 15, 2022, 03:03:24 AM »
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.

Offline stryderTopic starter

  • Newbie
  • *
  • Posts: 9
  • Activity:
    1.2%
  • Reputation Power: 1
  • stryder has no influence.
  • Referrals: 0
    • View Profile
Re: New Blacksmithy Script
« Reply #9 on: September 17, 2022, 02:45:18 PM »
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!!

Tags: