Please help me get this working. Topic is solved

Ask gaming related questions (AHK v1.1 and older)
Guest

Please help me get this working.

22 Feb 2016, 04:30

Hi, I managed to get my hands on a script I have been wanting for a long time to help in a game. I wanted at first just a script to lift the mouse extremely slowly but was unable to find one or get one working but this is much better anyway.
Spoiler

I can see the hotkeys and they move the mouse but don't do what I was told the script is suppose to do. From what I can see it is suppose to have a .ini file to work maybe? I how ever did not receive one when I got the file(it did make one but it is empty).

The way lock picking in this game works is there are usually between 4-7 "pins" on the chest UI. the pins have physics in that the "spring" affects the way you lift it, for example the longer/slower you continue lifting a pin the more you have to move the mouse to keep the same "pressure" on the pin to keep it at the same height. the pin has 2 general colours of red and yellow (slight shading on each side of the pin) with a clear cut between the 2 colours (horizontal separation). the way to separate the pin is to get the exact point where the 2 colours touch to the small area on the lock UI where you then click which will separate them and allow you to drop the red colour (that is on the bottom) and move onto the next pin. all pins have to be separated to unlock the chest. the area which i am referring to where you click is a extremely thin unique coloured line which is always in the exact same spot (How ever the pins do change size and height randomly, how ever there is a unique pattern to a pin which will always be seen again (same height and length) eventually.
so basically this is meant to scan the pin and lift it the required amount and click at the right time at which point it will "sleep' then move onto the next pin and repeat till all the pins are seperated.
I how ever am unable to figure this out on my own as I do not know enough.
I was told that this is what this script was designed for and suppose to do.

The point at which they split is that thin light "cream?" coloured line directly below the black area in the middle of the "Lock"
https://i.ytimg.com/vi/Y2-2ANstSm4/maxresdefault.jpg



any and all help is very much appreciated, thank you.
User avatar
evilC
Posts: 4823
Joined: 27 Feb 2014, 12:30

Re: Please help me get this working.

23 Feb 2016, 06:52

Use code tags to post code, not spoiler tags.

Code: Select all

BarrelTop = 319 ; black line where the yellow and red boundary is suppose to be in 
; for a succesful pick attempt
It looks like this line needs to be configured according to the resolution that you play the game in. Take a screenshot of the game while the lockpick GUI is open and find out the y coordinate of the black line at the top of the barrel.

It looks like the INI file is created for you, it does not look like the script should come with one.
Jilly
Posts: 15
Joined: 22 Feb 2016, 04:08

Re: Please help me get this working.

23 Feb 2016, 07:29

sorry how would I go about finding the y coordinate?
and once I change that to the correct number will I just press scroll lock to start the script? or how do i start it?

also do I have to change any of these parts?

Code: Select all

BarrelTop = 319 ; black line where the yellow and red boundary is suppose to be in 
; for a succesful pick attempt

PinX = 0
PinY = 0
PickLocY = 374
PickLocX = 827
color_red = 0xDE6060
color_yellow = 0xDABF5C
color_nearblack = 0x292929
hwnd = 0
hDC = 0
pix = 0
thank you by the way.
User avatar
evilC
Posts: 4823
Joined: 27 Feb 2014, 12:30

Re: Please help me get this working.

23 Feb 2016, 07:43

I am guessing just the barreltop.

Screenshot the game window, then open the file in MS Paint. The coordinates of the cursor are in the bottom left of the paint window. Find the Y coord for the "boundary" line and replace 319 with the new coordinate
Jilly
Posts: 15
Joined: 22 Feb 2016, 04:08

Re: Please help me get this working.

23 Feb 2016, 09:07

thank you very much I will give it a try soon :)
Jilly
Posts: 15
Joined: 22 Feb 2016, 04:08

Re: Please help me get this working.

24 Feb 2016, 03:26

I tried changing it to the correct pixel but was unable to get it working. It doesn't do anything when i press scroll lock. it just brings up the window that says start. i click ok and then nothing happens.
i tried changing the color parts in the above section of the code but no success.
Jilly
Posts: 15
Joined: 22 Feb 2016, 04:08

