Yoko

All sides of Injection
It is currently 2025-12-23 15:55:34

All times are UTC+02:00




Post new topic  Reply to topic  [ 37 posts ]  Go to page Previous 1 2
Author Message
 Post subject:
PostPosted: 2006-03-22 10:13:24 
Offline
Expert!
User avatar

Joined: 2004-08-11 23:56:17
Posts: 746
Location: The Citadel
Точнее проблему опиши.


Top
   
 Post subject:
PostPosted: 2006-03-22 13:55:19 
Offline
User avatar

Joined: 2006-03-21 18:41:21
Posts: 35
Вообщем он должен перекладывать руду итд чтоб реколился во вторую шахту.. а он не реколиться!
Сейчас дам скрипт.
Code:
###################################### 
# Antares /Revenant/ uoa.ru / ver 4
######################################
# в банке должны быть руны в пещеры, помеченные в инжекте как обьекты
# (Закладка Objects !!!! не путать c Object type)
# Mine , Mine1, Mine2, Mine3, Mine4, а в бекпаке обьект Bank - руна к банку
# промаркировать каждую пещеру надо зарание, запустив процедуру MultyMark()
# Для марка, обходя последовательно все точки копания набирать "set"
# (точка копания - центр квадрата 5х5 тайлов, который выкапывается подчистую)
# При окончании марка в текущей пещере набрать "stop" перереколиться в следующюю пещеру и продолжить
# После марка 5 пещер появятся файлы C:\mine4.dat, C:\mine3.dat, C:\mine2.dat, C:\mine1.dat, C:\mine.dat
# После этого можно начинать копку запустив процедуру main() стоя у банка.
# И если в банке будут лежать жаренные фишстеки, чар не применет возможностью ими полакомиться.
# при вероятности дисконнектов перед копкой запускать процедуру Reconnect
#
#
# скрипт с авторесом (при стаке в Брит) Верхнее меню помощи должно быть открыто.
# процедуру minesh(PX,PY) поставить вместо mine(PX,PY) для копки лопатой и разбивания добытых камней на стоунблоки, в паке должна быть кирка
# процедура pod() для экстренного подьема выпавшей из банка руды. Контейнер куда собирать указать в самой процедуре.

################################
var Cont = '0x40007E70' ;ID контейнера в который будет складываться накопанное.
var RC = '0x40007477' ;ID контейнера с регами
var Dagg = '0x40007477' ;ID контейнера с дагерами и бинтами (на случай если копаются элемы)
var food= '0x097B' ;еда(type) по умолчанию жаренные фишстейки
var q, w, p
var f=file("D:\mine.dat")
;var f , mine
var mine

############################### процедура запуска для 5 пещер
# количество пещер может быть уменьшено или увеличено
# удалением или внесением троестрочий вида:
# f=file("C:\mine1.dat")
# mine='Mine1'
# one()

sub main()
repeat

f=file("D:\mine.dat")
mine='Mine'
one()


f=file("D:\mine1.dat")
mine='Mine1'
one()


#f=file("D:\mine2.dat")
#mine='0x40022107'
#one()


until UO.Dead()
end sub
#########
sub tert()
uo.print(str(uo.str*4))
end sub
################################
sub one()
dim PX[50], PY[50]
var Minepoints=0
var i

uo.Print('Loading from file...')
f.open()
Minepoints=safe call f.ReadNumber()
for i=1 to Minepoints
PX[i]=safe call f.ReadNumber()
PY[i]=safe call f.ReadNumber()
next
f.close()
uo.Print('Loaded')
uo.say("Bank")
wait(100)
med()
takereg()
Recall(mine)
for p=1 to Minepoints
uo.Print('X: '+str(PX[p])+' Y: '+str(PY[p]))
WalkN(PX[p],PY[p],'')
q=PX[p]
w=PY[p]
uo.Print('Mining...')
UO.Warmode("0")
mine(PX,PY)
;minesh(PX,PY)
next
recall('Bank')
Razg()
end sub
##########################
sub vozvrat(PX,PY)
var i
uo.Print('Move...')
for i=1 to p
uo.Print('X: '+str(PX[p])+' Y: '+str(PY[p]))
WalkN(PX[i],PY[i],'')
next
end sub
########################
sub Mark()
dim PX[50], PY[50]
var Minepoints=0
var i
uo.Print('Start marking...')
for i=1 to 50
UO.DeleteJournal()
uo.Print('Set point '+ str(i))
repeat
wait(500)
if UO.InJournal('stop')then
SaveToFile(i-1,PX,PY)
return
endif
until UO.InJournal('set')
PX[i] = UO.GetX("self")
PY[i] = UO.GetY("self")
uo.Print('Point '+str(i)+' X: '+str(PX[i])+' Y: '+str(PY[i])+'taken')
next
end sub
########################
sub MultyMark()
uo.Print('Cove............ 1')
f=file("D:\mine.dat")
Mark()
uo.Print('Cove............ 2')
f=file("D:\mine1.dat")
Mark()
uo.Print('Cove............ 3')
f=file("D:\mine2.dat")
Mark()
uo.Print('Marking finished. Ready for mine')
end sub
#############################
sub SaveToFile(mp,PX,PY)
var s=0,k=0
f.open()
f.create()
uo.Print('points = '+ str(mp))
s=safe call f.writeln(mp)
for k=1 to mp
s=safe call f.writeln(str(PX[k])+' '+str(PY[k]))
next
f.close()
end sub

