Blacksmithy

Details #

All scripts have been collected over the years and if available will still contain the creators details, these scripts may run well or not.

Scripts #

Blacksmithy #

sub main()
	var item = 0x1440 #cutlass

	var i = 0
	var time
	Repeat
		UO.DeleteJournal()
		UO.WaitTargetType(0x1BF2)
		UO.WaitMenu('What', 'Armors', 'What', 'Plate', 'What', 'Gorget')
		UO.OnGump('anygump', '3')
		UO.UseType(0x13E3)
		time = 0
		Repeat
			wait(200)
			time = time + 200
		Until UO.InJournal("destroy|create") || time > 10000
		If UO.InJournal("create") Then
			i = i + 1
		End If
		#If i > 50 Then
			#reSmelt(item)
			#i = 0
		#EndIf
	Until UO.SkillVal("Blacksmithing") > (69 * 10) || i > 120
	#reSmelt(item)
	armsLore()
end sub

sub reSmelt(item)
	var forgeType = "0x0FB1"
	var forge, time
	
	UO.IgnoreReset()
	UO.Set("finddistance", 1)	
	UO.FindType(forgeType, -1, 'ground')

	If UO.FindCount() < 1 Then
		return
	End If
	forge = UO.GetSerial('finditem')
	
	Repeat
		UO.DeleteJournal()
		UO.FindType(item, -1, 'my')
		UO.WaitTargetObject('finditem', forge)
		UO.UseType(0x0FBB)
		time = 0
		Repeat
			Wait(200)
			time = time + 200
		Until UO.InJournal("destroy|back into") || time == 10000
	Until UO.FindCount() < 1
end sub

sub armsLore()	
	#May change item to use Arms Lore with. 0x13E3 is a Smith's Hammer.
	Repeat
		UO.DeleteJournal()
		UO.WaitTargetType(0x13E3)
		UO.UseSkill("Arms Lore")
		Wait(5000)
	Until FALSE
end sub

Blacksmithy2.sc #

sub main()
	UO.Set("quiet", "1")
	UO.Set("finddistance", "1")
	UO.FindType('0x0FB1', -1, 'ground')
	var forge = UO.GetSerial('finditem')
	
	While TRUE
		UO.WaitMenu('What', 'Armors', 'What', 'Platemail', 'What', 'Breastplate')
		UO.WaitTargetType('0x1BF2')
		UO.OnGump('anygump', '1')
		UO.UseType('0x13E3')
		pigeonWait("create|destroy", 10000)
		reSmelt('0x1415', forge)
	Wend
end sub

sub reSmelt(item, forge)
	While UO.Count(item) > 0
		UO.FindType(item, -1, 'my')
		UO.WaitTargetObject('finditem', forge)
		UO.UseType('0x0FBB')
		pigeonWait("turned", 10000)
	Wend
end sub

sub pigeonWait(textCond, maxTime)
	var time = 0
	UO.DeleteJournal()
	Repeat
		Wait(200)
		time = time + 200
	Until UO.InJournal(textCond) || time > maxTime
end sub

Blacksmithy3.sc #

sub main()
	var forgeType = 0x1999
	var ingotType = 0x1BF2
	var smithyHammerType = 0x13E3
	var breastPlateType = 0x1415
	
	var armsLoreToggle = True

	UO.Set('finddistance', '1')
	UO.FindType(forgeType, -1, 'ground')
	var forge = UO.GetSerial('finditem')
	
	While True
		UO.DeleteJournal()
		
		UO.WaitMenu('What', 'Armors', 'What', 'Platemail', 'What', 'Breastplate')
		UO.WaitTargetType(ingotType)

		#Was required for exceptional popup.
		#UO.OnGump('anygump', '1')

		UO.UseType(smithyHammerType)

		journalWait('create|destroy', 10000)

		reSmelt(breastPlateType, forge)
		
		If armsLoreToggle == True Then
			armsLore(smithyHammerType)
		End If
		
		armsLoreToggle = Not armsLoreToggle
	Wend
end sub

sub reSmelt(itemType, forge)
	var tongType = 0x0FBB

	While UO.Count(itemType) > 0
		UO.DeleteJournal()	

		UO.FindType(itemType, -1, 'my')
		UO.WaitTargetObject('finditem', forge)
		UO.UseType(tongType)

		journalWait('turned', 10000)
	Wend
end sub

sub journalWait(journalPattern, timeout)
	var time = 0

	Repeat
		Wait(50)
		time = time + 50
	Until UO.InJournal(journalPattern) || time > timeout
end sub

sub armsLore(itemType)
	UO.Print(itemType)
	UO.WaitTargetType(itemType)
	UO.UseSkill('Arms Lore')
	
	journalWait('only|damage', 3000)
end sub

Blacksmithy4.sc #

sub main()
	var currentBag, i
	var ingotType = 0x1BF2
	var smithyHammerType = 0x13E3
	
	UO.UnsetCatchBag()
	UO.Set("quiet", 0)
	
	#Select Bag of bags
	userSelectObject('Bags')
	var bagType = UO.GetGraphic('Bags')
	
	#UO.Set("quiet", "1")
	
	Repeat
		UO.FindType(bagType, -1, 'Bags')
		If UO.FindCount() Then
			currentBag = UO.GetSerial('finditem')
		Else
			armsLore()
		End If
		
		UO.SetCatchBag(currentBag)
		UO.MoveItem(currentBag, 0, 'ground')

		Repeat
			UO.DeleteJournal()
			UO.WaitTargetType(ingotType)
			UO.WaitMenu('What', 'Armors', 'What', 'Platemail', 'What', 'Breastplate')
			
			UO.UseType(smithyHammerType)
			journalWait('create|destroy', 10000)
			
			UO.FindType(-1, -1, currentBag)
		Until UO.FindCount() > 147
	Until FALSE
end sub

sub userSelectObject(objcetLabel)
	UO.AddObject(objcetLabel)
	
	While UO.Targeting()
		Wait(500)
	Wend
end sub

sub journalWait(journalPattern, timeOut)
	var time = 0
		
	UO.DeleteJournal()
	
	Repeat
		time = time + 200
		Wait(200)
	Until UO.InJournal(journalPattern) || time > timeOut
end sub

sub armsLore()
	Repeat
		UO.WaitTargetType(0x13E3)		
		UO.UseSkill("Arms Lore")
		
		Wait(5000)
	Until FALSE
end sub

Make Shields.sc #

sub Main()
  var la = 0
  Repeat
    UO.Print("Loop " + str(la + 1))
	UO.Exec("waitmenu 'What' 'Shields' 'What' 'Heater'")
	UO.Exec("waittargettype 0x1bf2") 
	UO.Exec("usetype '0x13e3'")
	wait(11000)
	la = la + 1
  Until la > 100
end sub

Make Ringmail Tunic.sc #

sub main() 
	var howMany = 45

	var ingots = 0x1bf2
	var oldBritainColour = 0x0852
	var smithyHammer = 0x13e3

	var i = 0	
  	For i = 0 to howMany
		UO.DeleteJournal()  	

    	UO.Print("Loop " + Str(i + 1))
    	
		UO.WaitMenu('What', 'Armor', 'What', 'Ring', 'What', 'Tunic')
		UO.WaitTargetType(ingots , oldBritainColour) 
		UO.UseType(smithyHammer)
		
		journalWait('create|destroy', 15000)
	Next
end sub

sub journalWait(journalPattern, timeout)
	var time = 0

	Repeat
		Wait(50)
		time = time + 50
	Until UO.InJournal(journalPattern) || time > timeout
end sub

Powered by BetterDocs