1. Install newest AHK(AutoHotKey) if you haven't.
2. Create a new AHK script. (Rightclick in folder/on desktop and New> AHK)
3. Copy the below code inside the new .ahk file. Save.
4.[Optional] Compile the script. (Right click in .ahk file > Compile)
Start: NumPad9 (Don't hit it again!)1. Make sure Trove is the active window before starting the program!
2. When Prompted, set the desired percent(%) health you want it to heal at.
DO NOT ADD "%" sign in prompt! 20 = 20%, 50 = 50%, etc.Stop: Alt+NumPad9
Exit Script: Alt+NumPad7
Tell me and I forget. Teach me and I remember. Involve me and I learn.
Benjamin Franklin
It dosen't work....
I download the Auto Hotkey program. I paste the "Code" into the script. I compile it. I run Trove, then run the script. I have also tried running the script first, then running Trove. Once in-game, I press down NUMPAD 9 and I type in the amount of healing I want from," Proceed To Heal At?" I am not sure if it is asking me for the amount of health I start to heal at, or the percentage of health. Anyways, I tried both. I go to a random world with my Ice Sage, and start battling. I don't heal myself of course. But then... IT WON'T HEAL ITSELF. The script itself seems idle. Does it matter what potion I use? I am using the Unyielding Flask. Does it get interfered if I have a Berseker Raptor equipped? Please help.
Last edited by MagickWolf; 05-02-2015 at 09:04 AM.
I'm sorry, but your sentence did not make sense to me..
It would be great if you can add a video for it.
Make sure the Potion Hotkey is "q". If it's not "q" change the hotkey either in game, or in the script. Also, make sure the Trove window is active once you run the script.
Line 21:
ControlSend, , {q}, ahk_pid %pidn%
Change "{q}" to the hotkey. Example - If hotkey is H change "q" to "h"; ControlSend, , {h}, ahk_pid %pidn%
It doesn't matter what you have on your char. If your HP is less then the percent you tell it, it will heal. Other then that, it wont. Find out the Health amount it will heal at, and just stand there in U4 until it drops below the %. The script works perfect for everyone else, it's something on your end you're doing wrong.
Tell me and I forget. Teach me and I remember. Involve me and I learn.
Benjamin Franklin
Update Auto-Pot v1.0.1
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 + 0x0091B0A8 z1 := ReadMemory(pointerBase, pid) z2 := ReadMemory(z1 + 0x98, pid) z3 := ReadMemory(z2 + 0x28, pid) z4 := ReadMemory(z3 + 0x10, pid) z5 := z4 + 0xcc 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 }
Last edited by Trove; 05-05-2015 at 03:51 PM.
HaHaItsJake (05-06-2015)
the potion script stopped working, could update?
UPDATE: V1.0.1
Tell me and I forget. Teach me and I remember. Involve me and I learn.
Benjamin Franklin
Trove (05-15-2015)
I have to ask a question, your script gets the current health on the Health variable and the following operation : Health * HealAt / 100 gets the life required to be healed right ?
So if the user starts the script when he doesn't have a full hp bar, it'll be x% of his HP when he starts the script. For example if i started the script when i was at 1HP then the potions will never be used (at 100% yes... but it's so useless to do that)
That's not better to get the Max Health instead of the current HP at launching ?
Well it's not working anymore