PDA

View Full Version : [317/508]Adding Item-Giving Commands[317/508]



Techn0fev3r
June 17th, 2010, 21:16
Welcome to my Second Tutorial

Credits: 90% Me for Creating the Tutorial & Codes
10% Moparscape Client for Item ID's

This Tutorial Teaches you how to create commands that only give you Item/Xp once

Files Modified: Client.java, Player.java

Lets Start with Player.Java

Search for this in Player.java

public int delay;

Under That Place

public int -------

The --- is where you put the name of your command

e.g
Code: [Select]

public int GodSword;

Client.Java

In Client.Java Search for this
Code:

if(command

Just above that after the end bracket and above the if(command

Add This

if(command.equalsIgnoreCase("Godsword")) {
if (starter == 0) {
addItem(0000, 0);
sendMessage("You have REcieved your Godsword(s)");
starter = 1;
savemoreinfo();
savechar();
} else if (Godsword== 1) {
sendMessage("You have already used this Command!.");


}
}

Change the blue to the name of your public int ----;

Change the Yellow to the Item ID

Change the Orange to the Amount

Thanks for Reading This tutorial

-Techn0fev3r

XxBryantD
June 20th, 2010, 16:22
thanks needed this

Break
June 20th, 2010, 16:23
This wont work for 508.

gamerbug
July 9th, 2010, 06:22
yeah, this is only 317