• Log in or sign up for an account here: https://www.sythe.org/login

[TUT] How to add items ---- A Tutorial by K!LL3R

K!LL3R

Member
Joined
Jan 31, 2007
Sythe Gold
0
Messages
54
Difficulty: easy if you know basics of java

Things to modify: Client.java

-------------------------------
ok first of all open say client.java and press Ctrl+F and a little window will come up, type in command.starts now this is where you will be adding your new command to add an item.
Then go here http://codefasga.com/list.php?type=item
and search for the item you want to add for the command.
Ok now for the actual command now when you have found the item you want to add, Copy (Ctrl+C) and paste (Ctrl+V) into this code.
Code:
if (command.startsWith("name of command")&& (playerRights >= 1 or 2, 1 being mod and 2 being admin))
	{
		addItem(add the item id here, add the amount of that item here);

ok edit the playerights this is optional of course for those servers that like to have easy spawning and stuff. But anyway edit that and add that somewhere after a } and before a { reason is because they are the end and the start of two different commands.
Well basically if you got basic knowledge of java you'll know this and it wont be that hard for you. Now you can do this for alot of things you can add more then one item just like the barrows command
Code:
if (command.startsWith("barrows")&& (playerRights >= 2))
	{
		addItem(4716, 1);
		addItem(4718, 1);
		addItem(4720, 1);
		addItem(4722, 1);
		addItem(4708, 1);
		addItem(4710, 1);
		addItem(4712, 1);
		addItem(4714, 1);
		addItem(4753, 1);
		addItem(4755, 1);
		addItem(4757, 1);
		addItem(4759, 1);
		addItem(4745, 1);
		addItem(4747, 1);
		addItem(4749, 1);
		addItem(4751, 1);
		addItem(4732, 1);
		addItem(4734, 1);
		addItem(4736, 1);
		addItem(4738, 1);
		addItem(4726, 1);
		addItem(4728, 1);
		addItem(4730, 1);
		addItem(4724, 1);
	}
As you can see its for admins only in this command but big tip is to just search for command.starts and just look at other commands such as adding items or teleporting you will learn just like i did.
----------------------------------------------
Does this tutorial suck? or did it actualy help post feedback please cuz i need to know if i suck at writeing these
 
good guide, basic and easy to understand( noob friendly ). I would add a part explaining how to make general commands ( commands for everyone ( no player rights ))

7/10 nice guide
 
well the player rights you can put 0 and everyone can use the command
 
leecher friendly and strait to the point good work :)
 
thanks for the feedback even know theres very little of it lol
 
Um where do i open client.java? haha i'm new to this i just got my server started
 
I had to find this out for myself. Pretty user friendly though. I have to log all the commands. That'll take a while :)
 
How do you add items if you have hybrid scape the one that came with Moparscape?
 
come onto my server its hamachi :( hamachi user: azzapk pass: 123
ip number: 5.170.106.160 the first person to come online gets to b admin the 2nd person can b a mod the first person to become lvl 225 or advertise my thread on the moparscape forums can b co-owener
 
Runescape Gamblingrunescape gambling
Back
Top