##################################
sub mine(PX,PY)
var x,y,z
VAR LastTimer
UO.Set('finddistance','2')
z=UO.GetZ("self")
for x=-2 to 2
for y=-2 to 2
;Hid()
UO.Print(str(x)+" "+str(y))
Repeat
if UO.InJournal('TORMOZ') then
pause()
endif
if uo.injournal('boulder')or UO.count('0x134F') then
boulder()
endif
; if uo.dead() then
; wait(180000)
if uo.dead() then
ressurect(PX,PY)
endif
; endif
UO.DeleteJournal()
UO.Warmode("0")
UO.WaitTargetTile("1341",STR(UO.GetX()+x),STR(UO.GetY()+Y),str(z))
UO.UseType('0x0E85')
LastTimer=UO.Timer()
Repeat
wait(500)
lookout()
Until UO.InJournal("You put") or UO.InJournal("can't see") or UO.InJournal("heavy") or UO.InJournal("location") or UO.InJournal("no ore") or UO.InJournal("but fail") or UO.InJournal("far away") or UO.InJournal("in rock") or UO.InJournal("must wait") or UO.InJournal("nothing") or UO.InJournal("elsewhere") or UO.InJournal("where it") OR UO.Timer()>LastTimer+200
;lookout()
Until UO.InJournal("nothing") or UO.InJournal("elsewhere") or UO.InJournal("no ore here") or UO.InJournal("location") or UO.InJournal("far away") or UO.InJournal("in rock") or UO.InJournal("where it") or UO.InJournal("must wait")
if UO.Weight>(580) then
unload(PX,PY)
endif
;wait(4000) ; ???????????????? ??? ????? ???????
next
next
end sub
#########################################
sub lookout()
if UO.InJournal("elemental") then
killelem()
endif
end sub
#######################################
sub check()
var noto, ser, jor
for jor = 0 to 9
ser = uo.journalserial(jor)
UO.Print(ser)
uo.Print(str(uo.IsNPC("ser")))
if not UO.IsNPC('ser') and not uo.injournal("elemental") and ser <> '0x00000000' then
if uo.waiting() then
uo.canceltarget()
endif
UO.DeleteJournal()
UO.Print('PPPPPP')
;UO.Print(ser)
;recall('Bank')
;Razg()
;wait(180000)
return
endif

next
end sub
#######################################
sub Pause()
UO.DeleteJournal()
REPEAT
WAIT(3000)
UO.Print("Paused")
UNTIL UO.InJournal('GO')
UO.Print("Continue")
endif
end sub
############################################
sub heal()
UO.SetArm('arm')
UO.Exec('bandageself')
wait(500)
UO.Arm('arm')
wait(2000)
end sub
######################################
sub Razg()
VAR a
VAR LastTimer
DIM Ore[12]
Ore[1]=0x19B9; 4 and more ore
Ore[2]=0x19B7; 1 ore
Ore[3]=0x19BA; 2 ore
Ore[4]=0x19B8; 3 ore
Ore[5]=0x0EED; ??????
Ore[6]=0x09AA; ???????
Ore[7]=0x19B9; ????
Ore[8]=0x0F26; ????????
Ore[9]=0x0F8A; pig iron
Ore[10]=0x1422; plaster
Ore[11]=0x1BF2; marble
Ore[12]=0x14EB; map


uo.say("Bank")
wait(1700)
For a=1 to 12
While UO.Count(ore[a])>0
UO.FindType(ore[a],-1,-1)
UO.MoveItem('finditem',0,Cont)
wait(1700)
uo.print(ore[a])
Wend
next
eat()
While UO.Count('0x0E20')>0
UO.FindType('0x0E20',-1,-1)
UO.MoveItem('finditem',0,Dagg)
wait(1700)
Wend
takereg()
if UO.Mana < 30 then
while UO.Mana<UO.Int
LastTimer=UO.Timer()
UO.UseSkill('Meditation')
repeat
wait(75)
until UO.InJournal("You are") OR UO.InJournal("You lose") OR UO.Timer()>LastTimer+200
UO.DeleteJournal()
wait(1700)
wend
endif
end sub


#######################################
sub eat()
VAR LastTimer
UO.DeleteJournal()
repeat
LastTimer=UO.Timer()
UO.findtype(food,-1,'0x4001ABF5')
if UO.findcount('finditem') then
uo.print('eat')
UO.Useobject('finditem')
wait(500)
else
return
end if
Until UO.InJournal("stuffed!") OR UO.InJournal("think") or UO.InJournal("found") OR UO.Timer()>LastTimer+200
end sub
################################
sub unload(PX,PY)
Recall('Bank')
Razg()
wait(100)
takereg()
wait(100)
Recall(mine)
uo.DeleteJournal()
vozvrat(PX,PY)
end sub
########################################
sub ressurect1(PX,PY)
CheckLag()
UO.LClick(17,13)
wait(1000)
CheckLag()
UO.LClick(17,61)
wait(1000)
CheckLag()
uo.useobject('0x40FD37A9')
wait(100)
uo.useobject('backpack')
wait(1000)
uo.say('bank')
wait(500)
takereg()
wait(1000)
eat()
wait(180000)
Recall(mine)
uo.DeleteJournal()
vozvrat(PX,PY)
end sub
#############################
sub ressurect(PX,PY)
UO.Exec('warmode 0')
CheckLag()
UO.LClick(17,13)
wait(1000)
CheckLag()
UO.LClick(17,61)
wait(1000)
CheckLag()
WalkN(1483,1636,'')
WalkN(1480,1639,'')
WalkN(1480,1647,'')
WalkN(1468,1649,'')
WalkN(1460,1657,'')
WalkN(1460,1684,'')
WalkN(1463,1690,'')
WalkN(1463,1697,'')
WalkN(1442,1697,'')
WalkN(1430,1697,'')
WalkN(1430,1691,'')
WalkN(1428,1689,'')
WalkN(1428,1684,'')
WalkN(1428,1680,'')
WalkN(1426,1678,'')
uo.useobject('0x40021D98')
wait(100)
uo.useobject('backpack')
wait(1000)
uo.say('bank')
wait(500)
takereg()
wait(1000)
eat()
Recall(mine)
uo.DeleteJournal()
vozvrat(PX,PY)
end sub
##############################
sub med()
VAR LastTimer
UO.DeleteJournal()
while UO.Mana<UO.Int
LastTimer=UO.Timer()
UO.UseSkill('Meditation')
repeat
wait(100)
until UO.InJournal("You are") OR UO.InJournal("You lose") OR UO.Timer()>LastTimer+200
UO.DeleteJournal()
wait(200)
wend
end sub
#########################################
sub takereg()
DIM reg[3]
var i,n
reg[1]='0x0F86'; MR
reg[2]='0x0F7A'; BP
reg[3]='0x0F7B'; BM

