Jump to content

Major Help, Cant seem to get it working.


Hyflex
 Share

Recommended Posts

The Following i need help with:

1)When Click one script like Auto Pickup i want the script to start and then when i press Auto Pickup again i want it to stop that script and allow me to select any other script.

2)There is also a problem with the Close buton, when i click it normally it closes fine but if i start a script and press it it doesnt do a thing.

3) The part: GUICtrlSetColor(-1, 0x000080)

$Label3 = GUICtrlCreateLabel("http://www.google.com", 16, 232, 353, 17, $WS_GROUP)

I want that as a link what loads the site.

4) i want to know how to do a PixelSearch over any part of the screen and when it sees Pure black i want it to pause all running scripts and when the black disapears i want it to unpause... can anyone help?

5) A Differnt/Better way of selecing the script maybe like a Tickbox one. Like...

http://img180.imageshack.us/img180/3869/testid6.png

But not with the % boxes

Help would be much appreciated. Thanks in advance.

#cs ----------------------------------------------------------------------------
   
    Script Version: V1
    Author: XxXGoD
    Created For: myself lol
   
    Script Function: All In 1
   
#ce ----------------------------------------------------------------------------


; All In 1 Bot Start


#include <GUIConstants.au3>

#Region ### START Koda GUI section ### Form=C:\XUnleashedTest\AForm4.kxf
Opt("GUIOnEventMode", 1)
$Form4 = GUICreate("U WAT", 620, 328, 327, 219)
GUISetIcon("")
$GroupBox1 = GUICtrlCreateGroup("", 8, 8, 605, 281)
$TaultUnleashed = GUICtrlCreatePic(@ScriptDir & "\TrainerPic.JPG", 16, 16, 589, 121, BitOR($SS_NOTIFY,$WS_GROUP))
$Label1 = GUICtrlCreateLabel("By XxXGoD", 18, 136, 520, 25, $WS_GROUP)
GUICtrlSetFont(-1, 16, 800, 0, "MS Mincho")
GUICtrlSetColor(-1, 0xFF0000)
$Label2 = GUICtrlCreateLabel("Version: 2.0", 488, 264, 60, 17, $WS_GROUP)
$Label4 = GUICtrlCreateLabel("", 8, 144, 4, 4, $WS_GROUP)
$Label1 = GUICtrlCreateLabel("Eat this.", 16, 176, 370, 17, $WS_GROUP)
GUICtrlSetColor(-1, 0x000080)
$Label3 = GUICtrlCreateLabel("http://www.google.com", 16, 232, 353, 17, $WS_GROUP)
GUICtrlSetColor(-1, 0xFF0000)
$Label2 = GUICtrlCreateLabel("Booa", 16, 216, 408, 17, $WS_GROUP)
GUICtrlSetColor(-1, 0x000080)
$Label4 = GUICtrlCreateLabel("OWNED.", 14, 266, 107, 17, $WS_GROUP)
GUICtrlSetColor(-1, 0x000080)
GUICtrlCreateGroup("", -99, -99, 1, 1)

$Button1 = GUICtrlCreateButton("&Start Foot+Combat Pet", 2, 296, 120, 25)
GUICtrlSetOnEvent(-1, "StartFCP")

$Button2 = GUICtrlCreateButton("&Start Mount", 122, 296, 75, 25)
GUICtrlSetOnEvent(-1, "StartM")

$Button3 = GUICtrlCreateButton("&Start Foot", 197, 296, 75, 25)
GUICtrlSetOnEvent(-1, "StartF")

$Button4 = GUICtrlCreateButton("&Auto Pickup", 272, 296, 75, 25)
GUICtrlSetOnEvent(-1, "AutoPickup")

$Button5 = GUICtrlCreateButton("&Mount Healer", 347, 296, 75, 25)
GUICtrlSetOnEvent(-1, "AutoHeal")

$Button6 = GUICtrlCreateButton("&Pet Heal+Pickup", 423, 296, 100, 25)
GUICtrlSetOnEvent(-1, "AutoBoth")

$Button7 = GUICtrlCreateButton("&Close", 545, 296, 75, 25)
GUICtrlSetOnEvent(-1, "Close")

GUISetState(@SW_SHOW)
   
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

    EndSwitch
WEnd




; Automatic Pickup
Func AutoBoth()
   
    While 1
       
; Key Delay Options
Opt("SendKeyDownDelay", 1)
Opt("SendKeyDelay", 1)
; Key Delay Options End

; Main Settings / Constants
$Health = 0XC60000
$CheckHP = 1
$ChiPot = 3
$PetLife = 0x0B10000
$PetCharmOfReturn = 0x191418
$PetHunger = 0xADAB61
$CharacterLifeHeal = 0x9B0100
$CharacterChiHeal = 0x000051
$ChiCharmOfReturn = 0x101010
$LifeCharmOfReturn = 0x101010
; Main Settings / Constants End

