if you need to replicate basegame behavior within a custom range npc, your only real option is to go
here, search for instances of
(where <id> is the id you're trying to copy) and manually interpret and translate all the logic into lua code. not an easy undertaking for sure, so instead i'd recommend simply changing the graphics for the basegame npc as you need to.
even if you want the version with custom graphics to show up in the same level as the unchanged basegame npc, it still might be possible without a custom npc by manually drawing a custom sprite over specific instances of the normal npc, though this isn't super simple either, so it'd be good to know your exact use case.