UO.UseObject(RC)
for i=1 to 3
while UO.Count(reg[i])<5
UO.FindType(reg[i],-1,RC)
n=UO.Count(reg[i])
UO.Grab(str(5-n),'finditem')
wait(1700)
CheckLag()
wend
next
;UO.UseObject(Dagg)
; if not UO.count('0x0F51') then
; UO.FindType('0x0F51',-1,Dagg)
; IF uo.findcount() then
; UO.Grab(str(1),'finditem')
; wait(1700)
; CheckLag()
; endif
; endif
; if not UO.count('0x0E21') then
; UO.FindType('0x0E21',-1,Dagg)
; n=UO.Count(reg[i])
; IF uo.findcount() then
; UO.Grab(str(12-n),'finditem')
; wait(1700)
; CheckLag()
; endif
; endif
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
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
####################################
sub Hid()
while not uo.Hidden()
uo.exec('warmode 0')
uo.Print('Hiding...')
uo.UseSkill('Hiding')
wait(4000)
wend
wait(100)
end sub
#################################
sub Recall(dest)
var b
uo.print('Recoll')
for b=1 to 10
uo.deletejournal()
uo.waittargetobject(dest)
uo.cast('Recall',dest)
if WaitForRecall()==1 then
return 1
end if
next
return 0
end sub
###################################
sub WaitForRecall()
var Text1=uo.getname()+": The spell fizzles."
var mess='',lastX=uo.getX(),lastY=uo.getY()
for var v=0 to 200
mess=uo.journal(0)
if uo.Journal(0)==Text1 then
return 0
end if
if uo.getX()<>lastX OR uo.getY()<>LastY then
return 1
end if
wait(50)
next
return 0
end sub
################################
sub killelem()
VAR LastTimer, Elem ,i
LastTimer=UO.Timer()
UO.DeleteJournal()
UO.FindType('0x000E',-1,'ground')
Elem=UO.GetSerial('finditem')
UO.Exec('warmode 1')
UO.Attack(Elem)
;WalkN(0,0,Elem)
UO.Say('Dye, mother fucker!')
repeat
wait(2000)
until UO.InJournal('Body') OR LastTimer+300<UO.Timer() or uo.dead(Elem)
UO.Exec('warmode 0')
wait(100)
LastTimer=UO.Timer()
if UO.Life<50 and UO.Count('0x0E21') then
repeat
UO.BandageSelf()
wait(4000)
until UO.Life>170 OR LastTimer+300<UO.Timer()
endif
loot()
WalkN(q,w,'')
end sub
##################################
sub loot()
DIM R[5]
var a
R[1] = 0x0EED # ??????
R[2] = 0x09AA # ???????
R[3] = 0x19B9 # ????
R[4] = 0x0F8A # pig iron
R[5] = 0x19BA # ????, 2 ??????

UO.UseObject('lastcorpse')
wait(100)
uo.exec("warmode '0'")
uo.waittargetobject('lastcorpse')
uo.usetype(0x0F51)
wait(500)

for a=1 to 5
uo.findtype(R[a],"-1","lastcorpse")
if UO.FindCount()>0 and Uo.GetDistance("lastcorpse")<=2 then
UO.Grab("0","finditem")
wait(1500)
end if
wait(10)
next
end sub
##############################
#==============================================================
# 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()
; UO.Print("Target locked!")
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
If StepSucess==-1 Then
StepSucess=Go(7,38,300);WN - UpArrow
StepSucess=Go(1,39,300);NE - RightArrow
If StepSucess==-1 Then
StepSucess=Go(5,37,300);SW - LeftArrow
Endif
Endif
Endif

If dx>0 AND dy<0 Then
StepSucess=Go(1,39,300);NE - RightArrow
If StepSucess==-1 Then
StepSucess=Go(5,37,300);SW - LeftArrow
StepSucess=Go(3,40,300);SE - DownArrow
If StepSucess==-1 Then
StepSucess=Go(7,38,300);WN - UpArrow
Endif
Endif
Endif

If dx<0 AND dy>0 Then
StepSucess=Go(5,37,300);SW - LeftArrow
If StepSucess==-1 Then
StepSucess=Go(1,39,300);NE - RightArrow
StepSucess=Go(7,38,300);WN - UpArrow
If StepSucess==-1 Then
StepSucess=Go(3,40,300);SE - DownArrow
Endif
Endif
Endif

If dx<0 AND dy<0 Then
StepSucess=Go(7,38,300);WN - UpArrow
If StepSucess==-1 Then
StepSucess=Go(3,40,300);SE - DownArrow
StepSucess=Go(5,37,300);SW - LeftArrow
If StepSucess==-1 Then
StepSucess=Go(1,39,300);NE - RightArrow
Endif
Endif
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
StepSucess=Go(2,34,300);E - PgDown
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
StepSucess=Go(6,36,300);W - Home
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
StepSucess=Go(4,35,300);S - End
Endif
Endif

If dy<0 Then
StepSucess=Go(0,33,300);N - PgUp
If StepSucess==-1 Then
StepSucess=Go(1,39,300);NE - RightArrow
If StepSucess==-1 Then
StepSucess=Go(7,38,300);WN - UpArrow
Endif
StepSucess=Go(0,33,300);N - PgUp
Endif
Endif
Endif
Wend
end sub


sub Go(dir,key,walkwait)
VAR x,y, OldDir

x=UO.GetX()
y=UO.GetY()
OldDir=UO.GetDir()
;hid()
If UO.GetDir()<>dir Then
UO.Press(key)
wait(walkwait)
If UO.GetDir()<>dir Then
CheckLag()
Endif
Endif

UO.Press(key)
wait(walkwait)

If x==UO.GetX() AND y==UO.GetY() Then
CheckLag()
Endif

If x==UO.GetX() AND y==UO.GetY() AND OldDir<>UO.GetDir() Then
UO.Press(key)
wait(walkwait)
Endif