; Pet/Mount Life Checker
    $coord = PixelSearch( 176, 100, 178, 105, $PetLife, 1 )
    If @error Then
        Send("{8 down}")
        Sleep("100")
        Send("{8 up}")
        Sleep("100")
    EndIf
; Pet/Mount Life Checker End


; Pet/Mount Hunger Checker
        $coord = PixelSearch( 196, 116, 199, 121, $PetHunger, 1 )
    If @error Then
        Send("{8 down}")
        Sleep("100")
        Send("{8 up}")
        Sleep("100")
    EndIf
; Pet/Mount Hunger Checker End

    ; Automatic Pickup
        For $i = 1 To 99999999999999999999999999999999999999999999999999999999
            Send("s")
            Sleep(1000)
        Next
        ; Automatic Pickup End
WEnd
EndFunc
; Automatic Heal + Pickup End



; Automatic Pickup
Func AutoPickup()
    While 1
        For $i = 1 To 99999999999999999999999999999999999999999999999999999999
            Send("s")
            Sleep(1000)
        Next
WEnd

EndFunc
; Automatic Pickup End






; Automatic Healer
Func AutoHeal()
   
    While 1

; Key Delay Options
Opt("SendKeyDownDelay", 1)
Opt("SendKeyDelay", 1)
; Key Delay Options End




; Main Settings / Constants
$Health = 0XC60000
$CheckHP = 1
$ChiPot = 3
$PetLife = 0x0B10000
$PetCharmOfReturn = 0x191418
$PetHunger = 0xADAB61
$CharacterLifeHeal = 0x9B0100
$CharacterChiHeal = 0x000051
$ChiCharmOfReturn = 0x101010
$LifeCharmOfReturn = 0x101010
; Main Settings / Constants End

; Pet/Mount Life Checker
    $coord = PixelSearch( 176, 100, 178, 105, $PetLife, 1 )
    If @error Then
        Send("{8 down}")
        Sleep("100")
        Send("{8 up}")
        Sleep("100")
    EndIf
; Pet/Mount Life Checker End


; Pet/Mount Hunger Checker
        $coord = PixelSearch( 196, 116, 199, 121, $PetHunger, 1 )
    If @error Then
        Send("{8 down}")
        Sleep("100")
        Send("{8 up}")
        Sleep("100")   
        Send("{8 down}")
        Sleep("100")
        Send("{8 up}")
        Sleep("100")
    EndIf
; Pet/Mount Hunger Checker End
    WEnd
EndFunc
; Automatic Healer End






Func StartF()

While 1
   
   
; Key Delay Options
Opt("SendKeyDownDelay", 1)
Opt("SendKeyDelay", 1)
; Key Delay Options End




; Main Settings / Constants
$Health = 0XC60000
$CheckHP = 1
$ChiPot = 3
$PetLife = 0x0B10000
$PetCharmOfReturn = 0x191418
$PetHunger = 0xADAB61
$CharacterLifeHeal = 0x9B0100
$CharacterChiHeal = 0x000051
$ChiCharmOfReturn = 0x101010
$LifeCharmOfReturn = 0x101010
; Main Settings / Constants End


; Character Life Heal
    $coord = PixelSearch( 180, 46, 185, 53, $CharacterLifeHeal, 1 )
    If @error Then
        Send("{4 down}")
        Sleep("100")
        Send("{4 up}")
        Sleep("100")
    EndIf
; Character Life Heal End.


; Character Chi Heal
    $coord = PixelSearch( 180, 57, 184, 63, $CharacterChiHeal, 1 )
    If @error Then
        Send("{3 down}")
        Sleep("100")
        Send("{3 up}")
        Sleep("100")
    EndIf
; Character Chi Heal End.


; Character Out of Chi Heal
    $coord = PixelSearch( 439, 746, 441, 749, $ChiCharmOfReturn, 1 )
    If Not @error Then
        Send("{7 down}")
        Sleep("100")
        Send("{7 up}")
        Sleep("100")
        Exit
    EndIf
   
; Character Out of Chi Heal End.


; Character Out of Life Heal
    $coord = PixelSearch( 478, 747, 483, 753, $LifeCharmOfReturn, 1 )
    If Not @error Then
        Send("{7 down}")
        Sleep("100")
        Send("{7 up}")
        Sleep("100")
        Exit
    EndIf
   
