LightbulbOutdatedNk Check PX

Posts 1–9 of 9 · Page 1 of 1
Nk Check PX
Pixel Checker

Disclaimer :
This tool is used with the Adventure Bot : https://www.mpgh.net/forum/showthread.php?t=1358690
It is only working on trove on primary monitor.

Info & Tuto :

To make it work :
  • Press "i" and disable everything except "Dungeons".
  • Then set the game to windowed mode.
  • Maximize this window.
  • Find one or more dungeons ingame.
  • Open your character page.
  • Start the tool as admin (this will show a little tooltip with coordinates of the mouse, screen resolution and pixel color).
  • Bring your pointer to the middle of the dungeon star.
  • Press 1 to pause the script !
  • Save those 3 values : (X, Y, Color)
  • if you want to detect multiple dungeons, find a 3* dungeon and repeat with each dungeon :



Code:
Dungeon1 := DwmGetPixel(1563, 120,ahk_id %Handle%)<- here are the first 2 values
if (Dungeon1 = "0xe9fa")<- And here is the third
If you want to detect more dungeons, you have to add them :
Code:
Dungeon1 := DwmGetPixel(1563, 120, ahk_id %Handle%)
Dungeon2 := DwmGetPixel(1563, 193,ahk_id %Handle%)
Dungeon3 := DwmGetPixel(1563, 266,ahk_id %Handle%)
if (Dungeon1 = "0xe9fa"||Dungeon2 = "0x4ff1fb"||Dungeon3 = "0x9af7fe")

Feel free to comment with your resolution and a working combination of "X, Y, Color" to help others !


AHK Script :
Code:
	loop
{
	activeMonitorInfo( X, Y, Width, Height, Color)
	ToolTip,  X : %X%   Y : %Y%   Resolution : %Width%x%Height%   Color : %Color%
	Sleep 50
}
Numpad0::ExitApp
Numpad1::Pause,,1 

activeMonitorInfo( ByRef X, ByRef Y, ByRef Width,  ByRef  Height, ByRef Color  )
{ 
	;retrieves the size of the monitor, the mouse is on	
	CoordMode, Mouse, Window
	MouseGetPos, mouseX , mouseY
	SysGet, monCount, MonitorCount
	Loop %monCount%
    { 	
		SysGet, curMon, Monitor, %a_index%
        if ( mouseX >= curMonLeft and mouseX <= curMonRight and mouseY >= curMonTop and mouseY <= curMonBottom )
		{
			X      := mouseX-curMonLeft
			y      := mouseY
			Height := curMonBottom - curMonTop
			Width  := curMonRight  - curMonLeft
			Handle := WinExist("A")
			Color  := DwmGetPixel(X, Y, ahk_id %Handle%)
			return
		}
    }
}

DwmGetPixel(x, y, hwnd)
{	
   hDC := 	DllCall("user32.dll\GetDCEx", "UInt", hwnd, "UInt", 0, "UInt", 1|2)
   pix := 	DllCall("gdi32.dll\GetPixel", "UInt", hDC, "Int", x, "Int", y, "UInt")
			DllCall("user32.dll\ReleaseDC", "UInt", hwnd, "UInt", hDC)
   pix := DecToHex(pix)
   return pix
}
 
DecToHex(dec)
{
   oldfrmt := A_FormatInteger
   hex := dec
   SetFormat, IntegerFast, hex
   hex += 0
   hex .= ""
   SetFormat, IntegerFast, %oldfrmt%
   return hex
}
Virus scans :
https://virusscan.jotti.org/fr-FR/fi...job/uhx16fgrl2
https://www.virustotal.com/fr/file/7...is/1523839278/
NkChkPx_mpgh.net.rar710 B · 245 downloads Clean
Ok so I followed your posts instructions to the letter, and am still having problems, is it possible my mouse location isn't accurate or something, the bot still keeps looping the movement and respawn commands, I tried several different sets of values on various points close to the middle of the star, none of them seem to work, I appreciate the help btw, this screenshot shows the last values I used, as well as some of the lines I altered for my keyboard, please let me know if there any mistake I may have overlooked https://ibb.co/iQOprn
Quote Originally Posted by Gizmozaic View Post
In your screen you use the color #b1e21 that is purple, not yellow as a star... Make sure the cursor aims the center of the dungeon star and check the color code you obtained to see if it's yellow.
My problem was even with the cursor locked at the coordinates of the star it would change colors, like it was seeing right through the star for some reason, I resolved this by using the castle/dungeon icon instead of the star, and now have the bot working, thanks for the help and the hard work!
Quote Originally Posted by Gizmozaic View Post
I resolved this by using the castle/dungeon icon instead of the star, and now have the bot working
Ppl should learn from these words...
safe and clean not tested
Start the tool as admin (this will show a little tooltip with coordinates of the mouse, screen resolution and pixel color)
i new in use trove bot how i get this tools?
Not working,it just jumps and go right then foward and types ?respawn it can't even type /respawn
help pls
Don't know if it was needed, but I mapped out (from what I remember) every dungeon in Fire world for 1920x1080 resolution.

Dungeon1 := DwmGetPixel(1569, 129, ahk_id %Handle%)
Dungeon2 := DwmGetPixel(1570, 130,ahk_id %Handle%)
Dungeon3 := DwmGetPixel(1569, 129,ahk_id %Handle%)
Dungeon4 := DwmGetPixel(1570, 129,ahk_id %Handle%)
Dungeon5 := DwmGetPixel(1570, 129,ahk_id %Handle%)
Dungeon6 := DwmGetPixel(1569, 129,ahk_id %Handle%)
if (Dungeon1 = "0x25170a"||Dungeon2 = "0x17254b"||Dungeon3 = "0xf2458"||Dungeon4 = "0x22a90"||Dungeon5 = "0x168c"||Dungeon6 = "0x13324e")


Also, anyone that needs to fix it typing ?respawn instead of /respawn . Just find the line that says "ControlSend,,{Enter}{Shift down}/{Shift up}respawn{Enter},ahk_id %Handle%" and change it to "ControlSend,,{Enter}{Shift up}/{Shift up}respawn{Enter},ahk_id %Handle%"
Posts 1–9 of 9 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?