Tutorial description: making it so you need 70 woodcutting in order to use ::yell ingame, so when syi's come on.. they are just wasting their time.
Length: short, but very useful.
Difficulty: 1/10 or 2/10
Assumed knowledge: Searching through client.java (Control F)
Files Modified: client.java
For the first step we are going to make a backup of client.java, this is so if you mess up you can easily fix the problem.. but i know this will work no doubt, i ripped it right out of my files.
K lets begin.
Open up client.java
Search for :
Code:
(command.startsWith("yell")
---- NOTE: you can probably search for yell but... my way was the direct link.
Now you'll see your yell command
Replace it with this..
Code:
} else if (command.startsWith("yell") && command.length() > 5) {
if (playerLevel[8] > 70) {
PlayerHandler.messageToAll = playerName+ " - " +command.substring(5);
} if (playerLevel[8] < 69) {
sendMessage("You need a Woodcutting level of 70 in order to use the yell command.");
}
Now what this does is if your 70 woodcutting you can use the yell command..
Then where it says if (playerLevel[8] < 69) { this means that if your lvl 69 woodcutting or under you can't use yell and a message will be sent saying you need a woodcutting level of 70 in order to use the yell command.
NOTE: you can do this with any level, defence.. combat.. etc etc etc
Here are a list of player levels that you can use for this.. Note: the 8 in the command is woodcutting
LIST:
playerLevel[0] = Attack
playerLevel[1] = Defence
playerLevel[2] = Strength
playerLevel[3] = Hitpoints
playerLevel[4] = Range
playerLevel[5] = Prayer
playerLevel[6] = Magic
playerLevel[7] = Cooking
playerLevel[8] = WoodCutting
playerLevel[9] = Fletching
playerLevel[10] = Fishing
playerLevel[11] = Firemaking
playerLevel[12] = Crafting
playerLevel[13] = Smithing
playerLevel[14] = Mining
playerLevel[15] = Herblore
playerLevel[16] = Agility
playerLevel[17] = Thieving
playerLevel[18] = Slayer
playerLevel[19] = Farming
playerLevel[20] = Runecrafting
[end of the list]
K if you want to do it with combat do a code like this
if (combatlvl > 70) {
or something along the lines of that.. it has to do with what voids and type of server source you have..
And since people love server photography:
If your 69 woodcutting or lower: you'll get this message:

If your lvl 70 or above you'll be able to send the message perfectly.

Hope i was helpful in this
~Braiton