difficulty: um. not that hard just reading
credits: me and whoever helped me i guess
This is a command i wrote myself:
if (command.equalsIgnoreCase("freefall"))
{
startAnimation(1119);
updateRequired = true;
appearanceUpdateRequired = true;
PlayerHandler.messageToAll = (playerName + " is free falling!");
updateRequired = true;
sendMessage(" congrats you are now free falling. :]");
if (playerRights >= 1) {
startAnimation(1265);
} else {
sendMessage(your not staff! so you fall! haha);
}
}
ok first line.
if (command.equalsIgnoreCase("freefall"))
says that the command is called free fall.
next 3 lines
startAnimation(1119);
updateRequired = true;
appearanceUpdateRequired = true;
the first line is saying to start that animation. in the parenthesis is the emote/ anim id
second and third update is required for char. and so is second
next 3 lines
PlayerHandler.messageToAll = (playerName + " is free falling!");
updateRequired = true;
sendMessage(" congrats you are now free falling. :]");
first line. is sending a message to everyone on server. that "that player is free falling"
second same as above. updaterequired
sendMessage is just sending message to the player what he is doing
next 4 lines
if (playerRights >= 1) {
startAnimation(1265);
} else {
sendMessage(your not staff! so you fall! haha);
first on is saying. if the player has right 1 or above. (which is mod +)
then startAnimation(1265) just starting that animation instead
third is saying else if that player doesnt have rights 1 or above
then send the message
sendMessage(your not staff! so you fall! haha)
"home" command
if (command.equalsIgnoreCase("home")) {
if (teleblock == true) {
sendMessage("A magical force stops you from teleporting."); // made by Melee
} else {
teleportToX = 3356;
teleportToY = 3251;
heightLevel = 0;
sendMessage("You teleport to home");
}
} first line is saying thats command name.
second third. if that player is teleblocked. then send that message
else. if there not teleblocked..
then tele that player to those coordinates
then sends a message saying what ever u want it to say
well thats my tut. more like informative.
if you think it should be moved ask mod to move!
well thanks for taking interest
hope this helps some beginners!
Sign In
Register
Help

Bookmark
Del.icio.us
Digg
Email
Facebook
Google
Mixx
Reddit
StumbleUpon




Back to top
MultiQuote