Post: [PI] Making Custom Npcs
03-06-2015, 02:20 AM #1
Stunz
Former Staff
(adsbygoogle = window.adsbygoogle || []).push({});
Difficulty: 2/10
Knowledge Needed: Basic Coding Skills And C&P
Tested Base: Project Insanity
Server Classes Modified: Npchandler.java
Client Classes Modified: EntityDef.java
----------------------------------------------------------------------

Okay. I wasn't sure to post this in RS2 Server or RS2 Client. So This is my first tutorial so dont flame. I though this might help people customize their server. So lets get started...


CLIENT SIDED

For Client Sided You Will Make The Ints For Your Custom NPC.


Step 1. Open EntityDef.java

This is going to be your custom npc ints.
First fill in the information(Npc Id, Name, Examine, ETC)

    	if(i == ####) {
stream.currentOffset = streamIndices[630];
entityDef.aByte68 = 3;
entityDef.readValues(stream); // Collect original NPC data
entityDef.actions = new String[5];
entityDef.actions[1] = "Attack";
int changedColors = 1; // Number of model colors changed on the NPC
entityDef.originalModelColors = new int[changedColors];
entityDef.modifiedModelColors = new int[changedColors];
entityDef.originalModelColors[0] = 40; // Original model color
entityDef.modifiedModelColors[0] = 34; // Changed model color
entityDef.models = new int[9];
entityDef.models[0] = 9638;//Npc's Cape
entityDef.models[1] = 205;//Npc's Head
entityDef.models[2] = 40207;//Npc's Plate
entityDef.models[3] = 5024;//Npc's Legs
entityDef.models[4] = 43660;//Npc's Weapon
entityDef.models[5] = 13319;//Npc's Gloves
entityDef.models[6] = 10683;//Npc's Boots
entityDef.models[7] = 17461;//Npc's Darkness(Shadow)
entityDef.models[8] = 20147;//Npc's Arms(You Dont Have To Edit)
entityDef.standAnim = 6001;// Npc's Stand Emote
entityDef.name = "Npc's Name";
entityDef.combatLevel = 175;//Combat Level
entityDef.description = "Examine".getBytes();
}


Step 2. (You May Need An Emote List And Model ID List)

Now Edit The Models And Emotes...
For This Part You Will Use The Male Equip Model IDs
So If You Wanted This Monster To Have D Claws You Would Keep The Npc's Weapon The Same Because "43660" Is The Male Modle ID for D Claws.
For This Monster It Has Equiped....
Dragon Cape( A Custom Cape In My Server)
HairStyle
Dragon Plate
Dragon Legs
D Claws
Barrow Gloves
Infinity Boots

Now For the StandAnim Is How He Will Stand With The Weapon
Leave 6001 For Arms Down.

        entityDef.models[0] = 9638;//Npc's Cape
entityDef.models[1] = 205;//Npc's Head
entityDef.models[2] = 40207;//Npc's Plate
entityDef.models[3] = 5024;//Npc's Legs
entityDef.models[4] = 43660;//Npc's Weapon
entityDef.models[5] = 13319;//Npc's Gloves
entityDef.models[6] = 10683;//Npc's Boots
entityDef.models[7] = 17461;//Npc's Darkness(Shadow)
entityDef.models[8] = 20147;//Npc's Arms(You Dont Have To Edit)
entityDef.standAnim = 6001;// Npc's Stand Emote


After Done Customizing Your Ints They Should Look Something Like Mine....

    	if(i == 189) {
stream.currentOffset = streamIndices[630];
entityDef.aByte68 = 3;
entityDef.readValues(stream); // Collect original NPC data
entityDef.actions = new String[5];
entityDef.actions[1] = "Attack";
int changedColors = 1; // Number of model colors changed on the NPC
entityDef.originalModelColors = new int[changedColors];
entityDef.modifiedModelColors = new int[changedColors];
entityDef.originalModelColors[0] = 40; // Original model color
entityDef.modifiedModelColors[0] = 34; // Changed model color
entityDef.models = new int[9];
entityDef.models[0] = 9638;//cape
entityDef.models[1] = 205;//head 235
entityDef.models[2] = 40207;//plate
entityDef.models[3] = 5024;//legs
entityDef.models[4] = 43660;// D Claws
entityDef.models[5] = 13319;//gloves 13307
entityDef.models[6] = 10683;//boots 10683
entityDef.models[7] = 17461;//darkness
entityDef.models[8] = 20147;//arms
entityDef.standAnim = 6001;
entityDef.name = "NationScape's Warrior";
entityDef.combatLevel = 175;
entityDef.description = "A very powerful Warrior!".getBytes();
}


Now Since Your Done With That...
Save, Close, Compile ( If Any Errors, Tell Me)


SERVER SIDED

For This Part You Would Give Emotes And GFX If Needed.


Step 1. Open Npchandler.java

First, Search
    public static int getAttackEmote

Under That Add Your Npc Id And Its Attack Emote
When Done it Should Look Something Like This...
    case 2894:
return 2868;


Now Search,
    public int getRespawnTime

Under That Add case:####(#### Npc Id)

Now Search,
    case 1197://bears and cubs
(If Isnt There Search case: 1196)
Now Add SomeWhere Under That This...
    case ####:// NPC ID
npcs[i].attackType = #;// Different Attack Types Like Mage, Range, Melee(1-6)
npcs[i].endGfx = ###;//Add Gfx Id
break;


Save, Close, Compile. Post if Any Errors.
(adsbygoogle = window.adsbygoogle || []).push({});

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo