Скрипт на ковку фулов + раскладка по мешкам.
Основа скрипта была взята из этой темы.
Code: ############################ # edited by Scripts Writer # # 14.07.07 # ##################################### # Script for skill Black Smithing. # # Create full armor and then # # put them into bags. # ##################################### # Find ignots into backpack. If it's found and quantity # more than 150 then it would start to smith a full armor. # Before creating every full armor item, it'll be check ingots. # If the quantity of ignots less than 150, it'll find it on the ground # near your character and get up 300 ingots if it would be found. # # Script look at journal to find true message for each full armor # item , and recreate it if it would be "fail". # # When full armor will be created, script'll start function putitem() # It takes a bag from the first container,put here created items, and put it # into the second container. Repeat , until ingots could be found. ##################################### # # Delay -delay before creating items # ing -type of ingots # IngName -name of ingots # bag -type of bags where to put created items # Bag2 -ID of a second container # CurrentBag -ID of a first container # #Array with types of created items # full[0]=0x1413 # full[1]=0x1415 # full[2]=0x1411 # full[3]=0x1412 # full[4]=0x1410 # full[5]=0x1414 # # i,meshok -local variables without obvious initialization ##################################### sub Blacksmithing_Full_Rusty() bsarm("Rusty",'0x1BEF') end sub
sub Blacksmithing_Full_Old_Copper() bsarm("Old Copper",'0x1BEF') end sub
sub Blacksmithing_Full_Copper() bsarm("Copper",'0x1BE3') end sub
sub Blacksmithing_Full_Dull_Copper() bsarm("Dull Copper",'0x1BEF') end sub
sub Blacksmithing_Full_Silver() bsarm("Silver",'0x1BF5') end sub
sub Blacksmithing_Full_Gold() bsarm("Golden",'0x1BE9') end sub
sub Blacksmithing_Full_Shadow() bsarm("Shadow",'0x1BEF') end sub
sub Blacksmithing_Full_Rose() bsarm("Rose",'0x1BEF') end sub
sub Blacksmithing_Full_Agapite() bsarm("Agapite",'0x1BEF') end sub
sub Blacksmithing_Full_Blood_Rock() bsarm("Blood Rock",'0x1BEF') end sub
sub Blacksmithing_Full_Verite() bsarm("Verite",'0x1BEF') end sub
sub Blacksmithing_Full_Valorite() bsarm("Valorite",'0x1BEF') end sub
sub Blacksmithing_Full_Mytheril() bsarm("Mytheril",'0x1BEF') end sub
sub Blacksmithing_Full_Black_Rock() bsarm("Black Rock",'0x1BEF') end sub
sub Blacksmithing_Full_Obsidian() bsarm("Obsidian",'0x1BEF') end sub
sub Blacksmithing_Full_Plutonium() bsarm("Plutonium",'0x08AF') end sub
sub bsarm(IngName,ing)
uo.Set('finddistance','3') var Delay=3000 while not uo.Dead() TestIng(IngName,ing) UO.cancelmenu()
UO.AutoMenu(IngName+' Plate','Platemail (25') UO.AutoMenu(IngName+' Armor','Plate') UO.AutoMenu('Colored','Armor') UO.AutoMenu('Blacksmithing','Colored')
Plate: TestIng(IngName,ing) UO.DeleteJournal() UO.UseType(ing)
while NOT UO.InJournal("You put") AND NOT UO.InJournal("You have failed") wait(500) wend if UO.InJournal("You have failed") then goto Plate endif
UO.CancelMenu() wait(Delay)
UO.AutoMenu(IngName+' Plate','Platemail Legs') UO.AutoMenu(IngName+' Armor','Plate') UO.AutoMenu('Colored','Armor') UO.AutoMenu('Blacksmithing','Colored')
Legs: TestIng(IngName,ing) UO.DeleteJournal() UO.UseType(ing)
while NOT UO.InJournal("You put") AND NOT UO.InJournal("You have failed") wait(500) wend if UO.InJournal("You have failed") then goto Legs endif
UO.CancelMenu() wait(Delay)
UO.AutoMenu(IngName+' Plate','Platemail Arms') UO.AutoMenu(IngName+' Armor','Plate') UO.AutoMenu('Colored','Armor') UO.AutoMenu('Blacksmithing','Colored')
Arms: TestIng(IngName,ing) UO.DeleteJournal() UO.UseType(ing)
while NOT UO.InJournal("You put") AND NOT UO.InJournal("You have failed") wait(500) wend if UO.InJournal("You have failed") then goto Arms endif UO.CancelMenu() wait(Delay)
UO.AutoMenu(IngName+' Plate','Platemail Gauntlets') UO.AutoMenu(IngName+' Armor','Plate') UO.AutoMenu('Colored','Armor') UO.AutoMenu('Blacksmithing','Colored')
Gloves: TestIng(IngName,ing) UO.DeleteJournal() UO.UseType(ing)
while NOT UO.InJournal("You put") AND NOT UO.InJournal("You have failed") wait(500) wend if UO.InJournal("You have failed") then goto Gloves endif
UO.CancelMenu() wait(Delay)
UO.AutoMenu(IngName+' Plate','Plate Helm') UO.AutoMenu(IngName+' Armor','Plate') UO.AutoMenu('Colored','Armor') UO.AutoMenu('Blacksmithing','Colored')
Helm: TestIng(IngName,ing) UO.DeleteJournal() UO.UseType(ing)
while NOT UO.InJournal("You put") AND NOT UO.InJournal("You have failed") wait(500) wend if UO.InJournal("You have failed") then goto Helm endif
UO.CancelMenu() wait(Delay) UO.AutoMenu(IngName+' Plate','Platemail Gorget') UO.AutoMenu(IngName+' Armor','Plate') UO.AutoMenu('Colored','Armor') UO.AutoMenu('Blacksmithing','Colored')
Gorget: TestIng(IngName,ing) UO.DeleteJournal() UO.UseType(ing)
while NOT UO.InJournal("You put") AND NOT UO.InJournal("You have failed") wait(500) wend if UO.InJournal("You have failed") then goto Gorget endif
UO.CancelMenu() wait(Delay)
UO.AutoMenu(IngName+' Plate','Heater') UO.AutoMenu(IngName+' Armor','Plate') UO.AutoMenu('Colored','Armor') UO.AutoMenu('Blacksmithing','Colored')
putitem()
CheckLag() wend end sub
Sub TestIng(IngName,ing) UO.FindType(ing,'-1','backpack') if UO.GetQuantity('finditem')<=150 then UO.FindType(ing,'-1','ground') if uo.GetQuantity('finditem') >100 then uo.moveitem('finditem','300','backpack') wait(1000) end if end if end sub
sub putitem()
var i var bag=0x0E76 var Bag2=0x4028ED32 var CurrentBag=0x403648C1
DIM full[6]
full[0]=0x1413 full[1]=0x1415 full[2]=0x1411 full[3]=0x1412 full[4]=0x1410 full[5]=0x1414
var meshok uo.FindType(bag,'-1',CurrentBag) if uo.FindCount() then meshok=uo.GetSerial('finditem') uo.moveitem('finditem','all','backpack') wait(1000) end if uo.UseObject(meshok) wait(500) for i=0 to 5 UO.FindType(full[i],'-1','backpack') if uo.FindCount() then uo.moveitem('finditem','-1',meshok) wait(1000) CheckLag() end if next wait(500) uo.moveitem(meshok,'-1',Bag2) wait(500) end sub
sub CheckLag() UO.DeleteJournal() UO.Click('backpack') repeat wait(500) until UO.InJournal('backpack') end sub
|