; Character Out of Life Chi End.




    ; Characters Attack/Pickup
    $coord = PixelSearch( 426, 59, 429, 63, 0X000000, 1 )
    If @error Then
        Send("{v down}")
        Sleep("100")
        Send("{v up}")
        Send("{s down}")
                Sleep("100")
        Send("{s up}")
                Sleep("100")
        Send("{s down}")
                Sleep("100")
        Send("{s up}")
        Sleep("100")
        Send("{a down}")
        Sleep("100")
        Send("{a up}")
        Send("{s down}")
                Sleep("100")
        Send("{s up}")
                Sleep("100")
        Send("{s down}")
                Sleep("100")
        Send("{s up}")
        Sleep("100")
        Send("{a down}")
        Sleep("100")
        Send("{a up}")
        Send("{s down}")
                Sleep("100")
        Send("{s up}")
                Sleep("100")
        Send("{s down}")
                Sleep("100")
        Send("{s up}")
        Sleep("100")
        Send("{a down}")
        Sleep("100")
        Send("{a up}")
        Send("{s down}")
                Sleep("100")
        Send("{s up}")
                Sleep("100")
        Send("{s down}")
                Sleep("100")
        Send("{s up}")
    EndIf
   
    Sleep("1000")
WEnd
; Characters Attack/Pickup End
EndFunc





Func StartFCP()

While 1
   
; Key Delay Options
Opt("SendKeyDownDelay", 1)
Opt("SendKeyDelay", 1)
; Key Delay Options End


; Main Settings / Constants
$Health = 0XC60000
$CheckHP = 1
$ChiPot = 3
$PetLife = 0x0B10000
$PetCharmOfReturn = 0x191418
$PetHunger = 0xADAB61
$CharacterLifeHeal = 0x9B0100
$CharacterChiHeal = 0x000051
$ChiCharmOfReturn = 0x101010
$LifeCharmOfReturn = 0x101010
; Main Settings / Constants End


; Character Life Heal
    $coord = PixelSearch( 180, 46, 185, 53, $CharacterLifeHeal, 1 )
    If @error Then
        Send("{4 down}")
        Sleep("100")
        Send("{4 up}")
        Sleep("100")
    EndIf
; Character Life Heal End.


; Character Chi Heal
    $coord = PixelSearch( 180, 57, 184, 63, $CharacterChiHeal, 1 )
    If @error Then
        Send("{3 down}")
        Sleep("100")
        Send("{3 up}")
        Sleep("100")
    EndIf
; Character Chi Heal End.


; Character Out of Chi Heal
    $coord = PixelSearch( 439, 746, 441, 749, $ChiCharmOfReturn, 1 )
    If Not @error Then
        Send("{7 down}")
        Sleep("100")
        Send("{7 up}")
        Sleep("100")
        Exit
    EndIf
; Character Out of Chi Heal End.


; Character Out of Life Heal
    $coord = PixelSearch( 478, 747, 483, 753, $LifeCharmOfReturn, 1 )
    If Not @error Then
        Send("{7 down}")
        Sleep("100")
        Send("{7 up}")
        Sleep("100")
        Exit
    EndIf
; Character Out of Life Chi End.

   
    $coord = PixelSearch( 176, 100, 178, 105, $PetLife, 1 )
    If @error Then
        Send("{8 down}")
        Sleep("100")
        Send("{8 up}")
        Sleep("100")
    EndIf
; Pet/Mount Life Checker End


; Pet/Mount Hunger Checker
        $coord = PixelSearch( 196, 116, 199, 121, $PetHunger, 1 )
    If @error Then
        Send("{8 down}")
        Sleep("100")
        Send("{8 up}")
        Sleep("100")
    EndIf
; Pet/Mount Hunger Checker End
   
   
; Pet/Mount Out of Heal - Charm of Return
    $coord = PixelSearch( 676, 736, 678, 737, $PetCharmOfReturn, 1 )
    If Not @error Then
        Send("{7 down}")
        Sleep("100")
        Send("{7 up}")
        Sleep("100")
        Exit
    EndIf
   
; Pet/Mount Out of Heal - Charm of Return End


    ; Characters Attack/Pickup
    $coord = PixelSearch( 426, 59, 429, 63, 0X000000, 1 )
    If @error Then
        Send("{v down}")
        Sleep("100")
        Send("{v up}")
        Send("{s down}")
                Sleep("100")
        Send("{s up}")
                Sleep("100")
        Send("{s down}")
                Sleep("100")
        Send("{s up}")
        Sleep("100")
        Send("{a down}")
        Sleep("100")
        Send("{a up}")
        Send("{s down}")
                Sleep("100")
        Send("{s up}")
                Sleep("100")
        Send("{s down}")
                Sleep("100")
        Send("{s up}")
        Sleep("100")
        Send("{a down}")
        Sleep("100")
        Send("{a up}")
        Send("{s down}")
                Sleep("100")
        Send("{s up}")
                Sleep("100")
        Send("{s down}")
                Sleep("100")
        Send("{s up}")
        Sleep("100")
        Send("{a down}")
        Sleep("100")
        Send("{a up}")
        Send("{s down}")
                Sleep("100")
        Send("{s up}")
                Sleep("100")
        Send("{s down}")
                Sleep("100")
        Send("{s up}")
    EndIf

    Sleep("1000")
