Results 1 to 6 of 6
  1. #1
    taejim's Avatar
    Join Date
    Jul 2011
    Gender
    male
    Location
    Trove
    Posts
    301
    Reputation
    10
    Thanks
    892
    My Mood
    Devilish

    TaeJim's Auto Pot

    PLEASE READ THE HOW TO USE BELOW BEFORE ASKING

    How to use:
    - Install AHK if you dont have it
    - Creat a new AHK script
    - Copy the code below and paste it in the AHK script file you just created
    - Make sure you click the Trove window before you press hotkey


    - Start: Numpad9 (ONLY HIT HOTKEY ONCE)
    - It will ask you what percent(%) health you want it to heal at.
    WHEN YOU ENTER DONOT ADD THE "%" SIGN. 20% = 20, 50% = 50, etc.
    - Stop:
    - Alt + Numpad9: to stop.
    - Alt + Numpad7: to exit the script completely

    P/S: If you appreciated what I have done please press the thanks button :P, that is what keep me going

    CREDITS:
    - HaHaItsJake for his code
    - Me for update it


     

    Code:
    #NoEnv
    SendMode Input
    SetWorkingDir %A_ScriptDir%
    CoordMode, Mouse, Screen
    SetTitleMatchMode, 3
    SetKeyDelay, 0, 2
    
    
    Numpad9::
        WinGet, Handle, ID, A
        WinGet, pidn, PID, A
        Break := 0
        InputBox, HealAt, Enter Percent, Percent To Heal At?
        SetFormat, float, 1
        BaseHealth := GetHealth(Handle, pidn)
        Heal := (Health * HealAt) / 100
        Loop {
            GetHealth(Handle, pidn)
            If (Health < Heal)
            {
                ControlSend, , {q}, ahk_pid %pidn%
                Sleep, 500
            }
            If (Break = 1)
            {
                break
            }
            else
            {
                Sleep, 30
            }
        }
    Return
    
    NumPad7::
        ExitApp
    
    !NumPad9::
        Break := 1
    return
    
    GetHealth(Handle, pid)
    { 
        Global Health
        Base := getProcessBaseAddress(Handle)
        pointerBase := base + 0x0098CB50
        z1 := ReadMemory(pointerBase, pid)
        z2 := ReadMemory(z1 + 0x48, pid)
        z3 := ReadMemory(z2 + 0x208, pid)
        z4 := ReadMemory(z3 + 0x8, pid)
        z5 := z4 + 0xB4
        Health := ReadMemory(z5, pid)
    }
    
    getProcessBaseAddress(Handle)
    {
        return DllCall( A_PtrSize = 4
                                ? "GetWindowLong"
                                : "GetWindowLongPtr"
                            , "Ptr", Handle
                            , "Int", -6
                            , "Int64") ; Use Int64 to prevent negative overflow when AHK is 32 bit and target process is 64bit
         ; If DLL call fails, returned value will = 0
    }   
    
    ReadMemory(MADDRESS, pid)
    {
    VarSetCapacity(MVALUE,4,0)
    ProcessHandle := DllCall("OpenProcess", "Int", 24, "Char", 0, "UInt", pid, "UInt")
    ;DllCall("ReadProcessMemory","UInt",ProcessHandle,"UInt",MADDRESS,"Str",MVALUE,"UInt",4,"UInt *",0)
    DllCall("ReadProcessMemory", "UInt", ProcessHandle, "Ptr", MADDRESS, "Ptr", &MVALUE, "Uint",4)
    Loop 4
    result += *(&MVALUE + A_Index-1) << 8*(A_Index-1)
    
    return, result
    }


    Update log:
    - 31/07/2015: Initial release.
    Last edited by taejim; 07-31-2015 at 12:02 AM. Reason: added instruction

    Code:
    My Trove Bot (OUTDATED) LazyFishing v1.9
    If you appreciate what i have done:

    1. Press the Thanks button above and give me reputation <3

    2. You can donate me if you feel like it, any amount is much appreciate.


  2. The Following 5 Users Say Thank You to taejim For This Useful Post:

    die254 (07-31-2015),drakarhythm (07-31-2015),LeetSpeak3 (07-31-2015),maddoggy00 (07-31-2015),zoso54054 (07-31-2015)

  3. #2
    drakarhythm's Avatar
    Join Date
    Jul 2015
    Gender
    male
    Posts
    1
    Reputation
    10
    Thanks
    0
    Awesome work Teajim, just awesome and thank you very much

  4. #3
    zoso54054's Avatar
    Join Date
    Jan 2012
    Gender
    male
    Posts
    3
    Reputation
    10
    Thanks
    0
    Very nice, iv seen one bug with it. sometimes when i teleport it will use potions constantly until i turn it off but its rare. Thanks for the post!

  5. #4
    LeetSpeak3's Avatar
    Join Date
    Dec 2014
    Gender
    male
    Posts
    12
    Reputation
    10
    Thanks
    0
    Thanks, previously I was using a pixel search variation before this. ReadMemory ones are more reliable because theres a chance that I can receive too much damage, too quickly and die (although it was very unlikely).

  6. #5
    taejim's Avatar
    Join Date
    Jul 2011
    Gender
    male
    Location
    Trove
    Posts
    301
    Reputation
    10
    Thanks
    892
    My Mood
    Devilish
    Quote Originally Posted by zoso54054 View Post
    Very nice, iv seen one bug with it. sometimes when i teleport it will use potions constantly until i turn it off but its rare. Thanks for the post!
    hmm thank you for your feedback i will look into this but it might because of the game or the pointer i will look into the problem.


    Quote Originally Posted by LeetSpeak3 View Post
    Thanks, previously I was using a pixel search variation before this. ReadMemory ones are more reliable because theres a chance that I can receive too much damage, too quickly and die (although it was very unlikely).
    Nice i would love to look at ur work if you dont mind to share it :P

    Code:
    My Trove Bot (OUTDATED) LazyFishing v1.9
    If you appreciate what i have done:

    1. Press the Thanks button above and give me reputation <3

    2. You can donate me if you feel like it, any amount is much appreciate.


  7. #6
    taejim's Avatar
    Join Date
    Jul 2011
    Gender
    male
    Location
    Trove
    Posts
    301
    Reputation
    10
    Thanks
    892
    My Mood
    Devilish
    OUTDATED @maddoggy00 please closed the thread

    Code:
    My Trove Bot (OUTDATED) LazyFishing v1.9
    If you appreciate what i have done:

    1. Press the Thanks button above and give me reputation <3

    2. You can donate me if you feel like it, any amount is much appreciate.


Similar Threads

  1. [Outdated] Trove Auto-Pot v1.0.0
    By HaHaItsJake in forum Trove Hacks & Cheats
    Replies: 13
    Last Post: 07-01-2015, 12:44 PM
  2. Realm Relay auto nexus/pot
    By zekikez in forum Realm of the Mad God Tutorials & Source Code
    Replies: 36
    Last Post: 06-01-2015, 03:34 PM
  3. Nilly's - Auto-pot / Auto-Special if Priest / Auto-Nexus - Code
    By nilly in forum Realm of the Mad God Tutorials & Source Code
    Replies: 55
    Last Post: 05-02-2014, 11:08 PM
  4. auto pot nexus
    By Hurcan in forum Realm of the Mad God Help & Requests
    Replies: 3
    Last Post: 04-01-2014, 10:56 AM
  5. Looking for someone to code me a auto pots sorter for Rotmg
    By gamerlem101 in forum Realm of the Mad God Discussions
    Replies: 2
    Last Post: 06-16-2013, 06:42 AM