Yoko

All sides of Injection
It is currently 2025-12-02 17:18:05

All times are UTC+02:00




Post new topic  Reply to topic  [ 23 posts ]  Go to page Previous 1 2
Author Message
 Post subject: ы
PostPosted: 2007-11-19 11:13:52 
Offline

Joined: 2007-11-18 15:35:27
Posts: 24
да я прилажу я вот уже второй день маюсь с етим спритом пытаюсь переписать ну я 0 в етом я даже уже откапал 1\6 :) пока все мутил)


Top
   
 Post subject: ы
PostPosted: 2007-11-19 11:16:26 
Offline

Joined: 2007-11-18 15:35:27
Posts: 24
".[/code]" вот ето где прописать нада?


Top
   
 Post subject:
PostPosted: 2007-11-19 11:20:45 
Offline

Joined: 2007-11-18 15:35:27
Posts: 24
вот мне друг скинул скрипт говорит тут все пашет сам недавно капал я когда запускаю после выбора топора ошибку Unhandled exception in parser





### оЕПЕЛЕММШЕ ###
##################
##################################################################################################################
###
var FileName=('C:\trees.dat') ## - оСРЭ Й ТЮИКС Б ЙНРНПНЛ АСДСР УПЮМХРЯЪ ЙННПДХМЮРШ ДЕПЕБЭЕБ.
###
var TryHiding=0 ## 1 - оЕПЕД РЕЛ ЙЮЙ ПСАХРЭ ДЕПЕБН, АСДЕР ОШРЮРЭЯЪ СИРХ Б УЮИД, 0 - МЕ АСДЕР .
###
var GetFromFile=1 ## 1 - йННПДХМЮРШ ДЕПЕБЭЕБ АСДСР ЯВХРШБЮРЯЪ ХГ ТЮИКЮ, 0 - ЯНАХПЮРЯЪ ХГ ЙКХЕМРЮ
### (ЯМЮВЮКЮ ЯНАЕПХРЕ Ю ОНРНЛ ЯВХРШБЮИРЕ ХГ ТЮИКЮ).
###
var LogsQty=100 ## - йНКХВЕЯРБН КНЦНБ ОПХ ЙНРНПНЛ ВЮП ЯЙКЮДШБЮЕР КНЦХ Б ВЕЙ.
###
var QuantityImpact=5 ## - яЙНКЭЙН ПЮГ ВЮП АСДЕР СДЮПЪРЭ ОН ДЕПЕБС, ОПЕФДЕ ВЕЛ ОЕПЕИДЕР Й ДПСЦНЛС.(ЯРЮМДЮПР - 15)
###
var ChekType='0x14EF' ## - рХО ЙЮРНПФМНЦН ВЕЙЮ.
###
var LogsType='0x1BDD' ## - рХО КНЦНБ МЮ ЙЮРНПЦЕ.
###
##################################################################################################################
###
### оНЯКЕ МЮЯРПНИЙХ:
### хДХРЕ Б КЕЯ Б ЙНРНПНЛ БШ УНРХРЕ ПСАХРЭ.
### гЮОСЯРХРЕ cЙПХОР GoLumberjacking(), хМФЕЙР ОНОПНЯХР БЮЯ СЙЮГЮРЭ рНОНП
### (ОНЪБХРЯЪ ОПХЖЕК, ОПХЖЕКНЛ МЮ РНОНП ЙНРНПШИ БШ Я ЯНАНИ БГЪКХ),
### ГЮРЕЛ ХМФЕЙР ОНОПНЯХР БЮЯ СЙЮГЮРЭ пСМАСЙ(ОНЪБХРЯЪ ОПХЖЕК, ОПХЖЕКНЛ МЮ МЕЦН) ,пСМС(ОПХЖЕКНЛ МЮ МЕ ) Х яСМДСЙ ДКЪ КНЦНБ.
### оНЯКЕ ЩРНЦН ВЮП ОНИДЕР ОН ЙННПДХМЮРЮЛ Х АСДЕР БШПСАЮРЭ ДЕПЕБЭЪ.
###########
### йНД ###
###########
sub GoLumberjacking()
uo.Print('бШАЕПХ рНОНП: ')
uo.Exec('addobject Axe')
while uo.Targeting()
wait(100)
wend
uo.Exec('exec Lumberjacking')
end sub

sub Lumberjacking()
var i=0,j=0,k=0,r=0,q=0,ii,jj,f
var TopX=324,TopY=65
dim TreeX[5000],TreeY[5000],TreeT[5000]
dim TreeTile[29]
var flag=0,TreeCount=0,clicks=0,flag2=0
########################
### цПЮТХЙЮ ДЕПЕБЭЕБ ###
########################
TreeTile[0]=3277
TreeTile[1]=3280
TreeTile[2]=3283
TreeTile[3]=3286
TreeTile[4]=3289
TreeTile[5]=3291
TreeTile[6]=3294
TreeTile[7]=3296
TreeTile[8]=3299
TreeTile[9]=3302
TreeTile[10]=3393
TreeTile[11]=3394
TreeTile[12]=3395
TreeTile[13]=3396
TreeTile[14]=3415
TreeTile[15]=3416
TreeTile[16]=3417
TreeTile[17]=3418
TreeTile[18]=3419
TreeTile[19]=3438
TreeTile[20]=3439
TreeTile[21]=3440
TreeTile[22]=3441
TreeTile[23]=3442
TreeTile[24]=3460
TreeTile[25]=3461
TreeTile[26]=3462
TreeTile[27]=3290
TreeTile[28]=3288

uo.FilterSpeech('on')
uo.FilterSpeech('add', 'Where do you want to use the pickaxe?')

#####################################
### гЮЦПСФЮЕЛ ЙННПДХМЮРШ ХГ ТЮИКЮ ###
#####################################
if GetFromFile==1 then
uo.Print('гЮЦПСФЮЕЛ ЙННПДХМЮРШ ХГ ТЮИКЮ...')
f=file(FileName)
f.Open()
TreeCount=safe call f.ReadNumber()
for i=1 to TreeCount
TreeT[i]=safe call f.ReadNumber()
TreeX[i]=safe call f.ReadNumber()
TreeY[i]=safe call f.ReadNumber()
next
f.Close()
else
######################################
### яНАХПЮЕЛ ЙННПДХМЮРШ ХГ ЙКХЕМРЮ ###
######################################
uo.Print('бШАЕПХ йХПЙС: ')
uo.Exec('addobject Pickaxe')
while uo.Targeting()
wait(100)
wend
uo.Print('яНАХПЮЕЛ ЙННПДХМЮРШ ДЕПЕБЭЕБ Б НЙПСЦЕ...')
repeat
clicks=0
flag=0
uo.DeleteJournal()
#######################
### йКХЙЮЕЛ МЮ РЮИК ###
#######################
uo.UseObject('Pickaxe')
waitForTarget()
uo.DeleteJournal()
WaitForTryRock()
###############################
### оПНБЕПЪЕЛ ДЕПЕБН КХ ЩРН ###
###############################
flag=0
for k=0 to 28
if uo.LastTile(0)==TreeTile[k]+1 then
flag=2
end if
next
if flag==0 then
for k=0 to 28
if uo.LastTile(0)==TreeTile[k] then
flag=1
end if
next
end if
if uo.Lasttile(1)==uo.GetX() and uo.Lasttile(2)==uo.GetY() then
flag=3
end if
#########################
### йКХЙМСКХ МЮ ЯРБНК ###
#########################
if flag==1 then
flag2=0
if TreeCount>0 then
for ii=1 to TreeCount
if TreeX[ii]==uo.LastTile(1) and TreeY[ii]==uo.LastTile(2) then
flag2=1
end if
next
end if
if flag2==0 then
TreeCount=TreeCount+1
TreeX[TreeCount]=uo.LastTile(1)
TreeY[TreeCount]=uo.LastTile(2)
TreeT[TreeCount]=uo.LastTile(0)
uo.Print('мЮИДЕМН ДЕПЕБН МНЛЕП '+str(TreeCount)+' : x='+str(uo.Lasttile(1))+' y='+str(uo.LastTile(2)))
end if
end if
##########################
### йКХЙМСКХ ОН КХЯРБЕ ###
##########################
if flag==2 then
flag2=0
if TreeCount>0 then
for ii=1 to TreeCount
if TreeX[ii]==uo.LastTile(1) and TreeY[ii]==uo.LastTile(2) then
flag2=1
end if
next
end if
if flag2==0 then
TreeCount=TreeCount+1
TreeX[TreeCount]=uo.LastTile(1)
TreeY[TreeCount]=uo.LastTile(2)
TreeT[TreeCount]=uo.LastTile(0)-1
uo.Print('мЮИДЕМН ДЕПЕБН МНЛЕП '+str(TreeCount)+' : x='+str(uo.Lasttile(1))+' y='+str(uo.LastTile(2)))
end if
end if
until (flag==3) or (TreeCount==5000)
uo.FilterSpeech('off')
uo.Print('юМЮКХГ ГЮЙНМВЕМ, ЙННПДХМЮРШ ДЕПЕБЭЕБ ГЮОХЯЮМШ Б ТЮИК ' + FileName)
SaveToFile(TreeCount,TreeX,TreeY,TreeT)
end if
uo.Print('дЕПЕБЭЕБ МЮИДЕМН: '+str(TreeCount))
wait(2000)
######################################
### уНДХЛ ОН ЯНАПЮММШЛ ЙННПДХМЮРЮЛ ###
######################################
while 1==1
if TreeCount>0 then
for i=1 to TreeCount

if uo.Count('ZLK')>=LogsQty or uo.Weight>=uo.STR*4+20 then
ClickingOnScroll()
wait(2000)
end if

uo.Print('хДЕЛ Й ДЕПЕБС МНЛЕП '+str(i)+': x='+str(TreeX[i])+' y='+str(TreeY[i]))
InfoLogs()
flag=GotoXY(TreeX[i],TreeY[i],2)
if flag==1 then
if TryHiding==1 then
ToHide()
end if
GetTree(str(TreeT[i]),str(TreeX[i]),str(TreeY[i]),str(uo.GetZ()))
end if
next
end if
wend
end sub

sub SaveToFile(TreeCount,TreeX,TreeY,TreeT)
var s=0,i=0,f
f=file(FileName)
f.Open()
f.Create()
s=safe call f.Writeln(TreeCount)
for i=1 to TreeCount
s=safe call f.Writeln(str(TreeT[i])+' '+str(TreeX[i])+' '+str(TreeY[i]))
next
f.Close()
end sub

sub GetTree(Type,X,Y,Z)
var i
uo.Print('мЮВХМЮЕЛ ПСАЙС ДЕПЕБЮ...')
for i=0 to QuantityImpact
if uo.Warmode()==1 then
return 0
end if
wait(200)
uo.DeleteJournal()
uo.WaitTargetTile(Type,X,Y,Z)
uo.UseObject('Axe')
if WaitForChange()==1 then
return 1
end if
next
return 0
end sub

sub WaitForRecall()
var Text1=uo.GetName()+': The spell fizzles.'
var LastX=uo.GetX()
var LastY=uo.GetY()
var mess=''
for var i=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 WaitForHide()
var Text1=uo.GetName()+': You have hidden yourself well'
var Text2=uo.GetName()+": You can't seem to hide here."
var mess
for var i=0 to 200
mess=uo.Journal(0)
if uo.Journal(0)==Text1 then
return 1
end if
if uo.Journal(0)==Text2 then
return 0
end if
wait(50)
next
return 0
end sub

sub WaitForChange()
var Text1=uo.GetName()+': You hack at the tree for a while, but fail to produce any useable wood.'
var Text2='There are no logs here to chop.'
var Text3="You can't reach this."
var Text4='That is too far away.'
var Text5="You can't do much in your current state."
var mess
for var i=0 to 200
mess=uo.Journal(0)
if uo.Journal(0)==Text2 or uo.Journal(0)==Text3 or uo.Journal(0)==Text4 then
return 1
end if
if uo.Journal(0)==Text1 then
return 0
end if
if mess[0]=='Y' and mess[1]=='o' and mess[2]=='u' and mess[4]=='p' and mess[5]=='u' and mess[6]=='t' then
return 0
end if
wait(50)
next
return 0
end sub

