Simple RunUO blacksmith script.

Anything and all.

Moderators: Murderator+, Murderator

Post Reply
ziemni
Posts: 22
Joined: 2004-09-07 22:36:09
Location: Poland

Simple RunUO blacksmith script.

Post by ziemni »

Simple template to runuo crafting. Can be improved by finding out what item type is made, or with stocking smith with hammers (from container or by tinkering it). Its made as blacksmith trainer, so if u want to make stuff with it, just comment out smelting section.

Code: Select all

# (c) Ziemniaq ziemni@risp.pl
# thing - objtype of item which is made by Make Last button
# tested on RunUO (non-AOS) shard
sub bs_dfi()

var hammer = "0x13E4"
var ignot  = "0x1BF2"
var thing  = "0x1413"
var runuo_delay = 700
var last_tool
var num_ign
var i

 UO.FindType(hammer)
 while UO.FindCount()
 
   UO.FindType(hammer)
   UO.Exec("recall finditem 21")
   num_ign = UO.Count(ignot)
   i = 0
   
   # waits until ignot count changes (used by bs) or timeout
   
   while UO.Count(ignot) == num_ign and i < 7000
     i = i + 50
     wait(50)
   wend
   
  # smelts here
 
  if UO.Count(thing) then
   wait(runuo_delay)
   if UO.Waiting() then
     UO.CancelTarget()
   endif
   UO.WaitTargetType(thing)
   UO.FindType(hammer)
   UO.Exec("recall finditem 14")
   num_ign = UO.Count(ignot)
   i = 0
   while UO.Count(ignot) == num_ign and i < 7000
     i = i + 50
     wait(50)
   wend
  endif
  wend
end sub
Post Reply