Yoko

All sides of Injection
It is currently 2026-01-19 02:29:09

All times are UTC+02:00




Post new topic  Reply to topic  [ 6 posts ] 
Author Message
PostPosted: 2005-05-23 17:44:40 
Offline
Expert!
User avatar

Joined: 2005-05-20 20:30:10
Posts: 548
Вот решил сделать себе скрипт на обкладывание врага разным мусором, но что-то ему не нравится..
подправьте плиз, если что не так.
Code:
sub drop1()
if uo.getglobal('drop')=='on' then
uo.print('*DROP is allready running!!*')
goto q
end if
 var s
 dim d[6]
  d[0]=0x1B9B
  d[1]=0x1B9C
  d[2]=0x1B9D
  d[3]=0x1B9E
 d[4]=0x09AA
 d[5]=0x0E7D
 for s=0 to 5
uo.setglobal('drop','on')
uo.set('lasttarget','laststatus')
x=uo.getserial('lasttarget')
uo.findtype(d[s])
if uo.findcount('finditem') then
if uo.getdistance('finditem')<3 then
end if
  uo.drop("1",str(uo.getx(x)-1),str(uo.gety(x)),0,"finditem")
end if
wait(267)
uo.findtype(d[s])
if uo.findcount('finditem') then
if uo.getdistance('finditem')<3 then
end if
uo.drop("1",str(uo.getx(x)),str(uo.gety(x)+1),0,"finditem")
end if
wait(432)
uo.findtype(d[s])
if uo.findcount('finditem') then
if uo.getdistance('finditem')<3 then
end if
 uo.drop("1",str(uo.getx(x)+1),str(uo.gety(x)),0,"finditem")
end if
wait(600)
uo.findtype(d[s])
if uo.findcount('finditem') then
if uo.getdistance('finditem')<3 then
end if
uo.drop("1",str(uo.getx(x)),str(uo.gety(x)-1),0,"finditem")
end if
uo.setglobal('drop','off')
uo.print('.....d o n e.....')
q:
end sub


Top
   
 Post subject:
PostPosted: 2005-05-23 18:06:38 
Offline
Junior Expert
User avatar

Joined: 2004-06-24 22:08:56
Posts: 3220
Что именно ему не нравится?

_________________
YokoInjection CodeSweeper
Function not found?
Possession of mathematics at the level of art - a gift that is only available for election.
Sorry for my clumsy English.
Skype: d119060


Top
   
 Post subject:
PostPosted: 2005-05-23 18:11:29 
Offline
Expert!
User avatar

Joined: 2005-05-20 20:30:10
Posts: 548
на строчке
Code:
wait 267
он говорит что изменчивая переменная "X"

p.s. вообще я пытался написать скрипт кидающий любые из вышезаданных предметов вокруг врага, при этом если расстояния становится больше 3 тайлов, то выводит сообщение и выключается.. а получилось... ничего не получилось..


Top
   
 Post subject:
PostPosted: 2005-05-23 19:15:01 
Offline
Expert!

Joined: 2004-04-03 17:36:29
Posts: 2544
Location: Saint-Petersburg
Ты забыл в начале скрипта объявить переменную X.


ЗЫ: А wait(267) меня просто убил. Как ты умудрился так точно замерить необходимую тебе паузу? :shock: Именно 0.267 секунды, ни на одну тысячную больше или меньше... :shock: :shock: :shock:


Top
   
 Post subject:
PostPosted: 2005-05-23 19:50:02 
Offline
Expert!
User avatar

Joined: 2005-05-20 20:30:10
Posts: 548
Edred wrote:
Ты забыл в начале скрипта объявить переменную X.


ЗЫ: А wait(267) меня просто убил. Как ты умудрился так точно замерить необходимую тебе паузу? :shock: Именно 0.267 секунды, ни на одну тысячную больше или меньше... :shock: :shock: :shock:

Code:
sub drop1() 
if uo.getglobal('drop')=='on' then
uo.print('*DROP is allready running!!*')
goto q
end if
 var s
 dim d[6]
  d[0]=0x1B9B
  d[1]=0x1B9C
  d[2]=0x1B9D
  d[3]=0x1B9E
 d[4]=0x09AA
 d[5]=0x0E7D
 for s=0 to 5
uo.setglobal('drop','on')
uo.set('lasttarget','laststatus')
x=uo.getserial('lasttarget')

x=uo.getserial('lasttarget')
вот вроде пытался тут задать икс..
p.s. задержку я такую от балды ставил, в рассчете на то, что в логах сферы будет отображаться как рандомное кидание веток (если бы я везде поставил 500, то в логах бы везде наверное тоже были 500) - но на счет этого не уверен :)


Top
   
 Post subject:
PostPosted: 2005-05-24 02:06:28 
Offline
User avatar

Joined: 2005-05-21 07:12:12
Posts: 163
Location: DRW
Mihail wrote:
x=uo.getserial('lasttarget')
вот вроде пытался тут задать икс..

Через VAR объявляются переменные. :)


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

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 5 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