Что нового

Выбор нужного окна

Marik

Новичок
Сообщения
1
Репутация
0
Приветствую, у меня небольшая проблема. Иногда сбивается скрипт окно которое должно быть вторым становится первым.
Как сделать, чтобы после (Call ("Rest")) переключалось всегда на первое окно.

Код:
#cs ----------------------------------------------------------------------------


   Script requires two Accounts running on same computer in window mode.
   4 Individual Weapons should be placed in Hotbar 1 - 4 on the Attacking Account. These will be cycled through to provide a greater amount of durability and keep you skilling up longer.
   4 Individual Shields should be placed in Hotbar 1 - 4 on the Parrying Account. These will be cycled through to provide a greater amount of durability and keep you skilling up longer

   Begin the script with Attacking account unequiped and Focused in FPS mode.
   Make sure the Parrying account has only the sword equiped. The shields should be unequiped and in your inventory.
   Parrying Account should be in FPS mode and in the background upon Scrip activation.

   Script begins 10 seconds after you answer the questions, so you should have enough time to ensure Accounts are setup properly and alt-tabing between each other fluidly.
   
   Pause Key Pauses the Script
   Esc Key Ends the Script


#ce-------------------------------------------------------

Dim $a, $b, $c
Dim $Weapon
Global $Paused
$b = InputBox( "Question", "How many times would you like to swing? (1 sec = 1000)", "25" )
$c = InputBox( "Question", "How long would you like to rest? (1 sec = 1000)", "155000")
HotKeySet("{PAUSE}", "TogglePause")
HotKeySet("{ESC}", "Terminate")
$Weapon = 1
$Shield = 1
$a = 0
Sleep ( 10000 )

while 1
   sleep ( 150 )
      Call ("EquipAttack")
      sleep ( 600 )
      Call ("CombatMode")
      sleep ( 600 )
      Call ("EquipDefense")
      sleep ( 600 )
      Call ("CombatModeD")
      sleep ( 600 )
      Call("Attack")
      sleep ( 600 )
      Call ("Rest")
WEnd

Func EquipAttack()
   Sleep(1000)
   ;send ("{1} - {4}") ; Weapon
   Send("{" & $Weapon & "}")
   $Weapon = $Weapon + 1
   If $Weapon = 5 Then
      $Weapon = 1
   EndIf
   Sleep(1000)
EndFunc   ;==>Equip

Func CombatMode()
   Sleep (150 )
   Send ( "r" )
   Sleep ( 1000 )
EndFunc

Func EquipDefense()
   send ( "!{TAB}" )
   sleep ( 500 )
   ;send ("{1} - {4}") ; Shield
   Send("{" & $Shield & "}")
   $Shield = $Shield + 1
   If $Shield = 5 Then
      $Shield = 1
   EndIf
   Sleep(1000)
EndFunc

Func CombatModeD()
   Sleep (150 )
   Send ( "r" )
   Sleep ( 1000 )
   send ( "!{TAB}" )
EndFunc

Func Attack()
   Do
      sleep ( 150 )
      Mouseclick ( "Left" )
      sleep ( 150 )
      send ( "!{TAB}" )
      sleep ( 150 )
      Send ( "{V DOWN}" )
      sleep ( 1000 )
      Send ( "{V UP}" )
      sleep ( 600 )
      send ( "!{TAB}" )
      sleep ( 1000 )
      $a = $a + 1
   Until $a = $b
   $a = 0
EndFunc

Func Rest()
   Send ( "R" )
   Sleep ( 1500 )
   Send ( "5" )
   Sleep ( 1500 )
   Send ( "5" )
   Sleep ( 1500 )
   Send ( "0" )
   Sleep ( 1500 )
   Mouseclick ( "Left" )
   Sleep ( 1500 )
   send ( "!{TAB}" )
   Sleep ( 1500 )
   Send ( "R" )
   Sleep ( 3000 )
   Send ( "0" )
   Sleep ( 1500 )
   Mouseclick ( "Left" )
   Sleep ( 1500 )
   send ( "!{TAB}" )
   Sleep ( $c )
   Send ( "w" )
   Sleep ( 1500 )
   send ( "!{TAB}" )
   Sleep ( 1500 )
   Send ( "w" )
   Sleep ( 2000 )
   send ( "!{TAB}" )
   Sleep ( 1500 )
EndFunc

Func TogglePause()
   $Paused = Not $Paused
   While $Paused
      Sleep(100)
   WEnd
EndFunc   ;==>TogglePause
 

kaster

Мой Аватар, он лучший самый
Команда форума
Глобальный модератор
Сообщения
4 020
Репутация
622
Re: Помогите доработать скрипт

{TopicNameWarn}


Добавлено:
Сообщение автоматически объединено:

в твоем скрипте нет ни одной функции, которая меняет расположение окон.
 
Верх