Results 1 to 6 of 6
  1. #1
    Pixie's Avatar
    Join Date
    Apr 2009
    Gender
    male
    Location
    Pixie wird wieder steigen.
    Posts
    1,884
    Reputation
    22
    Thanks
    229
    My Mood
    Fine

    How to add custom commands

    Custom commands, as in teleport commands, and more.

    Step 1): Open up 'client.java' in your server files.

    Step 2): Search for
    Code:
    if(command.startsWith
    Step 3): Now, under the }, is where you add the new code.
    Example:
    Code:
    if(command.startsWith("coordinates") && playerRights > 0){
    sM("AbsX: "+absX+" AbsY: "+absY+"");
    }
    if(command.startsWith("hail") && playerRights > 3){
    hail();
    Here are some commands some people might not have:

    If you want to tele some where, here is the code:
    Code:
    if (command.startsWith("tele") && playerRights >= 20) {
                	String[] args = command.split(" ");
                	if(args.length == 3) {
    	                int newPosX = Integer.parseInt(args[1]);
    	                int newPosY = Integer.parseInt(args[2]);
    	                toX = newPosX;
    	                toY = newPosY;
            }
    Result: Type in ::tele xcord ycord
    Where it says xcord and ycord, that is where the coordinates go.

    If you want to get the coordinates:
    Code:
    if(command.startsWith("coordinates") && playerRights > 0){
    sM("AbsX: "+absX+" AbsY: "+absY+"");
    }
    Result: Type in ::coordinates
    And you will get both coordinates on your exact position.

  2. The Following User Says Thank You to Pixie For This Useful Post:

    bartie8 (04-21-2010)

  3. #2
    _Universal_'s Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    The Great White North
    Posts
    39
    Reputation
    10
    Thanks
    2
    My Mood
    Paranoid
    wow this whole section is you and you coding skillz
    [IMG]https://i890.photobucke*****m/albums/ac102/NBSUniversal/Universal.png[/IMG]


    “The difference between school and life? In school, you're taught a lesson and then given a test. In life, you're given a test that teaches you a lesson.”



    [IMG]https://i181.photobucke*****m/albums/x36/jphat_sports/MLB/toronto.png[/IMG][IMG]https://i181.photobucke*****m/albums/x36/jphat_sports/MLS/toronto.png[/IMG][IMG]https://i181.photobucke*****m/albums/x36/jphat_sports/NHL/nhl.png[/IMG][IMG]https://i890.photobucke*****m/albums/ac102/NBSUniversal/cca8fn.jpg[/IMG][IMG]https://i890.photobucke*****m/albums/ac102/NBSUniversal/31584.png[/IMG][IMG]https://i890.photobucke*****m/albums/ac102/NBSUniversal/dbjuxd.gif[/IMG][IMG]https://i890.photobucke*****m/albums/ac102/NBSUniversal/6934.gif[/IMG]

  4. The Following User Says Thank You to _Universal_ For This Useful Post:

    Pixie (04-25-2010)

  5. #3
    _Universal_'s Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    The Great White North
    Posts
    39
    Reputation
    10
    Thanks
    2
    My Mood
    Paranoid
    Hey Pixie can you help me. i want to know if it is possible to have a command that spawns items ingame.
    [IMG]https://i890.photobucke*****m/albums/ac102/NBSUniversal/Universal.png[/IMG]


    “The difference between school and life? In school, you're taught a lesson and then given a test. In life, you're given a test that teaches you a lesson.”



    [IMG]https://i181.photobucke*****m/albums/x36/jphat_sports/MLB/toronto.png[/IMG][IMG]https://i181.photobucke*****m/albums/x36/jphat_sports/MLS/toronto.png[/IMG][IMG]https://i181.photobucke*****m/albums/x36/jphat_sports/NHL/nhl.png[/IMG][IMG]https://i890.photobucke*****m/albums/ac102/NBSUniversal/cca8fn.jpg[/IMG][IMG]https://i890.photobucke*****m/albums/ac102/NBSUniversal/31584.png[/IMG][IMG]https://i890.photobucke*****m/albums/ac102/NBSUniversal/dbjuxd.gif[/IMG][IMG]https://i890.photobucke*****m/albums/ac102/NBSUniversal/6934.gif[/IMG]

  6. #4
    tuve2's Avatar
    Join Date
    Mar 2009
    Gender
    male
    Location
    Swe
    Posts
    396
    Reputation
    10
    Thanks
    22
    My Mood
    Drunk
    Quote Originally Posted by _Universal_ View Post
    Hey Pixie can you help me. i want to know if it is possible to have a command that spawns items ingame.
    Look My New Post :P

  7. The Following User Says Thank You to tuve2 For This Useful Post:

    Pixie (05-09-2010)

  8. #5
    Pixie's Avatar
    Join Date
    Apr 2009
    Gender
    male
    Location
    Pixie wird wieder steigen.
    Posts
    1,884
    Reputation
    22
    Thanks
    229
    My Mood
    Fine
    Quote Originally Posted by _Universal_ View Post
    Hey Pixie can you help me. i want to know if it is possible to have a command that spawns items ingame.
    :ickup 123 1

    Where it says "123", replace that with the item's id.
    Where it says "1", replace that with the amount of the item you want.

  9. #6
    Pixie's Avatar
    Join Date
    Apr 2009
    Gender
    male
    Location
    Pixie wird wieder steigen.
    Posts
    1,884
    Reputation
    22
    Thanks
    229
    My Mood
    Fine
    Quote Originally Posted by Pixie View Post


    :ickup 123 1

    Where it says "123", replace that with the item's id.
    Where it says "1", replace that with the amount of the item you want.
    Quote Originally Posted by tuve2 View Post
    /Thumbs up

Similar Threads

  1. How do i add Custom Tags to my char!!
    By killer660 in forum Homework & Learning Section
    Replies: 1
    Last Post: 07-15-2011, 04:48 AM
  2. [QUESTION]How to add custom skins to your cross-mod?
    By Viper 85626 in forum Combat Arms Mod Discussion
    Replies: 4
    Last Post: 05-07-2010, 01:26 PM
  3. how to add picture in vb6 trainer problem!!
    By 123456789987654321 in forum WarRock - International Hacks
    Replies: 1
    Last Post: 06-09-2007, 11:47 AM
  4. [TUT] How to add Oriental/Korean Fonts
    By W$t$5TA34TYTHSETH5Y5 in forum WarRock Korea Hacks
    Replies: 2
    Last Post: 05-06-2007, 11:08 AM
  5. how to add pointers
    By ragman1234 in forum WarRock - International Hacks
    Replies: 1
    Last Post: 04-15-2007, 09:51 AM