This is a very easy little snippet tutorial. This is for newcomers who dont know how to add item requirements to your custom items or any item in general. This is very basic so dont flame please lol.
Ok so first of all you will need to navigate to ItemAssistant.java . Ok so once you are there, you will need to find this by pressing ctrl+F, for those of you who didnt know
, You will need to find the following lines.
Code:
case 837:
c.rangeLevelReq = 61;
break;
It should be two above the seercul requirement.
Ok so how the following is worked is through a switch statement, this mean if you scroll to the top of the requirements, you will see a switch (itemId) {
so for every item's requirement you will need to add a case xxxx: where xxxx is the item id. flowed by the requirement, ten by a break;
So the format should look like this.
Code:
case xxxx:
c.rangeLevelReq = 61; //can be any level requirement.
break;
Ok so you will need to add this under the line we found.
If you want to add a whole type of an item, for example royal armor, you want all royal items to have a level 50 defense requirement, do the following.
Scroll up or find this
Code:
if(itemName.contains("godsword")) {
c.attackLevelReq = 75;
}
under that you can add
Code:
if(itemName.contains("royal")) {
c.defenceLevelReq = 50;
}
Ok guys, i hope this helps lol, i seen this asked before so i thought i just might post for the community. Thanks :coolface: