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