WEnd
; Characters Attack/Pickup End
EndFunc




Func StartM()


; Key Delay Options
Opt("SendKeyDownDelay", 1)
Opt("SendKeyDelay", 1)
; Key Delay Options End




; Main Settings / Constants
$Health = 0XC60000
$CheckHP = 1
$ChiPot = 3
$PetLife = 0x0B10000
$PetCharmOfReturn = 0x191418
$PetHunger = 0xADAB61
$CharacterLifeHeal = 0x9B0100
$CharacterChiHeal = 0x000051
$ChiCharmOfReturn = 0x101010
$LifeCharmOfReturn = 0x101010
; Main Settings / Constants End



; Pet/Mount Life Checker
While 1
   
    $coord = PixelSearch( 176, 100, 178, 105, $PetLife, 1 )
    If @error Then
        Send("{8 down}")
        Sleep("100")
        Send("{8 up}")
        Sleep("100")
    EndIf
; Pet/Mount Life Checker End


; Pet/Mount Hunger Checker
        $coord = PixelSearch( 196, 116, 199, 121, $PetHunger, 1 )
    If @error Then
        Send("{8 down}")
        Sleep("100")
        Send("{8 up}")
        Sleep("100")
    EndIf
; Pet/Mount Hunger Checker End
   
   
; Pet/Mount Out of Heal - Charm of Return
    $coord = PixelSearch( 676, 736, 678, 737, $PetCharmOfReturn, 1 )
    If Not @error Then
        Send("{7 down}")
        Sleep("100")
        Send("{7 up}")
        Sleep("100")
        Exit
    EndIf
; Pet/Mount Out of Heal - Charm of Return End



    ; Characters Attack/Pickup
    $coord = PixelSearch( 426, 59, 429, 63, 0X000000, 1 )
    If @error Then
            Send("{v down}")
        Sleep("100")
        Send("{v up}")
        Send("{s down}")
                Sleep("100")
        Send("{s up}")
                Sleep("100")
        Send("{s down}")
                Sleep("100")
        Send("{s up}")
        Sleep("100")
        Send("{a down}")
        Sleep("100")
        Send("{a up}")
        Send("{s down}")
                Sleep("100")
        Send("{s up}")
                Sleep("100")
        Send("{s down}")
                Sleep("100")
        Send("{s up}")
        Sleep("100")
        Send("{a down}")
        Sleep("100")
        Send("{a up}")
        Send("{s down}")
                Sleep("100")
        Send("{s up}")
                Sleep("100")
        Send("{s down}")
                Sleep("100")
        Send("{s up}")
        Sleep("100")
        Send("{a down}")
        Sleep("100")
        Send("{a up}")
        Send("{s down}")
                Sleep("100")
        Send("{s up}")
                Sleep("100")
        Send("{s down}")
                Sleep("100")
        Send("{s up}")
    EndIf

    Sleep("1000")
WEnd
; Characters Attack/Pickup End
EndFunc



; Exit Program
Func Close()
    Exit
EndFunc
; Exit Program End
Link to comment
Share on other sites

When you choose on events the GUIGetMsg is not used.

I've tried closing your script when Autopickup is selected and you are right that close() doesn't get called.

I've tried changing the function but no help.

Looks to me like you need to use GuiGetMsg instead of onevents.

Edited by martin
Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

As far as the first question is concerned, do you mean that if you try to run a second instance of your script that not only should it not run but that the first instance should close?

Or maybe I should have run your script to see if you might have meant something else, but your script has errors so it won't run. (missing Wend)

Where the missing wend???

The script starts fine but when its started it wont close the whole program & i want it so if i start one script on there i want it to run untill i select that script again, When i select the script again i want it to pause scripts and allow me to run a differnt script

Link to comment
Share on other sites

Where the missing wend???

The script starts fine but when its started it wont close the whole program & i want it so if i start one script on there i want it to run untill i select that script again, When i select the script again i want it to pause scripts and allow me to run a differnt script

Sorry XxXGoD, I messed up on that one and then modified my post too slowly (distracted by a bowl of pasta.)

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

Sorry XxXGoD, I messed up on that one and then modified my post too slowly (distracted by a bowl of pasta.)

I think the problem is to do with the fact that you are sending the key 's' which is being received by your program.

If you replace the send('s') with say ConsoleWrite('s') I think it might work.

