Hi guys. I'll be showing you, by request, how to make ints. It is SO EASY. Maybe someone has given you a download link to a model, you want in your server, but don't have the code. EASY. Just read this.
First off: Download these.
Gzipper: Used to make .dat files ready for your server:
http://uppit.com/XEE4S4
To use: Just drag a .dat file over it. You can't open it, but it is .exe. Be sure to scan
DatMaker: Used to view .Dats and export as MQOs, or make MQOs Dats (For a different tutorial, but this is good for viewing models).
http://uppit.com/RQU55P
To use: Go into it, click file, open or open folder. Must be a .dat file. Or MQO, but for ints, stick with DATs.
1. NPCs
Now you have those
Lets get started.
First, off, get your model. If you don't have one, I have one for you:
Link: http://www.sendspace.com/file/ap6pxf
This is a model I made with models from Jagex's cache, putting them together and then re-coloring. Please don't leech. Its cool. Lol.
So now you have that, you'll notice its a .dat. Not a winzip or winRar file like most of your models. Just drag it over the Gzipper and its a .gz. Then re-name it as a number, preferably between 5000 and 15000. Then go into your client and say
add model #### (your model number)
No :: or anything
If you get an error when runnning your client after you added model, take out, compile, open client, then add model again. Just don't compile after you add the model in folder and before you open client.
Now the ints. We'll be going to class5.java because its an NPC.
Look for this:
Code:
public static final Class5 method159(int i)
{Under that you'll see this:
Code:
for(int j = 0; j < 20; j++)
if(aClass5Array80[j].aLong78 == (long)i)
return aClass5Array80[j];
anInt56 = (anInt56 + 1) % 20;
Class5 class5 = aClass5Array80[anInt56] = new Class5();
aClass30_Sub2_Sub2_60.anInt1406 = anIntArray72[i];
class5.aLong78 = i;
class5.method165(true, aClass30_Sub2_Sub2_60);Now under that, we can add our ints.
Add this:
Code:
if(i == 3582)
{
aClass30_Sub2_Sub2_60.anInt1406 = anIntArray72[630];
class5.method165(true, aClass30_Sub2_Sub2_60);
class5.aStringArray66 = new String[5];
class5.aStringArray66[1] = "Attack";
class5.aString65 = "Name";
class5.anInt61 = LEVEL;
class5.aByteArray89 = "Examine".getBytes();
class5.anIntArray94 = new int[1];
class5.anIntArray94[0] = MODEL NUMBER;
}Now I'll explain the lines you need (Note: This can be used for every NPC, use it as a base!)
Code:
if(i == 3582)At the top. 3582, is the NPC ID. Change it to whatever
One.
Code:
class5.aStringArray66 = new String[5];
class5.aStringArray66[1] = "Attack";First line says that there are 5 options. (I THINK, HAVEN'T TESTED)
Second line shows in the [1] that it chooses option 1, which makes you ATTACK the monster, so the option is, attack. The 1 makes it attack, not the word, so you can change attack to "Beat with a stick" or something.
Two:
Code:
class5.aString65 = "Name";Name is the name of the NPC..Challenging, huh?
Three:
Code:
class5.anInt61 = LEVEL;Just the level of the monster, delete the whole line if you don't want a level, or make it 99999 for fun
Four:
Code:
class5.aByteArray89 = "Examine".getBytes();Examine. Change it to the examine info.
Five:
Code:
class5.anIntArray94 = new int[1];
class5.anIntArray94[0] = MODEL NUMBER;This part can be tough. The first line, the [1] makes it so the NPC contains 1 model, you can change this. If the NPC has 2 models used, a weopon and the person, for example, you'd have this:
Code:
class5.anIntArray94 = new int[2];
class5.anIntArray94[0] = MODEL NUMBER;
class5.anIntArray94[1] = MODEL NUMBER2;You'd just add the second line again, but make sure the 0 is a 1. Then add the other model number. Plus, the 1 at the first line is now a 2, due to 2 models.
If you have 3 models:
Code:
class5.anIntArray94 = new int[3];
class5.anIntArray94[0] = MODEL NUMBER;
class5.anIntArray94[1] = MODEL NUMBER2;
class5.anIntArray94[2] = MODEL NUMBER3;And so forth. Remember, on the second line, you start with 0.
There ya go
an NPC in your files. Just go in-game and spawn your new NPC.
I REALLY hope I have enough characters left for items
2. Items
Easier, just gotta download another model if you don't already have one.
Lets just use Jagex's D plate.
http://www.sendspace.com/file/bk8t3r
Great. Good. You got it. Already Gzipped for ya.
All you have to do is open you client, add the model into your folder, then say in your client:
add model ####
#### being the model number, no ::'s before or anything.
Might send you a message, if it did, good.
Now the int..
We're going to class8.java now, since it's an item.
Search for:
Code:
public static final Class8 method198(int i)Under that you'll see this:
Code:
for(int j = 0; j < 10; j++)
if(aClass8Array172[j].anInt157 == i)
return aClass8Array172[j];
anInt180 = (anInt180 + 1) % 10;
Class8 class8 = aClass8Array172[anInt180];
aClass30_Sub2_Sub2_183.anInt1406 = anIntArray195[i];
class8.anInt157 = i;
class8.method197();
class8.method203(true, aClass30_Sub2_Sub2_183);Under that, we can add our ints. Now copy this in.
Code:
if(i == 7104)
{
class8.aStringArray189 = new String[5];
class8.aStringArray189[1] = "Wield";
class8.anInt174 = %; //Model Drop/inv view
class8.anInt181 = 919;
class8.anInt190 = 429;
class8.anInt198 = 1660;
class8.anInt199 = -1;
class8.anInt169 = 1;
class8.anInt194 = 5;
class8.anInt197 = 120;
class8.anInt165 = $; //male wearing
class8.anInt200 = #; //female wearing
class8.anInt175 = 65;
class8.aBoolean176 = false;
class8.aString170 = "Name";
class8.aByteArray178 = "Examine".getBytes();
}Now lets explain the parts you need to change, as this will work for any item base.
One:
Code:
if(i == 7104)
{
7104 is the item ID. Change it to anything you like. Some clients must go under 7809, idk why, just look for a null item or something stupid. Like cheese.
Two:
Code:
class8.aStringArray189 = new String[5];
class8.aStringArray189[1] = "Wield";Been through this, look above for NPCs attack thing because it's basically the same. Weild can be anything.
Three:
Code:
class8.anInt174 = %; //Model Drop/inv viewSometimes a model will be a drop model, where its what the model looks like in the inventory and on the ground. Thats where this goes, if you have one, if you don't, use the regular model number.
Four:
Code:
class8.anInt165 = $; //male wearing
class8.anInt200 = #; //female wearingSometimes you'll have a female version of a plate or pants, and a male version (Like santa outfit).
First line, you use the model number for male, second for female, as it says above.
If you have just one, use the same model for both.
Sometimes you might have 2 models for one item. Here's what you do.
Code:
class8.anInt165 = $; //male wearing
class8.anInt165 = $; //male wearing
class8.anInt200 = #; //female wearing
class8.anInt200 = #; //female wearingYou just make another line for each, you can continue to do that too.
Five:
Code:
class8.aString170 = "Name";
class8.aByteArray178 = "Examine".getBytes();Easy enough, just name your item and Examine info. Sorry can't explain that well.
I'll try to add more info and pics and stuff.
Hope this helps, post if you need help or if it helped.
__________________