Подскажите пожалуйста!
Code: Select all
#sparring - stay+go
sub main()
sub maina()
VAR E, t, Enemy='0x000064E5' , MinHP=100, G=true, L, Weap='0x1B78' ; type of weapon
UO.Attack(Enemy)
UO.DeleteJournal()
while G==true
wait(500)
if not UO.ObjAtLayer("Rhand") then
UO.FindType(Weap,-1,'backpack')
if UO.FindCount() then
UO.Equip('Rhand','finditem')
endif
endif
if UO.InJournal("stay") or UO.Life<MinHP then
UO.Say("stay")
t=UO.Timer()
repeat
E=true
UO.Exec('warmode 0')
wait(500)
if UO.WarMode()==1 then
E=false
UO.Say("stay")
t=UO.Timer()
endif
until E==true and UO.Timer()>=t+30
CheckLag()
UO.SetArm('myarm')
while UO.Life<UO.Str
L=UO.Life
UO.Exec('warmode 0')
DelJ("the")
t=UO.Timer()
UO.Exec('bandageself')
repeat
Wait(500)
until UO.InJournal("You put") or UO.InJournal("barely help") or UO.InJournal("need healing") or UO.Life<L or UO.Timer()>t+100
CheckLag()
if UO.Life<L then
UO.Say("stay")
endif
wend
CheckBandage()
UO.Arm('myarm')
if not UO.InJournal("iiaoaee!") then
UO.Say("go")
repeat
wait(50)
until UO.InJournal("go") or UO.Life<UO.Str
DelJ(UO.GetName()+": go")
repeat
wait(50)
until UO.InJournal("go") or UO.Life<UO.Str
else
UO.Say("go")
endif
UO.DeleteJournal()
UO.Attack(Enemy)
endif
if UO.Dead() then
UO.Exec('warmode 1')
endif
wend
end sub
sub DelJ(s)
VAR MN=UO.InJournal(s)
while MN > 0
UO.SetJournalLine(MN-1, '')
MN=UO.InJournal(s)
wend
end sub
sub CheckLag()
DelJ("backpack")
UO.Click('backpack')
repeat
wait(500)
until UO.InJournal('backpack')
end sub
sub CheckBandage()
VAR Banka='0x4001D43F' ; ID of wash basin
UO.waittargetobject(banka)
UO.usetype(0x0e20)
Wait(1000)
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 all')
;UO.Exec('exec autoload')
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