If x==UO.GetX() AND y==UO.GetY() Then
CheckLag()
Endif

If x==UO.GetX() AND y==UO.GetY() Then
UO.Print("Zasada!")
return -1
Else
return 1
Endif
end sub
###########################################
sub pod()
UO.Say('Bank')
repeat
uo.findtype('0x19B9',-1,'ground')
if UO.FindCount() and Uo.GetDistance('finditem')<3 then
uo.moveitem('finditem','1000','0x40FA6B85')
wait(100)
end if
wait(1000)
uo.print("1")
until not UO.FindCount()
end sub
################################################
sub boulder()
if uo.count('0x0E85') then
while uo.count('0x134F')
uo.waittargettype('0x134F')
uo.usetype('0x0E85')
wait(100)
wend
uo.findtype('0x134F',-1,'ground')
if uo.FindCount()then
uo.waittargetobject('finditem')
uo.usetype('0x0E85')
endif
wait(2000)
endif
end sub
################################################
sub minesh(PX,PY)
var x, y,z
VAR LastTimer
uo.LastTile()

UO.Set('finddistance','2')
z=UO.GetZ("self")
for x=-2 to 2
for y=-2 to 2
;Hid()
UO.Print(str(x)+" "+str(y))
Repeat
if UO.InJournal('TORMOZ') then
pause()
endif
if uo.injournal('boulder')or UO.count('0x134F') then
boulder()
UO.Print('boulder')
endif
If UO.targeting() then
uo.canceltarget()
endif
UO.DeleteJournal()
UO.Warmode("0")
UO.WaitTargetTile("1339",STR(UO.GetX()+x),STR(UO.GetY()+Y),str(z))
UO.UseType('0x0F39')
LastTimer=UO.Timer()
Repeat
wait(500)
Until UO.InJournal("You put") or UO.InJournal("can't see") or uo.injournal('boulder') or UO.InJournal("heavy") or UO.InJournal("location") or UO.InJournal("no ore") or UO.InJournal("but fail") or UO.InJournal("far away") or UO.InJournal("in rock") or UO.InJournal("must wait") or UO.InJournal("nothing") or UO.InJournal("elsewhere") or UO.InJournal("where it") OR UO.Timer()>LastTimer+200
lookout()

Until UO.InJournal("nothing") or UO.InJournal("elsewhere") or UO.InJournal("no ore here") or UO.InJournal("location") or UO.InJournal("far away") or UO.InJournal("in rock") or UO.InJournal("where it")

if UO.Weight>(uo.str*4 - 20) then
unload(PX,PY)
endif
;wait(2000) ;?? ?????? ????? ? ????
next
next
end sub
####################


Top
   
 Post subject:
PostPosted: 2006-03-22 13:59:01 
Offline
User avatar

Joined: 2006-03-21 18:41:21
Posts: 35
По идее нужно поставить где то задержку.
А вот где я не знаю :roll:


Top
   
 Post subject:
PostPosted: 2006-03-22 14:35:34 
Offline
Expert!
User avatar

Joined: 2004-08-11 23:56:17
Posts: 746
Location: The Citadel
Есть там зедержки, они так большие. Попробуй взять в кавычки все цифры в командах типа findtype, moveitem:
Code:
UO.FindType('0x0E20', '-1', '-1' ) 


Top
   
 Post subject:
PostPosted: 2006-03-22 14:41:00 
Offline
User avatar

Joined: 2006-03-21 18:41:21
Posts: 35
Я нашел..Я играю вот тут http://www.heliosuo.net/ а тут когда умираешь остается монетка в паке :D ее перетаскивать незя..Он ее пытался перетащить из пака.
Теперь все работает :) спс


Top
   
 Post subject:
PostPosted: 2006-03-22 17:46:31 
Offline
User avatar

Joined: 2006-03-21 18:41:21
Posts: 35
Блин, встает на ворлд сейве :evil:


Top
   
 Post subject:
PostPosted: 2006-03-22 20:33:57 
Offline
User avatar

Joined: 2006-03-21 18:41:21
Posts: 35
И так,итог более менее перекасабоченного скрипта! :)
Code:
###################################### 
# Antares /Revenant/ uoa.ru / ver 4
######################################
# в банке должны быть руны в пещеры, помеченные в инжекте как обьекты
# (Закладка Objects !!!! не путать c Object type)
# Mine , Mine1, Mine2, Mine3, Mine4, а в бекпаке обьект Bank - руна к банку
# промаркировать каждую пещеру надо зарание, запустив процедуру MultyMark()
# Для марка, обходя последовательно все точки копания набирать "set"
# (точка копания - центр квадрата 5х5 тайлов, который выкапывается подчистую)
# При окончании марка в текущей пещере набрать "stop" перереколиться в следующюю пещеру и продолжить
# После марка 5 пещер появятся файлы C:\mine4.dat, C:\mine3.dat, C:\mine2.dat, C:\mine1.dat, C:\mine.dat
# После этого можно начинать копку запустив процедуру main() стоя у банка.
# И если в банке будут лежать жаренные фишстеки, чар не применет возможностью ими полакомиться.
# при вероятности дисконнектов перед копкой запускать процедуру Reconnect
#
#
# скрипт с авторесом (при стаке в Брит) Верхнее меню помощи должно быть открыто.
# процедуру minesh(PX,PY) поставить вместо mine(PX,PY) для копки лопатой и разбивания добытых камней на стоунблоки, в паке должна быть кирка
# процедура pod() для экстренного подьема выпавшей из банка руды. Контейнер куда собирать указать в самой процедуре.

################################
var Cont = '0x4000818D' ;ID контейнера в который будет складываться накопанное.
var RC = '0x40007477' ;ID контейнера с регами
var Dagg = '0x40007477' ;ID контейнера с дагерами и бинтами (на случай если копаются элемы)
var food= '0x097B' ;еда(type) по умолчанию жаренные фишстейки
var q, w, p
var f=file("D:\mine.dat")
;var f , mine
var mine
#0x4000818D
#0x40007E70

