I'm having a few problems with one of my scripts. First of all, the nicknaming portion of the script does not work (when it goes to nickname the Pokémon ingame, it nicknames "?" and not the appropriate Pokémon - the Magikarp given in this script). My second issue: the flag (0x9006) which prevents the guy from selling the Magikarp twice (instead he just tells you to scram) appears to work; however, when I leave the room/open the start menu etc., it seemingly clears the flag/ignores the checkflag and acts as if you've never talked to the guy before (so you can buy another Magikarp - c'mon, that'd be WAY too overpowered if someone could buy TWO Magikarp ^_^). Any suggestions/thoughts/corrections?
PS: I am aware there is no offset after the #dynamic 0x in the spoiler. I didn't think it mattered which offset it was set to. I compiled the script in a test ROM so the offset used for that would be different than the actual offset I intend to compile this script to.
EDIT: Also, another minor glitch/oddity that came up: right around when the Pokémon is given, the lock on the NPC is seemingly released and he begins moving again.