Ok, so I found like the perfect place to do the hook, hooked and it doesnt work......
I hooked into 0x8042A4A starting at the BL. The routine here is what determines if the Pokemon is capable of having a stone used on it(i believe) it branches to 2 sub routines that either store 1 or 0 into r0 which then returns back to the main routine and checks if r0 is 0. If it is it allows the evolution, if not then it changes the boxes to say no use.
My custom routine simply gets the species of the Pokemon, gets the gender(i hope) and then gets the required byte from the evo table. It the compares that byte to 0, if correct it resumes the original routine like nothing happened, if its either 1 or 2 it takes, takes away 1 to be able to compare to the gender, then if the gender matches the byte, continues the routine. If it doesnt match it goes to the routine that stores 1 into r0 to decline the evolution.
But atm, the game freezes on using the stone on any Pokemon weather or not it is able to, and freezes. From what I've seen too, is it doesnt change the if usable part. Any tips? And sorry for all the questions.:(
Heres the routine:
I hooked into 0x8042A4A starting at the BL. The routine here is what determines if the Pokemon is capable of having a stone used on it(i believe) it branches to 2 sub routines that either store 1 or 0 into r0 which then returns back to the main routine and checks if r0 is 0. If it is it allows the evolution, if not then it changes the boxes to say no use.
My custom routine simply gets the species of the Pokemon, gets the gender(i hope) and then gets the required byte from the evo table. It the compares that byte to 0, if correct it resumes the original routine like nothing happened, if its either 1 or 2 it takes, takes away 1 to be able to compare to the gender, then if the gender matches the byte, continues the routine. If it doesnt match it goes to the routine that stores 1 into r0 to decline the evolution.
But atm, the game freezes on using the stone on any Pokemon weather or not it is able to, and freezes. From what I've seen too, is it doesnt change the if usable part. Any tips? And sorry for all the questions.:(
Heres the routine:
Spoiler: