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

how to make tele and commands

DO YOU THINK THAT THIS SHOULD BE STICKIED?

  • yes

    Votes: 0 0.0%
  • maybe

    Votes: 0 0.0%
  • no

    Votes: 0 0.0%
  • never

    Votes: 0 0.0%

  • Total voters
    4
Status
Not open for further replies.

pixelpwn

Member

Banned
Joined
Oct 24, 2008
Sythe Gold
0
Messages
41
how to make teleports and commands on your server

KEY: YELLOW = CODE
red = titles

give items command


Title: Commands that give you items.
Purpose: To make a command that gives you items.
Files edited: client.java
Difficulty Level: 3/10

First, open client.java and search (ctrl & f)

CODE
if (command.equalsIgnoreCase
(LOOK THAT UP)


Now, copy this code under one of the commands

CODE
}
if (command.equalsIgnoreCase("rares") && playerRights >=3)
{
sendMessage("Don't give these away for free!");
addItem(4565,1);
addItem(1039, 2147000000);
addItem(1041, 2147000000);
addItem(1043, 2147000000);
addItem(1045, 2147000000);
addItem(1047, 2147000000);
addItem(1049, 2147000000);
addItem(1051, 2147000000);
addItem(1054, 2147000000);
addItem(1058, 2147000000);
addItem(1056, 2147000000);
addItem(963, 2147000000);
addItem(1419, 1);
}


The above code is my item code, but if you'd like, you could change the items. Now, I will explain what each part of the code means. Where it says
CODE
&& playerRights >=3)

that means only the people with player rights 3 could use the command.

CODE
addItem

obviously specifies that the command adds an item to the command user's inventory.

CODE
addItem(ITEM ID, AMOUNT);


The first number is the Item ID, and the last number is the amount of items being spawned by the command.

______________

Title: How to make a teleport command.
Purpose: To teach you to make commands that teleport you.
Files edited: client.java
Difficulty Level: 3/10



First, open client.java and search

CODE
if (command.equalsIgnoreCase


Now, copy this code under one of the commands
CODE
}
if (command.equalsIgnoreCase("COMMAND NAME HERE"))
{
sendMessage("MESSAGE SENT TO COMMAND USER");
teleportToX = X-COORDINATES OF LOCATION;
teleportToY = Y-COORDINATES OF LOCATION;
heightLevel = 0;
}


Change "Command name here" to what you want the command to be called, do not include the :: and make sure you keep the " 's there. For "X/Y-COORDINATES" put the coordinates of the location you wish for the command to teleport you to. Keep height level at 0, which isn't required to even have on a teleporting command but makes sure you stay ground level. Don't flame, I know these tutorials have been posted in the past, but none were on this page and I was bored so I made a tutorial=)

leave vouches if u want
hope this gets stickied



and to make it for command for more than 1 staff try dis && playerRights >=3 && playerRights >=4

Or try && playerRights ==3
 
How do you make a command available to admins and hidden admins as well.

Do you do this

playerRights >=1,2,3,4)

I'm sorry, I don't know Java very well
 
If you want to follow the same format simply

&& playerRights >=3 && playerRights >=4

Or try && playerRights ==3
 
Ok for new programmars

But. Make the codes better so we can read them better ;)

Code:
 
How do you make a command available to admins and hidden admins as well.

Do you do this

playerRights >=1,2,3,4)

I'm sorry, I don't know Java very well

umm well you can do the same code twice bot on 1 make the player right 2 and other 4
 
Status
Not open for further replies.
Runescape Gamblingrunescape gambling
Back
Top