the pet.cs on this source has the implementation for permapets, the cosmetic pet followers from old realm
there will likely be some errors but as it is a modified nr-core it should be largely compatible on the server's side, some issues might pop up with some ui elements missing on the client-side like the language string compatible textfield thing, but they have equivalents. (simpletext) even then, the fastest implementation would still be to just c+p and fix the few errors you get