Большая просьба помогите со скриптом!!!!
Posted: 2005-01-28 13:08:44
Вот скрипт на Mining Ha Drw ! !! Можно что бы Чар копал только айрон !!!!!!!! За ранее Спасибо ! ! ! ! !
sub mining()
VAR x,y,z='0',TileNum='1339'
VAR Last=0,LastTimer
For x=-4 to 4
For y=-4 to 4
Repeat
CheckLag()
ToHide()
UO.WaitTargetTile(TileNum,STR(UO.GetX()+x),STR(UO.GetY()+Y),z)
Uo.usetype('0x0E85')
LastTimer=UO.Timer()
repeat
wait(2000)
until UO.InJournal("Try mining") OR UO.InJournal("You put") OR UO.InJournal("You loosen") OR UO.InJournal("There is no") OR UO.InJournal("That is too") OR UO.InJournal("OOPS") OR UO.InJournal("attacking you") OR LastTimer+150<UO.Timer()
if UO.InJournal('You loosen') then
repeat
wait (500)
until UO.InJournal("You put") OR LastTimer+105<UO.Timer()
endif
until UO.InJournal("There is no") OR UO.InJournal("That is too") OR UO.InJournal("Try mining")
Next
Next
end sub
sub tohide()
while NOT UO.Hidden()
UO.DeleteJournal()
UO.FindType('0x0F0E','0x0631','my')
if UO.Life<UO.STR/2 AND UO.GetQuantity('finditem')>0 then
UO.UseType('0x0F0E','0x0631')
UO.Exec('warmode 0')
wait(2000)
else
UO.Exec('warmode 0')
UO.UseSkill('Stealth')
repeat
wait(50)
until UO.InJournal('You have hidden') OR UO.InJournal('seem to hide') OR UO.InJournal('preoccupied')
endif
wend
end sub
sub CheckLag()
UO.DeleteJournal()
UO.Click('backpack')
repeat
wait(500)
until UO.InJournal('backpack')
end sub
sub Reconnect()
var ReconnectTime,rFlag
ReconnectTime='0'
rFlag=1
repeat
while (uo.ObjAtLayer('Bpack')=='')
if rFlag then
ReconnectTime=MakeTime()
rFlag=0
end if
wait(20000)
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.TextOpen()
uo.TextPrint('Disconnected & Reconnected @ '+ReconnectTime)
rFlag=1
ReconnectTime='0'
end if
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
end if
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
end if
next
ret=t+" @ "+d
return ret
end sub
sub Time()
var hh,mm,ss,hms,t=str(uo.Time())
if len(t)<=2 then
hh="0"
mm="0"
ss=t
endif
if len(t)==3 then
hh="0"
mm=left(t,len(t)-2)
ss=right(t,len(t)-1)
endif
if len(t)==4 then
hh="0"
mm=left(t,len(t)-2)
ss=right(t,len(t)-2)
endif
if len(t)==5 then
hh=left(t,len(t)-4)
hms=left(t,len(t)-2)
mm=right(hms,len(hms)-1)
ss=right(t,len(t)-3)
endif
if len(t)==6 then
hh=left(t,len(t)-4)
hms=left(t,len(t)-2)
mm=right(hms,len(hms)-2)
ss=right(t,len(t)-4)
endif
return hh+":"+mm+":"+ss
end sub
sub Terminate()
uo.Print('??? ??????? ??????? ?????????!')
uo.DeleteJournal()
uo.Exec('terminate all')
wait(100)
uo.Exec('terminate all')
wait(100)
uo.Exec('terminate all')
wait(100)
end sub
sub CheckLag()
if uo.Waiting()>0 then
uo.Exec('canceltarget')
end if
uo.DeleteJournal()
uo.Click('backpack')
repeat
wait(50)
until uo.InJournal('backpack')
end sub
sub mining()
VAR x,y,z='0',TileNum='1339'
VAR Last=0,LastTimer
For x=-4 to 4
For y=-4 to 4
Repeat
CheckLag()
ToHide()
UO.WaitTargetTile(TileNum,STR(UO.GetX()+x),STR(UO.GetY()+Y),z)
Uo.usetype('0x0E85')
LastTimer=UO.Timer()
repeat
wait(2000)
until UO.InJournal("Try mining") OR UO.InJournal("You put") OR UO.InJournal("You loosen") OR UO.InJournal("There is no") OR UO.InJournal("That is too") OR UO.InJournal("OOPS") OR UO.InJournal("attacking you") OR LastTimer+150<UO.Timer()
if UO.InJournal('You loosen') then
repeat
wait (500)
until UO.InJournal("You put") OR LastTimer+105<UO.Timer()
endif
until UO.InJournal("There is no") OR UO.InJournal("That is too") OR UO.InJournal("Try mining")
Next
Next
end sub
sub tohide()
while NOT UO.Hidden()
UO.DeleteJournal()
UO.FindType('0x0F0E','0x0631','my')
if UO.Life<UO.STR/2 AND UO.GetQuantity('finditem')>0 then
UO.UseType('0x0F0E','0x0631')
UO.Exec('warmode 0')
wait(2000)
else
UO.Exec('warmode 0')
UO.UseSkill('Stealth')
repeat
wait(50)
until UO.InJournal('You have hidden') OR UO.InJournal('seem to hide') OR UO.InJournal('preoccupied')
endif
wend
end sub
sub CheckLag()
UO.DeleteJournal()
UO.Click('backpack')
repeat
wait(500)
until UO.InJournal('backpack')
end sub
sub Reconnect()
var ReconnectTime,rFlag
ReconnectTime='0'
rFlag=1
repeat
while (uo.ObjAtLayer('Bpack')=='')
if rFlag then
ReconnectTime=MakeTime()
rFlag=0
end if
wait(20000)
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.TextOpen()
uo.TextPrint('Disconnected & Reconnected @ '+ReconnectTime)
rFlag=1
ReconnectTime='0'
end if
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
end if
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
end if
next
ret=t+" @ "+d
return ret
end sub
sub Time()
var hh,mm,ss,hms,t=str(uo.Time())
if len(t)<=2 then
hh="0"
mm="0"
ss=t
endif
if len(t)==3 then
hh="0"
mm=left(t,len(t)-2)
ss=right(t,len(t)-1)
endif
if len(t)==4 then
hh="0"
mm=left(t,len(t)-2)
ss=right(t,len(t)-2)
endif
if len(t)==5 then
hh=left(t,len(t)-4)
hms=left(t,len(t)-2)
mm=right(hms,len(hms)-1)
ss=right(t,len(t)-3)
endif
if len(t)==6 then
hh=left(t,len(t)-4)
hms=left(t,len(t)-2)
mm=right(hms,len(hms)-2)
ss=right(t,len(t)-4)
endif
return hh+":"+mm+":"+ss
end sub
sub Terminate()
uo.Print('??? ??????? ??????? ?????????!')
uo.DeleteJournal()
uo.Exec('terminate all')
wait(100)
uo.Exec('terminate all')
wait(100)
uo.Exec('terminate all')
wait(100)
end sub
sub CheckLag()
if uo.Waiting()>0 then
uo.Exec('canceltarget')
end if
uo.DeleteJournal()
uo.Click('backpack')
repeat
wait(50)
until uo.InJournal('backpack')
end sub