sub WaitForTryRock()
var Text1='That is too far away.'
var Text2='Try mining in rock.'
var Text3='There is no ore here to mine.'
var Text4='You have no line of sight to that location'
var Text5="You can't see the target"
for var i=0 to 50
if uo.Journal(0)==Text1 or uo.Journal(0)==Text2 or uo.Journal(0)==Text3 or uo.Journal(0)==Text4 or uo.Journal(0)==Text5 then
return 1
end if
wait(200)
next
return 0
end sub

sub WaitForTarget()
for var i=0 to 50
if uo.Targeting()==1 then
return 1
end if
wait(200)
next
return 0
end sub

sub WaitForChangeXY(MyX,MyY,LastX,LastY)
for var i=1 to 50
if LastX<>MyX or LastY<>MyY then
return 1
end if
wait(200)
next
return 0
end sub

sub GotoXY(x,y,r)
var LastX=0,LastY=0,i=0
while Numb(y-uo.GetY())>r
if Numb(x-uo.GetX())<=r and Numb(y-uo.GetY())<=r then
return 1
end if
if (y-uo.GetY())>r then
LastX=uo.GetX()
LastY=uo.GetY()
for i=0 to 2
uo.Press(35)
next
if LastY==uo.GetY() then
for i=0 to 2
uo.Press(37)
next
end if
if LastY==uo.GetY() then
for i=0 to 2
uo.Press(40)
next
end if
if LastX==uo.GetX() and LastY==uo.GetY() then
for i=0 to 5
uo.Press(38)
next
end if
end if
if (uo.GetY()-y)>r then
LastY=uo.GetY()
for i=0 to 2
uo.Press(33)
next
if LastY==uo.GetY() then
for i=0 to 2
uo.Press(39)
next
end if
if LastY==uo.GetY() then
for i=0 to 2
uo.Press(38)
next
end if
if LastX==uo.GetX() and LastY==uo.GetY() then
for i=0 to 5
uo.Press(40)
next
end if
end if
wend
while Numb(x-uo.GetX())>r
if Numb(x-uo.GetX())<=r and Numb(y-uo.GetY())<=r then
return 1
end if
if (x-uo.GetX())>r then
LastX=uo.GetX()
LastY=uo.GetY()
for i=0 to 2
uo.Press(34)
next
if LastX==uo.GetX() then
for i=0 to 2
uo.Press(40)
next
end if
if LastX==uo.GetX() then
for i=0 to 2
uo.Press(39)
next
end if
if LastX==uo.GetX() and LastY==uo.GetY() then
for i=0 to 5
uo.Press(37)
next
end if
end if
if (uo.GetX()-x)>r then
LastX=uo.GetX()
for i=0 to 2
uo.Press(36)
next
if LastX==uo.GetX() then
for i=0 to 2
uo.Press(38)
next
end if
if LastX==uo.GetX() then
for i=0 to 2
uo.Press(37)
next
end if
if LastX==uo.GetX() and LastY==uo.GetY() then
for i=0 to 5
uo.Press(39)
next
end if
end if
wend
if Numb(x-uo.GetX())<=r and Numb(y-uo.GetY())<=r then
return 1
else
return 0
end if
return 0
end sub

sub Numb(num)
if num>=0 then
return num
else
return num*(-1)
end if
end sub

sub InfoLogs()
uo.Print('с БЮЯ БЯЕЦН '+str(uo.Count('0x1BDD'))+' КНЦНБ Б ЯСЛЙЕ')
uo.Print('хГ МХУ '+str(uo.Count('0x1BDD','0x0000'))+' ОПНЯРШУ Х ' +str(uo.Count('0x1BDD')-uo.Count('0x1BDD','0x0000'))+' ЖБЕРМШУ')
end sub

sub ToHide()
while not uo.Hidden()
uo.Print('оШРЮЕЛЯЪ СИРХ Б УЮИД...')
uo.DeleteJournal()
uo.Exec('warmode 0')
uo.UseSkill('Stealth')
wait(4100)
wend
wait(100)
end sub

sub ClickingOnScroll()
uo.exec("waittargettype '0x1BDD'")
uo.usetype('0x14EF')
end sub

sub Terminate()
uo.Exec('terminate Lumberjacking')
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


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

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 7 guests


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:  
cron
Powered by phpBB® Forum Software © phpBB Limited