[EasyUO] Simple Smithing Trainer

If you make a Client-side script you can publish it here for other players to use
Locked
User avatar
Tael
Elder Scribe
Posts: 166
Joined: Sun May 17, 2009 1:44 am

[EasyUO] Simple Smithing Trainer

Post by Tael »

I've used this script to train smithing on my main and four bodrunners. It works fine for me, and with any luck it will work fine for everyone. It's not perfect for this shard (I wrote it originally for somewhere else) because you can save a few ingots doing circlets here, and I didn't bother adding them in. However, the script is still very efficient. 50 to GM takes less than 7K ingots.

Follow the instructions in the script and good luck :)

Code: Select all

; Smith Trainer for Excelsior by Taelwrath
;-- Ingots don't pull from keys here, so to run the
;   script unattended for very long, you need to get
;   ingots from a secure container.  For smith tools,
;   I recommend getting some high-use ones---you'll only
;   need a couple K uses (and less than 7K ingots) for
;   50-100.  More for more, of course.
;-- This script is mostly designed for getting GM smith
;   for bodrunners, though it works to 120.  Default
;   values reflect that bodrunners will have lousy STR
;   (still, you'll want to start with default 60/10/10).
;   Even if you're running this script on a main with
;   max stats, I think it's best to use the defaults.
;-- You can set %ingotBox to the ID of your secure to
;   make init simpler.  You can set %getIngots to #FALSE
;   if you're using forges on the fly and have no access
;   to a secure; in this case, don't load up on too many
;   ingots or you'll be heavy and smelting all the time.
;   Have good smithing fun ...
;
    set %ingotBox XX
    set %getIngots #TRUE
    set %ingotAmt 500
    set %maxWt #MAXWEIGHT - 18
;
    if #SKILL >= #SKILLCAP
       {
       display ok Already at cap
       halt
       }
    if %getIngots = #FALSE
       goto init2
    if %ingotBox = XX
       {
       set #LOBJECTID X
       display OK Open the secure that holds your ingots
init_loop:
       if #LOBJECTID = X           ; get the box ID
          {
          wait 10
          goto init_loop
          }
       set %ingotBox #LOBJECTID
       goto init2
       }
    set #LOBJECTID %ingotBox
    event macro 17
    wait 20
init2:
    set %tool TLH_TBG_OLH
    set %gumpsize 530_437
    set %gumpXA 25    ; first row across
    set %gumpXB 230   ; second row across
    set %gumpY 50     ; first row down
    set %gumpYval 20  ; increment size down
    set %nextX 382
    set %nextY 270
    set %lastX 285
    set %lastY 412
    set %exitX 25
    set %exitY 412
    set %smeltY 362

    chooseskill blac
    menu hideEUO
    menu hide
;
    gosub GetTool
    finditem ENK C_ , #BACKPACKID
    if #FINDCNT = 0
       gosub GetMetal
main_0:
    gosub getfirst
    set %X #CONTPOSX + %lastX
    set %Y #CONTPOSY + %lastY
main_1:
    if #SKILL = #SKILLCAP
       {
       gosub smelt
       click %X %Y r
       set %cap ( #SKILL / 10 )
       display ok All done: %cap Blacksmithy
       halt
       }
    finditem ENK C_ , #BACKPACKID
    if #FINDSTACK < %cost
       gosub GetMetal
    click %X %Y
    gosub GetGump
    if #WEIGHT > %maxWt
       gosub smelt
    finditem %weapon C_ , #BACKPACKID
    if #FINDCNT > 20
       gosub smelt
    if #SKILL >= %thiscap
       {
       gosub smelt
       goto main_0
       }
    goto main_1

; -------
sub getfirst
    if #SKILL < 496
       {
       gosub setfirst 8 0 5 496 WSF 3 ; dagger
       return
       }
    if #SKILL < 645
       {
       gosub setfirst 12 0 2 645 YSF 6 ; mace
       return
       }
    if #SKILL < 743
       {
       gosub setfirst 8 0 4 743 JPH  8 ; cutlass
       return
       }
    if #SKILL < 867
       {
       gosub setfirst 8 0 7 867 VRH  8 ; kryss
       return
       }
    if #SKILL < 953
       {
       gosub setfirst 11 0 7 953 XRH 6 ; short spear
       return
       }
    if #SKILL < 1000
       {
       gosub setfirst 8 1 2 1000 YCP 8 ; wakizashi
       return
       }
    if #SKILL < 1064
       {
       gosub setfirst 4 0 3 1064 NSH 10 ; plate gorget
       return
       }
    if #SKILL < 1086
       {
       gosub setfirst 4 0 2 1086 ISH 12 ; plate gloves
       return
       }
    if #SKILL < 1124
       {
       gosub setfirst 5 0 5 1124 OSH 15 ; plate helm
       return
       }
    if #SKILL < 1158
       {
       gosub setfirst 4 0 1 1158 MSH 18 ; plate arms
       return
       }
    if #SKILL < 1200
       {
       gosub setfirst 4 0 10 1200 WBP 16 ; plate hiro sode
       return
       }
    halt

; -------
sub setfirst
    set %page %2
    set %X #CONTPOSX + %gumpXA
    set %Y #CONTPOSY + %gumpY + ( %gumpYval * %1 )
    click %X %Y
    gosub GetGump
sf_0:
    if %page > 0
       {
       set %FX #CONTPOSX + %nextX
       set %FY #CONTPOSY + %nextY
       click %FX %FY
       gosub GetGump
       set %page %page - 1
       goto sf_0
       }
    set %FX #CONTPOSX + %gumpXB
    set %FY #CONTPOSY + %gumpY + ( %gumpYval * %3 )
    click %FX %FY
    gosub GetGump
    set %thiscap %4
    set %weapon %5
    set %cost %6
    return

; -------
sub smelt
    finditem %weapon C_ , #BACKPACKID
    if #FINDCNT = 0
       return
    set %SX #CONTPOSX + %gumpXA
    set %SY #CONTPOSY + %smeltY
smelt_0:
    click %SX %SY
    target 7s
    finditem %weapon C_ , #BACKPACKID
    wait 5
    if #FINDCNT = 0
       {
       key esc
       gosub GetTool
       return
       }
    set #LTARGETID #FINDID
    set #LTARGETKIND 1
    event macro 22
smelt_1:
    if #TARGCURS = 1
       {
       wait 2
       goto smelt_1
       }
smelt_2:
    if #CONTSIZE <> %gumpsize
       {
       wait 2
       goto smelt_2
       }
    goto smelt_0

; -------
sub GetGump
gg_reset:
    set %failTimer #SCNT + 7
    wait 10
gump_0:
    if #CONTSIZE <> %gumpsize
       {
       if #SCNT > %failTimer
          {
          gosub GetTool
          goto gg_reset
          }
       wait 2
       goto gump_0
       }
    return

; -------
sub GetTool
    gosub CheckTool
    set %thisTool #FINDID
    set #LOBJECTID #FINDID
    event macro 17
    wait 10
    return

; -------
sub CheckTool
    finditem %tool C_
    if #FINDCNT = 0
       {
       display ok Need a smith tool
       halt
       }
    return

; -------
sub GetMetal
    if %getIngots = #FALSE
       goto metalfail
    finditem ENK C_ , %ingotBox
    if #FINDCNT = 0
       goto skipget
    exevent drag #FINDID %ingotAmt
    wait 10
    exevent dropc #BACKPACKID
    wait 10
    return
skipget:
    finditem %weapon C_ , #BACKPACKID
    if #FINDCNT < 5
       goto metalfail
    gosub smelt
    return
metalfail:
    gosub smelt
    display ok Need ingots to continue
    halt
Taelwrath - noobus perpetuus
snaggeh
Adept Scribe
Posts: 43
Joined: Fri Sep 16, 2011 7:34 pm

Re: [EasyUO] Simple Smithing Trainer

Post by snaggeh »

I have about 5k mined from gming mining so I shall give this a crack this evening and post some feedback..

Has no one else used this yet ?
Reskal
Elder Scribe
Posts: 108
Joined: Fri Aug 29, 2008 10:54 am

Re: [EasyUO] Simple Smithing Trainer

Post by Reskal »

He didn't bother to optimize it for Excelsior, why should we bother to waste our hard mined ingots. Not all have tons of them.
To be honest the blacksmith guide on the wiki is bit disappointing also, completely ignores the costs in ingots and makes no clear suggestions.
For example dagger uses up 4 ingots and brought me well to 49.6 blacksmithing, then it reaches 100% success chance and one has to change. Actually i look for other items i can make, eventually mace with 6 ingots is next, what is relatively cheap.

Another factor for ingot cost is, that success chance should be 60% and higher, cause you do not fail that often and can smelt items in to regain some ingots. So i take a maul for now, has 60.4% success chance.
Reskal
Elder Scribe
Posts: 108
Joined: Fri Aug 29, 2008 10:54 am

Re: [EasyUO] Simple Smithing Trainer

Post by Reskal »

Edit: pure emergency let me use this macro , i did not forget what i wrote before.
But i had to delete a part in the script to make this macro work, because it tells me "Already at cap" but i have 55 blacksmithing.

The part i deleted was:

Code: Select all

 if #SKILL >= #SKILLCAP
       {
       display ok Already at cap
       halt
       }
Locked