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

    Lightbulb Nk Gems/XP Bot 1.5

    Nk Gems/XP Bot

    What's new :
    New launcher, can work in any adventure world (even geode topside !)
    Now working in background !
    Now working on any monitor (not only primary) !

    Disclaimer :
    This bot is here to prove that you can do avnthing you want if you have an idea.
    If you want a better gems/exp bot, you can make your own just editing my code.

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

    To make it work on a 1920x1080 : (for others, read the quick guide below)
    • If you keyboard layout is not azerty, you have to edit these lines with the keys you are using to move :
      Code:
      if (%dir% = "TopL"){
      	xDirKey := "q"
      	yDirKey := "z"
      }else if (%dir% = "Top"){
      	xDirKey := ""
      	yDirKey := "z"
      }else if (%dir% = "TopR"){
      	xDirKey := "d"
      	yDirKey := "z"
      }else if (%dir% = "Left"){
      	xDirKey := "q"	
      	yDirKey := ""
      }else if (%dir% = "Right"){
      	xDirKey := "d"
      	yDirKey := ""
      }else if (%dir% = "BotL"){
      	xDirKey := "q"
      	yDirKey := "s"
      }else if (%dir% = "Bot"){
      	xDirKey := ""
      	yDirKey := "s"
      }else if (%dir% = "BotR"){
      	xDirKey := "d"
      	yDirKey := "s"
      }
    • Press "i" and disable everything except "Dungeons".
    • Set the game to windowed mode.
    • Maximize this window.
    • Run the GUI
    • Enter a world
    • Pick the blade direction on the GUI
    • You are done, now you can let it play in background

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


    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 caves bot
    Add auto pots script
    Add automatic world switch ?

    I'm opened to all of your ideas and suggestions, feel free to share them in the comments (Thanks to those who already inspired me). This is experimental, so it may not work on the first try !

    AHK Script :
    Launcher :
    Code:
    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 gTop, 🡹
    Gui Add, Button, xm+165 ym+12 w80 h23 gTopR, 🡽 
    Gui Add, Button, xm+5 ym+35 w80 h23 gLeft, 🡸
    Gui Add, Button, xm+85 ym+35 w80 h23, unused
    Gui Add, Button, xm+165 ym+35 w80 h23 gRight,  🡺
    Gui Add, Button, xm+5 ym+58 w80 h23 gBotL, 🡿
    Gui Add, Button, xm+85 ym+58 w80 h23 gBot,🡻
    Gui Add, Button, xm+165 ym+58 w80 h23 gBotR, 🡾
    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 gPause vToggle, Pause
    Gui Add, Button, xm+257 ym+58 w80 h23 gStop, Stop
    Gui Show,, Nk Bots v1.5
    Return
    
    TopL:
    	Run, NkAdvBot.ahk "TopL"
    Return
    
    Top:
    	Run, NkAdvBot.ahk "Top"
    Return
    
    TopR:
    	Run, NkAdvBot.ahk "TopR"
    Return
    
    Left:
    	Run, NkAdvBot.ahk "Left"
    Return
    
    Right:
    	Run, NkAdvBot.ahk "Right"
    Return
    
    BotL:
    	Run, NkAdvBot.ahk "BotL"
    Return
    
    Bot:
    	Run, NkAdvBot.ahk "Bot"
    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
    hWnd := WinExist("ahk_exe Trove.exe")
    
    if(hWnd=""){
    	MsgBox, 48, Error, No Trove window found
    	ExitApp
    }else{
    	CoordMode, Mouse, Screen
    	CoordMode, Pixel, Screen
    	SysGet, WindowBorderWidth, 32
    	;Delay between each key (ms) to avoid some bugs while typing
    	SetKeyDelay, 40	
    }
    		
    ;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 := "q"
    	yDirKey := "z"
    }else if (%dir% = "Top"){
    	xDirKey := ""
    	yDirKey := "z"
    }else if (%dir% = "TopR"){
    	xDirKey := "d"
    	yDirKey := "z"
    }else if (%dir% = "Left"){
    	xDirKey := "q"	
    	yDirKey := ""
    }else if (%dir% = "Right"){
    	xDirKey := "d"
    	yDirKey := ""
    }else if (%dir% = "BotL"){
    	xDirKey := "q"
    	yDirKey := "s"
    }else if (%dir% = "Bot"){
    	xDirKey := ""
    	yDirKey := "s"
    }else if (%dir% = "BotR"){
    	xDirKey := "d"
    	yDirKey := "s"
    }
    
    ;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 %hWnd%
    	Sleep 100
    	ControlSend,,{z down},ahk_id %hWnd%
    	ControlSend,,{d down},ahk_id %hWnd%
    	Sleep 100
    	ControlSend,,{Space},ahk_id %hWnd%
    	Sleep 200
    	ControlSend,,{Space},ahk_id %hWnd%
    	Sleep 200
    	ControlSend,,{Space},ahk_id %hWnd%
    	Sleep 200
    	ControlSend,,{Space},ahk_id %hWnd%
    	Sleep 200
    	ControlSend,,{Space},ahk_id %hWnd%
    	Sleep 200
    	ControlSend,,{Space down},ahk_id %hWnd%
    	Sleep 600
    	ControlSend,,{z up},ahk_id %hWnd%
    	ControlSend,,{d up},ahk_id %hWnd%
    	ControlSend,,{Space up},ahk_id %hWnd%
    	Sleep 200
    	;respawn to the rally blade and use it	
    	ControlSend,,{Enter}{Shift down}:{Shift up}respawn{Enter},ahk_id %hWnd%
    	Sleep 1000
    	ControlSend,,e,ahk_id %hWnd%
    	;Send {e}
    	Sleep 2000
    	ControlSend,,w,ahk_id %hWnd%
    	ControlSend,,{%yDirKey% down},ahk_id %hWnd%
    	ControlSend,,{%xDirKey% down},ahk_id %hWnd%
    	Sleep 300
    	ControlSend,,{%yDirKey% up},ahk_id %hWnd%
    	Sleep 100
    	ControlSend,,{%xDirKey% up},ahk_id %hWnd%
    	Sleep 1000
    	ControlSend,,e,ahk_id %hWnd%
    	Sleep 3000
    	TimeOut = 0
    	FoundDungeon = 0
    	Loop {
    		;detect a dungeon TO-DO : Edit for multi accounts
    		Dungeon1 := PixelColorSimple(1560 , 122, hWnd)
    		Dungeon2 := PixelColorSimple(1560 , 194, hWnd)
    		Dungeon3 := PixelColorSimple(1560 , 266, hWnd)
    		
    		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 %hWnd%				
    			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 %hWnd%
    				;auto loot everything
    				Sleep 5000
    				ControlSend,,{e up},ahk_id %hWnd%
    			}
    			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 pixel color and tooltip color libs
    
    PixelColorSimple(pc_x, pc_y, hWnd)
    {
    	SysGet, WindowTitleHeight, 4
    	SysGet, WindowBorderWidth, 45
    	pc_hDC := DllCall("GetDC", "UInt", hWnd)
    	pc_fmtI := A_FormatInteger
    	SetFormat, IntegerFast, Hex
    	pc_c := DllCall("GetPixel", "UInt", pc_hDC, "Int", pc_x+WindowBorderWidth, "Int", pc_y-WindowTitleHeight, "UInt")
    	pc_c := pc_c >> 16 & 0xff | pc_c & 0xff00 | (pc_c & 0xff) << 16
    	pc_c .= ""
    	SetFormat, IntegerFast, %pc_fmtI%
    	DllCall("ReleaseDC", "UInt", hWnd, "UInt", pc_hDC)
    	return pc_c
    }
    
    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/jrwnntyaev
    https://www.virustotal.com/gui/file/...f32e/detection
    <b>Downloadable Files</b> Downloadable Files
    Last edited by T-800; 04-14-2020 at 03:42 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 31 Users Say Thank You to limacezzz For This Useful Post:

    ahmedtarek (04-05-2020),alouisgg (03-20-2020),beaverchins2 (04-08-2020),chromie496 (04-02-2020),craigjaycn (03-17-2020),Darckarc (04-02-2020),dasdafw (03-19-2020),DragonSov (04-11-2020),dwawfsafwea (03-31-2020),EmirAXE (04-01-2020),Faynizz (03-11-2020),harry8972 (03-27-2020),henrykungz (04-26-2020),hongchen (04-06-2020),Jeffwong1233 (04-09-2020),Justin20003 (03-07-2020),Just_neet (05-12-2020),karatecookie4 (04-02-2020),kissmeilike (03-22-2020),Kumoko (03-13-2020),macmac213 (03-30-2020),MareJmeker (04-05-2020),Nethifix (03-08-2020),nozilahack (03-13-2020),pv98765 (03-05-2020),realkyuubi (03-11-2020),solidenmity (03-29-2020),titanium6 (03-07-2020),UmAbacaxi (03-05-2020),User000000000000000001 (03-14-2020),Zebauum (03-14-2020)

  3. #2
    T-800's Avatar
    Join Date
    Aug 2014
    Gender
    male
    Location
    Romania
    Posts
    17,066
    Reputation
    1688
    Thanks
    84,851
    //Approved (ahk scripts)

    "Never stop being a good person because of bad people"


    Super User -> 15-7-2020
    Global Moderator -> 23-3-2019 - 15-7-2020
    Steam Moderator -> 12-12-2017 - 23-3-2019
    Steam Minion+ -> 09-04-2017 - 12-12-2017
    Steam Minion -> 03-01-2017 - 09-04-2017


  4. The Following User Says Thank You to T-800 For This Useful Post:

    limacezzz (03-05-2020)

  5. #3
    thegamingobsession's Avatar
    Join Date
    Mar 2019
    Gender
    male
    Posts
    9
    Reputation
    10
    Thanks
    2
    Pixel Checker not working on second monitor, saying the colour is 0xFFFFFF anywhere on the screen

  6. #4
    Kumoko's Avatar
    Join Date
    Apr 2011
    Gender
    male
    Posts
    175
    Reputation
    10
    Thanks
    321
    You should make it easier for some and include a qwerty verison. It's not terribly difficult to modifiy but most users won't have the knowledge of how to do so.
    However, it does work once movement binds and pixels set for myself. nice release
    Im back.

  7. The Following 2 Users Say Thank You to Kumoko For This Useful Post:

    Joca. (03-20-2020),limacezzz (03-18-2020)

  8. #5
    dasdafw's Avatar
    Join Date
    Jan 2018
    Gender
    male
    Posts
    5
    Reputation
    10
    Thanks
    0

    idk

    pls make vidio how to use this

  9. #6
    jejeh123's Avatar
    Join Date
    Feb 2019
    Gender
    male
    Posts
    1
    Reputation
    10
    Thanks
    0
    respawn bot is broken. keep doing ;respawn without slash

  10. #7
    kissmeilike's Avatar
    Join Date
    Aug 2017
    Gender
    male
    Posts
    30
    Reputation
    10
    Thanks
    0
    not working

  11. #8
    karatecookie4's Avatar
    Join Date
    May 2018
    Gender
    male
    Posts
    1
    Reputation
    10
    Thanks
    0

    help?

    Quote Originally Posted by Kumoko View Post
    You should make it easier for some and include a qwerty verison. It's not terribly difficult to modifiy but most users won't have the knowledge of how to do so.
    However, it does work once movement binds and pixels set for myself. nice release
    hey i guess you got the bot to work and im not good with tech so could you possibly help me

  12. #9
    T-800's Avatar
    Join Date
    Aug 2014
    Gender
    male
    Location
    Romania
    Posts
    17,066
    Reputation
    1688
    Thanks
    84,851
    Outdated, closed.

    "Never stop being a good person because of bad people"


    Super User -> 15-7-2020
    Global Moderator -> 23-3-2019 - 15-7-2020
    Steam Moderator -> 12-12-2017 - 23-3-2019
    Steam Minion+ -> 09-04-2017 - 12-12-2017
    Steam Minion -> 03-01-2017 - 09-04-2017


Similar Threads

  1. [Outdated] Nk Gems/XP Bot 1.5
    By limacezzz in forum Trove Hacks & Cheats
    Replies: 7
    Last Post: 03-05-2020, 02:17 AM
  2. Grimoire 3.8 --Tainted Gems Farming Bot
    By Viserra in forum Adventure Quest Worlds (AQW) Hacks / Cheats / Trainers
    Replies: 3
    Last Post: 02-25-2019, 10:00 AM
  3. [Release] Dreadrock Gem Exchange bot (fast Tainted Gems, Dark Crystal Shards & Diamonds)
    By axtreckkkk in forum Adventure Quest Worlds (AQW) Hacks / Cheats / Trainers
    Replies: 46
    Last Post: 11-02-2018, 12:33 AM
  4. [Release] Fast TAINTED GEMS Dreadrock Gem Exchange Bot
    By amir buu in forum Adventure Quest Worlds (AQW) Hacks / Cheats / Trainers
    Replies: 3
    Last Post: 08-15-2017, 05:02 AM
  5. [Release] NEW, FASTER GOOD + EVIL REP (TAINTED GEM) BOT FOR RANK 4 GOOD + EVIL
    By dzungteelee in forum Adventure Quest Worlds (AQW) Hacks / Cheats / Trainers
    Replies: 3
    Last Post: 09-11-2013, 11:34 PM