Yoko

All sides of Injection
It is currently 2024-03-29 07:42:19

All times are UTC+02:00




Post new topic  Reply to topic  [ 8 posts ] 
Author Message
PostPosted: 2012-03-13 15:22:40 
Offline

Joined: 2012-03-13 15:09:30
Posts: 48
Peace - war помогите пожалуста со скриптом чтобы можно было без кнопок выключить режим вар
тоесть постоянно включался Peace


Top
   
PostPosted: 2012-03-13 15:47:23 
Offline
User avatar

Joined: 2009-05-28 09:58:28
Posts: 2802
Location: Иваново
Code:
sub war_off()
   WHILE NOT UO.Dead()
      if uo.Warmode()==1 then
         uo.Warmode(0)
      end if
      wait(100)
   WEND
end sub

_________________
Image
YokoInjection CodeSweeper
Ошибка "Unhandled exception in parser"
Стрелялка для олдов.


Top
   
PostPosted: 2012-03-13 20:27:27 
Offline

Joined: 2012-03-13 15:09:30
Posts: 48
Спасибо скрипт работает только проблема не ушла :(
если чара ударить или убить то после резуректа он типа не war и war выходит надпись :

You are preoccupied with thoughts of battle.
Пытаемся уйти в хайд...
You are preoccupied with thoughts of battle.
Пытаемся уйти в хайд...
You are preoccupied with thoughts of battle.
Пытаемся уйти в хайд...


Top
   
PostPosted: 2012-03-16 01:36:22 
Offline

Joined: 2012-03-13 15:09:30
Posts: 48
Тот скрипт выше рабочий активировать режим вар нельзя, но при ударе он отвечает и при рубки леса если энт кинул магию но в хайт не уходит его сразу бьют

You are preoccupied with thoughts of battle.
Пытаемся уйти в хайд...


Top
   
PostPosted: 2012-03-16 08:57:47 
Offline
User avatar

Joined: 2009-05-28 09:58:28
Posts: 2802
Location: Иваново
можно ПОПРОБОВАТЬ убрать IF ENDIF и увеличить паузу до 500.

_________________
Image
YokoInjection CodeSweeper
Ошибка "Unhandled exception in parser"
Стрелялка для олдов.


Top
   
PostPosted: 2012-03-16 13:28:46 
Offline
Expert!
User avatar

Joined: 2005-09-14 15:31:58
Posts: 2152
Location: Latvia
А если вместо
uo.Warmode(0)
сделать
uo.Warmode(1)
wait(500)
uo.Warmode(0)
?

_________________
Уроки языка Injection
Основные команды языка Injection
Yoko Injection Code Sweeper
Drw (2009) скрипты
2017 Начал играть на Uorpg.net


Top
   
PostPosted: 2012-03-16 17:26:35 
Offline

Joined: 2012-03-13 15:09:30
Posts: 48
Перепробовал оба варианта
убрать IF ENDIF не пошел или я что то не так убрал,
во втором варианте скрипт пошел но проблема осталась,
ент кастует магию или атакует, чар в хайт не уходит, если самому нажать кнопку war то скрипт его переводит в peace и чар уходит в хайт.
Code:
sub war_off()
   WHILE NOT UO.Dead()
      if uo.Warmode()==1 then
         uo.Warmode(1)
         wait(500)
         uo.Warmode(0)
      end if
      wait(100)
   WEND
end sub


Top
   
PostPosted: 2012-03-16 18:45:41 
Offline
User avatar

Joined: 2009-05-28 09:58:28
Posts: 2802
Location: Иваново
чар не уходит потому что игра думает что чар не в варе.

Если у тебя добывающий скрипт то ПЕРЕД и ПОСЛЕ использования инструмента вставь просто:

uo.Warmode(0)
wait( 500 )






Я использую вот такую проверку:

Code:
            repeat
               CheckAll()
               UO.DeleteJournal()
               UO.WaitTargetTile(Tiles, mX+X, mY+Y, mZ)
               Tools()
               LastTimer=UO.Timer()
               repeat
                  wait( delay1 )
               until UO.InJournal( allmsg ) || UO.Timer()>LastTimer+delay2 || UO.Weight > MaxVes || UO.Dead()
               CheckAll()
            until UO.InJournal( endmsg ) || UO.Timer()>LastTimer+delay3 || UO.Weight > MaxVes || UO.Dead()


Sub CheckAll()
   UO.Set('quiet','1')
   if UO.InJournal('is attacking you') then
      Enemy = UO.JournalSerial(UO.InJournal("is attacking you")-1)
      DeleteJournal('is attacking you')
      Gong(1)
      uo.Usetype( weapon )
      UO.Attack( Enemy )
      LastTimer=UO.Timer()
      repeat
         wait( delay2 )
      until uo.dead() or uo.GetX(Enemy)==0 || UO.Timer()>LastTimer+delay2
      uo.Warmode(0)
      wait(delay2)
   end if
   If UO.Life < Uo.Str/10 then
      UO.Set('quiet','0')
      uo.charprint(printcolour, 'Умираю!')
      MyTerminate()
   endif
   If UO.Weight > MaxVes Then
      UO.Set('quiet','0')
      uo.charprint(printcolour, 'Перегруз!')
      MyTerminate()
   endif
   if uo.Warmode()==1 then
      uo.Warmode(0)
      wait(delay2)
   end if
   DIM Fish[5]
   Fish[1]  = '0x09CC'   ; тип рыбы 1
   Fish[2]  = '0x09CD'   ; тип рыбы 2
   Fish[3]  = '0x09CE'   ; тип рыбы 3
   Fish[4]  = '0x09CF'   ; тип рыбы 4
   For i=1 To 4
      UO.FindType( Fish[i], -1, 'ground' )
      If UO.FindCount() > 0 Then
         timemove=UO.Timer()
         while UO.ContainerOf( UO.GetSerial('finditem') )=='0xFFFFFFFF' && timemove+20>UO.Timer()
            uo.MoveItem('finditem',0,'backpack')
            wait(delay1)
         wend
         if uo.count( knife ) then
            UO.WaitTargetObject( 'finditem' )
            UO.UseType( knife )
            while UO.Count( Fish[i] )
               wait( delay1 )
            wend
            UO.FindType( Steak )
            while UO.FindCount()>1
               UO.MoveItem( 'finditem', '0' , 'backpack' )
               wait( delay1 )
               UO.FindType( Steak )
            wend
         endif
      endif
   Next
end sub


PS это кусок.

_________________
Image
YokoInjection CodeSweeper
Ошибка "Unhandled exception in parser"
Стрелялка для олдов.


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

All times are UTC+02:00


Who is online

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