I tried running your script after I opened notepad. As soon as I clicked on AUtopickup I then clicked on Notepad and a lot more characters than 's' were being sent.

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

I think the problem is to do with the fact that you are sending the key 's' which is being received by your program.

If you replace the send('s') with say ConsoleWrite('s') I think it might work.

I tried running your script after I opened notepad. As soon as I clicked on AUtopickup I then clicked on Notepad and a lot more characters than 's' were being sent.

ok.... will consolewrite work same as a key press though???

Link to comment
Share on other sites

ok.... will consolewrite work same as a key press though???

Hi,

I don't think so!

So long,

Mega

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Link to comment
Share on other sites

ok.... will consolewrite work same as a key press though???

No, but it allows you to see the letter appear in the console window in Scite for example, and if it works then it confirms that the problem is connected with the S keypress.

What is the 's' for ? If it's for another application then you need to activate that application before you send the s characters, and you need to ensure that 's' isn't sent when your script is active again.

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

s is for pickin up.

if i play without this and press s it picks up items

Ok, then here is a version of your script which works as far as the autopickup is concerned, but you need to change the line where I have put "Untitled - Notepad" to be the title of the game you are playing. Line 140 I think.

#cs ----------------------------------------------------------------------------
   
    Script Version: V1
    Author: XxXGoD
    Created For: myself lol
   
    Script Function: All In 1
   
#ce ----------------------------------------------------------------------------


; All In 1 Bot Start


#include <GUIConstants.au3>

#Region ### START Koda GUI section ### Form=C:\XUnleashedTest\AForm4.kxf
Opt("GUIOnEventMode", 1)
$Form4 = GUICreate("U WAT", 620, 328, 327, 219)
GUISetIcon("")
$GroupBox1 = GUICtrlCreateGroup("", 8, 8, 605, 281)
$TaultUnleashed = GUICtrlCreatePic(@ScriptDir & "\TrainerPic.JPG", 16, 16, 589, 121, BitOR($SS_NOTIFY,$WS_GROUP))
$Label1 = GUICtrlCreateLabel("By XxXGoD", 18, 136, 520, 25, $WS_GROUP)
GUICtrlSetFont(-1, 16, 800, 0, "MS Mincho")
GUICtrlSetColor(-1, 0xFF0000)
$Label2 = GUICtrlCreateLabel("Version: 2.0", 488, 264, 60, 17, $WS_GROUP)
$Label4 = GUICtrlCreateLabel("", 8, 144, 4, 4, $WS_GROUP)
$Label1 = GUICtrlCreateLabel("Eat this.", 16, 176, 370, 17, $WS_GROUP)
GUICtrlSetColor(-1, 0x000080)
$Label3 = GUICtrlCreateLabel("http://www.google.com", 16, 232, 353, 17, $WS_GROUP)
GUICtrlSetColor(-1, 0xFF0000)
$Label2 = GUICtrlCreateLabel("Booa", 16, 216, 408, 17, $WS_GROUP)
GUICtrlSetColor(-1, 0x000080)
$Label4 = GUICtrlCreateLabel("OWNED.", 14, 266, 107, 17, $WS_GROUP)
GUICtrlSetColor(-1, 0x000080)
GUICtrlCreateGroup("", -99, -99, 1, 1)

$Button1 = GUICtrlCreateButton("&Start Foot+Combat Pet", 2, 296, 120, 25)
GUICtrlSetOnEvent(-1, "StartFCP")

$Button2 = GUICtrlCreateButton("&Start Mount", 122, 296, 75, 25)
GUICtrlSetOnEvent(-1, "StartM")

$Button3 = GUICtrlCreateButton("&Start Foot", 197, 296, 75, 25)
GUICtrlSetOnEvent(-1, "StartF")

$Button4 = GUICtrlCreateButton("&Auto Pickup", 272, 296, 75, 25)
GUICtrlSetOnEvent(-1, "AutoPickup")

$Button5 = GUICtrlCreateButton("&Mount Healer", 347, 296, 75, 25)
GUICtrlSetOnEvent(-1, "AutoHeal")

$Button6 = GUICtrlCreateButton("&Pet Heal+Pickup", 423, 296, 100, 25)
GUICtrlSetOnEvent(-1, "AutoBoth")

$Button7 = GUICtrlCreateButton("&Close", 545, 296, 75, 25)
GUICtrlSetOnEvent(-1, "Close")

GUISetState(@SW_SHOW)
 Global $t = 0,$AP = 0
#EndRegion ### END Koda GUI section ###

While 1
    
    if not WinActive("U WAT") Then
      if $AP Then
        if TimerDiff($t) > 1000 then 
            Send("s");ConsoleWrite('s');
            $t = TimerInit()
        EndIf
      EndIf
   EndIf

    
    sleep(20)       
            
 
