PDA

View Full Version : [317]How to Change a NPC's Name (Client)



reserved
July 15th, 2010, 20:32
This is an easy to follow guide for those who need to change an NPC's name for 317's.
This can be great for those who have custom quests or custom mini-games with NPC's, etc.

Client Tested: DeltaScape (should work on most 317's)

Difficulty: 2/10

--

Step 1:

Open Class5.Java. (NOTE: Remember that this is in the client! Not server!)


Step 2:

Scroll down until you find something similar to this:


if(i == 72) { // NPC ID
aClass30_Sub2_Sub2_60.anInt1406 = anIntArray72[630];
class5.method165(true, aClass30_Sub2_Sub2_60); // Collect original NPC data
class5.aStringArray66 = new String[5];
class5.aStringArray66[1] = "Attack";
class5.anIntArray94 = new int[3]; // Number of models the NPC uses
class5.anIntArray94[0] = 10013; //
class5.anIntArray94[1] = 10128; //
class5.anIntArray94[2] = 10186; //
class5.aString65 = "Mithril Dragon"; // NPC name
class5.anInt61 = 304; //combat level
class5.aByteArray89 = "A scary dragon made of mithril".getBytes(); // NPC description

}



Step 3:

Directly under that last bracket, insert this:


if(i == ####) { // NPC ID
class5.aString65 = "@@@@@@"; // NPC name
class5.anInt61 = ***; // Combat level
class5.aByteArray89 = "&&&&&&&&&".getBytes(); // NPC description



Step 4:

Now we can begin the actual NPC renaming.
First, notice:


if(i == ####) { // NPC ID

#### is the NPC's ID, you can use any ID you need, I recommend finding an NPC that
suits what you are looking for. I also recommend not to use an important NPC, such as
Make-Over Mage, Bob, etc.


Now, notice this:


class5.aString65 = "@@@@@@"; // NPC name

You can change @@@@@@ whatever you want, this is the NPC's Name.


Now, notice this line:


class5.anInt61 = ***; //combat level

The *** is the NPC's combat level. Change this to whatever you want, it will not effect their
stats. Also, you can remove this line if the combat level does not matter.


Lastly, notice this line:


class5.aByteArray89 = "&&&&&&&&&".getBytes(); // NPC description

The &&&&&&&&& is the NPC's description. This is the message you will receive when you
examine the NPC. Change it to whatever you need.


After you finish, save, and compile, and reopen the client if you already have it up.
Spawn the NPC and see if the changes work, the NPC SHOULD have the same look as the
previous, just with a different name, and or combat level/description.

XxBryantD
July 15th, 2010, 21:48
thank u is there a way to make npc look like me with armour

rum
July 23rd, 2010, 05:42
ahh, i was wondering how to change an items name. i wanted to change fishing potions into overload, i don't need help with the stat boosts i have that covered. just looking for how to change the name of the item.

GFX
July 23rd, 2010, 05:50
Nice tut this will help out some coders =]

Xdragon
July 24th, 2010, 02:08
nice. was looking for this :)

evolution
July 25th, 2010, 16:24
I was looking for this, thanks can you also do it server side?