Code: Select all
#blacksmith. Крафтит ножи и плавит
sub Bs()
Var box=0x403803F8
var forge=0x401C4019
Var ingt,colort,i=0,flag=0,flag1=0
Var PRD='0x0F51'
VAR ms0 = "You put the"
VAR ms1 = "You have failed"
VAR ms2 = "World data saved"
Dim Ing[18]
Dim IngColor[18]
Ing[0]='0x1BEF' #Iron
Ing[1]='0x1BEF' #Rusty
Ing[2]='0x1BEF' #Old Copper
Ing[3]='0x1BEF' #Dull Copper
Ing[4]='0x1BE3' #Copper
Ing[5]='0x1BEF' #Bronze
Ing[6]='0x1BF5' #Silver
Ing[7]='0x1BE9' #Gold
Ing[8]='0x1BEF' #Shadow
Ing[9]='0x1BEF' #Rose
Ing[10]='0x1BEF' #Agapite
Ing[11]='0x1BEF' #BloodRock
Ing[12]='0x1BEF' #Verite
Ing[13]='0x1BEF' #Valorite
Ing[14]='0x1BEF' #Mytheril
Ing[15]='0x1BEF' #BlackRock
Ing[16]='0x1BEF' #Obsidian
Ing[17]='0x1BEF' #Plutonium
IngColor[0]='0x0000' #Iron
IngColor[1]='0x0750' #Rusty
IngColor[2]='0x0590' #Old Copper
IngColor[3]='0x060A' #Dull Copper
IngColor[4]='0x0000' #Copper
IngColor[5]='0x0488' #Bronze
IngColor[6]='0x0000' #Silver
IngColor[7]='0x0000' #Gold
IngColor[8]='0x096B' #Shadow
IngColor[9]='0x0014' #Rose
IngColor[10]='0x0193' #Agapite
IngColor[11]='0x04C2' #BloodRock
IngColor[12]='0x07D5' #Verite
IngColor[13]='0x00CE' #Valorite
IngColor[14]='0x052D' #Mytheril
IngColor[15]='0x0455' #BlackRock
IngColor[16]='0x0028' #Obsidian
IngColor[17]='0x08AF' #Plutonium
uo.cancelmenu()
uo.automenu('Blacksmithing','Weapons')
uo.automenu('Weapons','Swords & Blades')
uo.automenu('Swords & Blades','dagger (3 iron ingot)')
uo.automenu('dagger')
wait(300)
repeat
for i=0 to 17
UO.FindType(Ing[i],IngColor[i],2)
if UO.GetQuantity('finditem') > 8 then
flag1=1
ingt=Ing[i]
endif
next
if flag1==0 then
i=0
repeat
UO.FindType(Ing[i],IngColor[i],box)
if UO.GetQuantity('finditem') > 8 then
flag=1
UO.Grab('300','finditem')
wait(500)
ingt=Ing[i]
endif
i=i+1
until flag==1
else
UO.DeleteJournal()
While NOT UO.Hidden()
UO.UseSkill('Hiding')
Wait(3000)
Wend
Checklag()
UO.UseType(ingt)
repeat
wait(100)
until (UO.InJournal(ms0) or UO.InJournal(ms1) or UO.InJournal(ms2) or UO.inJournal("You smelt") or UO.inJournal("You can't"))
if (UO.InJournal(ms0)) then
repeat
UO.FindType(PRD,-1,2)
UO.WaitTargetObject('finditem')
UO.UseObject(forge)
wait(1000)
until UO.FindCount('finditem') < 8
endIf
endif
flag=0
flag1=0
until ((uo.skillval("Blacksmithy",1) > 999) or (UO.Dead()))
end sub
Sub Checklag()
uo.deletejournal()
uo.click('backpack')
Repeat
wait(100)
Until UO.InJournal("backpack")
end sub
sub Reconnector()
var ReconnectTime, RFlag
ReconnectTime = '0'
RFlag = 1
Repeat
While (UO.ObjAtLayer('Bpack') == '')
if RFlag Then
ReconnectTime = MakeTime()
RFlag = 0
endif
Wait(20000) # WorldSave Protection
UO.Say('')
Wait(3000)
UO.Say('')
Wait(3000)
UO.Say('')
Wait(3000)
UO.LDblClick(357,164)
UO.LClick(616,459)
Wait(3000)
WEnd
Wait(3000)
if (RFlag == 0) and (ReconnectTime <> '0') Then
;UO.Exec('terminate Bs')
;UO.Exec('exec Bs')
UO.TextOpen()
UO.TextPrint('Disconnected & Reconnected @ '+ReconnectTime)
RFlag = 1
ReconnectTime = '0'
endif
Until false
end sub
sub MakeTime()
VAR D, T, Ret, i
Ret = STR(UO.Time())
T = ""
For i = 0 To Len(Ret)
T = Ret[Len(Ret)-i] + T
If (I == 2) OR (I == 4) Then
T = ":" + T
EndIf
Next
Ret = STR(UO.Date())
D = ""
For i = 0 To Len(Ret)
D = Ret[Len(Ret)-i] + D
If (I == 2) OR (I == 4) Then
D = "." + D
EndIf
Next
Ret = T + " @ " + D
RETURN Ret
end sub
Имеется вот этот прекрасный скрипт на бс.
В хайде кует и плавит даггеры из различных металлов, добирает из сундука.
но проблема в том, что когда остаётся ровно 8 ингов - выдаёт ошибку,
Line 71: Runetime error
помогите плз
