Results 1 to 13 of 13
  1. #1
    limacezzz's Avatar
    Join Date
    May 2015
    Gender
    male
    Posts
    62
    Reputation
    10
    Thanks
    338
    My Mood
    Inspired

    Lightbulb Nk Adventure Bot 1.3

    Adventure Bot

    What's new :
    New launcher, to add other bots and tools later
    Better compatibility
    Easier setup
    Easier updating (for me or other devs ahah, for common users it's the same)

    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 on a 1920x1080 : (for others, read the quick guide below)
    • Press "i" and disable everything except "Dungeons".
    • Set the game to windowed mode.
    • Maximize this window.
    • Run the GUI
    • Pick the blade direction

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


    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, this during 90s or until the dungeon is completed.
    If the dungeon is cleared before those 90s, the script will try to loot, add 1 to dungeons count and restart (/respawn...).
    After 90s uncleared the script will timeout and respawn.

    To-do :
    (still) Find the dungeon pointer (that shows up the dungeon logo).
    Improve delays between keys sending.
    Enable multi-acc.
    Adapt to different resolutions
    Create better "random" human behavior when waiting in dungeon or respawning
    Make a geode bot
    Add auto pots script
    Code automatic world switch

    I'm opened to all of your ideas and suggestions, don't hesitate to share them in the comments


    AHK Script :
    Launcher :
    Code:
    ;thanks to kui5z for the gui idea
    SetWorkingDir %A_ScriptDir%
    
    PauseFlag := 0
    
    Gui Add, GroupBox, h87 w250, Adventure Bot Control (arrow = blade position)
    Gui Add, Button, xm+5 ym+12 w80 h23 gTopL,🡼
    Gui Add, Button, xm+85 ym+12 w80 h23 gTopR, 🡽
    Gui Add, Button, xm+165 ym+12 w80 h23 gPause vToggle, Pause
    Gui Add, Button, xm+5 ym+35 w80 h23 gBotL, 🡿
    Gui Add, Button, xm+85 ym+35 w80 h23 gBotR, 🡾
    Gui Add, Button, xm+165 ym+35 w80 h23 gStop, Stop
    Gui Add, Button, xm+5 ym+58 w80 h23, unused
    Gui Add, Button, xm+85 ym+58 w80 h23, unused
    Gui Add, Button, xm+165 ym+58 w80 h23, unused
    Gui Add, GroupBox, h87 w90 x262 y6, Tools
    Gui Add, Button, xm+257 ym+12 w80 h23 gPxChk, Pixel Checker
    Gui Add, Button, xm+257 ym+35 w80 h23, unused
    Gui Add, Button, xm+257 ym+58 w80 h23, unused
    Gui Show,, Nk Bots v1.3
    Return
    
    TopL:
    	Run, NkAdvBot.ahk "TopL"
    Return
    
    TopR:
    	Run, NkAdvBot.ahk "TopR"
    Return
    
    BotL:
    	Run, NkAdvBot.ahk "BotL"
    Return
    
    BotR:
    	Run, NkAdvBot.ahk "BotR"
    Return
    
    Pause:
    	Send {Numpad1}
    	if(PauseFlag=0){
    		PauseFlag := 1
    		GuiControl,,Toggle,Resume
    	}else{
    		PauseFlag := 0
    		GuiControl,,Toggle,Pause
    	}
    Return
    	
    Stop:
    	Send {Numpad0}
    Return
    	
    PxChk:
    	Run, NkPxChk.ahk
    Return
    
    GuiClose:
    	Send {Numpad0}
    	ExitApp
    Return
    Bot :
    Code:
    #SingleInstance force
    #NoTrayIcon
    
    ;get window handle
    WinGet, win_ids, ID, Trove
    if(win_ids=""){
    	MsgBox, 48, Error, No Trove window found
    	ExitApp
    }else{
    	;TO-DO : edit for multi accounts
    	Handle := win_ids
    	;Delay between each key (ms) to avoid some bugs while typing
    	SetKeyDelay, 40	
    	;Currently working in foreground only
    	WinActivate, Trove
    }
    
    ;Retrieve the direction from args[1] and setup the keys (don't ask me why, dir is always equal to 1, which is also the name of the first arg var, so it works only like this Ô_o
    dir := 1
    if (%dir% = "TopL"){
    	xDirKey := "z"
    	yDirKey := "q"
    }else if (%dir% = "TopR"){
    	xDirKey := "z"
    	yDirKey := "d"
    }else if (%dir% = "BotL"){
    	xDirKey := "s"
    	yDirKey := "q"
    }else if (%dir% = "BotR"){
    	xDirKey := "s"
    	yDirKey := "d"
    }
    
    ;Init quests tracker
    ClearedDungeons := 0
    Loop {
    	ToolTipColor(0x262626,0xffab87)
    	ToolTip, Dungeons completed : %ClearedDungeons%`nPress num1 to pause`nPress num0 to exit, 10, 34
    	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,,{%xDirKey% down},ahk_id %Handle%
    	ControlSend,,{%yDirKey% down},ahk_id %Handle%
    	Sleep 300
    	ControlSend,,{%xDirKey% up},ahk_id %Handle%
    	Sleep 100
    	ControlSend,,{%yDirKey% up},ahk_id %Handle%
    	Sleep 1000
    	ControlSend,,e,ahk_id %Handle%
    	Sleep 3000
    	TimeOut = 0
    	FoundDungeon = 0
    	Loop {
    		;detect a dungeon TO-DO : Edit for multi accounts
    		PixelGetColor Dungeon1, 1570, 130, RGB
    		PixelGetColor Dungeon2, 1570, 202, RGB
    		PixelGetColor Dungeon3, 1570, 274, RGB
    		if (Dungeon1 = "0xFEF89A"||Dungeon2 = "0xFEF89A"||Dungeon3 = "0xFEF89A")
    		{
    			FoundDungeon = 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 ;=5000ms wait per loop inside dungeon
    		}
    		else
    		{
    			;When the dungeon is completed (after waiting a bit and the detected icon disappeared)
    			if (FoundDungeon = 1)
    			{
    				ClearedDungeons++
    				;time to loot !
    				Sleep 2000
    				;wait for chest to be destroyed
    				ControlSend,,{e down},ahk_id %Handle%
    				;auto loot everything
    				Sleep 5000
    				ControlSend,,{e up},ahk_id %Handle%
    			}
    			Break
    		}
    	}
    }
    
    Numpad0::ExitApp
    Numpad1::
    	ToolTipColor(0x262626,0xff0000)
    	ToolTip, The bot is paused `nPress num1 to resume, 10, 34
    	Pause,,1 
    Return 
    
    ;libraries :
    
    ;Thanks to lexikos for his tooltip color lib
    ToolTipColor(Background := "", Text := "", hwnd := "") {
        static bc := "", tc := ""
        if (hwnd = "") {
            if (Background != "")
                bc := Background="Default" ? "" : _TTG("Color", Background)
            if (Text != "")
                tc := Text="Default" ? "" : _TTG("Color", Text)
            _TTHook()
        }
        else {
            VarSetCapacity(empty, 2, 0)
            DllCall("UxTheme.dll\SetWindowTheme", "ptr", hwnd, "ptr", 0
                , "ptr", (bc != "" && tc != "") ? &empty : 0)
            if (bc != "")
                DllCall("SendMessage", "ptr", hwnd, "uint", 1043, "ptr", bc, "ptr", 0)
            if (tc != "")
                DllCall("SendMessage", "ptr", hwnd, "uint", 1044, "ptr", tc, "ptr", 0)
        }
    }
     
    _TTHook() {
        static hook := 0
        if !hook
            hook := DllCall("SetWindowsHookExW", "int", 4
                , "ptr", RegisterCallback("_TTWndProc"), "ptr", 0
                , "uint", DllCall("GetCurrentThreadId"), "ptr")
    }
     
    _TTWndProc(nCode, _wp, _lp) {
        Critical 999
       ;lParam  := NumGet(_lp+0*A_PtrSize)
       ;wParam  := NumGet(_lp+1*A_PtrSize)
        uMsg    := NumGet(_lp+2*A_PtrSize, "uint")
        hwnd    := NumGet(_lp+3*A_PtrSize)
        if (nCode >= 0 && (uMsg = 1081 || uMsg = 1036)) {
            _hack_ = ahk_id %hwnd%
            WinGetClass wclass, %_hack_%
            if (wclass = "tooltips_class32") {
                ToolTipColor(,, hwnd)
            }
        }
        return DllCall("CallNextHookEx", "ptr", 0, "int", nCode, "ptr", _wp, "ptr", _lp, "ptr")
    }
     
    _TTG(Cmd, Arg1, Arg2 := "") {
        static htext := 0, hgui := 0
        if !htext {
            Gui _TTG: Add, Text, +hwndhtext
            Gui _TTG: +hwndhgui +0x40000000
        }
        Gui _TTG: %Cmd%, %Arg1%, %Arg2%
        if (Cmd = "Font") {
            GuiControl _TTG: Font, %htext%
            SendMessage 0x31, 0, 0,, ahk_id %htext%
            return ErrorLevel
        }
        if (Cmd = "Color") {
            hdc := DllCall("GetDC", "ptr", htext, "ptr")
            SendMessage 0x138, hdc, htext,, ahk_id %hgui%
            clr := DllCall("GetBkColor", "ptr", hdc, "uint")
            DllCall("ReleaseDC", "ptr", htext, "ptr", hdc)
            return clr
        }
    }
    Virus scans :
    https://virusscan.jotti.org/filescanjob/sg6nayc9al
    https://www.virustotal.com/gui/file/...f5c8/detection
    <b>Downloadable Files</b> Downloadable Files
    Last edited by T-800; 03-05-2020 at 10:08 AM.
    "Open source enables a development method for software that harnesses the power of distributed peer review and transparency of process.
    The promise of open source is higher quality, better reliability, greater flexibility, lower cost, and an end to predatory vendor lock-in."

    -> Gem farming bot

  2. The Following 9 Users Say Thank You to limacezzz For This Useful Post:

    12fdssfd (03-02-2020),challe87 (02-20-2020),chipon1 (02-10-2020),DaddyTead (02-21-2020),harrizuan (02-22-2020),jonnispro (03-03-2020),Kimmoli (02-12-2020),Roxas49 (02-13-2020),thegamingobsession (02-26-2020)

  3. #2
    meme's Avatar
    Join Date
    Jan 2016
    Gender
    male
    Location
    42.434720, -83.985
    Posts
    8,107
    Reputation
    1470
    Thanks
    2,430
    My Mood
    Lurking
    /approved //2short
    Quote Originally Posted by Hennessy View Post
    meme is shittiest general mod ever.
     
    dd/mm/yy
    Member | 28/1/16 - ∞
    Premium | 20/3/16 - ∞
    BattleOn Minion | 24/12/17 - 21/7/21
    Minion+ | 4/4/19 - 11/12/20
    Other MMMORPG Minion | 10/11/19 - 21/7/21
    Publicist | 7/2/20 - Unknown
    Minecraft Minion | 10/12/20 - 21/7/21
    General Minion | 10/12/20 - 21/7/21

    Moderator | 11/12/20 - 21/7/21
    Princess | 5/1/21 - 30/6/21
    Global Moderator | 21/7/21 - ∞
    Pharaoh | 30/1/22 - ∞
    Trusted Member | 16/3/23 - ∞

  4. The Following User Says Thank You to meme For This Useful Post:

    limacezzz (02-10-2020)

  5. #3
    Joca.'s Avatar
    Join Date
    Oct 2018
    Gender
    male
    Posts
    58
    Reputation
    10
    Thanks
    13
    Hey, can you tell me purpose of this, for what this can be used? Give me couple examples?

  6. #4
    Bananajoe1337's Avatar
    Join Date
    Nov 2019
    Gender
    male
    Posts
    3
    Reputation
    10
    Thanks
    1
    it types :respawn instead of /respawn for me, what could cause this?

  7. #5
    limacezzz's Avatar
    Join Date
    May 2015
    Gender
    male
    Posts
    62
    Reputation
    10
    Thanks
    338
    My Mood
    Inspired
    Quote Originally Posted by Joca. View Post
    Hey, can you tell me purpose of this, for what this can be used? Give me couple examples?
    farming gem boxes

    - - - Updated - - -

    Quote Originally Posted by Bananajoe1337 View Post
    it types :respawn instead of /respawn for me, what could cause this?
    it's your keyboard layout, so in the code you should try to edit this line to type /respawn correctly
    Code:
    ;respawn to the rally blade and use it	
    	ControlSend,,{Enter}{Shift down}:{Shift up}respawn{Enter},ahk_id %Handle%
    "Open source enables a development method for software that harnesses the power of distributed peer review and transparency of process.
    The promise of open source is higher quality, better reliability, greater flexibility, lower cost, and an end to predatory vendor lock-in."

    -> Gem farming bot

  8. #6
    Ohsaewon's Avatar
    Join Date
    Oct 2018
    Gender
    male
    Posts
    286
    Reputation
    42
    Thanks
    24
    This is perfect for reformatting my keyboard. I appreciate it.

  9. #7
    thegamingobsession's Avatar
    Join Date
    Mar 2019
    Gender
    male
    Posts
    9
    Reputation
    10
    Thanks
    2
    the old bot use to make it so you can run trove in the background while having the bot on, how do i do that with this bot?

  10. #8
    limacezzz's Avatar
    Join Date
    May 2015
    Gender
    male
    Posts
    62
    Reputation
    10
    Thanks
    338
    My Mood
    Inspired
    Quote Originally Posted by thegamingobsession View Post
    the old bot use to make it so you can run trove in the background while having the bot on, how do i do that with this bot?
    It was still working for you ? i will try add this back bit it is a heard feature
    Any help is appreciated for dungeon pointers
    "Open source enables a development method for software that harnesses the power of distributed peer review and transparency of process.
    The promise of open source is higher quality, better reliability, greater flexibility, lower cost, and an end to predatory vendor lock-in."

    -> Gem farming bot

  11. #9
    thegamingobsession's Avatar
    Join Date
    Mar 2019
    Gender
    male
    Posts
    9
    Reputation
    10
    Thanks
    2
    yeah the new one and old was was working just had to edit them a bit but ive recently changed my monitor layout and cant seem to get it working again, im trying to run the bot on the second screen, im doing the pointers the same way for the second screen as i did for my main screen but my second screen is to the right so it goes into negative values, ive got (1571, -357, 0xfbf14f), also tried the pointer at both the star and dungeon icon but for some reason its not picking up the dungeon, any ideas?
    Last edited by thegamingobsession; 02-27-2020 at 10:27 PM.

  12. #10
    limacezzz's Avatar
    Join Date
    May 2015
    Gender
    male
    Posts
    62
    Reputation
    10
    Thanks
    338
    My Mood
    Inspired
    Quote Originally Posted by thegamingobsession View Post
    yeah the new one and old was was working just had to edit them a bit but ive recently changed my monitor layout and cant seem to get it working again, im trying to run the bot on the second screen, im doing the pointers the same way for the second screen as i did for my main screen but my second screen is to the right so it goes into negative values, ive got (1571, -357, 0xfbf14f), also tried the pointer at both the star and dungeon icon but for some reason its not picking up the dungeon, any ideas?
    Which one isn't working on your 2nd monitor ? i think the old one doesn't support multiple screens actually, and i don't know about the new one (i'm working on it to background already)
    "Open source enables a development method for software that harnesses the power of distributed peer review and transparency of process.
    The promise of open source is higher quality, better reliability, greater flexibility, lower cost, and an end to predatory vendor lock-in."

    -> Gem farming bot

  13. #11
    thegamingobsession's Avatar
    Join Date
    Mar 2019
    Gender
    male
    Posts
    9
    Reputation
    10
    Thanks
    2
    the old one as im using it in the background, it worked on my second screen before. I has the second monitor to the right of my main so the values didnt go negative but ive had to switch my monitors around so my second screen is to the left of my main, the bot runs just fine on my main but putting trove onto the second screen and changing the values around doesnt seem to be working
    Edit: For some reason the autohotkey script to get the pixel doesnt work fully on the screen that isnt the main one. not sure what to do from here.
    Last edited by thegamingobsession; 02-28-2020 at 05:33 PM.

  14. #12
    YatoArtz's Avatar
    Join Date
    Mar 2020
    Gender
    male
    Posts
    1
    Reputation
    10
    Thanks
    0

    Installing

    How do i make this work exactly? I have the files but idk how to load it.

  15. #13
    limacezzz's Avatar
    Join Date
    May 2015
    Gender
    male
    Posts
    62
    Reputation
    10
    Thanks
    338
    My Mood
    Inspired
    Quote Originally Posted by thegamingobsession View Post
    yeah the new one and old was was working just had to edit them a bit but ive recently changed my monitor layout and cant seem to get it working again, im trying to run the bot on the second screen, im doing the pointers the same way for the second screen as i did for my main screen but my second screen is to the right so it goes into negative values, ive got (1571, -357, 0xfbf14f), also tried the pointer at both the star and dungeon icon but for some reason its not picking up the dungeon, any ideas?
    Here you go, i updated it, back to background ! https://www.mpgh.net/forum/showthread.php?t=1490847

    - - - Updated - - -

    Quote Originally Posted by YatoArtz View Post
    How do i make this work exactly? I have the files but idk how to load it.
    you have to install autohotkey, then just double click on the gui file (use updated version https://www.mpgh.net/forum/showthread.php?t=1490847 )
    "Open source enables a development method for software that harnesses the power of distributed peer review and transparency of process.
    The promise of open source is higher quality, better reliability, greater flexibility, lower cost, and an end to predatory vendor lock-in."

    -> Gem farming bot

Similar Threads

  1. [Outdated] Nk Adventure Bot v1.0
    By limacezzz in forum Trove Hacks & Cheats
    Replies: 25
    Last Post: 03-05-2020, 10:04 AM
  2. [Outdated] Adventure Bot [Update]
    By limacezzz in forum Trove Hacks & Cheats
    Replies: 26
    Last Post: 03-05-2020, 10:03 AM
  3. [Outdated] Nk Adventure Bot v1.2
    By limacezzz in forum Trove Hacks & Cheats
    Replies: 55
    Last Post: 09-14-2019, 09:54 PM
  4. NK Adventure Bot bylimacezzz changed for u9
    By mattes32 in forum Trove Hacks & Cheats
    Replies: 0
    Last Post: 05-17-2018, 06:01 AM
  5. [Outdated] Adventure Bot
    By limacezzz in forum Trove Hacks & Cheats
    Replies: 14
    Last Post: 02-18-2018, 08:12 AM