Sign in to follow this  
Followers 0
rokuli

Need help with script!

6 posts in this topic

Hello i need help with script!

My old code:

#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <misc.au3>
HotKeySet("{esc}", "_Exit")
Global $upper[2] = [0, 0]
Global $lower[2] = [0, 0]
Global $uppertwo[2] = [0, 0]
Global $lowertwo[2] = [0, 0]
Global $setl1 = 0, $setu1 = 0, $setu2 = 0, $setl2 = 0
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Hockey.tk/Kiekko.tk aimbot", 139, 200, 200, 200)
$setupperone = GUICtrlCreateButton("Left Up", 0, 8, 139, 25, 0)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
$setlowerone = GUICtrlCreateButton("Left Down", 0, 40, 139, 25, 0)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
$setuppertwo = GUICtrlCreateButton("Right Up", 0, 72, 139, 25, 0)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
$setlowertwo = GUICtrlCreateButton("Right down", 0, 104, 139, 25, 0)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
$start = GUICtrlCreateButton("START! =D", 32, 136, 75, 25, 0)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
$restart = GUICtrlCreateButton("Restart", 0, 168, 139, 25, 0)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
$dll = DllOpen("user32.dll")
While 1
    Sleep(10)
    $guimsg = GUIGetMsg()
    Select
        Case $GUI_EVENT_CLOSE = $guimsg
            Exit
        Case $setupperone = $guimsg
            MsgBox(0, "", "Drag the mouse to the Left upper pillar and press f3")
            While $setu1 = 0
                Sleep(40)
                If _IsPressed("72", $dll) Then
                    $pos = MouseGetPos()
                    $upper[0] = $pos[0]
                    $upper[1] = $pos[1]
                    $setu1 = 1
                    MsgBox(0, " By Sägä ", "Left Upper pillar pos has been set!!")
                EndIf
            WEnd
        Case $setlowerone = $guimsg
            MsgBox(0, "", "Drag the mouse to the Left lower pillar and press f4")
            While $setl1 = 0
                Sleep(40)
                If _IsPressed("73", $dll) Then
                    $pos = MouseGetPos()
                    $lower[0] = $pos[0]
                    $lower[1] = $pos[1]
                    $setl1 = 1
                    MsgBox(0, " By Sägä ", "Left Lower pillar pos has been set!!")
                EndIf
            WEnd
        Case $setuppertwo = $guimsg
            MsgBox(0, "", "Drag the mouse to the Right upper pillar and press f5")
            While $setu2 = 0
                Sleep(40)
                If _IsPressed("74", $dll) Then
                    $pos = MouseGetPos()
                    $uppertwo[0] = $pos[0]
                    $uppertwo[1] = $pos[1]
                    $setu2 = 1
                    MsgBox(0, " By Sägä ", "Right Upper pillar pos has been set!!")
                EndIf
            WEnd
        Case $setlowertwo = $guimsg
            MsgBox(0, "", "Drag the mouse to the Right lower pillar and press f6")
            While $setl2 = 0
                Sleep(40)
                If _IsPressed("75", $dll) Then
                    $pos = MouseGetPos()
                    $lowertwo[0] = $pos[0]
                    $lowertwo[1] = $pos[1]
                    $setl2 = 1
                    MsgBox(0, " By Sägä ", "Right Lower pillar pos has been set!!")
                EndIf
            WEnd
        Case $start = $guimsg
            MsgBox(0, "  Sägä ", "LETS MAKE GOALS :)")
            While $guimsg <> $restart
                $guimsg = GUIGetMsg()
                Sleep(40)
                If _IsPressed("72", $dll) Then; f3
                    MouseMove($upper[0], $upper[1], 0)
                EndIf
                If _IsPressed("73", $dll) Then; f4
                    MouseMove($lower[0], $lower[1], 0)
                EndIf
                If _IsPressed("74", $dll) Then; f5
                    MouseMove($uppertwo[0], $uppertwo[1], 0)
                EndIf
                If _IsPressed("75", $dll) Then; f6
                    MouseMove($lowertwo[0], $lowertwo[1], 0)
                EndIf
            WEnd
            MsgBox('', 'RESTART', '')
            MsgBox(0, "   By Sägä  ", "Better luck next time, honey =D")
            $setu1 = 0
            $setl1 = 0
            $setu2 = 0
            $setl2 = 0

    EndSelect
WEnd

DllClose($dll)
Exit


Func _Exit()
    DllClose($dll)
    Exit
EndFunc   ;==>_Exit

Old scripts works fine, but i wanna make it better. Old script works this way: when i press f3 cursor teleports to one positions, but i need help to edit it.

What i want: Posted Image

So, When i'm AREA 1, and i press Mouse Left, Cursor moves to same line with right down pillar, little distance from player.

When i'm AREA 2, and i press Mouse Left, Cursor moves to same line with right up pillar, little distance from player.

When i'm AREA 3, and i press Mouse Left, Cursor moves to same line with left down pillar, little distance from player.

When i'm AREA 4, and i press Mouse Left, Cursor moves to same line with left up pillar, little distance from player.

I made this picture to realise what i mean.Posted Image

