ItemContenets.java under "canWear"
|
Trying to figure out how to write a code so they cant equip until 200m xp in that certain level any hints on how to start? im on a 667 revision
I went into itemDefinitions.java and found the code for 99 ( itemRequiriments.put(Skills.RANGE, 99); ) but not for 200m
I found that but what would the code be in order for it to only be wearable if you have 200m xp
Just an example. This method sucks but it works so meh.
player.java
Skills.javaCode:public boolean maxDefence = false;
In the addXp method in Skills.javaCode:public void maxXpOrNaw(int skill, Player player) { if(skill == DEFENCE) { if(player.maxDefence) return; player.maxDefence = true; }
buttonhandler.javaCode:if (xp[skill] > MAXIMUM_EXP) { xp[skill] = MAXIMUM_EXP; maxXpOrNaw(skill, player); }
Code:if(itemId == ##### && player.maxDefence == false) { player.errorMessage("You need 200M xp in Defence to wear this cape."); return false; }
That dont work lol.
I believe that was pseudo-code and not meant for you to directly copy and paste, lol. Not sure what framework you're using, but what was mentioned above is exactly how you'd do it. I'll 'word' you through the process, because spoonfeeding isn't going to help you learn.
- Find where items run through a "requirements" check upon equip.
- Wherever the case may be, create a new check.
- Referencing the player, check the player's XP for "X" skill.
- If the player has 200M xp in "X" skill, allow the item to be equipped. If not, send a notification to the player as to why.
I'm sure you were looking for code, but again I have no base downloaded nor did you mention your framework. Best of luck to you.
Its a 667
Whats your skype? ill fix this for ya fele
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |