Jump to content

Last Chaos Pet Feeding Macro


Walaboo
 Share

Recommended Posts

I'm having trouble with a script. When using the send or controlsend function it won't actually send to the selected program. The window is activated and brought up, but nothing is getting through. However, I do know that a value is being sent because if I select a different window the values start to appear. I've placed my code below. Please offer any suggestions.

WinWait("LastChaos - Aeria Games & Entertainment (Window 1024x768)","")
If Not WinActive("LastChaos - Aeria Games & Entertainment (Window 1024x768)","") Then WinActivate("LastChaos - Aeria Games & Entertainment (Window 1024x768)","")
WinWaitActive("LastChaos - Aeria Games & Entertainment (Window 1024x768)","")

While 1 = 1
Send("{F1}")
Sleep(10000)
WEnd
Link to comment
Share on other sites

I'm having trouble with a script. When using the send or controlsend function it won't actually send to the selected program. The window is activated and brought up, but nothing is getting through. However, I do know that a value is being sent because if I select a different window the values start to appear. I've placed my code below. Please offer any suggestions.

WinWait("LastChaos - Aeria Games & Entertainment (Window 1024x768)","")
If Not WinActive("LastChaos - Aeria Games & Entertainment (Window 1024x768)","") Then WinActivate("LastChaos - Aeria Games & Entertainment (Window 1024x768)","")
WinWaitActive("LastChaos - Aeria Games & Entertainment (Window 1024x768)","")

While 1 = 1
Send("{F1}")
Sleep(10000)
WEnd

SendKeyDelay

Alters the the length of the brief pause in between sent keystrokes.

Time in milliseconds to pause (default=5). Sometimes a value of 0 does not work; use 1 instead.

SendKeyDownDelay

Alters the length of time a key is held down before being released during a keystroke. For applications that take a while to register keypresses (and many games) you may need to raise this value from the default.

Time in milliseconds to pause (default=5).

Try at AutoItOption()

Edited by GoodMan
Link to comment
Share on other sites

Thanks Goodman for the reply. I took your advice and used the sendkeydown delay, but it still hasn't responded. I also used the winwaitdelay to make sure that the program was up before anything was sent. I've made the changes to my script below.

AutoItSetOption("WinWaitDelay",1000)

WinWait("LastChaos - Aeria Games & Entertainment (Window 1024x768)","")
If Not WinActive("LastChaos - Aeria Games & Entertainment (Window 1024x768)","") Then WinActivate("LastChaos - Aeria Games & Entertainment (Window 1024x768)","")
WinWaitActive("LastChaos - Aeria Games & Entertainment (Window 1024x768)","")

AutoItSetOption("SendKeyDownDelay",1000)

While 1 = 1
Send("{F1}")
Sleep(10000)
WEnd
Link to comment
Share on other sites

I still haven't had any luck. I've used the window info tool and modified my code below to include the window class in the control send function. Please off any suggestions as to how to get the game to accept keystrokes. Thanks.

#include <WindowsConstants.au3>

AutoItSetOption("WinWaitDelay",1000)

WinWait("LastChaos - Aeria Games & Entertainment (Window 1024x768)","")
If Not WinActive("LastChaos - Aeria Games & Entertainment (Window 1024x768)","") Then WinActivate("LastChaos - Aeria Games & Entertainment (Window 1024x768)","")
WinWaitActive("LastChaos - Aeria Games & Entertainment (Window 1024x768)","")

AutoItSetOption("SendKeyDownDelay",1000)

While 1 = 1
ControlSend("LastChaos - Aeria Games & Entertainment (Window 1024x768)", "", "[CLASS:ViewPort Window; INSTANCE:1]", "{1}")
Sleep(10000)
WEnd
Link to comment
Share on other sites

I still haven't had any luck. I've used the window info tool and modified my code below to include the window class in the control send function. Please off any suggestions as to how to get the game to accept keystrokes. Thanks.

#include <WindowsConstants.au3>

AutoItSetOption("WinWaitDelay",1000)

WinWait("LastChaos - Aeria Games & Entertainment (Window 1024x768)","")
If Not WinActive("LastChaos - Aeria Games & Entertainment (Window 1024x768)","") Then WinActivate("LastChaos - Aeria Games & Entertainment (Window 1024x768)","")
WinWaitActive("LastChaos - Aeria Games & Entertainment (Window 1024x768)","")

AutoItSetOption("SendKeyDownDelay",1000)

While 1 = 1
ControlSend("LastChaos - Aeria Games & Entertainment (Window 1024x768)", "", "[CLASS:ViewPort Window; INSTANCE:1]", "{1}")
Sleep(10000)
WEnd

Yeah, refer this.

