Yoko

All sides of Injection
It is currently 2024-03-29 09:40:05

All times are UTC+02:00




Post new topic  Reply to topic  [ 2 posts ] 
Author Message
 Post subject: а в т о таргет
PostPosted: 2012-03-29 19:23:23 
Offline
User avatar

Joined: 2007-05-23 19:51:18
Posts: 197
Как
Code:
   var temp = 0
   UO.Set('quiet','1')
   uo.exec('set finddistance 25')
   Ignores()
   DIM Chars[2]
   Chars[0] = '0x0190' ## - Тип male.
   Chars[1] = '0x0191' ## - Тип female.
   uo.findtype(Chars[0], '-1', '1')
   maleplayernum = uo.findcount()
   uo.findtype(Chars[1], '-1', '1')
   femaleplayernum = uo.findcount()
   allplayernum = maleplayernum + femaleplayernum
   for a = 0 to 1 ## - Перебираем типы male/female.
      uo.findtype(Chars[a], '-1', '1')
      if allplayernum == 1 then
         if UO.GetMaxHP('finditem') < 200 then ; проверка на хп, чтобы отсеивало вендоров.
            UO.AddObject('MainTarget','finditem')
         endif
      else
         if uo.findcount() > 0 then
            temp = uo.findcount()
            for i=0 to uo.findcount()
               uo.findtype(Chars[a], '-1', '1')
               UO.GetStatus('finditem')
               if UO.GetMaxHP('finditem') < 200 then
                  lastplayernum = lastplayernum + 1
                  if lastplayernum < 5 then
                     UO.AddObject('AddTarget'+str(lastplayernum), 'finditem')
                  else
                     i = temp
                  endif
                  if lastplayernum == 1 then
                     UO.AddObject('MainTarget','finditem')
                  endif
                  UO.Ignore('finditem', 'on')
               endif
            next
         endif
      endif
   next
   UO.Set('quiet','0')
   UO.Print("MainTarget: "+UO.GetName('MainTarget'))
   UO.Click('MainTarget')
   UO.IgnoreReset()
end sub


Как в таком контесте кода сделать так, чтобы
Code:
MainTarget
присаиваивалось значение
Code:
 lasttarget
( для каста ) ?


Last edited by some on 2012-03-30 23:32:10, edited 2 times in total.

Top
   
PostPosted: 2012-03-30 21:26:16 
Offline
User avatar

Joined: 2007-05-23 19:51:18
Posts: 197
Попробовал вместо
Code:
UO.AddObject('MainTarget','finditem')
ставить ловушку на найденного перса
Code:
uo.waittargetobject('finditem') 
uo.waittargetlast('finditem')
для присвоения ласттаргета и дальнейшего каста магии - не вышло.


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

All times are UTC+02:00


Who is online

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