Ok, I've got it figured out. If your wanting to do this put in this code
public override bool PreDraw(NPC npc, SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor)
{
if (npc.type == NPCID.Guide && npc.GivenName == "Andrew") //Where it says "Andrew" is the name, change this to whatever the name of your NPC is. (You have to keep the " " around it)
{
Texture2D texture = Mod.Assets.Request<Texture2D>("Assets/NPCs/Guide/Andrew").Value; //"Assets/NPCs/Guide/Andrew" is the path of your image/spritesheet.
Vector2 position = npc.position - Main.screenPosition + new Vector2(-12, -6); //-12, -6 is the offset that the npc will be drawn. For me I had to use those numbers, but depending on the width and height of the frame you may need different ones.
// Get the current frame of the NPC's animation
Rectangle sourceRectangle = npc.frame;
// Modify the source rectangle to only draw a specific portion of the texture, this again depends on how big each frame is. Be sure to keep extra room in the source rectangle for things like attacking or when the npc bobs up in the animation.
sourceRectangle.X += 2;
sourceRectangle.Y += 8;
sourceRectangle.Width -= 0;
sourceRectangle.Height -= 10;
SpriteEffects spriteEffects = npc.direction == 1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None;
// Draw the NPC using the modified source rectangle
spriteBatch.Draw(texture, position, sourceRectangle, drawColor, 0f, Vector2.Zero, 1f, spriteEffects, 0f);
return false;
}
return true;
}