ScriptUO

Official ScriptUO EasyUO Scripts => Script Library => Crafting => Topic started by: CityKitty on May 30, 2021, 03:45:02 PM

Title: Using the Crafting Stations
Post by: CityKitty on May 30, 2021, 03:45:02 PM
Hey guys! Just a quick question. I've been using your terrific scripts for my crafting for a while but now I'm starting to get the benches that store a gazillion charges and I'm wondering how I change the script for that. The writing desk is ID 40938 and the alchemy one is ID 40323. Can anyone tell me what to change in the script?

Thanks in advance!
Title: Re: Using the Crafting Stations
Post by: Gaderian on May 30, 2021, 09:43:23 PM
Not certain where you got the ID number for the reward, but it will end up being a modification for loading the "use item" action in the script.

Under Easyuo it will be an alphabetic ID, not numeric.
UO Stealth will use numeric references for item ID's.

So it will be different for each script depending on how they use it. Probably easiest to ask in the thread for the specific script you are using.
Title: Re: Using the Crafting Stations
Post by: CityKitty on May 31, 2021, 07:16:32 AM
Ack! Those numbers are from the Pinco's UI item ID. I have the find ID script so will try and see if that works.

I will give the "use item" command and see what happens. Thanks for the response.
Title: Re: Using the Crafting Stations
Post by: Gaderian on May 31, 2021, 12:52:15 PM
I would guess (but do not know) that Pinco's number may have a good possibility of matching the UOSteam ID method.
EUO needs a conversion, because it uses a right to left mod 26 function.
40938 / 26 = 1574 remainder 14
14 + 1 = 15 = O (letter)
1574 / 26 = 60 remainder 14
14 + 1 = 15 = O
gives us: OO
60 / 26 = 2 remainder 7
7 + 1 = 8 = H
gives us OOH
2 + 1 = 3 = C
gives an EUO id of OOHC (all letters)

So if you need further help with how to change a script, name or link the specific script here for a more specific example/help. :)
Title: Re: Using the Crafting Stations
Post by: 12TimesOver on June 01, 2021, 03:18:55 AM
In my script library there is a script called "XIIxOveR's SuperStuff" which has a click and target option for getting item info if helpful.

X
Title: Re: Using the Crafting Stations
Post by: CityKitty on June 01, 2021, 07:56:54 PM
So, the guys here pointed me to a script "FindInfo" that allows me to see the item id, type, etc. so let me try again and see if this info makes any sense at all to you. *crosses fingers*

Writing Desk Type: OMIC ID: GDJAJND
Alchemy Station Type: TTHC ID: WVGMKQD

I looked through the scribe and alchemy scripts I have but was just too confused. I can give it another try tho.

I'm feeling quite happy with myself right now tho, since I managed to change another script to let me add something new to it and it worked! First try too! Ok, it wasn't that big a deal but I will look for my kudos where I can find them!  8)

Going to try to attach the scripts too. Thanks in advance for your help!
Title: Re: Using the Crafting Stations
Post by: Gaderian on June 01, 2021, 11:56:40 PM
I only have fletching station, sewing machine and the smithing press to test with. I am assuming the other stations have the same description:
"Uses Remaining:" and then the number at the end of the description when you hover over with the mouse.

So for the Crisis Craft and Fill Spellbook script, the changes would happen in:
MWCraft
(set some variables here like the TYPE for the craft station)
This is the focal point where the logic would have to be changed.
I would do a fall back to the crafting tool (the script keeps 2 in your main backpack... which is acceptable), in the event that the crafting station is out of charges.

Maybe a new script idea is born from a script to replenish crafting stations until full...

Here is up the point where the change is required.
This routine would need to be modified to first validate the crafting station and how many charges are left on it.

I would add a variable:
set !ToolStationScribe OMIC
Other types to be added would be for each of the craft skills, but this is a scribe only script.
Other scripts that use this MWCraft routine would benefit from adding more variables for the other crafting stations:
set !ToolStationAlchemy TTHC
set !ToolStationFletching JGHC
set !ToolStationBlacksmithing LQGC
set !ToolStationTailoring BJGC
set !ToolStationTinkering ANJC
There is possibly a different type for the other orientation of the various stations. I do not have that many vet rewards to choose to setup a complete craft area with all the stations, so I would probably ask for you help on the ones you already have.


Code: easyuo
  1. ; Crafting Stuff
  2. Sub MWCraft
  3.  
  4.   ; Gosub Craft (Tool) (Type) (Category) (Page) (Selection)
  5.   Namespace Push
  6.   Namespace Local Mwinc_Craft
  7.   set !Type N/A
  8.   set !Smelt False
  9.   set !MakeLast False
  10.   set !Enhance False
  11.   set !Craftmenu 530_497
  12.   set !Toolfletching UFG
  13.   set !Tooltailoring HAG
  14.   set !Toolalchemy RQF
  15.   set !Tooltinkering JTL
  16.   set !Toolblacksmithing OBG_FBG_TLH
  17.   set !Toolcooking OGG_DND_BCG
  18.   set !Toolcarpentry BIG_AIG_EGG_AGG_ZHG_CGG_CIG_IGG_WFG_KGG
  19.   set !ToolScribe PBG
  20.   set !ToolStationScribe OMIC
  21.   set !ToolStation !ToolStation . %1
  22.   set !Tool !Tool . %1
  23.   set !N_Variable %0
  24.   if %2 <> MakeLast && %2 <> Smelt && %3 <> Enhance
  25.   {
  26.     set !Type %2
  27.     set !Category %3
  28.     set !Page %4 - 1
  29.     set !Selection %5
  30.   }
  31.   if %2 = Smelt
  32.   {
  33.     set !Smelt True
  34.     set !Item %3
  35.   }
  36.   if %2 = Makelast
  37.     set !MakeLast True
  38.   if %3 = Enhance
  39.   {
  40.     set !Enhance True
  41.     set !Item %4
  42.   }
  43.   Finditem !ToolStation G_2
  44.   if #findcnt > 0
  45.    {
  46.    event property #findid
  47.    wait 5
  48.    ; here pick off uses remaining number using str commands on #property or need to find a sub that does that...
  49.    ; so we are going to use a new made up variable called %number_of_uses to hold that value
  50.    event property #findid
  51.    wait 5
  52.    str pos #property remaining:
  53.    set %left #strres + 11
  54.    str len #property
  55.    set %length #strres - %left
  56.    str mid #property %left %length
  57.    set %number_of_uses #strres
  58.    if %number_of_uses < 1
  59.   {
  60.     finditem !Tool C_ , #backpackid
  61.     if #findcnt < 1
  62.     {
  63.       display Out Of %1 Tools
  64.       halt
  65.     }
  66.   }
  67.  
  68.   if #contsize = !Craftmenu
  69.   {
  70.     if !Last_Tool <> !Tool
  71.     {
  72.       gosub Click_Offset 50 50 R
  73.       wait 20
  74.     }
  75.   }
  76.   for #Findindex 1 #Findcnt
  77.   {
  78.     if #Findcol = 0
  79.       Break
  80.   }
  81.   if #findcol <> 0
  82.   {
  83.     display Out Of %1 Tools
  84.     halt
  85.   }

CheckScribe
(add a check for charges on the crafting station)
Even without the test for charges on the crafting station here, it would make 2 tools to sit in the backpack of the character, which is a good fall back. The primary will be to use the crafting station and the secondary would be to use the tool in backpack.
If you do not have tinkering on the character, then it will fail and CheckScribe would need the verification like what was added in MWCraft.

So that is an example on how to modify one of those to handle using the station (writing desk - in this case).
It needs some decisions and debugging/testing, but that is the idea.

If you need more assistance, I can play with and test later in the week.

To really test this out and be useful in all situations, there is probably a different orientation for each of the rewards that would have to be added to the Types above.
Title: Re: Using the Crafting Stations
Post by: CityKitty on June 02, 2021, 09:14:05 AM
I only have fletching station, sewing machine and the smithing press to test with. I am assuming the other stations have the same description:
"Uses Remaining:" and then the number at the end of the description when you hover over with the mouse.

         Yes

So for the Crisis Craft and Fill Spellbook script, the changes would happen in:
MWCraft
(set some variables here like the TYPE for the craft station)
This is the focal point where the logic would have to be changed.

         The only place MWCraft is mentoned is in several subs, such as:
sub Makescroll11
    gosub MWCraft Scribe N/A 1 2 1
    wait 10
    Return
       I don't see here I can put the type.

I would do a fall back to the crafting tool (the script keeps 2 in your main backpack... which is acceptable), in the event that the crafting station is out of charges.

      Since not all my chars have tinkering, maybe an idea is to put a message "If you don't have tinkering, be sure to put two tools in the backpack."

Maybe a new script idea is born from a script to replenish crafting stations until full...

       Useful for those who don't use Pinco's in the EC and an organizer to dump the tools into the station.

Here is up the point where the change is required.
This routine would need to be modified to first validate the crafting station and how many charges are left on it.

I would add a variable:
set !ToolStationScribe OMIC
       Doesn't appear to belong anywhere with the other variables but I'm too new to say really.

Other types to be added would be for each of the craft skills, but this is a scribe only script.
Other scripts that use this MWCraft routine would benefit from adding more variables for the other crafting stations:
set !ToolStationAlchemy TTHC
set !ToolStationFletching JGHC
set !ToolStationBlacksmithing LQGC
set !ToolStationTailoring BJGC
set !ToolStationTinkering ANJC
There is possibly a different type for the other orientation of the various stations. I do not have that many vet rewards to choose to setup a complete craft area with all the stations, so I would probably ask for you help on the ones you already have.

     ...Nope, fish out of water here. Can't tell where this should go.

Code: easyuo
  1. ; Crafting Stuff
  2. Sub MWCraft
  3.  
  4.   ; Gosub Craft (Tool) (Type) (Category) (Page) (Selection)
  5.   Namespace Push
  6.   Namespace Local Mwinc_Craft
  7.   set !Type N/A
  8.   set !Smelt False
  9.   set !MakeLast False
  10.   set !Enhance False
  11.   set !Craftmenu 530_497
  12.   set !Toolfletching UFG
  13.   set !Tooltailoring HAG
  14.   set !Toolalchemy RQF
  15.   set !Tooltinkering JTL
  16.   set !Toolblacksmithing OBG_FBG_TLH
  17.   set !Toolcooking OGG_DND_BCG
  18.   set !Toolcarpentry BIG_AIG_EGG_AGG_ZHG_CGG_CIG_IGG_WFG_KGG
  19.   set !ToolScribe PBG
  20.   set !ToolStationScribe OMIC
  21.   set !ToolStation !ToolStation . %1
  22.   set !Tool !Tool . %1
  23.   set !N_Variable %0
  24.   if %2 <> MakeLast && %2 <> Smelt && %3 <> Enhance
  25.   {
  26.     set !Type %2
  27.     set !Category %3
  28.     set !Page %4 - 1
  29.     set !Selection %5
  30.   }
  31.   if %2 = Smelt
  32.   {
  33.     set !Smelt True
  34.     set !Item %3
  35.   }
  36.   if %2 = Makelast
  37.     set !MakeLast True
  38.   if %3 = Enhance
  39.   {
  40.     set !Enhance True
  41.     set !Item %4
  42.   }
  43.   Finditem !ToolStation G_2
  44.   if #findcnt > 0
  45.    {
  46.    event property #findid
  47.    wait 5
  48.    ; here pick off uses remaining number using str commands on #property or need to find a sub that does that...
  49.    ; so we are going to use a new made up variable called %number_of_uses to hold that value
  50.    event property #findid
  51.    wait 5
  52.    str pos #property remaining:
  53.    set %left #strres + 11
  54.    str len #property
  55.    set %length #strres - %left
  56.    str mid #property %left %length
  57.    set %number_of_uses #strres
  58.    if %number_of_uses < 1
  59.   {
  60.     finditem !Tool C_ , #backpackid
  61.     if #findcnt < 1
  62.     {
  63.       display Out Of %1 Tools
  64.       halt
  65.     }
  66.   }
  67.  
  68.   if #contsize = !Craftmenu
  69.   {
  70.     if !Last_Tool <> !Tool
  71.     {
  72.       gosub Click_Offset 50 50 R
  73.       wait 20
  74.     }
  75.   }
  76.   for #Findindex 1 #Findcnt
  77.   {
  78.     if #Findcol = 0
  79.       Break
  80.   }
  81.   if #findcol <> 0
  82.   {
  83.     display Out Of %1 Tools
  84.     halt
  85.   }

CheckScribe
(add a check for charges on the crafting station)
Even without the test for charges on the crafting station here, it would make 2 tools to sit in the backpack of the character, which is a good fall back. The primary will be to use the crafting station and the secondary would be to use the tool in backpack.
If you do not have tinkering on the character, then it will fail and CheckScribe would need the verification like what was added in MWCraft.

So that is an example on how to modify one of those to handle using the station (writing desk - in this case).
It needs some decisions and debugging/testing, but that is the idea.

If you need more assistance, I can play with and test later in the week.

To really test this out and be useful in all situations, there is probably a different orientation for each of the rewards that would have to be added to the Types above.

Yes, I'm sure you're right. I will see if I can change mine and give you the other code. Right now, both of those are for facing south.

Thanks for all the help! I wish I was a lot farther along in my learning to write scripts, but I'm working on it. Happy to test and help out in whatever ways you need. :)
Title: Re: Using the Crafting Stations
Post by: Gaderian on June 02, 2021, 07:16:14 PM
I do not have enough vet rewards to get all the craft stations to test out. I do not have access to a writing desk to test the one I was discussing, so some of this becomes a bit of a guess by applying the code generically to the other craft station that I do have. There may be some errors that come out of that kind of programming.
Don't hesitate to ask for help.
Title: Re: Using the Crafting Stations
Post by: CityKitty on June 03, 2021, 08:08:48 AM
Thanks so much. I will bumble along and try to apply the things you said. Meanwhile, if there's anything you need to know about the alchemy and scribe stations, I'm here to help.
Title: Re: Using the Crafting Stations
Post by: Gaderian on June 06, 2021, 11:09:35 PM
I found east facing writing desk and alchemy stations:

Code: easyuo
  1. set !ToolStationScribe _OMIC_WMIC_
  2. set !ToolStationAlchemy _TTHC_XTHC_

So we can add it to the info.
Title: Re: Using the Crafting Stations
Post by: CityKitty on June 19, 2021, 04:30:35 PM
I found east facing writing desk and alchemy stations:

Code: easyuo
  1. set !ToolStationScribe _OMIC_WMIC_
  2. set !ToolStationAlchemy _TTHC_XTHC_

So we can add it to the info.

Great! I will add those. I haven't had a lot of time but I'm hoping to be able to work on the script for a little bit.
Title: Re: Using the Crafting Stations
Post by: CityKitty on December 27, 2021, 08:23:48 AM
Hi!

I'm sorry, I had to be away for a while. Couldn't be helped but I'm back now and wondering where this idea of the crafting stations is at now. Apologies if I was supposed to do something, just let me know and I'll get on it.

My plan is to get all the stations, not just for the crafting, but for decoration in my workshops. Looking forward to getting back on this. Just got the tinker station, so will give you that info if needed.
Title: Re: Using the Crafting Stations
Post by: Gaderian on December 27, 2021, 10:36:11 AM
I am off the next few days, so I have time. Do you need help adjusting the scripts?
Title: Re: Using the Crafting Stations
Post by: CityKitty on December 27, 2021, 07:36:51 PM
Hey! Glad to hear from you.

Yes, what I think I need to know is what the command would be and where to place it for any script I need to change because, after all, I can't ask you to do every one. Did we discover whether the ID stays the same or changes with the direction the station faces?

Ideally, I will want to change all the scripts I use just to add that command, since I plan to have all the stations and I do have all the crafters. Right now, I have the writing table, alchemist's table and tinker table.

Any help at all is much appreciated and thanks in advance.
Title: Re: Using the Crafting Stations
Post by: Gaderian on December 27, 2021, 08:26:23 PM
First, the orientation will be a different TYPE. This TYPE refers to the graphic in one of the files. Each graphic gets a different number, so the South and East facings are just a different picture.

We should pick 1 of the scripts to see how to change it. Then if you want to apply similar logic to other scripts, we can go from there. I would prefer starting from someone's original post for their script, then we can show the required changes in that thread and other people can find it, too. If the original author is around, either they might be willing to change it or to apply the changes and repost it. I do not want to repost their whole work - out of respect.
Title: Re: Using the Crafting Stations
Post by: CityKitty on December 28, 2021, 12:46:16 PM
Yes I agree, it's always better to get permission. I suspect that, once I see how to change a script I'll feel more confident in trying it in other scripts.

I'll give you an example. Maybe Crisis would like to be involved too.

Crisis Craft and Fill Spellbook Filler Version 1.3b (http://Crisis Craft and Fill Spellbook Filler Version 1.3b)

EDIT to add: The crafting station faces south.
Title: Re: Using the Crafting Stations
Post by: Crisis on December 29, 2021, 10:40:40 PM
I do not have an active account nor access to the new stations but I trust Gaderian 100% to do an awesome job adding those in there. I will update the original post with the updated one when y'all have it sorted. :)
Title: Re: Using the Crafting Stations
Post by: Gaderian on December 30, 2021, 03:01:38 AM
I do not have any of the workstations myself. While I do have an active account and could test - if given access to one and a secure in reach.
I have written up the scroll maker 1.3 that she mentioned earlier and sent her a PM to try it. We'll see what her results are...
Title: Re: Using the Crafting Stations
Post by: CityKitty on December 30, 2021, 05:09:18 PM
What server are you on Gaderian? I'm on Pacific and would happily offer you the use of my stations. We could use a different script once you have a station to use.
Title: Re: Using the Crafting Stations
Post by: CityKitty on November 12, 2023, 01:56:28 PM
I have good news. A short test of the script appears to produce a positive result! I had no tools anywhere near me, just the station and it made the scrolls with no complaints. Now I'll go see what other scripts I can apply this to. I'll attach the modded one in case you want to take a look. It's really only what you wrote put into the appropriate spot with the addition of the two stations, as noted above.
Title: Re: Using the Crafting Stations
Post by: CityKitty on November 12, 2023, 02:55:49 PM
This is another scribe one I'm trying to mod. It's so large and confusing, I get lost. If you ever have some spare time, maybe you could look at this one too.

Thanks in advance.