[2008-12-17(Wed) 18:35:18.640] -164< SRC_LINE[04123] ycmExecWinActivate( "" , 00468 ) Got Window Handle[A] Ptr[0x002D00EA] by 'LastChaos' as [PID_00300] in 0s026
[2008-12-17(Wed) 18:35:20.015] -163> SRC_LINE[04181] ycmExecWinActivate( "" , 00468 ) Got Control Class[A] String[ViewPort Window] in 1s412
[2008-12-17(Wed) 18:35:20.031] -163< SRC_LINE[04196] ycmExecWinActivate( "" , 00468 ) Got Control Handle[A] String[] by 'ViewPort Window' in 1s417

: 0x0108C17C    +0xF9184      dword [127] PET GUI Show   Flag =0/1               [D] 1        (0x00000001) [F] 1.40129846432482e-045  
: 0x0108C180    +0xF9188      float [128] PET GUI Life   Max  =100               [F] 100                     [D] 1120403456 (0x42C80000) ▶ [D] 0        (0x00000000) [F] 0
: 0x0108C184    +0xF918C      float [129] PET GUI Life   Cur  =100               [F] 43                   [D] 1110179840 (0x422C0000) ▶ [D] 0       (0x00000000) [F] 0
: 0x0108C188    +0xF9190      float [130] PET GUI Hungry Max  =100               [F] 100                     [D] 1120403456 (0x42C80000) ▶ [D] 0        (0x00000000) [F] 0
: 0x0108C18C    +0xF9194      float [131] PET GUI Hungry Cur  =100               [F] 32                   [D] 1107296256 (0x42000000) ▶ [D] 0       (0x00000000) [F] 0
: 0x0108C190    +0xF9198      dword [132] PET Level =0                           [D] 54      (0x00000036) [F] 7.56701170735401e-044  
: 0x0108C194    +0xF919C      dword [133] PET Type  =0=Horse 1=Drake               [D] 1          (0x00000001) [F] 1.40129846432482e-045  
: 0x0108C198    +0xF91A0      dword [134] PET Class =0:PON/HAT 1:HOR/DRK 2:NM/DRG  [D] 1          (0x00000001) [F] 1.40129846432482e-045  
: 0x0108C19C    +0xF91A4      dword [135] PET Skill Point =-1                     [D] 0       (0x00000000) [F] 0

Reading memory, it is reliable.

Link to comment
Share on other sites

Yeah, refer this.

[2008-12-17(Wed) 18:35:18.640] -164< SRC_LINE[04123] ycmExecWinActivate( "" , 00468 ) Got Window Handle[A] Ptr[0x002D00EA] by 'LastChaos' as [PID_00300] in 0s026
[2008-12-17(Wed) 18:35:20.015] -163> SRC_LINE[04181] ycmExecWinActivate( "" , 00468 ) Got Control Class[A] String[ViewPort Window] in 1s412
[2008-12-17(Wed) 18:35:20.031] -163< SRC_LINE[04196] ycmExecWinActivate( "" , 00468 ) Got Control Handle[A] String[] by 'ViewPort Window' in 1s417

: 0x0108C17C    +0xF9184      dword [127] PET GUI Show   Flag =0/1               [D] 1        (0x00000001) [F] 1.40129846432482e-045  
: 0x0108C180    +0xF9188      float [128] PET GUI Life   Max  =100               [F] 100                     [D] 1120403456 (0x42C80000) ▶ [D] 0        (0x00000000) [F] 0
: 0x0108C184    +0xF918C      float [129] PET GUI Life   Cur  =100               [F] 43                   [D] 1110179840 (0x422C0000) ▶ [D] 0       (0x00000000) [F] 0
: 0x0108C188    +0xF9190      float [130] PET GUI Hungry Max  =100               [F] 100                     [D] 1120403456 (0x42C80000) ▶ [D] 0        (0x00000000) [F] 0
: 0x0108C18C    +0xF9194      float [131] PET GUI Hungry Cur  =100               [F] 32                   [D] 1107296256 (0x42000000) ▶ [D] 0       (0x00000000) [F] 0
: 0x0108C190    +0xF9198      dword [132] PET Level =0                           [D] 54      (0x00000036) [F] 7.56701170735401e-044  
: 0x0108C194    +0xF919C      dword [133] PET Type  =0=Horse 1=Drake               [D] 1          (0x00000001) [F] 1.40129846432482e-045  
: 0x0108C198    +0xF91A0      dword [134] PET Class =0:PON/HAT 1:HOR/DRK 2:NM/DRG  [D] 1          (0x00000001) [F] 1.40129846432482e-045  
: 0x0108C19C    +0xF91A4      dword [135] PET Skill Point =-1                     [D] 0       (0x00000000) [F] 0

Reading memory, it is reliable.

Thanks for the information, but how will I use this especially if the memory values change every time I boot up the game.
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...