SwagCoder
"The man who went to the unknown to find runescape secrets"
[TUT]How to add *custom* items
Hello everybody, I am going to teach you how to actually add custom items. These items are not recolors, and are actual NEW items. Before you attempt this, please be sure you have patience, and common sense. If you lack either of the two, please, leave now, and save us all some time.
Difficulty: 1/10, depending on skill and patience
Purpose: To teach you how to add brand new items
Assumed Knowledge: Copy & Paste, Basic Java, how to use a model viewer, common sense -.-
Classes Modified: class8.java, possibly models folder
Step 1 - Getting a model viewer
To add custom items to your client, this requires patience, some basic java knowledge, and a model viewer.
Question: What is a model viewer and what does it do?
Answer: A model viewer is a program that can view 3-Dimensional models built by JAGeX, and enable you to see what they look like and what the ID's are. Without a Model Viewer, you cannot add custom items.
Now that you know what a model viewer is and does, download RSMV(RuneScape Model Viewer) by clicking:
How to use RSMV - Easy as 1, 2, 3!
1) Download it, extract it, and click compile. Compile it and close.
2) Hit run, and it will grab models. Just let it run as long as you want.
3) Once you've let it run, open RSMV and then look through the models.
Step 2 - Model awareness
Now that you have RSMV, know how to get models, know how to look through them, and understand what models are, you are ready to start adding the item to your client.
NOTE: Not all models are view-able. Some may say invalid format, that is normal.
The first thing you should know is the Model ID. Now, usually, there are 1-3 models per item, depending on what item you are adding.
Example - Dragon Chainbody: 3 models: male wearing, female wearing, and drop/inventory model
You want to know the ID's of all of these, so it appear correctly in all 3 places.
Now is the "tricky" part. If the model is 10000 or lower, you can merely make the class8 grab that model from the cache. If it is greater, it usually requires you to GZip the model. If you know how to GZip, and what it is, skip to step 4.
Step 3 - G-Zipping a model
Question - What is Gzip, and what does it do?
Answer - Gzip is a special program that allows you to zip a .dat file and add it into your client as a format that the client can read. It is basically WinZip, or WinRar, just a different format.
Now that you know what Gzip is and what it does, you are ready to download it. Download it by clicking:
Here, Here, or Here
Now that you've downloaded Gzip, you need to know how to use it. There is one simple way to use it:
1) Extract the downloaded file
2) Open the extracted folder
3) Copy the gzip icon into a new folder named "GZip Models"
4) Paste the file you need to zip into the folder, and drag it onto the icon, and wait until it zips it
Okay, now you can go to step 4.
Step 4 - Adding the item into your client
Now to add the item into your client. Here is an example of an item, and how to add it:
Item being added: Princess Crown
Models: 6962 - Male/Female wearing, 6944 - drop/inventory model (zoom has to be figured out)
class8 for the item:
Code: [Select]
if(i == #####){ //item id
class8.aStringArray189 = new String[5];
class8.aStringArray189[1] = "Wear";
class8.anInt174 = 6944;//inventory/drop model
class8.anInt181 = 440;//zoom/rotation
class8.anInt190 = 76;//zoom/rotation
class8.anInt198 = 1850;//zoom/rotation
class8.anInt204 = 0;//zoom/rotation
class8.anInt169 = 1;//zoom/rotation
class8.anInt194 = 1;//zoom/rotation
class8.anInt165 = 6962;//male wearing
class8.anInt200 = 6963;//female wearing
class8.anInt175 = 29;
class8.anInt197 = 87;
class8.aString170 = "Princess crown";
class8.aByteArray178 = "A crown fit for a princess.".getBytes();
}
The rotations/zooms aren't very important unless you want the item to appear correctly in the inventory. But other than that, this is a basic layout for a helmet.
Now that you know how to add the models correctly, then you can start adding custom items! Here is class8.java for platebodies, platelegs, and kiteshields:
Platebody
Code: [Select]
if(i == ####){ //item id
class8.aStringArray189 = new String[5];
class8.aStringArray189[1] = "Wear";
class8.anInt174 = 1;//inventory/drop model
class8.anInt181 = 1180;//dont change
class8.anInt190 = 452;//dont change
class8.anInt198 = 0;//dont change
class8.anInt204 = 0;//dont change
class8.anInt169 = -1;//dont change
class8.anInt194 = -1;//dont change
class8.anInt165 = 1;//male wearing
class8.anInt200 = 1;//female wearing
class8.anInt175 = -1;//dont change
class8.anInt197 = -1;//dont change
class8.aString170 = "Item Name";//item name
class8.aByteArray178 = "Item info".getBytes();//examine info
}
Platelegs
Code: [Select]
if(i == ####){ //item id
class8.aStringArray189 = new String[5];
class8.aStringArray189[1] = "Wear";
class8.anInt174 = 1;//inventory/drop model
class8.anInt181 = 1740;//dont change
class8.anInt190 = 444;//dont change
class8.anInt198 = 0;//dont change
class8.anInt204 = 0;//dont change
class8.anInt169 = 0;//dont change
class8.anInt194 = -8;//dont change
class8.anInt165 = 1;//male wearing
class8.anInt200 = 1;//female wearing
class8.anInt175 = -1;//dont change
class8.anInt197 = -1;//dont change
class8.aString170 = "Item Name";//item name
class8.aByteArray178 = "Item info".getBytes();//examine info
}
Kiteshield
Code: [Select]
if(i == ####){ //item id
class8.aStringArray189 = new String[5];
class8.aStringArray189[1] = "Wear";
class8.anInt174 = 1;//inventory/drop model
class8.anInt181 = 1560;//dont change
class8.anInt190 = 344;//dont change
class8.anInt198 = 1104;//dont change
class8.anInt204 = 0;//dont change
class8.anInt169 = -6;//dont change
class8.anInt194 = -14;//dont change
class8.anInt165 = 1;//male wearing
class8.anInt200 = 1;//female wearing
class8.anInt175 = -1;//dont change
class8.anInt197 = -1;//dont change
class8.aString170 = "Item Name";//item name
class8.aByteArray178 = "Item info".getBytes();//examine info
}
If you did not understand this, I'm sorry, and will revise the guide later, but for now I'm leaving as is because I'm tired. I figured this all out on my own, and you can too. Gzip will be further explained tomorrow, this tutorial took me awhile, hopefully its some use to you guys.
--Very confusing I know but there's no easier way.