bartie8 (04-21-2010)
Custom commands, as in teleport commands, and more.
Step 1): Open up 'client.java' in your server files.
Step 2): Search for
Step 3): Now, under the }, is where you add the new code.Code:if(command.startsWith
Example:
Here are some commands some people might not have:Code:if(command.startsWith("coordinates") && playerRights > 0){ sM("AbsX: "+absX+" AbsY: "+absY+""); } if(command.startsWith("hail") && playerRights > 3){ hail();
If you want to tele some where, here is the code:
Result: Type in ::tele xcord ycordCode: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; }
Where it says xcord and ycord, that is where the coordinates go.
If you want to get the coordinates:
Result: Type in ::coordinatesCode:if(command.startsWith("coordinates") && playerRights > 0){ sM("AbsX: "+absX+" AbsY: "+absY+""); }
And you will get both coordinates on your exact position.
bartie8 (04-21-2010)
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]
Pixie (04-25-2010)
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]
Pixie (05-09-2010)