
Вот скриптик:
; Скрипт на вип шахту с хождением ©Cyric
; ver 2.1
;
; Скрипт делает следующее: чар копает всё вокруг себя, потом переходит к сле-
; дующему месту и т.д. Если набирёт указанный вес (по умолчанию 700) то пойдёт
; разгрузит руду в сундук, затем вернётся и продолжит с того места, на котором
; остановился. Копание происходит стоя в хайде.
;
; В случае выкапывания элементали, если включенно убийство элей
; (переменная KillElemental равна 1) чар будет пить инвизку, морфиться
; в демона, брать в руки щит, одевать горжетку,лечиться и килять элю,
; потом лутать руду и продолжать копать (чтобы всё это работало желательно,
; чтобы у чара были прокачены Wrestling, Parrying, Tactics, в бекпеке должны
; быть инвизки (чар будет пить перед тем как морфиться, чтобы эля не убила),
; тотал манки, щит, горжетка (это та часть армора, которая на шею одевается).
; Если убийство элей отключено (переменная KillElemental равна 0), то чар
; сначала, стоя в хайде, докапает всё вокруг себя, потом будет просто стоять.
;
; В скрипте предусмотренна одновременная прокачка спирит спика (это не отразиться
; на эффетивности скрипта).
;
; Настройка:
; Укажите нужно ли убивать элементалей (переменная KillElemental). По умолчанию включено.
; Укажите вес, набрав который чар пойдёт разгружаться (переменная maxweight)
; Укажите координаты х и у точки, находящейся рядом с сундуком (переменные x[0],y[o])
; Введите координаты тайлов, между которыми нужно ходить и стоя в которых копать (массивы x и y)
; Укажите количество тайлов, между которыми ходит чар (переменная n)
; Укажите ID ящика и подконтейнера внутри этого ящика, в который чар будет складывать руду
; (переменные Container и Container2 в функции Razgruzka()).
;
; Всё. Наслаждайтесь.
sub main()
VAR KillElemental=0 ;Убивать элей, или нет
VAR my, mx,i,j,p=1,time=UO.Time(),maxweight=600,n=1
DIM x[10],y[10]
x[0]=5646 ;Координаты тайла рядом с ящиком
y[0]=1120
;Парами х,у укажите координаты тайлов, стоя в которых чар будет копать вокруг себя
x[1]=5657
y[1]=1117
uo.deletejournal()
while (not uo.dead())
WalkN(x[p],y[p],'')
if p==n then
p=1
else
p=p+1
endif
mx = UO.GetX("self")
my = UO.GetY("self")
tohide()
for i = mx-4 to mx+4
for j = my-4 to my+4
dig(i,j,KillElemental)
if UO.Weight>=maxweight then
WalkN(x[0],y[0],'')
razgruzka()
WalkN(x[p],y[p],'')
endif
UO.Print("Now Mining In: "+str(mx-i)+" "+str(my-j))
wait(1000)
next
next
wait(5000)
;UO.FindType('0x0010',-1,'ground')
;if UO.FindCount()>0 then
;i = UO.GetX("self")
;j = UO.GetY("self")
;if KillElemental==1 Then
;KillElem()
;WalkN(i,j,'')
;else
;repeat
;wait(1000)
;until UO.IsNPC('finditem')==0
;endif
;endif
wend
end sub
sub dig(i,j,KillElemental)
var MMM,count,x,y
while (not uo.injournal("no ore")) and (not uo.injournal("in rock")) and (not uo.injournal ("That is too far"))
tohide()
UO.Waittargettile("1339", str(i), str(j),"0")
UO.Usetype (0x0F39)
uo.deletejournal()
count=0
while (not uo.injournal("fail")) and (not uo.injournal("put")) and (not uo.injournal("elemental")) and (not uo.injournal("no ore")) and (not uo.injournal("in rock")) and (not uo.injournal ("That is too far")) and count<300
wait(100)
count=count+1
wend
if count<10 and uo.injournal("fail") then
wait(9000)
endif
UO.FindType('0x0010',-1,'ground')
if UO.InJournal('something with ore') OR UO.InJournal("attacking you") OR uo.findcount()>0 then
x = UO.GetX("self")
y = UO.GetY("self")
if KillElemental==1 Then
KillElem()
WalkN(x,y,'')
endif
endif
wend
uo.deletejournal()
end sub
sub razgruzka()
VAR Container='0x40489B4D'; Тут укажите ID своего ящика
VAR Container2='0x4017F581';ID сумки внутри ящика
UO.UseObject(Container)
wait(1000)
while uo.count('0x19B7')<>0
UO.FindType('0x19B7')
UO.MoveItem('finditem','0',Container2)
wait(600)
wend
while uo.count('0x19B8')<>0
UO.FindType('0x19B8')
UO.MoveItem('finditem','0',Container2)
wait(600)
wend
while uo.count('0x19B9')<>0
UO.FindType('0x19B9')
UO.MoveItem('finditem','0',Container2)
wait(600)
wend
while uo.count('0x19BA')<>0
UO.FindType('0x19BA')
UO.MoveItem('finditem','0',Container2)
wait(600)
wend
while uo.count('0x0F15')<>0
UO.FindType('0x0F15')
UO.MoveItem('finditem','0',Container2)
wait(600)
wend
while uo.count('0x0F18')<>0
UO.FindType('0x0F18')
UO.MoveItem('finditem','0',Container2)
wait(600)
wend
while uo.count('0x0F0F')<>0
UO.FindType('0x0F0F')
UO.MoveItem('finditem','0',Container2)
wait(600)
wend
while uo.count('0x0F16')<>0
UO.FindType('0x0F16')
UO.MoveItem('finditem','0',Container2)
wait(600)
wend
while uo.count('0x0F10')<>0
UO.FindType('0x0F10')
UO.MoveItem('finditem','0',Container2)
wait(600)
wend
while uo.count('0x0F26')<>0
UO.FindType('0x0F26')
UO.MoveItem('finditem','0',Container2)
wait(600)
wend
while uo.count('0x0F11')<>0
UO.FindType('0x0F11')
UO.MoveItem('finditem','0',Container2)
wait(600)
wend
end sub
sub tohide()
while NOT UO.Hidden()
UO.DeleteJournal()
if UO.Life<50 then
UO.UseType('0x0F0E','0x0631') ; inviz potion
wait(2000)
else
UO.UseSkill('Hiding')
repeat
wait(50)
until UO.InJournal('You have hidden') OR UO.InJournal('seem to hide') OR UO.InJournal('preoccupied')
endif
UO.WarMode('flip')
wait(100)
UO.Warmode(0)
wend
end sub
#=====================================thx to SavageV===========
# CheckLag() - click on backpack and awaiting "backpack"
# message in journal.
#
# Journal has been deleted!!!
#--------------------------------------------------------------
sub CheckLag()
UO.DeleteJournal()
UO.Click('backpack')
Repeat
wait(500)
Until UO.InJournal('backpack')
end sub
#======================================thx to SavageV==========
# WalkN(X,Y,Serial) - char is walking by dX and dY step
# sub using Home, End, PgUp, PgDown keys
# d'not rebind this key from default action!
# serial - Serial of target or "" - string
# walkwait - delay after keypress
# Example:
# WalkN(2080,2113,'') - go to coordinates
# WalkN(0,0,'0x12345678') - go to target position
#--------------------------------------------------------------
sub WalkN(x,y,Target)
VAR i,StepSucess
VAR dx,dy,Exit=0
While Exit<>1
If Target<>"" Then
dx=UO.GetX(Target)-UO.GetX()
dy=UO.GetY(Target)-UO.GetY()
If UO.GetDistance(Target)<2 Then
Exit=1
Endif
Else
dx=x-UO.GetX()
dy=y-UO.GetY()
If dx==0 AND dy==0 Then
Exit=1
Endif
Endif
If dx<>0 AND dy<>0 Then
If dx>0 AND dy>0 Then
StepSucess=Go(3,40,300) ;SE - DownArrow
Endif
If dx>0 AND dy<0 Then
StepSucess=Go(1,39,300) ;NE - RightArrow
Endif
If dx<0 AND dy>0 Then
StepSucess=Go(5,37,300) ;SW - LeftArrow
Endif
If dx<0 AND dy<0 Then
StepSucess=Go(7,38,300) ;WN - UpArrow
Endif
Endif
If dx<>0 AND dy==0 Then
If dx>0 Then
StepSucess=Go(2,34,300) ;E - PgDown
If StepSucess==-1 Then
StepSucess=Go(3,40,300) ;SE - DownArrow
If StepSucess==-1 Then
StepSucess=Go(1,39,300) ;NE - RightArrow
Endif
Endif
Endif
If dx<0 Then
StepSucess=Go(6,36,300) ;W - Home
If StepSucess==-1 Then
StepSucess=Go(7,38,300) ;WN - UpArrow
If StepSucess==-1 Then
StepSucess=Go(5,37,300) ;SW - LeftArrow
Endif
Endif
Endif
Endif
If dx==0 AND dy<>0 Then
If dy>0 Then
StepSucess=Go(4,35,300) ;S - End
If StepSucess==-1 Then
StepSucess=Go(3,40,300) ;SE - DownArrow
If StepSucess==-1 Then
StepSucess=Go(5,37,300) ;SW - LeftArrow
Endif
Endif
Endif
If dy<0 Then
StepSucess=Go(0,33,300) ;N - PgUp
If StepSucess==-1 Then
StepSucess=Go(7,38,300) ;WN - UpArrow
If StepSucess==-1 Then
StepSucess=Go(1,39,300) ;NE - RightArrow
Endif
Endif
Endif
Endif
Wend
end sub
sub Go(dir,key,walkwait)
VAR x,y
x=UO.GetX()
y=UO.GetY()
while UO.GetDir()<>dir
UO.Press(key)
wait(walkwait)
If UO.GetDir()<>dir Then
CheckLag()
Endif
wend
UO.Press(key)
wait(walkwait)
If x==UO.GetX() AND y==UO.GetY() Then
CheckLag()
Endif
If x==UO.GetX() AND y==UO.GetY() Then
return -1
Else
return 1
Endif
end sub
sub killelem()
VAR LastTimer, Elem
UO.UseType('0x0F0E','0x0631') ; inviz potion
While UO.STR<201 ; U'r not morfed char max Strength + 1
If UO.Mana>=50 then
UO.WaitMenu('What','Daemon')
UO.Cast('Polymorph')
wait(8000)
else
UO.UseType('0x0F0E','0x09DF') ; total mana potion
wait(3000)
endif
Wend
LastTimer=UO.Timer()
repeat
UO.BandageSelf()
wait(4000)
until UO.Life==UO.STR
UO.UseType(0x1B76) ; heater shield
UO.UseType(0x1413) ; platemail gorget
UO.DeleteJournal()
UO.Exec('warmode 1')
UO.FindType('0x0010',-1,'ground')
Elem=UO.GetSerial('finditem')
UO.Attack(Elem)
repeat
wait(1000)
If UO.Life<50 Then
UO.UseType('0x0F0E','0x09BB') ;GH
Endif
If UO.GetDistance(Elem)>1 Then
WalkN(0,0,Elem)
Endif
until UO.IsNPC(Elem)==0
wait(3000)
UO.findtype('0x19B9',-1,'ground') ; 3 ore
UO.moveitem('finditem')
wait(1000)
UO.findtype('0x19B8',-1,'ground') ; 3 ore
UO.moveitem('finditem')
wait(1000)
UO.findtype('0x19BA',-1,'ground') ; 3 ore
UO.moveitem('finditem')
wait(1000)
UO.findtype('0x19B7',-1,'ground') ; 3 ore
UO.moveitem('finditem')
wait(1000)
UO.findtype('0x0EED',-1,'ground') ; 3 ore
UO.moveitem('finditem')
wait(1000)
UO.FindType('0x0010',-1,'ground')
If UO.GetQuantity('finditem')>0 Then
KillElem()
Endif
UO.Exec('warmode 0')
wait(1000)
UO.Print("Sdoh skotina!")
LastTimer=UO.Timer()
if UO.Life<180 then ; U'r max HP
repeat
UO.BandageSelf()
wait(4000)
until UO.Life>180 OR LastTimer+300<UO.Timer()
endif
UO.DeleteJournal()
end sub
Просто почемуто я не магу каставать вортекса!


