Jump to content
  • 0

changing NPC's gender code


Question

Posted (edited)

as the title says, is there any way I can change the gender of my npc since i'm currently using the 'player' sprite. For example, mine i'm using a swordsman sprite but it's a female.

here's the full script:

//==================================================
//Walking NPC player sprite
//==================================================
// - Gepard
//==================================================
prontera,156,180,0    script    Bonita    1,{   // the number 1 here is the swordsman sprite female with the default hairstyle

end;

OnInit:
setarray .Message$[0],"Bonita: Hi there!",
                    "",
                    "",
                    "Bonita: Don't mind me",
                    "",
                    "Bonita: I'm just looking around",
                    "",
                    "Bonita: Hmm..";
while( 1 ){
    if(.Count >= getarraysize( .Message$))
    .Count = 0;
    npcwalkto rand(150,160),rand(175,186);
    npctalk .Message$[ .Count];
    .Count++;
    sleep rand(3000,5000);
}
end;

}

please help i want to change the gender to male

Edited by Mael
Use a codebox
  • MVP 1

5 answers to this question

Recommended Posts

  • 0
Posted
Just now, mrgeiszer said:

hi your code works, lastly can i also change the hairstyle and having head top equipment?

thanks for your help anyway

Yes you can

//Examples
	setunitdata(getnpcid(0), UNPC_HAIRSTYLE, 2);
	setunitdata(getnpcid(0), UNPC_HAIRCOLOR, 5);
	setunitdata(getnpcid(0), UNPC_HEADTOP, 547);
	setunitdata(getnpcid(0), UNPC_HEADMIDDLE, 0);
	setunitdata(getnpcid(0), UNPC_HEADBOTTOM, 0);
	setunitdata(getnpcid(0), UNPC_CLOTHCOLOR, 1);
	setunitdata(getnpcid(0), UNPC_ROBE, 4);

 

  • Upvote 1
  • 0
Posted
11 hours ago, Racaae said:

Yes you can

//Examples
	setunitdata(getnpcid(0), UNPC_HAIRSTYLE, 2);
	setunitdata(getnpcid(0), UNPC_HAIRCOLOR, 5);
	setunitdata(getnpcid(0), UNPC_HEADTOP, 547);
	setunitdata(getnpcid(0), UNPC_HEADMIDDLE, 0);
	setunitdata(getnpcid(0), UNPC_HEADBOTTOM, 0);
	setunitdata(getnpcid(0), UNPC_CLOTHCOLOR, 1);
	setunitdata(getnpcid(0), UNPC_ROBE, 4);

 

thank you for this it works perfectly for my npc

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...