[AutoIt] Two Accounts, One Computer Melee / Parry Macro

08/14/2009 12:16 Penakle#1
Instructions:
ESC Key - Terminates Macro
Pause Key - Pauses Macro
Accounts Need to be ran in windowed mode.

Parrying Account should be logged in, with Shield and Weapon equipped and unsheathed. You will need to have rest assigned to the 0 hot key on the hot bar. If your going to be leveling Polearm, I suggest you find a corner to back into or it will not work. Character should be in Mouse look mode before you alt tab to the Attacking character.

Attacking Account should be logged in and have No weapon attached. Weapons must be in Inventory. You will need 4 weapons total. Character must be focused and in Mouse Look Mode before the macro initiates.

Attacker Hotkeys
1-4 - Weapons
0 - Rest

Defender Hotkeys
0 - Rest

After you answer the questions, you will have 10 seconds to set up the windows. Make sure you alt tab between the two windows to ensure they are setup correct.

Magic / Parry
Code:
#cs ----------------------------------------------------------------------------
   Script by: Eiles


   Script requires two Accounts running on same computer in window mode.
   4 Individual Staffs 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.

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



Dim $a, $b, $c, $d, $e
Dim $Weapon
Global $Paused
$b = InputBox( "Question", "How many times would you like to Cast?", "40" )
$c = InputBox( "Question", "How long would you like to rest? (1 sec = 1000)", "120000" )
$d = InputBox( "Question", " What Hotkey is your spell on?", "5" )
$e = InputBox( "Question", "What is the cast time of the spell? (1 sec = 1000)", "2000" )
HotKeySet("{PAUSE}", "TogglePause")
HotKeySet("{ESC}", "Terminate")
$Weapon = 1
$Shield = 1
$a = 0
Sleep ( 10000 )

while 1
   sleep ( 100 )
      Call ("EquipAttack")
      sleep ( 500 )
      Call ("CombatModeA")
      sleep ( 500 )
      Call ("EquipDefense")
      sleep ( 500 )
      Call ("CombatModeD")
      sleep ( 500 )
      Call("Attack")
      sleep ( 500 )
      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

Func CombatModeA()
   Sleep (100 )
   Send ( "r" )
   Sleep ( 1000 )
   Send ( $d )
   Sleep ( 200 )
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 (100 )
   Send ( "r" )
   Sleep ( 1000 )
   send ( "!{TAB}" )
EndFunc

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

Func Rest()
   Send ( "R" )
   Sleep ( 1500 )
   Send ( "0" )
   Sleep ( 1500 )
   Mouseclick ( "Left" )
   Sleep ( 1500 )
   send ( "!{TAB}" )
   Sleep ( 1500 )
   Send ( "R" )
   Sleep ( 1500 )
   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

Func Terminate( )
    Exit 0
EndFunc
Melee / Parry

Code:
#cs ----------------------------------------------------------------------------
   Script by: Eiles


   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 ( 100 )
      Call ("EquipAttack")
      sleep ( 500 )
      Call ("CombatMode")
      sleep ( 500 )
      Call ("EquipDefense")
      sleep ( 500 )
      Call ("CombatModeD")
      sleep ( 500 )
      Call("Attack")
      sleep ( 500 )
      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 (100 )
   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 (100 )
   Send ( "r" )
   Sleep ( 1000 )
   send ( "!{TAB}" )
EndFunc

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

Func Rest()
   Send ( "R" )
   Sleep ( 1500 )
   Send ( "0" )
   Sleep ( 1500 )
   Mouseclick ( "Left" )
   Sleep ( 1500 )
   send ( "!{TAB}" )
   Sleep ( 1500 )
   Send ( "R" )
   Sleep ( 1500 )
   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

Func Terminate( )
    Exit 0
EndFunc
03/26/2010 06:24 Azereus#2
Doesnt work to me, its alt tabing and then it stops
i run 2x darkfall windowed screen, im at the attackers window he switches to the defender not sheathing sword nothing just alt tabing, any hint why that is so?


Edit:

Dunno how i fixed it, but its probably something with the windows 7 administration
04/21/2010 00:48 Striker009#3
Quote:
Originally Posted by Azereus View Post
Doesnt work to me, its alt tabing and then it stops
i run 2x darkfall windowed screen, im at the attackers window he switches to the defender not sheathing sword nothing just alt tabing, any hint why that is so?


Edit:

Dunno how i fixed it, but its probably something with the windows 7 administration
If anyone knows how to fix this, let me know :P

For some reason i have the same problem with windows 7. If im on the desktop, it will alt tab into Darkfall but nothing will happen at all. No tabbing between the two clients, no clicking, nothing.
04/27/2010 01:27 Rails3#4
I can get the macro to run if I open both darkfall clients in admin mode, and open the script in admin mode.

The problem I'm experiencing is that after a few swings, the characters switch. So now the blocking character is attacking....

I have a feeling there is a problem with the way Alt+tab works in windows. Any chance we can get a revision, or suggestion?

Thanks!
06/09/2010 14:52 Pegasu#5
How do you manage to macro two windows? How do you parry while hiting the same time?