Silabsoft Forums: Explaining What Commands Do. Also Ill Explain My Command - Silabsoft Forums

Jump to content

Reply Rules

[*]"Leeching" - This is a moparscape term. Here at silabsoft we do not believe in the term. I only care if you blatantly plagiarize work from a creditable source.
[*] Flaming - It's not allowed anywhere on these boards.
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic
  • Bookmark

Explaining What Commands Do. Also Ill Explain My Command idk im bored so this is random

#1 User is offline   melee wins Icon

  • Advanced Member
  • PipPipPip
  • Group: Senior Member
  • Posts: 151
  • Joined: 22-August 09

Posted 06 November 2009 - 07:01 PM

Purpose: to explain commands and what it does. in detail

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!
Posted Image

Malice hero! The one who kept me going.
0

#2 User is offline   Ownage-Pkerzs Icon

  • Advanced Member
  • PipPipPip
  • Group: Senior Member
  • Posts: 65
  • Joined: 25-August 09
  • Gender:Male

Posted 06 November 2009 - 07:18 PM

Wow maybe people will actually learn something lol
Join the most creative and fun server out there!

Ownage-Pkerz.tk, Ownage-Pkerzs.no-ip.biz
Don't miss out becoming an Ownage-Pker!
0

#3 User is offline   melee wins Icon

  • Advanced Member
  • PipPipPip
  • Group: Senior Member
  • Posts: 151
  • Joined: 22-August 09

Posted 06 November 2009 - 10:21 PM

idk i did this very fast!

lol..

tanks i guess
Posted Image

Malice hero! The one who kept me going.
0

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic
  • Bookmark