WEnd




; Automatic Pickup
Func AutoBoth()
   
    While 1
       
; Key Delay Options
Opt("SendKeyDownDelay", 1)
Opt("SendKeyDelay", 1)
; Key Delay Options End

; Main Settings / Constants
$Health = 0XC60000
$CheckHP = 1
$ChiPot = 3
$PetLife = 0x0B10000
$PetCharmOfReturn = 0x191418
$PetHunger = 0xADAB61
$CharacterLifeHeal = 0x9B0100
$CharacterChiHeal = 0x000051
$ChiCharmOfReturn = 0x101010
$LifeCharmOfReturn = 0x101010
; Main Settings / Constants End

; Pet/Mount Life Checker
    $coord = PixelSearch( 176, 100, 178, 105, $PetLife, 1 )
    If @error Then
        Send("{8 down}")
        Sleep("100")
        Send("{8 up}")
        Sleep("100")
    EndIf
; Pet/Mount Life Checker End


; Pet/Mount Hunger Checker
        $coord = PixelSearch( 196, 116, 199, 121, $PetHunger, 1 )
    If @error Then
        Send("{8 down}")
        Sleep("100")
        Send("{8 up}")
        Sleep("100")
    EndIf
; Pet/Mount Hunger Checker End
    $AP = 0;because Autopickup inverts it
    AutoPickup()
WEnd
EndFunc
; Automatic Heal + Pickup End



; Automatic Pickup
Func AutoPickup()
   $t = Timerinit();
  ;Send("s");Consolewrite('s');38ssassass
   
       $AP = not $AP
   
;
if $AP then WinActivate("Untitled - Notepad")
EndFunc
; Automatic Pickup End






; Automatic Healer
Func AutoHeal()
   
    While 1

; Key Delay Options
Opt("SendKeyDownDelay", 1)
Opt("SendKeyDelay", 1)
; Key Delay Options End




; Main Settings / Constants
$Health = 0XC60000
$CheckHP = 1
$ChiPot = 3
$PetLife = 0x0B10000
$PetCharmOfReturn = 0x191418
$PetHunger = 0xADAB61
$CharacterLifeHeal = 0x9B0100
$CharacterChiHeal = 0x000051
$ChiCharmOfReturn = 0x101010
$LifeCharmOfReturn = 0x101010
; Main Settings / Constants End

; Pet/Mount Life Checker
    $coord = PixelSearch( 176, 100, 178, 105, $PetLife, 1 )
    If @error Then
        Send("{8 down}")
        Sleep("100")
        Send("{8 up}")
        Sleep("100")
    EndIf
; Pet/Mount Life Checker End


; Pet/Mount Hunger Checker
        $coord = PixelSearch( 196, 116, 199, 121, $PetHunger, 1 )
    If @error Then
        Send("{8 down}")
        Sleep("100")
        Send("{8 up}")
        Sleep("100")   
        Send("{8 down}")
        Sleep("100")
        Send("{8 up}")
        Sleep("100")
    EndIf
; Pet/Mount Hunger Checker End
    WEnd
EndFunc
; Automatic Healer End






Func StartF()

While 1
   
   
; Key Delay Options
Opt("SendKeyDownDelay", 1)
Opt("SendKeyDelay", 1)
; Key Delay Options End




; Main Settings / Constants
$Health = 0XC60000
$CheckHP = 1
$ChiPot = 3
$PetLife = 0x0B10000
$PetCharmOfReturn = 0x191418
$PetHunger = 0xADAB61
$CharacterLifeHeal = 0x9B0100
$CharacterChiHeal = 0x000051
$ChiCharmOfReturn = 0x101010
$LifeCharmOfReturn = 0x101010
; Main Settings / Constants End


; Character Life Heal
    $coord = PixelSearch( 180, 46, 185, 53, $CharacterLifeHeal, 1 )
    If @error Then
        Send("{4 down}")
        Sleep("100")
        Send("{4 up}")
        Sleep("100")
    EndIf
; Character Life Heal End.


; Character Chi Heal
    $coord = PixelSearch( 180, 57, 184, 63, $CharacterChiHeal, 1 )
    If @error Then
        Send("{3 down}")
        Sleep("100")
        Send("{3 up}")
        Sleep("100")
    EndIf
; Character Chi Heal End.


; Character Out of Chi Heal
    $coord = PixelSearch( 439, 746, 441, 749, $ChiCharmOfReturn, 1 )
    If Not @error Then
        Send("{7 down}")
        Sleep("100")
        Send("{7 up}")
        Sleep("100")
        Exit
    EndIf
   
; Character Out of Chi Heal End.


; Character Out of Life Heal
    $coord = PixelSearch( 478, 747, 483, 753, $LifeCharmOfReturn, 1 )
    If Not @error Then
        Send("{7 down}")
        Sleep("100")
        Send("{7 up}")
        Sleep("100")
        Exit
    EndIf
   
; Character Out of Life Chi End.




   ; Characters Attack/Pickup
    $coord = PixelSearch( 426, 59, 429, 63, 0X000000, 1 )
    If @error Then
        Send("{v down}")
        Sleep("100")
        Send("{v up}")
        Send("{s down}")
                Sleep("100")
        Send("{s up}")
                Sleep("100")
        Send("{s down}")
                Sleep("100")
        Send("{s up}")
        Sleep("100")
        Send("{a down}")
        Sleep("100")
        Send("{a up}")
        Send("{s down}")
                Sleep("100")
        Send("{s up}")
                Sleep("100")
        Send("{s down}")
                Sleep("100")
        Send("{s up}")
        Sleep("100")
        Send("{a down}")
        Sleep("100")
        Send("{a up}")
        Send("{s down}")
                Sleep("100")
        Send("{s up}")
                Sleep("100")
        Send("{s down}")
                Sleep("100")
        Send("{s up}")
        Sleep("100")
        Send("{a down}")
        Sleep("100")
        Send("{a up}")
        Send("{s down}")
                Sleep("100")
        Send("{s up}")
                Sleep("100")
        Send("{s down}")
                Sleep("100")
        Send("{s up}")
    EndIf
   
    Sleep("1000")
WEnd
; Characters Attack/Pickup End
EndFunc





Func StartFCP()

While 1
   
; Key Delay Options
Opt("SendKeyDownDelay", 1)
Opt("SendKeyDelay", 1)
; Key Delay Options End


; Main Settings / Constants
$Health = 0XC60000
$CheckHP = 1
$ChiPot = 3
$PetLife = 0x0B10000
$PetCharmOfReturn = 0x191418
$PetHunger = 0xADAB61
$CharacterLifeHeal = 0x9B0100
$CharacterChiHeal = 0x000051
$ChiCharmOfReturn = 0x101010
$LifeCharmOfReturn = 0x101010
; Main Settings / Constants End


; Character Life Heal
    $coord = PixelSearch( 180, 46, 185, 53, $CharacterLifeHeal, 1 )
    If @error Then
        Send("{4 down}")
        Sleep("100")
        Send("{4 up}")
        Sleep("100")
    EndIf
; Character Life Heal End.


; Character Chi Heal
    $coord = PixelSearch( 180, 57, 184, 63, $CharacterChiHeal, 1 )
    If @error Then
        Send("{3 down}")
        Sleep("100")
        Send("{3 up}")
        Sleep("100")
    EndIf
; Character Chi Heal End.


; Character Out of Chi Heal
    $coord = PixelSearch( 439, 746, 441, 749, $ChiCharmOfReturn, 1 )
    If Not @error Then
        Send("{7 down}")
        Sleep("100")
        Send("{7 up}")
        Sleep("100")
        Exit
    EndIf
; Character Out of Chi Heal End.


; Character Out of Life Heal
    $coord = PixelSearch( 478, 747, 483, 753, $LifeCharmOfReturn, 1 )
    If Not @error Then
        Send("{7 down}")
        Sleep("100")
        Send("{7 up}")
        Sleep("100")
        Exit
    EndIf
; Character Out of Life Chi End.

   
    $coord = PixelSearch( 176, 100, 178, 105, $PetLife, 1 )
    If @error Then
        Send("{8 down}")
        Sleep("100")
        Send("{8 up}")
        Sleep("100")
    EndIf
; Pet/Mount Life Checker End


; Pet/Mount Hunger Checker
        $coord = PixelSearch( 196, 116, 199, 121, $PetHunger, 1 )
    If @error Then
        Send("{8 down}")
        Sleep("100")
        Send("{8 up}")
        Sleep("100")
    EndIf
; Pet/Mount Hunger Checker End
   
   
; Pet/Mount Out of Heal - Charm of Return
    $coord = PixelSearch( 676, 736, 678, 737, $PetCharmOfReturn, 1 )
    If Not @error Then
        Send("{7 down}")
        Sleep("100")
        Send("{7 up}")
        Sleep("100")
        Exit
    EndIf
   
