Довести до Ума.

Anything and all.

Moderators: Murderator+, Murderator

Post Reply
<FaTe>
Posts: 35
Joined: 2006-09-15 18:16:29

Довести до Ума.

Post by <FaTe> »

Здраствйте. Вот сделал скрипт на каст стрелки в чара и добор регов из сундука. Последний (добор регов) не работает. Просто не делает его. Пытался еще некоторые варианты. Там он начинал перебирать реги в паке. Если можете, помогите пожалуйста. Буду благодарен.

Code: Select all

VAR Sunduk = '0x40229F69'; ID сундука с регами
VAR kachok_shkafina = '0x001883C8'; ID на каво кастуем
var LastTimer
var count=1,i=0

sub Resist() 
   uo.useobject('backpack')
   UO.Exec('terminate Reconnector')
  wait(1000)
   UO.Exec('exec Reconnector')
  wait(1000)
   uo.useobject(Sunduk)
  wait(1000)
 i=0
   repeat
 i=i+1
  while not uo.Dead()
   uo.DeleteJournal()
  CheckLag()
 
  UO.DeleteJournal()
    If UO.Count('0x0F7A','0x0000')<=10 then
   UO.FindType('0x0F7A','0x0000','Sunduk') 
 if uo.findcount() then
   UO.Grab('60','finditem')
  repeat
  wait(50)
 endif
 endif

 UO.DeleteJournal()
    If UO.Count('0x0F88','0x0000')<=10 then
   UO.FindType('0x0F88','0x0000','Sunduk')
 if uo.findcount() then
   UO.Grab('60','finditem')
   repeat
  wait(50)
 endif
 endif

   uo.deletejournal()
   LastTimer=UO.Timer()
  while uo.Mana>=20
   UO.DeleteJournal()
   uo.waittargetobject('kachok_shkafina')
   uo.Cast('Magic Arrow')
  wait(4500)
 wend
 if i==30 then
   uo.usetype('0x097B')
  wait(1000)
 i=0
 end if
    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(2000)
 wend 
 wend
end sub


ЗЫ: И если можно, то сделайте плиз пограмотней написанное мною -) Спасибо.
korzh
Posts: 220
Joined: 2007-04-26 23:35:15

Re: Довести до Ума.

Post by korzh »

Приведем скрипт в читабельный вид... И а

Code: Select all

sub Resist()
  uo.useobject('backpack')
  UO.Exec('terminate Reconnector')
  wait(1000)
  UO.Exec('exec Reconnector')
  wait(1000)
  uo.useobject(Sunduk)
  wait(1000)
  i=0
  repeat
    i=i+1
    while not uo.Dead()
      uo.DeleteJournal()
      CheckLag()
     
      ;до этого момента все нормально :)

      UO.DeleteJournal()
      If UO.Count('0x0F7A','0x0000')<=10 then
        UO.FindType('0x0F7A','0x0000','Sunduk')
        if uo.findcount() then
          UO.Grab('60','finditem')
          repeat
            wait(50)
          endif ; Тут не endif a until
        endif
      ;и тут для симетрии еще endif надо :)
       
        UO.DeleteJournal()
        If UO.Count('0x0F88','0x0000')<=10 then
          UO.FindType('0x0F88','0x0000','Sunduk')
          if uo.findcount() then
            UO.Grab('60','finditem')
            repeat
              wait(50)
            endif ; Тут не endif a until
          endif
        ;и тут тоже для симетрии еще endif надо :)
 
          uo.deletejournal()
          LastTimer=UO.Timer()
          while uo.Mana>=20
            UO.DeleteJournal()
            uo.waittargetobject('kachok_shkafina')
            uo.Cast('Magic Arrow')
            wait(4500)
          wend
          if i==30 then
            uo.usetype('0x097B')
            wait(1000)
            i=0
          end if
          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(2000)
          wend
        wend
  ; сюда until тоже нада бы.
 end sub


зы Когда там клуб невыспавшихся\неспавших откроЮТ?
Post Reply