ScriptUO
Official ScriptUO EasyUO Scripts => Scripting Chat => Topic started by: declo on March 10, 2016, 02:50:51 PM
-
Does anyone have a snippet or sub for using tiles forges (those without ids)?
-
This is one I use in some scripts. Works OK for most forges, but the IDs were pulled some time ago.
;-------------------------------------------------------------------------------
sub SmeltOre ; JBG
finditem SUJ_OUJ_KUJ_JBG_CUT_SOJ_HVJ_WUJ_CVJ_KUJ_GUJ G_2
if #FINDCNT > 0
{
menu set EUOEdit_status Smelting ore....
set %forge #FINDID
repeat
set %smelt_continue #FALSE
findItem TVJ_GWJ_DWJ_EWJ C_ , #BACKPACKID
if #FINDCNT > 0
{
if ( ( #FINDTYPE = TVJ ) && ( #FINDSTACK = 1 ) )
{
ignoreitem #FINDID test
if #FINDCNT > 1
set %smelt_continue #TRUE
}
else
{
set #LOBJECTID #FINDID
set #LTARGETID %forge
set #LTARGETKIND 1
event macro 17 0
target 5s
event macro 22 0
wait 15
set %smelt_continue #TRUE
}
}
until %smelt_continue = #FALSE
}
if %sound = #TRUE
sound
menu set EUOEdit_status Smelting complete!
ignoreitem reset test
finditem %shovel_types C_ , #BACKPACKID
if #FINDCNT > 0
set #LOBJECTID #FINDID ; set shovel back to last object.
return
There's extra code in there at the end just because this supported my miner so it just re-finds the shovel.
-
Thanks!
What about those forges that do not have IDs? Like those in dungeons.
-
Thanks!
What about those forges that do not have IDs? Like those in dungeons.
Those do likely pull up with an ID using finditem. THis sub works well for forges found in town for example.