This is a rather intricate and advanced sort of add on I've been working on implementing into my game. I'm trying to add in the whole pager system like sun/moon has where you can summon a pokemon to assist you rather than rely on an HM (The whole HM thing has always bothered me, I hate having to keep an HM slave). I considered using the HM to item system but I liked this idea better. I already have a working custom GUI menu (minus the ability to be accessed, or really do anything but move a cursor around).
I lack a few things that I really need. First and foremost, I need a way to call the handler's for the HMs from the menu (will be adding a small trigger to trigger the HM check and use when the player clicks the button). I'm having trouble with this because I want to trigger the check to check badges, terrain, location, and all of that stuff but I want it to skip the pokemon move checks which check to see if a pokemon has a move. It's been tricky, I've played with the handlers some already to see if I got any results but I'm having trouble getting around some of the more intricate ones (dive and fly have been exceedingly bothersome but they are mandatory for my game).
If ridding the script of the movecheck is too bothersome, could someone give me pointers on script to do the terrain and other checks where I can comment out and bypass the original handler? If I can bypass the normal check handler and have my own script run the check then I can tie in the move usage into my own check script. I'm a decent programmer but I am still learning, all of these procedures are a bit more advanced than the ones I have been messing with so far. Also, is there a way I can add a code to check if an in-game switch has been set to on as part of the HM use check. I want a custom menu where you can select a move on the menu and it be used. I want to have each option on the menu to be unlocked in-game (a person adds a chip or programs a pokemon cry in which grants you the new move at a certain point in the game). The only reason I want some of the original checks left in place is to prevent glitches like surf being used on tiles it is not supposed to (same with dive) or cut causing the cut animation to appear anytime it's triggered creating phantom trees. If anyone can help me out with this code that would be wonderful! I'm not yet looking to change any of the animations to it.
Finally, I need to know how to set the shown species when the HM is triggered to a set species (normally it would show whatever pokemon used the move). i.e. When fly is used, pidgeot is always shown since the set pokemon the device calls for that service is pidgeot always.