############################### процедура запуска для 5 пещер
# количество пещер может быть уменьшено или увеличено
# удалением или внесением троестрочий вида:
# f=file("C:\mine1.dat")
# mine='Mine1'
# one()

sub main()
repeat

f=file("D:\mine.dat")
mine='Mine'
one()


f=file("D:\mine1.dat")
mine='Mine1'
one()


#f=file("D:\mine2.dat")
#mine='0x40022107'
#one()


until UO.Dead()
end sub
#########
sub tert()
uo.print(str(uo.str*4))
end sub
################################
sub one()
dim PX[50], PY[50]
var Minepoints=0
var i

uo.Print('Loading from file...')
f.open()
Minepoints=safe call f.ReadNumber()
for i=1 to Minepoints
PX[i]=safe call f.ReadNumber()
PY[i]=safe call f.ReadNumber()
next
f.close()
uo.Print('Loaded')
uo.say("Bank")
wait(100)
med()
takereg()
Recall(mine)
for p=1 to Minepoints
uo.Print('X: '+str(PX[p])+' Y: '+str(PY[p]))
WalkN(PX[p],PY[p],'')
q=PX[p]
w=PY[p]
uo.Print('Mining...')
UO.Warmode("0")
mine(PX,PY)
;minesh(PX,PY)
next
recall('Bank')
Razg()
end sub
##########################
sub vozvrat(PX,PY)
var i
uo.Print('Move...')
for i=1 to p
uo.Print('X: '+str(PX[p])+' Y: '+str(PY[p]))
WalkN(PX[i],PY[i],'')
next
end sub
########################
sub Mark()
dim PX[50], PY[50]
var Minepoints=0
var i
uo.Print('Start marking...')
for i=1 to 50
UO.DeleteJournal()
uo.Print('Set point '+ str(i))
repeat
wait(500)
if UO.InJournal('stop')then
SaveToFile(i-1,PX,PY)
return
endif
until UO.InJournal('set')
PX[i] = UO.GetX("self")
PY[i] = UO.GetY("self")
uo.Print('Point '+str(i)+' X: '+str(PX[i])+' Y: '+str(PY[i])+'taken')
next
end sub
########################
sub MultyMark()
uo.Print('Cove............ 1')
f=file("D:\mine.dat")
Mark()
uo.Print('Cove............ 2')
f=file("D:\mine1.dat")
Mark()
uo.Print('Cove............ 3')
f=file("D:\mine2.dat")
Mark()
uo.Print('Marking finished. Ready for mine')
end sub
#############################
sub SaveToFile(mp,PX,PY)
var s=0,k=0
f.open()
f.create()
uo.Print('points = '+ str(mp))
s=safe call f.writeln(mp)
for k=1 to mp
s=safe call f.writeln(str(PX[k])+' '+str(PY[k]))
next
f.close()
end sub

##################################
sub mine(PX,PY)
var x,y,z
VAR LastTimer
UO.Set('finddistance','2')
z=UO.GetZ("self")
for x=-2 to 2
for y=-2 to 2
;Hid()
UO.Print(str(x)+" "+str(y))
Repeat
if UO.InJournal('TORMOZ') then
pause()
endif
if uo.injournal('boulder')or UO.count('0x134F') then
boulder()
endif
; if uo.dead() then
; wait(180000)
if uo.dead() then
ressurect(PX,PY)
endif
; endif
UO.DeleteJournal()
UO.Warmode("0")
UO.WaitTargetTile("1341",STR(UO.GetX()+x),STR(UO.GetY()+Y),str(z))
UO.UseType('0x0E85')
LastTimer=UO.Timer()
Repeat
wait(500)
lookout()
Until UO.InJournal("You put") or UO.InJournal("can't see") or UO.InJournal("heavy") or UO.InJournal("location") or UO.InJournal("no ore") or UO.InJournal("but fail") or UO.InJournal("far away") or UO.InJournal("in rock") or UO.InJournal("must wait") or UO.InJournal("nothing") or UO.InJournal("elsewhere") or UO.InJournal("where it") OR UO.Timer()>LastTimer+200
;lookout()
Until UO.InJournal("nothing") or UO.InJournal("elsewhere") or UO.InJournal("no ore here") or UO.InJournal("location") or UO.InJournal("far away") or UO.InJournal("in rock") or UO.InJournal("where it") or UO.InJournal("must wait")
if UO.Weight>(580) then
unload(PX,PY)
endif
;wait(4000) ; ???????????????? ??? ????? ???????
next
next
end sub
#########################################
sub lookout()
if UO.InJournal("elemental") then
killelem()
endif
end sub
#######################################
sub check()
var noto, ser, jor
for jor = 0 to 9
ser = uo.journalserial(jor)
UO.Print(ser)
uo.Print(str(uo.IsNPC("ser")))
if not UO.IsNPC('ser') and not uo.injournal("elemental") and ser <> '0x00000000' then
if uo.waiting() then
uo.canceltarget()
endif
UO.DeleteJournal()
UO.Print('PPPPPP')
;UO.Print(ser)
;recall('Bank')
;Razg()
;wait(180000)
return
endif

next
end sub
#######################################
sub Pause()
UO.DeleteJournal()
REPEAT
WAIT(3000)
UO.Print("Paused")
UNTIL UO.InJournal('GO')
UO.Print("Continue")
endif
end sub
############################################
sub heal()
UO.SetArm('arm')
UO.Exec('bandageself')
wait(500)
UO.Arm('arm')
wait(2000)
end sub
######################################
sub Razg()
wait(500)
VAR a
VAR LastTimer
DIM Ore[11]
Ore[1]=0x19B9; 4 and more ore
Ore[2]=0x19B7; 1 ore
Ore[3]=0x19BA; 2 ore
Ore[4]=0x19B8; 3 ore
Ore[5]=0x09AA; ???????
Ore[6]=0x19B9; ????
Ore[7]=0x0F26; ????????
Ore[8]=0x0F8A; pig iron
Ore[9]=0x1422; plaster
Ore[10]=0x1BF2; marble
Ore[11]=0x14EB; map


uo.say("Bank")
wait(2000)
yarecol()
wait(2000)
For a=1 to 11
While UO.Count(ore[a])>0
UO.FindType(ore[a],-1,-1)
UO.MoveItem('finditem',0,Cont)
wait(1700)
uo.print(ore[a])
Wend
next
eat()
While UO.Count('0x0E20')>0
UO.FindType('0x0E20',-1,-1)
UO.MoveItem('finditem',0,Dagg)
wait(1700)
Wend
takereg()
if UO.Mana < 30 then
while UO.Mana<UO.Int
LastTimer=UO.Timer()
UO.UseSkill('Meditation')
repeat
wait(75)
until UO.InJournal("You are") OR UO.InJournal("You lose") OR UO.Timer()>LastTimer+200
UO.DeleteJournal()
wait(100)
wend
endif
end sub


#######################################
sub eat()
VAR LastTimer
UO.DeleteJournal()
repeat
LastTimer=UO.Timer()
UO.findtype(food,-1,'0x4001ABF5')
if UO.findcount('finditem') then
uo.print('eat')
UO.Useobject('finditem')
wait(1700)
else
return
end if
Until UO.InJournal("stuffed!") OR UO.InJournal("think") or UO.InJournal("found") OR UO.Timer()>LastTimer+200
end sub
################################
sub unload(PX,PY)
Recall('Bank')
Razg()
wait(100)
takereg()
wait(100)
Recall(mine)
uo.DeleteJournal()
vozvrat(PX,PY)
end sub
########################################
sub ressurect1(PX,PY)
CheckLag()
UO.LClick(17,13)
wait(1000)
CheckLag()
UO.LClick(17,61)
wait(1000)
CheckLag()
uo.useobject('0x40FD37A9')
wait(100)
uo.useobject('backpack')
wait(1000)
uo.say('bank')
wait(500)
takereg()
wait(1000)
eat()
wait(180000)
Recall(mine)
uo.DeleteJournal()
vozvrat(PX,PY)
end sub
#############################
sub ressurect(PX,PY)
UO.Exec('warmode 0')
CheckLag()
UO.LClick(17,13)
wait(1000)
CheckLag()
UO.LClick(17,61)
wait(1000)
CheckLag()
WalkN(1483,1636,'')
WalkN(1480,1639,'')
WalkN(1480,1647,'')
WalkN(1468,1649,'')
WalkN(1460,1657,'')
WalkN(1460,1684,'')
WalkN(1463,1690,'')
WalkN(1463,1697,'')
WalkN(1442,1697,'')
WalkN(1430,1697,'')
WalkN(1430,1691,'')
WalkN(1428,1689,'')
WalkN(1428,1684,'')
WalkN(1428,1680,'')
WalkN(1426,1678,'')
uo.useobject('0x40021D98')
wait(100)
uo.useobject('backpack')
wait(1000)
uo.say('bank')
wait(500)
takereg()
wait(1000)
eat()
Recall(mine)
uo.DeleteJournal()
vozvrat(PX,PY)
end sub
##############################
sub med()
VAR LastTimer
UO.DeleteJournal()
while UO.Mana<UO.Int
LastTimer=UO.Timer()
UO.UseSkill('Meditation')
repeat
wait(100)
until UO.InJournal("You are") OR UO.InJournal("You lose") OR UO.Timer()>LastTimer+200
UO.DeleteJournal()
wait(200)
wend
end sub
#########################################
sub takereg()
DIM reg[3]
var i,n
reg[1]='0x0F86'; MR
reg[2]='0x0F7A'; BP
reg[3]='0x0F7B'; BM

UO.UseObject(RC)
for i=1 to 3
while UO.Count(reg[i])<5
UO.FindType(reg[i],-1,RC)
n=UO.Count(reg[i])
UO.Grab(str(5-n),'finditem')
wait(1700)
CheckLag()
wend
next
;UO.UseObject(Dagg)
; if not UO.count('0x0F51') then
; UO.FindType('0x0F51',-1,Dagg)
; IF uo.findcount() then
; UO.Grab(str(1),'finditem')
; wait(1700)
; CheckLag()
; endif
; endif
; if not UO.count('0x0E21') then
; UO.FindType('0x0E21',-1,Dagg)
; n=UO.Count(reg[i])
; IF uo.findcount() then
; UO.Grab(str(12-n),'finditem')
; wait(1700)
; CheckLag()
; endif
; endif
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
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
####################################
sub Hid()
while not uo.Hidden()
uo.exec('warmode 0')
uo.Print('Hiding...')
uo.UseSkill('Hiding')
wait(4000)
wend
wait(100)
end sub
#################################
sub Recall(dest)
var b
uo.print('Recoll')
for b=1 to 10
uo.deletejournal()
uo.waittargetobject(dest)
uo.cast('Recall',dest)
if WaitForRecall()==1 then
return 1
end if
next
return 0
end sub
###################################
sub WaitForRecall()
var Text1=uo.getname()+": The spell fizzles."
var mess='',lastX=uo.getX(),lastY=uo.getY()
for var v=0 to 200
mess=uo.journal(0)
if uo.Journal(0)==Text1 then
return 0
end if
if uo.getX()<>lastX OR uo.getY()<>LastY then
return 1
end if
wait(50)
next
return 0
end sub
################################
sub killelem()
VAR LastTimer, Elem ,i
LastTimer=UO.Timer()
UO.DeleteJournal()
UO.FindType('0x000E',-1,'ground')
Elem=UO.GetSerial('finditem')
UO.Exec('warmode 1')
UO.Attack(Elem)
;WalkN(0,0,Elem)
UO.Say('Dye, mother fucker!')
repeat
wait(2000)
until UO.InJournal('Body') OR LastTimer+300<UO.Timer() or uo.dead(Elem)
UO.Exec('warmode 0')
wait(100)
LastTimer=UO.Timer()
if UO.Life<50 and UO.Count('0x0E21') then
repeat
UO.BandageSelf()
wait(4000)
until UO.Life>170 OR LastTimer+300<UO.Timer()
endif
loot()
WalkN(q,w,'')
end sub
##################################
sub loot()
DIM R[5]
var a
R[1] = 0x0EED # ??????
R[2] = 0x09AA # ???????
R[3] = 0x19B9 # ????
R[4] = 0x0F8A # pig iron
R[5] = 0x19BA # ????, 2 ??????

UO.UseObject('lastcorpse')
wait(100)
uo.exec("warmode '0'")
uo.waittargetobject('lastcorpse')
uo.usetype(0x0F51)
wait(500)

for a=1 to 5
uo.findtype(R[a],"-1","lastcorpse")
if UO.FindCount()>0 and Uo.GetDistance("lastcorpse")<=2 then
UO.Grab("0","finditem")
wait(1500)
end if
wait(10)
next
end sub
##############################
#==============================================================
# 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()
; UO.Print("Target locked!")
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
If StepSucess==-1 Then
StepSucess=Go(7,38,300);WN - UpArrow
StepSucess=Go(1,39,300);NE - RightArrow
If StepSucess==-1 Then
StepSucess=Go(5,37,300);SW - LeftArrow
Endif
Endif
Endif

If dx>0 AND dy<0 Then
StepSucess=Go(1,39,300);NE - RightArrow
If StepSucess==-1 Then
StepSucess=Go(5,37,300);SW - LeftArrow
StepSucess=Go(3,40,300);SE - DownArrow
If StepSucess==-1 Then
StepSucess=Go(7,38,300);WN - UpArrow
Endif
Endif
Endif

If dx<0 AND dy>0 Then
StepSucess=Go(5,37,300);SW - LeftArrow
If StepSucess==-1 Then
StepSucess=Go(1,39,300);NE - RightArrow
StepSucess=Go(7,38,300);WN - UpArrow
If StepSucess==-1 Then
StepSucess=Go(3,40,300);SE - DownArrow
Endif
Endif
Endif

If dx<0 AND dy<0 Then
StepSucess=Go(7,38,300);WN - UpArrow
If StepSucess==-1 Then
StepSucess=Go(3,40,300);SE - DownArrow
StepSucess=Go(5,37,300);SW - LeftArrow
If StepSucess==-1 Then
StepSucess=Go(1,39,300);NE - RightArrow
Endif
Endif
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
StepSucess=Go(2,34,300);E - PgDown
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
StepSucess=Go(6,36,300);W - Home
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
StepSucess=Go(4,35,300);S - End
Endif
Endif

If dy<0 Then
StepSucess=Go(0,33,300);N - PgUp
If StepSucess==-1 Then
StepSucess=Go(1,39,300);NE - RightArrow
If StepSucess==-1 Then
StepSucess=Go(7,38,300);WN - UpArrow
Endif
StepSucess=Go(0,33,300);N - PgUp
Endif
Endif
Endif
Wend
end sub


sub Go(dir,key,walkwait)
VAR x,y, OldDir

x=UO.GetX()
y=UO.GetY()
OldDir=UO.GetDir()
;hid()
If UO.GetDir()<>dir Then
UO.Press(key)
wait(walkwait)
If UO.GetDir()<>dir Then
CheckLag()
Endif
Endif

UO.Press(key)
wait(walkwait)

If x==UO.GetX() AND y==UO.GetY() Then
CheckLag()
Endif

If x==UO.GetX() AND y==UO.GetY() AND OldDir<>UO.GetDir() Then
UO.Press(key)
wait(walkwait)
Endif

If x==UO.GetX() AND y==UO.GetY() Then
CheckLag()
Endif

If x==UO.GetX() AND y==UO.GetY() Then
UO.Print("Zasada!")
return -1
Else
return 1
Endif
end sub
###########################################
sub pod()
UO.Say('Bank')
repeat
uo.findtype('0x19B9',-1,'ground')
if UO.FindCount() and Uo.GetDistance('finditem')<3 then
uo.moveitem('finditem','1000','0x40FA6B85')
wait(1700)
end if
wait(1000)
uo.print("1")
until not UO.FindCount()
end sub
################################################
sub boulder()
if uo.count('0x0E85') then
while uo.count('0x134F')
uo.waittargettype('0x134F')
uo.usetype('0x0E85')
wait(100)
wend
uo.findtype('0x134F',-1,'ground')
if uo.FindCount()then
uo.waittargetobject('finditem')
uo.usetype('0x0E85')
endif
wait(2000)
endif
end sub
################################################
sub minesh(PX,PY)
var x, y,z
VAR LastTimer
uo.LastTile()

UO.Set('finddistance','2')
z=UO.GetZ("self")
for x=-2 to 2
for y=-2 to 2
;Hid()
UO.Print(str(x)+" "+str(y))
Repeat
if UO.InJournal('TORMOZ') then
pause()
endif
if uo.injournal('boulder')or UO.count('0x134F') then
boulder()
UO.Print('boulder')
endif
If UO.targeting() then
uo.canceltarget()
endif
UO.DeleteJournal()
UO.Warmode("0")
UO.WaitTargetTile("1339",STR(UO.GetX()+x),STR(UO.GetY()+Y),str(z))
UO.UseType('0x0F39')
LastTimer=UO.Timer()
Repeat
wait(500)
Until UO.InJournal("You put") or UO.InJournal("can't see") or uo.injournal('boulder') or UO.InJournal("heavy") or UO.InJournal("location") or UO.InJournal("no ore") or UO.InJournal("but fail") or UO.InJournal("far away") or UO.InJournal("in rock") or UO.InJournal("must wait") or UO.InJournal("nothing") or UO.InJournal("elsewhere") or UO.InJournal("where it") OR UO.Timer()>LastTimer+200
lookout()

Until UO.InJournal("nothing") or UO.InJournal("elsewhere") or UO.InJournal("no ore here") or UO.InJournal("location") or UO.InJournal("far away") or UO.InJournal("in rock") or UO.InJournal("where it")

if UO.Weight>(uo.str*4 - 20) then
unload(PX,PY)
endif
;wait(2000) ;?? ?????? ????? ? ????
next
next
end sub
####################
sub yarecol()
uo.waittargetobject('0x40004567')
uo.cast('Recall')
end sub
####################
########Крафт Кир Ок
#############Поехали   
sub PickAxe()
Repeat
UO.WaitMenu('Tinkering','Tools','Tools','Pick axe')
wait (1000)
UO.Usetype('0x1EBC')
wait (1000)
UO.DeleteJournal()
while not (UO.InJournal("You put") or UO.InJournal("Tinkering failed"))
wait(300)
wend
wait(200)
until UO.Dead()
end sub
################Все


Top
   
 Post subject:
PostPosted: 2006-03-22 22:31:44 
Offline
Expert!
User avatar

Joined: 2005-05-04 14:05:19
Posts: 2580
Location: Москва
Была такая интересная фишка... на поле частов встречается. Если в uo.grab(-1, obj)
То пол не давал перетащить всю стопку говоря что очень тяжело;)
а если uo.grab(0, obj) то все норм было%) тоесть интересная штуковина ;) пол хочет от тать все что унее есть;) то лько не унести%))


Top
   
 Post subject:
PostPosted: 2006-03-23 13:55:30 
Offline
User avatar

Joined: 2006-03-21 18:41:21
Posts: 35
Блин помогите мне( скрипт встает на ворлд сейве и все!


Top
   
 Post subject:
PostPosted: 2006-04-18 04:15:24 
Offline
User avatar

Joined: 2006-03-28 07:55:10
Posts: 19
рекол инвиз 8) :D


Top
   
 Post subject:
PostPosted: 2006-04-18 08:40:05 
Offline
Expert!

Joined: 2004-04-03 17:36:29
Posts: 2544
Location: Saint-Petersburg
NooBozz^^ wrote:
Блин помогите мне( скрипт встает на ворлд сейве и все!


Паузы проверь, чеклаг где надо вставь. Добавь дополнительную проверку на таймер, если завис в каком-то цикле ожидания сообщений (быстрее всего именно это и происходит, а сообщения нету и не будет, так как действие "съелось" ворлдсэйвом). Поработай сам, а не жди у моря погоды. И неумение писать скрипты - не является оправданием. Здесь все когда-то не умели писать скрипты. Язык очень легкий, почитай уроки скриптинга в разделе Хелп, и все будет в порядке.


Top
   
 Post subject:
PostPosted: 2006-04-19 04:36:49 
Offline

Joined: 2005-04-16 23:33:13
Posts: 104
flake wrote:
Проверять возможности нет, писал в блокноте.

Code:
sub StupidGMs()
var f, name
uo.ignore( 'self' )
uo.set( 'finddistance', '15' )
 repeat
  f=0
  repeat   
   wait(500)   
   uo.findtype( '0x0190', '-1', 'ground' )
    if uo.findcount() == 0 then
      uo.findtype( '0x0191', '-1', 'ground' )   
        if uo.findcount() then
           f = 1            
        endif
    else
     f = 1
    endif
  until f == 1

   uo.click( 'finditem' )
   wait(1000)   
   name = uo.getname( 'finditem' )
   uo.say( name + ' , привет! ' ) ; вот тут уже врубай фантазию   
 until uo.dead()
endsub
Слушай скрипт хороший. А возможно сделать так? чтобы чар ответил игроку которого нашел а потом его заигнорил и писал следущему игроку? И игнор спадал со всех чаров через 10 минут?


Top
   
 Post subject:
PostPosted: 2006-04-19 05:53:44 
Offline

Joined: 2005-04-19 18:00:29
Posts: 2259
Location: Московская область
Code:
sub StupidGMs() 
var f, name ,time
uo.ignore( 'self' )
uo.set( 'finddistance', '15' )
 while not uo.Dead()
    time = 0
    while not (time) == 600000
      f=0
      repeat   
      wait(500)   
      uo.findtype( '0x0190', '-1', 'ground' )
      if uo.findcount() == 0 then
        uo.findtype( '0x0191', '-1', 'ground' )   
        if uo.findcount() then
           f = 1             
        endif
      else
        f = 1
      endif
    until f == 1

    uo.click( 'finditem' )
    wait(1000)   
    name = uo.getname( 'finditem' )
    uo.say( name + ' , привет! ' ) ; вот тут уже врубай фантазию 
    uo.Ignore('finditem')
    time = time + 1000 
    wend
 uo.IgnoreReset()
 wend
endsub


Top
   
 Post subject:
PostPosted: 2006-04-19 13:15:55 
Offline
Expert!
User avatar

Joined: 2005-05-20 20:30:10
Posts: 548
не уж-то решили повторить мой скрипт на вендора на оскоме? :)


Top
   
 Post subject:
PostPosted: 2006-04-19 13:23:21 
Offline
Expert!
User avatar

Joined: 2005-05-04 14:05:19
Posts: 2580
Location: Москва
блин и тут облом...
Хотя стоп... утебя он запатентован???


Top
   
 Post subject:
PostPosted: 2006-04-19 18:14:05 
Offline
User avatar

Joined: 2005-07-17 15:30:52
Posts: 308
Location: www.drw.ru
Изначальная проблема автора в следующем (я его лично знаю) я написал скрипт на мининг, все отлично работает, гм начал рейды по шахтам, как на зло, один из наших знакомых за добычу на макросе 20к логов словил на каторге, вот автор и боится повторить его подвиг, а все потому что инвизки не брал с собой, тк в скрипте это предусмотрено, я сильно сомневаюсь что наши гмы в инвизе видят, а тот чел не горюет, ща на ветровском ламбере на каторге рубит, половину уже вырубил, попал туда еще вчера.


Top
   
 Post subject:
PostPosted: 2006-04-19 21:45:13 
Offline
Expert!
User avatar

Joined: 2005-05-04 14:05:19
Posts: 2580
Location: Москва
Инвизка против ГМ, сильно;)
А еще ГМа можно в парализ взять%)) а если вообще доставать будет так и кил его нах%) На Оскоме в свое время народ борзый был... бывало дергаешь когото на разговор а крендель сразу в рекол пускается...


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 37 posts ]  Go to page Previous 1 2

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited