Jump to content

devloper script not working-did he use autoit?


Recommended Posts

Guys, i need some help. I Cant get in touch with the deveoper, he relased his script a while ago for sc2. I tried to input it into autoit before i start adjusting some keys but i cant get it to work

It shows-> Line 52 (lcaotion of exe) Error: variable used without being declared

here is the script. Also i removed the #include, since they werent recoginzed

#include
#include
#include
#include
#include
#include
#include
#include
#Include
HotKeySet("!q", "Alt1") ;Sets the hatchery/Queen count
HotKeySet("{F1}", "drone") ;Runs the hatchery script
HotKeySet("{F2}", "zergling") ;Runs the hatchery script
HotKeySet("{F3}", "larva") ;Runs the hatchery script
HotKeySet("{F4}", "hydra") ;Runs the hatchery script
HotKeySet("{F5}", "roach") ;Runs the hatchery script
HotKeySet("{F6}", "overlord") ;Runs the hatchery script
HotKeySet("{F7}", "muta") ;Runs the hatchery script
HotKeySet("!x", "baneling") ;Runs the hatchery script
HotKeySet("!z", "Tumor") ;Sets the hatchery/Queen count
;=============================================================================================================
;GUI
;=============================================================================================================
GUICreate("Zermer", 210, 800)
GUISetIcon("C:\Users\Geeps\Downloads\Chrome\StarCraft-II.ico")
$SpawnLabel = GUICtrlCreateLabel("Spawn Larva", 30, 40, 131, 21, 0x1000)
$Spawn = GUICtrlCreateCombo("F3", 30, 60, 130, 21)
GUICtrlSetData($Spawn, "F1|F2|F3|F4|F5|F6|F7")
$SpawnLabel = GUICtrlCreateLabel("Hatchery Grouping", 30, 120, 131, 21, 0x1000) ;hatchery hotkey
$GroupHatch = GUICtrlCreateCombo("4", 30, 140, 130, 21)
GUICtrlSetData($GroupHatch, "1|2|3|4|5|6|7|8|9|0")
$SpawnLabel = GUICtrlCreateLabel("Queen Grouping", 30, 200, 131, 21, 0x1000) ;Queen hotkey
$GroupQueen = GUICtrlCreateCombo("1", 30, 220, 130, 21)
GUICtrlSetData($GroupQueen, "1|2|3|4|5|6|7|8|9|0")
$BuildDrone = GUICtrlCreateLabel("Build Drone", 30, 280, 131, 21, 0x1000)
$Drone = GUICtrlCreateCombo("F1", 30, 300, 130, 21)
GUICtrlSetData($Drone, "F1|F2|F3|F4|F5|F6|F7")
$BuildZergling = GUICtrlCreateLabel("Build Zergling", 30, 360, 131, 21, 0x1000)
$Zergling = GUICtrlCreateCombo("F2", 30, 380, 130, 21)
GUICtrlSetData($Zergling, "F1|F2|F3|F4|F5|F6|F7")
$BuildHydra = GUICtrlCreateLabel("Build Hydralisk", 30,440, 131, 21, 0x1000)
$Hydra = GUICtrlCreateCombo("F4", 30, 460, 130, 21)
GUICtrlSetData($Hydra, "F1|F2|F3|F4|F5|F6|F7")
$BuildRoach = GUICtrlCreateLabel("Build Roach", 30, 520, 131, 21, 0x1000)
$Roach = GUICtrlCreateCombo("F5", 30, 540, 130, 21)
GUICtrlSetData($Roach, "F1|F2|F3|F4|F5|F6|F7")
$BuildOverlord = GUICtrlCreateLabel("Build Overlord", 30, 600, 131, 21, 0x1000)
$Overlord = GUICtrlCreateCombo("F6", 30, 620, 130, 21)
GUICtrlSetData($Overlord, "F1|F2|F3|F4|F5|F6|F7")
$BuildMuta = GUICtrlCreateLabel("Build Mutalisk", 30, 680, 131, 21, 0x1000)
$Muta = GUICtrlCreateCombo("F7", 30, 700, 130, 21)
GUICtrlSetData($Muta, "F1|F2|F3|F4|F5|F6|F7")
$button1 = GUICtrlCreateButton("Set Hotkeys", 30, 760, 130, 20)
GUISetState()
;=============================================================================================================
;/GUI
;=============================================================================================================
$x = @DesktopWidth/2
$y = @DesktopHeight/2
$HatchKey = 4
$QueenKey = 1
$oAltStatus = 1
$oSleeper = 0
$oTumor =0
$tumorif = 0
$dll = DllOpen("user32.dll")
Global $MPos, $tumorx, $tumory
$Form1 = GUICreate("Form1", 633, 35, @DesktopWidth-210, 500, $WS_POPUP, $WS_EX_LAYERED)
GUISetBkColor(0xABCDEF)
_WinAPI_SetLayeredWindowAttributes($Form1, 0xABCDEF, 255)
WinSetOnTop("Form1", "", 1)
while 1
$msg = GUIGetMsg()
Select
Case $msg = $GUI_EVENT_CLOSE
Exit
Case $msg = $button1
$SpawnKey = GUICtrlRead($Spawn)
SpawnFunc()
$DroneKey = GUICtrlRead($Drone)
DroneFunc()
$ZerglingKey = GUICtrlRead($Zergling)
ZerglingFunc()
$HydraKey = GUICtrlRead($Hydra)
HydraFunc()
$RoachKey = GUICtrlRead($Roach)
RoachFunc()
$OverlordKey = GUICtrlRead($Overlord)
OverlordFunc()
$MutaKey = GUICtrlRead($Muta)
MutaFunc()
$HatchKey = GUICtrlRead($GroupHatch)
$QueenKey = GUICtrlRead($GroupQueen)
MsgBox (0, "Zermer", "Hotkeys Set!")
EndSelect
If _IsPressed("10", $dll) and _IsPressed("34", $dll) Then
Alt1()
EndIf
If _IsPressed("04", $dll) Then
attack()
EndIf
WEnd
;HotkeySet Functions
Func SpawnFunc()
Global $Hatchkey = "{"& $SpawnKey & "}"
HotKeySet($Hatchkey, "larva") ;Runs the hatchery script
EndFunc
Func DroneFunc()
$testkey = "{"& $DroneKey & "}"
HotKeySet($testkey, "drone") ;Runs the hatchery script
EndFunc
Func ZerglingFunc()
$testkey = "{"& $ZerglingKey & "}"
HotKeySet($testkey, "zergling") ;Runs the hatchery script
EndFunc
Func HydraFunc()
$testkey = "{"& $HydraKey & "}"
HotKeySet($testkey, "hydra") ;Runs the hatchery script
EndFunc
Func RoachFunc()
$testkey = "{"& $RoachKey & "}"
HotKeySet($testkey, "roach") ;Runs the hatchery script
EndFunc
Func OverlordFunc()
$testkey = "{"& $OverlordKey & "}"
HotKeySet($testkey, "overlord") ;Runs the hatchery script
EndFunc
Func MutaFunc()
$testkey = "{"& $MutaKey & "}"
HotKeySet($testkey, "muta") ;Runs the hatchery script
EndFunc
;End HotkeySet functions
;if ctrl 4 ;make ctrl add 1 to AltStatus
Func Alt1() ;1 hatchery setting
$oAltStatus += 1
Beep (200,500)
EndFunc
Func attack()
MouseUp("middle")
Send ("{^ down}")
MouseDown("left")
MouseDown("left")
Sleep(10)
MouseUp("left")
;Send ("{^ up}")
EndFunc
Func baneling()
MouseClick("left")
Send ("x") ;highlight select
Beep (900,120)
EndFunc
;drone #f1
Func drone()
Send($HatchKey) ;hatchery hotkey
Send ("s") ;highlight select
Send ("d") ;spawn larva
Send ("d") ;spawn larva
Send ("d") ;spawn larva
Send ("d") ;spawn larva
Beep (500,500)
EndFunc
;zergling #f2
Func zergling()
Send($HatchKey) ;hatchery hotkey
Send ("s") ;highlight select
Send ("z") ;spawn larva
Send ("z") ;spawn larva
Send ("z") ;spawn larva
Send ("z") ;spawn larva
Send ("z") ;spawn larva
Send ("z") ;spawn larva
Send ("z") ;spawn larva
;sleep (20)
;Send ("+3")
EndFunc
;larve #f3
Func larva()
If $oAltStatus = 1 Then
Send ("^{F8}")
Send ("{+ down}")
Send("{BACKSPACE}") ;hatchery hotkey
Send ($QueenKey) ;highlight queen
Send ("v") ;spawn larva
MouseClick("left",$x, $y, 1, 0) ;Click on hatchery in the middle of the Screen hatchery((
Send ("{+ up}")
Send ("{F8}")
EndIf
If $oAltStatus = 2 Then
Send ("^{F8}")
Send ("{+ down}")
Send("{BACKSPACE}") ;hatchery hotkey
Send ($QueenKey) ;highlight queen
Send ("v") ;spawn larva
MouseClick("left",$x, $y, 1, 0) ;Click on hatchery in the middle of the Screen hatchery((
Send("{BACKSPACE}") ;hatchery hotkey
Send ("v") ;spawn larva
MouseClick("left",$x, $y, 1, 0) ;Click on hatchery in the middle of the Screen hatchery((
Send ("{+ up}")
Send ("{F8}")
EndIf
If $oAltStatus >= 3 Then
Send ("^{F8}")
Send ("{+ down}")
Send("{BACKSPACE}") ;hatchery hotkey
Send ($QueenKey) ;highlight queen
Send ("v") ;spawn larva
MouseClick("left",$x, $y, 1, 0) ;Click on hatchery in the middle of the Screen hatchery((
Send("{BACKSPACE}") ;hatchery hotkey
Send ("v") ;spawn larva
MouseClick("left",$x, $y, 1, 0) ;Click on hatchery in the middle of the Screen hatchery((
Send("{BACKSPACE}") ;hatchery hotkey
Send ("v") ;spawn larva
MouseClick("left",$x, $y, 1, 0) ;Click on hatchery in the middle of the Screen hatchery((
Send ("{+ up}")
Send ("{F8}")
Send ("3")
EndIf
$oSleeper = $oSleeper + 1
Sound()
EndFunc
;hydra #f4
Func hydra()
Send($HatchKey) ;hatchery hotkey
Send ("s") ;highlight select
Send ("h") ;spawn larva
Send ("h") ;spawn larva
Send ("h") ;spawn larva
Send ("h") ;spawn larva
;sleep (20)
;Send ("+2")
EndFunc
;roach #f5
Func roach()
Send($HatchKey) ;hatchery hotkey
Send ("s") ;highlight select
Send ("r") ;spawn larva
Send ("r") ;spawn larva
Send ("r") ;spawn larva
Send ("r") ;spawn larva
;sleep (20)
;Send ("+2")
EndFunc
;overlord #f6
Func overlord()
Send($HatchKey) ;hatchery hotkey
Send ("s") ;highlight select
Send ("v") ;spawn larva
;sleep (20)
;Send ("+6")
EndFunc
;muta #f7
Func muta()
Send($HatchKey) ;hatchery hotkey
Send ("s") ;highlight select
Send ("t") ;spawn larva
Send ("t") ;spawn larva
Send ("t") ;spawn larva
Send ("t") ;spawn larva
;sleep (20)
;Send ("+5")
EndFunc
;infestor #f8
Func infestor()
Send($HatchKey) ;hatchery hotkey
Send ("s") ;highlight select
Send ("i") ;spawn larva
EndFunc
Func Sound()
Run ("Larva.exe","")
EndFunc
Func Tumor()
Beep (500,500)
If $tumorif = 0 Then
$tumorif = 1
Send ("7")
Send ("7")
Send ("c")
While $oTumor < 1
If _IsPressed("01", $dll) Then
$MPos = MouseGetPos()
$tumorx = $MPos[0]
$tumory = $MPos[1]
;MouseClick("left",$x, $y, 1, 0) ;Click on hatchery in the middle of the Screen hatchery((
;Run ("Tumor.exe","")
MouseClickDrag("left", $tumorx-20, $tumory+20, $tumorx+20, $tumory-20)
Sleep(15)
Send ("^7")
;ControlFocus("[CLASS:StarCraft II]", "", "")
$oTumor = 1
EndIf
WEnd
$oTumor = 0
$tumorif = 0
EndIf
EndFunc
Link to comment
Share on other sites

  • Moderators

Jimmywhy,

Welcome to the AutoIt forum. :)

Unfortunately you appear to have missed the Forum Rules on your way in. Please read them now - particularly the bit about not discussing game automation - and then you will understand why you will get no help and this thread will now be locked. ;)

See you soon with a legitimate question I hope. :D

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...