jakehop55
July 22nd, 2010, 19:01
Welcome to my first tutorial in awhile. I've now recently take a break from MW, WAW, and MW2 and come back to RS. Please don't flame and enjoy the tutorial.
~ Info ~
Base: Any
File Modified: Client
Difficulty: 1/10
Version: 317
Description: This will allow your players to keep cutting the logs and not have to bank, drop, or sell them. If the wcmode is on, once a player's inventory is full, it will remove all the logs and keep allowing the player to cut down the tree. It's a simple Toggle on & off. This comes in handy, trust me.
~ Start ~
First open Client.java and search for:
if (command.equalsIgnoreCase("bank") && playerRights >= 1 && !isInPitGame()) {
openUpBank();
}
Under the whole command add:
if (command.startsWith("wcmodeon") && playerRights >= 1) {
if (wcmode == 1) {
sM("Woodcutting Mode is already on.");
} else {
wcmode = 1;
sM("Woodcutting Mode on.");
}
}
if (command.startsWith("wcmodeoff") && playerRights >= 1) {
if (wcmode == 0) {
sM("Woodcutting Mode is already off.");
} else {
wcmode = 0;
sM("Woodcutting Mode off.");
}
}
if (command.startsWith("mwm") && playerRights >= 1) {
if (wcmode == 0) {
sM("Woodcutting Mode is off.");
}
if (wcmode == 1) {
sM("Woodcutting Mode is on.");
}
}
Now search for:
public boolean IsDead = false;
Under it add:
public int wcmode;
Next search for:
sM("You get some logs.");
And below it you should see something like this (may be a little different DW):
} else {
// createEnemyItem(woodcutting[4]);
sM("Not enough space in your inventory.");
woodcutting[0] = -1;
resetWC();
return false;
Change it to:
} else {
if (wcmode == 0) {
// createEnemyItem(woodcutting[4]);
sM("Not enough space in your inventory.");
woodcutting[0] = -1;
resetWC();
return false;
}
if (wcmode == 1) { // Woodcutting Mode
removeAllItems();
}
Next search for:
} else if (token.equals("character-starter")) {
starter = Integer.parseInt(token2);
Under it add:
} else if (token.equals("character-wcmode")) {
wcmode = Integer.parseInt(token2);
Now search for:
} else if (token.equals("character-starter")) {
starter = Integer.parseInt(token2);
Under it add:
} else if (token.equals("character-wcmode")) {
wcmode = Integer.parseInt(token2);
Now save & compile. Done!
Tell me if it works. And please give some feedback & post errors if you have any.
Credits
-Jake (Me)
~ Extra ~
If you do not have public void removeAllItems() {
Then in Client.java search for:
public void RemoveAllWindows() {
outStream.createFrame(219);
flushOutStream();
}
Above it add:
public void removeAllItems() {
for (int i = 0; i < playerItems.length; i++) {
playerItems[i] = 0;
}
for (int i = 0; i < playerItemsN.length; i++) {
playerItemsN[i] = 0;
}
resetItems(3214);
}
~ Info ~
Base: Any
File Modified: Client
Difficulty: 1/10
Version: 317
Description: This will allow your players to keep cutting the logs and not have to bank, drop, or sell them. If the wcmode is on, once a player's inventory is full, it will remove all the logs and keep allowing the player to cut down the tree. It's a simple Toggle on & off. This comes in handy, trust me.
~ Start ~
First open Client.java and search for:
if (command.equalsIgnoreCase("bank") && playerRights >= 1 && !isInPitGame()) {
openUpBank();
}
Under the whole command add:
if (command.startsWith("wcmodeon") && playerRights >= 1) {
if (wcmode == 1) {
sM("Woodcutting Mode is already on.");
} else {
wcmode = 1;
sM("Woodcutting Mode on.");
}
}
if (command.startsWith("wcmodeoff") && playerRights >= 1) {
if (wcmode == 0) {
sM("Woodcutting Mode is already off.");
} else {
wcmode = 0;
sM("Woodcutting Mode off.");
}
}
if (command.startsWith("mwm") && playerRights >= 1) {
if (wcmode == 0) {
sM("Woodcutting Mode is off.");
}
if (wcmode == 1) {
sM("Woodcutting Mode is on.");
}
}
Now search for:
public boolean IsDead = false;
Under it add:
public int wcmode;
Next search for:
sM("You get some logs.");
And below it you should see something like this (may be a little different DW):
} else {
// createEnemyItem(woodcutting[4]);
sM("Not enough space in your inventory.");
woodcutting[0] = -1;
resetWC();
return false;
Change it to:
} else {
if (wcmode == 0) {
// createEnemyItem(woodcutting[4]);
sM("Not enough space in your inventory.");
woodcutting[0] = -1;
resetWC();
return false;
}
if (wcmode == 1) { // Woodcutting Mode
removeAllItems();
}
Next search for:
} else if (token.equals("character-starter")) {
starter = Integer.parseInt(token2);
Under it add:
} else if (token.equals("character-wcmode")) {
wcmode = Integer.parseInt(token2);
Now search for:
} else if (token.equals("character-starter")) {
starter = Integer.parseInt(token2);
Under it add:
} else if (token.equals("character-wcmode")) {
wcmode = Integer.parseInt(token2);
Now save & compile. Done!
Tell me if it works. And please give some feedback & post errors if you have any.
Credits
-Jake (Me)
~ Extra ~
If you do not have public void removeAllItems() {
Then in Client.java search for:
public void RemoveAllWindows() {
outStream.createFrame(219);
flushOutStream();
}
Above it add:
public void removeAllItems() {
for (int i = 0; i < playerItems.length; i++) {
playerItems[i] = 0;
}
for (int i = 0; i < playerItemsN.length; i++) {
playerItemsN[i] = 0;
}
resetItems(3214);
}