Yoko

All sides of Injection
It is currently 2024-04-16 14:50:04

All times are UTC+02:00




Post new topic  Reply to topic  [ 1 post ] 
Author Message
PostPosted: 2011-12-02 10:33:38 
Offline

Joined: 2011-12-02 10:23:21
Posts: 1
Народ нужен очень простой скрипт :)
Но в инжекте я пкоа что полный 0 и просто не знаю даже как сделать самом ( нету нормальых примеров! Все скрипты ,что я смотрел слишком сложные для начального уровня)

Нужен скрипт на лесоруба !
нужно что б он делал 3 вещи
1ая - загружал список деревьев из файла
2е ходил и рубил их
3е - походил к опр точке ( даж не знаю как ее добавить >.< ) открывал ящик и кидал туда деревья
+ если будет возможность чуть отдельно - вариант с октытием вместо ящика банка
Quote:
#####################################

Помогите плиииз :)
### Загружаем координаты из файла ###
#####################################
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

потом как я понимаю идет вот тэо
Quote:
######################################
### Ходим по собранным координатам ###
######################################
while 1==1
if TreeCount>0 then
for i=1 to TreeCount
if TryRecall==1 and uo.Count('ZLK')>=LogsQty or uo.Weight>=uo.STR*4+20 then
ToRecall()
end if
uo.Print('Идем к дереву номер '+str(i)+': x='+str(TreeX[i])+' y='+str(TreeY[i]))
InfoLogs()
flag=GotoXY(TreeX[i],TreeY[i])
if flag==1 then
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


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 1 post ] 

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