LightbulbOutdatedNk Adventure Bot v1.2

Posts 1–15 of 56 · Page 1 of 4
Nk Adventure Bot v1.2
Adventure Bot

What's new :
Now working with trove in background !
Now detecting up to 3 dungeons !

Disclaimer :
This bot is here to show everyone that you can do what you want if you got an idea.
If you want a good adventure bot, you can make your own just editing my code.

Info & Tuto :
The 4th update of my adventure bot !

To make it work :
  • Press "i" and disable everything except "Dungeons".
  • Then set the game to windowed mode.
  • Finally maximize this window.

If this is not working (the bot is just /respawn-ing), check this tutorial :
https://www.mpgh.net/forum/showthread.php?t=1358751




Working in fire and water worlds, if you want to go in air just change this :
Code:
ControlSend,,{z down},ahk_id %Handle%
ControlSend,,{d down},ahk_id %Handle%
Sleep 200
ControlSend,,{z up},ahk_id %Handle%
Sleep 150
ControlSend,,{d up},ahk_id %Handle%
To this :
Code:
ControlSend,,{z down},ahk_id %Handle%
ControlSend,,{q down},ahk_id %Handle%
Sleep 200
ControlSend,,{z up},ahk_id %Handle%
Sleep 150
ControlSend,,{q up},ahk_id %Handle%
Explanations :
This script will make you respawn.
Then it sends keys to move to the rally blade and use it.
Once teleported, it checks if you are in a dungeon by searching for it's logo (checking pixel color at logo location) on the top right of the screen.
If the logo is found, the script checks every 5s if this logo is still here, and this, during 90s or until the dungeon is completed.
If the dungeon is cleared before those 90s, the script will restart (/respawn...).

To-do :
Find the dungeon pointer (that shows up the dungeon logo).
Improve delays between keys sending.
Enable multi-acc.
Adapt to different resolutions...

I'm opened to all of your ideas and suggestions


AHK Script :
Code:
	;get window handle
	WinGet, win_ids, ID, Trove
	
	;TO-DO : edit for multi account
	Handle := win_ids
	
	;To avoid some bugs
	SetKeyDelay, 40	
	
	Loop {	
		Sleep 200
		ControlSend,,{w},ahk_id %Handle%
		Sleep 100
		ControlSend,,{z down},ahk_id %Handle%
		ControlSend,,{d down},ahk_id %Handle%
		Sleep 100
		ControlSend,,{Space},ahk_id %Handle%
		Sleep 200
		ControlSend,,{Space},ahk_id %Handle%
		Sleep 200
		ControlSend,,{Space},ahk_id %Handle%
		Sleep 200
		ControlSend,,{Space},ahk_id %Handle%
		Sleep 200
		ControlSend,,{Space},ahk_id %Handle%
		Sleep 200
		ControlSend,,{Space down},ahk_id %Handle%
		Sleep 600		
		ControlSend,,{z up},ahk_id %Handle%
		ControlSend,,{d up},ahk_id %Handle%
		ControlSend,,{Space up},ahk_id %Handle%

		Sleep 200
		;respawn to the rally blade and use it	
		ControlSend,,{Enter}{Shift down}/{Shift up}respawn{Enter},ahk_id %Handle%
		Sleep 1000
		ControlSend,,e,ahk_id %Handle%
		;Send {e}
		Sleep 2000
		ControlSend,,w,ahk_id %Handle%
		ControlSend,,{z down},ahk_id %Handle%
		ControlSend,,{d down},ahk_id %Handle%
		Sleep 200
		ControlSend,,{z up},ahk_id %Handle%
		Sleep 150
		ControlSend,,{d up},ahk_id %Handle%
		Sleep 1000
		ControlSend,,e,ahk_id %Handle%
		Sleep 3000

		TimeOut = 0
		LastTime = 0
		Loop {
			;detect a dungeon			
			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")
			{
				LastTime = 1
				if (TimeOut = 18)
				{
					;break after 5000ms*18=90s in uncleared dungeon
					break
				}
				TimeOut++				
				;fake human moves in 5000ms loop
				Sleep 500
				ControlSend,,&,ahk_id %Handle%				
				Sleep 4500
			}
			else
			{
				if (LastTime = 1)
				{
					;time to loot !
					ControlSend,,{e down},ahk_id %Handle%
					;wait for the chest to be destroyed
					Sleep 6000
					ControlSend,,{e up},ahk_id %Handle%
				}
				break
			}
		}
	}	

Numpad0::ExitApp
Numpad1::Pause,,1 

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/2zj9ryjwwz
https://www.virustotal.com/fr/file/7...is/1523840072/
NkAdvBot_v1.2_mpgh.net.rar933 B · 1,183 downloads Clean
Hi there. I changed some values to match my qwerty keyboard so the movement and the respawning works, but I am running into a similar problem as the last time, it isn't scanning for the dungeon stars, I have it in window mode maximized, my normal screen res is 1920x1080
Quote Originally Posted by Gizmozaic View Post
Hi there. I changed some values to match my qwerty keyboard so the movement and the respawning works, but I am running into a similar problem as the last time, it isn't scanning for the dungeon stars, I have it in window mode maximized, my normal screen res is 1920x1080
Did you disabled everything but dungeons on the top right corner ? It should work, you have the same resolution as me
Everything is disabled, except for dungeons, is it possible that my layout looks different somehow, maybe I can take a screenshot or something.

- - - Updated - - -

Does the top right of your dungeon screen look like this?


https://ibb.co/b69dZ7
What Does This Button Actually Do? Dungeons alone?
safe and clean not tested
why this script writes ?respawn and not ./respawn
change the script from
ControlSend,,{Enter}{Shift down}/{Shift up}respawn{Enter},ahk_id %Handle%
to
ControlSend,,{Enter}{Shift up}/{Shift up}respawn{Enter},ahk_id %Handle%
he run forward and dont press blade
Looks quite dam sick
For me the bot permanently walks against this wall instead of using the blade

https://prntscr.com/j8kc4cⓘ

Fixed by adding

ControlSend,,{s down},ahk_id %Handle%

and

ControlSend,,{s up},ahk_id %Handle%
Sleep 150
Posts 1–15 of 56 · Page 1 of 4
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?