Re: Please help me get this working.

25 Feb 2016, 01:53

shameless bump
Jilly
Posts: 15
Joined: 22 Feb 2016, 04:08

Re: Please help me get this working.

25 Feb 2016, 22:32

shameless bump
Jilly
Posts: 15
Joined: 22 Feb 2016, 04:08

Re: Please help me get this working.

26 Feb 2016, 23:00

shameless bump
Jilly
Posts: 15
Joined: 22 Feb 2016, 04:08

Re: Please help me get this working.

27 Feb 2016, 02:04

shameless bump again. please help someone
User avatar
evilC
Posts: 4823
Joined: 27 Feb 2014, 12:30

Re: Please help me get this working.

29 Feb 2016, 08:17

The line in the code:

Code: Select all

Home::
IfWinActive, MortalGame
is where the code starts when you hit HOME.

Download DebugView (google it), then add in OutputDebug lines like this into the code:

Code: Select all

Home::
OutputDebug HOME pressed
IfWinActive, MortalGame
{
OutputDebug MO is Active
window := WinExist("A") ;// grab the hwnd of the active window
MouseGetPos, curX, curY 
PinX = %curX%
MouseMove, 200, 200, 0, R
Sleep 200
MouseClick, Right,,,,,D
PixelGetColor, clr2, PinX, BarrelTop - 8, RGB slow
While (!CompareRGB(color_red, clr2))
{
OutputDebug In While loop that appears to be looking for red pixels
MouseMove, -10, -20, 0, R
PixelGetColor, clr2, PinX, BarrelTop - 8, RGB Slow
}
The text should appear in the DebugView window so you can see where the code got to.

Also, there are a number of hotkeys in the script (HOME, PGUP, PGDOWN, INSERT, DELETE, F9, F10, F11, F12...), do you know what they all are supposed to do? ScrollLock does NOT appear the be the hotkey that activates the main part of the macro, that looks to be HOME, or maybe END.
It looks like some of them are maybe to debug various aspects of the script or to find out variables needed for configuration.
Jilly
Posts: 15
Joined: 22 Feb 2016, 04:08

Re: Please help me get this working.

29 Feb 2016, 09:13

Im sorry i dont know what each hotkey is suppose to do. I will do a little more testing trying to use the home key.
thank you
Jilly
Posts: 15
Joined: 22 Feb 2016, 04:08

Re: Please help me get this working.

02 Mar 2016, 13:26

shameless bump. still need help please!
Jilly
Posts: 15
Joined: 22 Feb 2016, 04:08

Re: Please help me get this working.

06 Mar 2016, 11:16

Bump. still seeking help if anyone can.
Jilly
Posts: 15
Joined: 22 Feb 2016, 04:08

Re: Please help me get this working.

23 Mar 2016, 16:11

bump. cud still use some help :(
Jilly
Posts: 15
Joined: 22 Feb 2016, 04:08

Re: Please help me get this working.

26 Mar 2016, 18:48

Bump still cant get this working -.-
User avatar
HinkerLoden
Posts: 93
Joined: 23 Mar 2016, 07:50
Contact:

Re: Please help me get this working.

26 Mar 2016, 19:15

maybe you should give us a progress on your side. Seems you not put any energy in it and you want a ready solution. So no one will help you out. Mods . Do your job
Jilly
Posts: 15
Joined: 22 Feb 2016, 04:08

Re: Please help me get this working.

27 Mar 2016, 19:25

ive tried everything i can think of. I've already explained I can't learn a whole language because I have a lot of other things I am doing. If you don't want to help then don't, no need to bash me for asking.
User avatar
Capn Odin
Posts: 1352
Joined: 23 Feb 2016, 19:45
Location: Denmark
Contact:

Re: Please help me get this working.

28 Mar 2016, 16:30

I have looked at the script and come to the conclusion that it will be easier to rewrite it. There are lots of strange repetitions in the code and it's surprisingly long for its limited use.
I may look in to it, but I would like if you could inform me of the following first.
Is the game free, if so then how large is the download and how far into the game before one encounter lockpicking ?
Please excuse my spelling I am dyslexic.

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: No registered users and 51 guests