BLACK AND BLUE LINES SHOW WHERE CURSOR SHOULD POINT!!!

PLAYER AND CURSOR DISTANCE ALWAYS SAME WHEN I PRESS MOUSE LEFT, AND CURSOR GETS RIGHT POSITION!

SO, PLEASE TELL ME HOW TO CODE THAT, OR MAKE READY CODE FOR THAT!

Share this post


Link to post
Share on other sites



Try that.

#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <misc.au3>
HotKeySet("{esc}", "_Exit")
Global $upper[2] = [0, 0]
Global $lower[2] = [0, 0]
Global $uppertwo[2] = [0, 0]
Global $lowertwo[2] = [0, 0]
Global $setl1 = 0, $setu1 = 0, $setu2 = 0, $setl2 = 0
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Hockey.tk/Kiekko.tk aimbot", 139, 200, 200, 200)
$setupperone = GUICtrlCreateButton("Left Up", 0, 8, 139, 25, 0)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
$setlowerone = GUICtrlCreateButton("Left Down", 0, 40, 139, 25, 0)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
$setuppertwo = GUICtrlCreateButton("Right Up", 0, 72, 139, 25, 0)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
$setlowertwo = GUICtrlCreateButton("Right down", 0, 104, 139, 25, 0)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
$start = GUICtrlCreateButton("START! =D", 32, 136, 75, 25, 0)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
$restart = GUICtrlCreateButton("Restart", 0, 168, 139, 25, 0)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
$dll = DllOpen("user32.dll")
While 1
    Sleep(10)
    $guimsg = GUIGetMsg()
    Select
        Case $GUI_EVENT_CLOSE = $guimsg
            Exit
        Case $setupperone = $guimsg
            MsgBox(0, "", "Drag the mouse to the Left upper pillar and press f3")
            While $setu1 = 0
                Sleep(40)
                If _IsPressed("72", $dll) Then
                    $pos = MouseGetPos()
                    $upper[0] = $pos[0]
                    $upper[1] = $pos[1]
                    $setu1 = 1
                    MsgBox(0, " By Sägä ", "Left Upper pillar pos has been set!!")
                EndIf
            WEnd
        Case $setlowerone = $guimsg
            MsgBox(0, "", "Drag the mouse to the Left lower pillar and press f4")
            While $setl1 = 0
                Sleep(40)
                If _IsPressed("73", $dll) Then
                    $pos = MouseGetPos()
                    $lower[0] = $pos[0]
                    $lower[1] = $pos[1]
                    $setl1 = 1
                    MsgBox(0, " By Sägä ", "Left Lower pillar pos has been set!!")
                EndIf
            WEnd
        Case $setuppertwo = $guimsg
            MsgBox(0, "", "Drag the mouse to the Right upper pillar and press f5")
            While $setu2 = 0
                Sleep(40)
                If _IsPressed("74", $dll) Then
                    $pos = MouseGetPos()
                    $uppertwo[0] = $pos[0]
                    $uppertwo[1] = $pos[1]
                    $setu2 = 1
                    MsgBox(0, " By Sägä ", "Right Upper pillar pos has been set!!")
                EndIf
            WEnd
        Case $setlowertwo = $guimsg
            MsgBox(0, "", "Drag the mouse to the Right lower pillar and press f6")
            While $setl2 = 0
                Sleep(40)
                If _IsPressed("75", $dll) Then
                    $pos = MouseGetPos()
                    $lowertwo[0] = $pos[0]
                    $lowertwo[1] = $pos[1]
                    $setl2 = 1
                    MsgBox(0, " By Sägä ", "Right Lower pillar pos has been set!!")
                EndIf
            WEnd
        Case $start = $guimsg
            MsgBox(0, "  Sägä ", "LETS MAKE GOALS :)")
            While $guimsg <> $restart
                $guimsg = GUIGetMsg()
                Sleep(40)
                If _IsPressed("72", $dll) Then; f3
                    MouseMove($upper[0], $upper[1], 0)
                EndIf
                If _IsPressed("73", $dll) Then; f4
                    MouseMove($lower[0], $lower[1], 0)
                EndIf
                If _IsPressed("74", $dll) Then; f5
                    MouseMove($uppertwo[0], $uppertwo[1], 0)
                EndIf
                If _IsPressed("75", $dll) Then; f6
                    MouseMove($lowertwo[0], $lowertwo[1], 0)
                EndIf
            WEnd
            MsgBox('', 'RESTART', '')
            MsgBox(0, "   By Sägä  ", "Better luck next time, honey =D")
            $setu1 = 0
            $setl1 = 0
            $setu2 = 0
            $setl2 = 0

    EndSelect
WEnd

DllClose($dll)
Exit


Func _Exit()
    DllClose($dll)
    Exit
EndFunc   ;==>_Exit

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Share this post


Link to post
Share on other sites

U didn't even edit that?

Share this post


Link to post
Share on other sites

rokuli,

This is your second topic about game bots. This is second time you have been linked to the announcement that clearly says we do NOT accept such things here. :graduated:

I would strongly suggest you do NOT start a third topic along the same lines. :(

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______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

 

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  
Followers 0