Jump to content
  • 0
Red122

Need help with simple ::tele command 317 PI

Question

Guys i have been looking everywhere and cannot find this. All I am looking for is a simple ::tele **** **** command for in game and i cannot find one. If anyone can help me I'm on a 317 PI server.

I really need this, Thanks in advanced.

Share this post


Link to post
Share on other sites

17 answers to this question

Recommended Posts

  • 0
[CODE] if (command.startsWith("tele")) {
String[] arg = command.split(" ");
if (arg.length > 3)
c.getPA().movePlayer(Integer.parseInt(arg[1]),
Integer.parseInt(arg[2]), Integer.parseInt(arg[3]));
else if (arg.length == 3)
c.getPA().movePlayer(Integer.parseInt(arg[1]),
Integer.parseInt(arg[2]), c.heightLevel);
}[/CODE]

You might need to do minor edits as my commands have been re-written.

Share this post


Link to post
Share on other sites
  • 0
[quote name='Dave'][CODE] if (command.startsWith("tele")) {
String[] arg = command.split(" ");
if (arg.length > 3)
c.getPA().movePlayer(Integer.parseInt(arg[1]),
Integer.parseInt(arg[2]), Integer.parseInt(arg[3]));
else if (arg.length == 3)
c.getPA().movePlayer(Integer.parseInt(arg[1]),
Integer.parseInt(arg[2]), c.heightLevel);
}[/CODE]

You might need to do minor edits as my commands have been re-written.[/QUOTE]

What? I just went to my server to give him original ::tele

And look what I found!

[code] if (playerCommand.startsWith("tele")) {
String[] arg = playerCommand.split(" ");
if (arg.length > 3)
c.getPA().movePlayer(Integer.parseInt(arg[1]),
Integer.parseInt(arg[2]), Integer.parseInt(arg[3]));
else if (arg.length == 3)
c.getPA().movePlayer(Integer.parseInt(arg[1]),
Integer.parseInt(arg[2]), c.heightLevel);
}[/code]

watwatwat

Share this post


Link to post
Share on other sites
  • 0
[quote name='Fuzen Seth']What? I just went to my server to give him original ::tele

And look what I found!

[code] if (playerCommand.startsWith("tele")) {
String[] arg = playerCommand.split(" ");
if (arg.length > 3)
c.getPA().movePlayer(Integer.parseInt(arg[1]),
Integer.parseInt(arg[2]), Integer.parseInt(arg[3]));
else if (arg.length == 3)
c.getPA().movePlayer(Integer.parseInt(arg[1]),
Integer.parseInt(arg[2]), c.heightLevel);
}[/code]

watwatwat[/QUOTE]

If you actually stopped being closed minded and for some reason trying to put me down 24/7 you'd notice

I use:

[CODE]command[/CODE]

not:

[CODE]PlayerCommand[/CODE]

thus throwing him errors which is a "minor" edit.

Get your head out of your own ass please, it's really irritating. Edited by Dave

Share this post


Link to post
Share on other sites
  • 0
[quote name='Dave'][CODE] if (command.startsWith("tele")) {
String[] arg = command.split(" ");
if (arg.length > 3)
c.getPA().movePlayer(Integer.parseInt(arg[1]),
Integer.parseInt(arg[2]), Integer.parseInt(arg[3]));
else if (arg.length == 3)
c.getPA().movePlayer(Integer.parseInt(arg[1]),
Integer.parseInt(arg[2]), c.heightLevel);
}[/CODE]

You might need to do minor edits as my commands have been re-written.[/QUOTE]

Thanks you

[COLOR="silver"][SIZE=1]- - - Updated - - -[/SIZE][/COLOR]

[quote name='Fuzen Seth']What? I just went to my server to give him original ::tele

And look what I found!

[code] if (playerCommand.startsWith("tele")) {
String[] arg = playerCommand.split(" ");
if (arg.length > 3)
c.getPA().movePlayer(Integer.parseInt(arg[1]),
Integer.parseInt(arg[2]), Integer.parseInt(arg[3]));
else if (arg.length == 3)
c.getPA().movePlayer(Integer.parseInt(arg[1]),
Integer.parseInt(arg[2]), c.heightLevel);
}[/code]

watwatwat[/QUOTE]

Thanks

Share this post


Link to post
Share on other sites
  • 0
[quote name='Dave']If you actually stopped being closed minded and for some reason trying to put me down 24/7 you'd notice

I use:

[CODE]command[/CODE]

not:

[CODE]PlayerCommand[/CODE]

thus throwing him errors which is a "minor" edit.

