I tried to make an NPC that gives you a Tyrogue if you talk with him, the problem is I can't find a tutorial for this or any instructions for this specific type of script.
I've looked into what NPCs in the game give you a pokemon, I found Amanita gives an Eevee, located her in Castelia City and found out she uses Script 988. I tried to look into script 988 but couldn't make out much of it.
In the header it says there are 5 scripts, which is consistent with what NPRE says, but that's it, as NPRE shows 5 scripts and 28 function which I don't know what they do, and I can't pinpoint the exact part of the script responsible with giving the player a pokemon, as NPRE says it's Function 13 (I think?). It's one of the pictures.
Meanwhile running scrparse.lua in desmume says there are 22 scripts in script file 988, as in one of the pictures.
Can anyone help me? I really don't know what to make of this.