Auto pill was already a feature of the game.
It just needed to be enabled by finding the value for it to enable it on.
There is also a value to give it time.
Then set the values from 5 to 10 so that it can goto 100% instead of 50% use.
Don't open a DLL for re-editing unless you want to reverse engineer it, try a dissasembler/debugger with ida pro, ollydbg, cheat engine etc.
Lets say you have auto pill address to enable/disable and the two addresses after it are integers for the HP and Chi %.
Without modification to code min is 0 and max is 5 for the % values to use a pill under.
You could write this code like this. Where you put the address where the 0xXXXXXXXX is.
int* AutoPill = 0xXXXXXXXX; // Put auto pill address here.
int* AutoPillHP = 0xXXXXXXXX;
int* AutoPillCHI = 0xXXXXXXXX;
Later in your code your could do this to set it.
*AutoPill = 1;
*AutoPillHP = 5;
*AutoPillChi = 3;
Or you could do it like this
struct AutoPill {
int Enabled;
int HP;
int Chi;
};
AutoPill* autopill = 0xXXXXXXXX;
And later in your code.
autopill->Enabled = 1;
autopill->HP = 5;
Look at declaring/accessing a pointer.
When assigning to the value/thing the * in front re-references the pointer so you can write a value at the address it stores.
Like if you had a dll made and injected you might do this in a loop.
// Toggle the AutoPill
if (GetAsyncKeyState(VK_F2) != 0) {
Sleep(300); // Sleep so as to not trigger many many times.
autopill->Enabled = !autopill->Enabled; // The ! is the not operator essentially it flips the bits to their opposite. or you could check and do 1 or 0 i can't remember if this requires boolean type or not...
}
// Set value of HP when holding F3 and pressing num keys

.
if (GetAsyncKeyState(VK_F3) != 0) {
Sleep(300);
if (GetAsyncKeyState(VK_NUM0) != 0) {
autopill->HP = 0;
} else if (GetAsyncKeyState(VK_NUM1) != 0) {
autopill->HP = 1; // 10%
} // etc for each one

.
}