; Pet/Mount Out of Heal - Charm of Return End


   ; Characters Attack/Pickup
    $coord = PixelSearch( 426, 59, 429, 63, 0X000000, 1 )
    If @error Then
        Send("{v down}")
        Sleep("100")
        Send("{v up}")
        Send("{s down}")
                Sleep("100")
        Send("{s up}")
                Sleep("100")
        Send("{s down}")
                Sleep("100")
        Send("{s up}")
        Sleep("100")
        Send("{a down}")
        Sleep("100")
        Send("{a up}")
        Send("{s down}")
                Sleep("100")
        Send("{s up}")
                Sleep("100")
        Send("{s down}")
                Sleep("100")
        Send("{s up}")
        Sleep("100")
        Send("{a down}")
        Sleep("100")
        Send("{a up}")
        Send("{s down}")
                Sleep("100")
        Send("{s up}")
                Sleep("100")
        Send("{s down}")
                Sleep("100")
        Send("{s up}")
        Sleep("100")
        Send("{a down}")
        Sleep("100")
        Send("{a up}")
        Send("{s down}")
                Sleep("100")
        Send("{s up}")
                Sleep("100")
        Send("{s down}")
                Sleep("100")
        Send("{s up}")
    EndIf

    Sleep("1000")
WEnd
; Characters Attack/Pickup End
EndFunc




Func StartM()


; Key Delay Options
Opt("SendKeyDownDelay", 1)
Opt("SendKeyDelay", 1)
; Key Delay Options End




; Main Settings / Constants
$Health = 0XC60000
$CheckHP = 1
$ChiPot = 3
$PetLife = 0x0B10000
$PetCharmOfReturn = 0x191418
$PetHunger = 0xADAB61
$CharacterLifeHeal = 0x9B0100
$CharacterChiHeal = 0x000051
$ChiCharmOfReturn = 0x101010
$LifeCharmOfReturn = 0x101010
; Main Settings / Constants End



; Pet/Mount Life Checker
While 1
   
    $coord = PixelSearch( 176, 100, 178, 105, $PetLife, 1 )
    If @error Then
        Send("{8 down}")
        Sleep("100")
        Send("{8 up}")
        Sleep("100")
    EndIf
; Pet/Mount Life Checker End


; Pet/Mount Hunger Checker
        $coord = PixelSearch( 196, 116, 199, 121, $PetHunger, 1 )
    If @error Then
        Send("{8 down}")
        Sleep("100")
        Send("{8 up}")
        Sleep("100")
    EndIf
; Pet/Mount Hunger Checker End
   
   
; Pet/Mount Out of Heal - Charm of Return
    $coord = PixelSearch( 676, 736, 678, 737, $PetCharmOfReturn, 1 )
    If Not @error Then
        Send("{7 down}")
        Sleep("100")
        Send("{7 up}")
        Sleep("100")
        Exit
    EndIf
; Pet/Mount Out of Heal - Charm of Return End



   ; Characters Attack/Pickup
    $coord = PixelSearch( 426, 59, 429, 63, 0X000000, 1 )
    If @error Then
            Send("{v down}")
        Sleep("100")
        Send("{v up}")
        Send("{s down}")
                Sleep("100")
        Send("{s up}")
                Sleep("100")
        Send("{s down}")
                Sleep("100")
        Send("{s up}")
        Sleep("100")
        Send("{a down}")
        Sleep("100")
        Send("{a up}")
        Send("{s down}")
                Sleep("100")
        Send("{s up}")
                Sleep("100")
        Send("{s down}")
                Sleep("100")
        Send("{s up}")
        Sleep("100")
        Send("{a down}")
        Sleep("100")
        Send("{a up}")
        Send("{s down}")
                Sleep("100")
        Send("{s up}")
                Sleep("100")
        Send("{s down}")
                Sleep("100")
        Send("{s up}")
        Sleep("100")
        Send("{a down}")
        Sleep("100")
        Send("{a up}")
        Send("{s down}")
                Sleep("100")
        Send("{s up}")
                Sleep("100")
        Send("{s down}")
                Sleep("100")
        Send("{s up}")
    EndIf

    Sleep("1000")
WEnd
; Characters Attack/Pickup End
EndFunc



; Exit Program
Func Close()
    
    Exit
EndFunc
; Exit Program Endssss
Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

dont understnad what that helped with...

Maybe it didn't help then. But for me it got rid of the first 2 of your original problems:-

1. When I click on AutoPickup button, the letter 's' is sent to the Notepad window and not to "U WAT", which was causing some of the problems.

When I activate U WAT again the it stops sending 's' untill I leave U WAT (and here I've assumed that you will be returning to the game, if not it would need to be activated.)

2. Once I have started Autopickup I can close the program which you couldn't do before.

So does your question mean that you didn't get any of these improvements?

Edited by martin
Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

I'm not sure I'm going to be able to help.

When you click on AutiPickup what exactly happens? When I tried your script it sent the letter 's even to your own program. Now it shpould make your game active and the letter 's' should be used by that. Have you made the change to line 140?

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

nop what? What does it need a pause for? You need to be more detailed so I can keep up with you.

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
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
 Share

  • Recently Browsing   0 members

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