Sign in to follow this  
Followers 0
Scorekeeper

placement marker detecotr.

1 post in this topic

Here is a rip off the game, it is the bar and is located in the left corner:

Posted Image

I have decided to make a placement marker to calculate the coordinates of everything else but do not know how to make autoit detect it.HELP.

The coord of the marker is X: 40 Y: 66 .

Also i want to take the original width of the bar, then multiply it by the %. 100% means that it'll check the end of the bar= max health. 50% means it'll check half the bar = half health instead of the hp/mp selection.

Anyone help, if anyone can teach me it would be great.

Here is the old code:

;*********************************************|Variables Defined|*********************************************
$currentColor = 0
Dim $Width, $Height, $pixel, $Runbot, $hpbot, $mpbot, $Aboutbot, $aboutbot, $begin, $dif, $Channel3x, $Channel3y, $Runbot, $hpbot, $mpbot, $Screen, $hpbotpercent, $mpbotpercent, $pixelCheck2, $pixelCheck, $pixelGetX, $pixelGetX2, $pixelGetY2, $pixelGetY
$count = 0  
;*********************************************|Variables Defined|*********************************************

;*********************************************|GUI|*********************************************
    #include <GUIConstants.au3>
Fileinstall("C:\Program Files\RoseBots\Images\Background.jpg","C:\Program Files\RoseBots\Images\Background.jpg")
Fileinstall("C:\Program Files\RoseBots\Images\LS.bmp","C:\Program Files\RoseBots\Images\LS.bmp")
Global $Paused
HotKeySet("{PAUSE}", "TogglePause")
HotKeySet("{ESC}", "Terminate")
Opt("GUIOnEventMode",1)
GUICreate ( "Life Support Bot By ScoreKeeper", 400,335)
GUISetBKcolor(6119597)
GUICtrlCreatePic("C:\Program Files\RoseBots\Images\Background.jpg",0,0,400,335,$WS_EX_TRANSPARENT) 
$1 = GUICtrlCreateLabel ( "1. Login to ROSE and Alt-Tab back here", 20, 10, 195, 15)
$2 = GUICtrlCreateLabel ( "2. Select desired Hp Shotcut and %.", 20, 25, 180, 15)
$3 = GUICtrlCreateLabel ( "3. Select desired Mp Shotcut and %.", 20, 85, 180, 15)
$4 = GUICtrlCreateLabel ( "4. Select screen mode.", 20, 145, 110, 15)
$6 = GUICtrlCreateLabel ( "The Esc button will exit the script.", 20, 250, 160, 15)
$7 = GUICtrlCreateLabel ( "The Pause button will pause the script.", 20, 265, 185, 15)
$8 = GUICtrlCreateLabel ( "Life Support Bot by ScoreKeeper AKA Darren Willows !", 20, 295, 270, 15)
$9 = GUICtrlCreateLabel ( "www.GamerzPlanet.net Copyright© 2005", 20, 310, 200, 15)
GUICtrlSetColor($1,16768341)
GUICtrlSetColor($2,16768341)
GUICtrlSetColor($3,16768341)
GUICtrlSetColor($4,16768341)
GUICtrlSetColor($6,16768341)
GUICtrlSetColor($7,16768341)
GUICtrlSetColor($8,16768341)
GUICtrlSetColor($9,16768341)
GUICtrlCreatePic("C:\Program Files\RoseBots\Images\LS.bmp",315,250,85,85,0,$WS_EX_STATICEDGE)
;*********************************************|GUI|*********************************************

;*********************************************|settings|********************************************


*

$hpbot = GUICtrlcreatecombo( "F1", 75, 50, 100)
GUICtrlSetData(-1,"F2")
GUICtrlSetData(-1,"F3")
GUICtrlSetData(-1,"F4")
GUICtrlSetData(-1,"F5")
GUICtrlSetData(-1,"F6")
GUICtrlSetData(-1,"F7")
GUICtrlSetData(-1,"F8")
$hpbotpercent = GUICtrlcreatecombo( "10%", 200, 50, 100)
GUICtrlSetData(-1,"20%")
GUICtrlSetData(-1,"30%")
GUICtrlSetData(-1,"40%")
GUICtrlSetData(-1,"50%")
GUICtrlSetData(-1,"60%")
GUICtrlSetData(-1,"70%")
GUICtrlSetData(-1,"80%")
$mpbot = GUICtrlcreatecombo( "F1", 75, 110, 100)
GUICtrlSetData(-1,"F2")
GUICtrlSetData(-1,"F3")
GUICtrlSetData(-1,"F4")
GUICtrlSetData(-1,"F5")
GUICtrlSetData(-1,"F6")
GUICtrlSetData(-1,"F7")
GUICtrlSetData(-1,"F8")
$mpbotpercent = GUICtrlcreatecombo( "10%", 200, 110, 100)
GUICtrlSetData(-1,"20%")
GUICtrlSetData(-1,"30%")
GUICtrlSetData(-1,"40%")
GUICtrlSetData(-1,"50%")
GUICtrlSetData(-1,"60%")
GUICtrlSetData(-1,"70%")
GUICtrlSetData(-1,"80%")
$Screen = GUICtrlcreatecombo( "F1", 75, 110, 100)
GUICtrlSetData(-1,"F2")
GUICtrlSetData(-1,"F3")
GUICtrlSetData(-1,"F4")
GUICtrlSetData(-1,"F5")
GUICtrlSetData(-1,"F6")
GUICtrlSetData(-1,"F7")
;*********************************************|settings|********************************************


*
$Mode = GUICtrlcreatecombo( "Fullscreen", 75, 170, 100)
GUICtrlSetData(-1,"Windowed")
$Aboutbot = GUICtrlCreateButton ( "About", 115, 220, 75)
GUICtrlSetOnEvent($Aboutbot,"About")
$Runbot = GUICtrlCreateButton ( "Run bot", 20, 220, 75)
GUICtrlSetOnEvent($Runbot,"Runbot")
GUISetState(@SW_SHOW)
;*********************************************| GUI |*********************************************

;*********************************************|Run About |*********************************************
Func About()
Run ("C:\Program Files\RoseBots\Images\LS BOT.txt")
EndFunc
;*********************************************|Run About |*********************************************

;*********************************************|screen|*********************************************
Func OnChannel1()
    WinActivate("ROSE online")
    $Size = WinGetPos("ROSE online")
    $Width = $Size[2]
    $Height = $Size[3]
    If GUICtrlRead($Screen) = "Fullscreen" Then
        $Winx = 0
        $Winy = 0
    Else
        $Winx = 4
        $Winy = 30
        $Width = $Width - 8
        $Height = $Height - 34
    Endif
;*********************************************|screen|*********************************************

;*********************************************| pix hp |*********************************************
        Select
                           Case GuiCtrlRead($hpbotpercent) = '10%'
                      $pixelGetX = 86
                      $pixelGetY = 75
                              Case GuiCtrlRead($hpbotpercent) = '20%'
                      $pixelGetX = 99
                      $pixelGetY = 75
                              Case GuiCtrlRead($hpbotpercent) = '30%'
                      $pixelGetX = 115
                      $pixelGetY = 75
                              Case GuiCtrlRead($hpbotpercent) = '40%'
                      $pixelGetX = 124
                      $pixelGetY = 75
                              Case GuiCtrlRead($hpbotpercent) = '50%'
                      $pixelGetX = 160
                      $pixelGetY = 75
                              Case GuiCtrlRead($hpbotpercent) = '60%'
                      $pixelGetX = 171
                      $pixelGetY = 75
                              Case GuiCtrlRead($hpbotpercent) = '70%'
                      $pixelGetX = 184
                      $pixelGetY = 75
                              Case GuiCtrlRead($hpbotpercent) = '80%'
                      $pixelGetX = 192
                      $pixelGetY = 75
                      EndSelect
;*********************************************| pix hp |*********************************************

;*********************************************| pix mp |*********************************************
        Select
                           Case GuiCtrlRead($mpbotpercent) = '10%'
                      $pixelGetX2 = 86
                      $pixelGetY2 = 88
                              Case GuiCtrlRead($mpbotpercent) = '20%'
                      $pixelGetX2 = 99
                      $pixelGetY2 = 88
                              Case GuiCtrlRead($mpbotpercent) = '30%'
                      $pixelGetX2 = 115
                      $pixelGetY2 = 88
                              Case GuiCtrlRead($mpbotpercent) = '40%'
                      $pixelGetX2 = 124
                      $pixelGetY2 = 88
                              Case GuiCtrlRead($mpbotpercent) = '50%'
                      $pixelGetX2 = 160
                      $pixelGetY2 = 88
                              Case GuiCtrlRead($mpbotpercent) = '60%'
                      $pixelGetX2 = 171
                      $pixelGetY2 = 88
                              Case GuiCtrlRead($mpbotpercent) = '70%'
                      $pixelGetX2 = 184
                      $pixelGetY2 = 88
                              Case GuiCtrlRead($mpbotpercent) = '80%'
                      $pixelGetX2 = 192
                      $pixelGetY2 = 88
                       EndSelect