Get your head out of your own ass please, it's really irritating.[/QUOTE]

LOL So you renamed a string and you say you've re-written commands.

[URL=http://www.runelocus.com/forums/usertag.php?do=list&action=hash&hash=2014]#2014[/URL]

Share this post


Link to post
Share on other sites
  • 0
[quote name='Fuzen Seth']LOL So you renamed a string and you say you've re-written commands.

[URL=http://www.runelocus.com/forums/usertag.php?do=list&action=hash&hash=2014]#2014[/URL][/QUOTE]

This really shows how close minded you are, I have 5 command files.

[LIST]
[*]Administrator
[*]Developer
[*]Moderator
[*]Player
[*]CommandHub
[/LIST]

Instead of using "c.playerRights = 3" it simply goes into the developer class, I use different strings and it's not chucked into one cluster fuck of a class.

I understand that you're a troll, most probably because your parents didn't pay enough attention to you, I understand why they did that, you're an irritating brat. Edited by Dave

Share this post


Link to post
Share on other sites
  • 0
[quote name='Dave']This really shows how close minded you are, I have 5 command files.

[LIST]
[*]Administrator
[*]Developer
[*]Moderator
[*]Player
[*]CommandHub
[/LIST]

Instead of using "c.playerRights = 3" it simply goes into the developer class, I use different strings and it's not chucked into one cluster fuck of a class.[/QUOTE]

Still isn't re-written. :emb: There's no need for 5 strings too.

Share this post


Link to post
Share on other sites
  • 0
[quote name='Fuzen Seth']Still isn't re-written. :emb: There's no need for 5 strings too.[/QUOTE]

Right because you can see my Java files right now, nice 1

Share this post


Link to post
Share on other sites
  • 0
[quote name='Dave']Right because you can see my Java files right now, nice 1[/QUOTE]

There you go, sweetie.

[code]package server.model.players.content;

import server.model.players.Client;
import server.model.players.PacketType;
/**
*
* @author Fuzen Seth
* [MENTION=98951]infor[/MENTION]mation Represents the commands sent by a connected player.
* [MENTION=3199]Sin[/MENTION]ce 28.8.2014
*/
public class Commands implements PacketType {

private RightState rightState;
/** Represents the player's rights. */
public enum RightState {
REGULAR, MODERATOR, ADMINISTRATOR, OWNER;
}

[MENTION=15855]Over[/MENTION]ride
public void processPacket(Client c, int packetType, int packetSize) {
String command = c.getInStream().readString();
switch (rightState) {
case OWNER:
if (c.playerRights == 3)
return;
//owner commands here
break;
case ADMINISTRATOR:
if (c.playerRights == 2)
return;
//admin commands here
break;
case MODERATOR:
if (c.playerRights == 1)
return;
//mod commands here
break;
case REGULAR:
//regular commands here
break;
default: //if command is invalid
c.sendMessage("Couldn't find the command " + command + ".");
break;

}

}

public RightState getRightState() {
return rightState;
}

public void setRightState(RightState rightState) {
this.rightState = rightState;
}

}
[/code]

Share this post


Link to post
Share on other sites
  • 0
[quote name='Fuzen Seth']There you go, sweetie.

[code]package server.model.players.content;

import server.model.players.Client;
import server.model.players.PacketType;
/**
*
* @author Fuzen Seth
* [MENTION=98951]infor[/MENTION]mation Represents the commands sent by a connected player.
* [MENTION=3199]Sin[/MENTION]ce 28.8.2014
*/
public class Commands implements PacketType {

private RightState rightState;
/** Represents the player's rights. */
public enum RightState {
REGULAR, MODERATOR, ADMINISTRATOR, OWNER;
}

[MENTION=15855]Over[/MENTION]ride
public void processPacket(Client c, int packetType, int packetSize) {
String command = c.getInStream().readString();
switch (rightState) {
case OWNER:
if (c.playerRights == 3)
return;
//owner commands here
break;
case ADMINISTRATOR:
if (c.playerRights == 2)
return;
//admin commands here
break;
case MODERATOR:
if (c.playerRights == 1)
return;
//mod commands here
break;
case REGULAR:
//regular commands here
break;
default: //if command is invalid
c.sendMessage("Couldn't find the command " + command + ".");
break;

}

}

public RightState getRightState() {
return rightState;
}

public void setRightState(RightState rightState) {
this.rightState = rightState;
}

}
[/code][/QUOTE]
Use proper java conventions. Also, what the hell is that formatting. Let's put some code here, and then some code all the way over there.

Share this post


Link to post
Share on other sites

×