EndFunc


;*********************************************| pix mp |*********************************************

;*********************************************| Shortcut hp |*********************************************
$pixelhp = PixelGetColor(35,42)

Do
     $pixelCheck = PixelGetColor($pixelGetX, $pixelGetY)
Until $pixelCheck = $pixelhp
;*********************************************| Shortcut hp |*********************************************  
While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            Send("{ESC}")
        Case    GUICtrlRead ($hpbot) = "F1"
            ConsoleWrite(GUICtrlRead($hpbot) & @LF)
            Send("{F1}")
        Case    GUICtrlRead ($hpbot) = "F2"
            ConsoleWrite(GUICtrlRead($hpbot) & @LF)
            Send("{F2}")
        Case    GUICtrlRead ($hpbot) = "F3"
            ConsoleWrite(GUICtrlRead($hpbot) & @LF)
            Send("{F3}")
        Case    GUICtrlRead ($hpbot) = "F4"
            ConsoleWrite(GUICtrlRead($hpbot) & @LF)
            Send("{F4}")
        Case    GUICtrlRead ($hpbot) = "F5"
            ConsoleWrite(GUICtrlRead($hpbot) & @LF)
            Send("{F5}")
        Case    GUICtrlRead ($hpbot) = "F6"
            ConsoleWrite(GUICtrlRead($hpbot) & @LF)
            Send("{F6}")
        Case    GUICtrlRead ($hpbot) = "F7"
            ConsoleWrite(GUICtrlRead($hpbot) & @LF)
            Send("{F7}")
        Case    GUICtrlRead ($hpbot) = "F8"
            ConsoleWrite(GUICtrlRead($hpbot) & @LF)
            Send("{F8}")
    EndSelect
WEnd
;*********************************************| Shortcut hp |*********************************************
Sleep (2500)

$pixelmp = PixelGetColor(35,42)

Do
     $pixelCheck2 = PixelGetColor($pixelGetX2, $pixelGetY2)
Until $pixelCheck2 = $pixelmp
;*********************************************| Shortcut mp |*********************************************
While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            Send("{ESC}")
        Case    GUICtrlRead ($mpbot) = "F1"
            ConsoleWrite(GUICtrlRead($mpbot) & @LF)
            Send("{F1}")
        Case    GUICtrlRead ($mpbot) = "F2"
            ConsoleWrite(GUICtrlRead($mpbot) & @LF)
            Send("{F2}")
        Case    GUICtrlRead ($mpbot) = "F3"
            ConsoleWrite(GUICtrlRead($mpbot) & @LF)
            Send("{F3}")
        Case    GUICtrlRead ($mpbot) = "F4"
            ConsoleWrite(GUICtrlRead($mpbot) & @LF)
            Send("{F4}")
        Case    GUICtrlRead ($mpbot) = "F5"
            ConsoleWrite(GUICtrlRead($mpbot) & @LF)
            Send("{F5}")
        Case    GUICtrlRead ($mpbot) = "F6"
            ConsoleWrite(GUICtrlRead($mpbot) & @LF)
            Send("{F6}")
        Case    GUICtrlRead ($mpbot) = "F7"
            ConsoleWrite(GUICtrlRead($mpbot) & @LF)
            Send("{F7}")
        Case    GUICtrlRead ($mpbot) = "F8"
            ConsoleWrite(GUICtrlRead($mpbot) & @LF)
            Send("{F8}")
    EndSelect
WEnd

;*********************************************| Shortcut mp |*********************************************
Sleep (4000)

$begin = TimerInit()
do
$dif = TimerDiff($begin)
until $dif>7200000
Exit

;*********************************************|Process|*********************************************



Func Runbot()
    WinActivate("ROSE online")
    $Size = WinGetPos("ROSE online")
    $Width = $Size[2]
    $Height = $Size[3]
EndFunc ;==>Runbot


Func TogglePause()
$Paused = NOT $Paused
While $Paused
sleep(100)
ToolTip('Script is "Paused"',0,0)
WEnd
ToolTip("")
EndFunc

Func Terminate()
Exit 0
EndFunc

Fou-Lu - Bof4 "...Wouldst thou fight a god?"

Share this post


Link to post
Share on other sites



Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0