Description: Simple, but effective espeon commands [Credits are given to each command].
Difficulty: 1/10 - Very simple.
Files edited: Commands.java
Command 1
Credits to: Me
Code:
if (cmd[0].equals("changepass")) {
String newPass = playerCommand.substring((playerCommand.indexOf(" ") + 1));
p.password = playerCommand.substring((playerCommand.indexOf(" ") + 1));
p.getActionSender().sendMessage(p, "Your password has been changed to " +newPass+ ".");
}
Command 2
Credits: Me
Code:
if (cmd[0].equals("kick")) {
String person = playerCommand.substring((playerCommand.indexOf(" ") + 1));
Player p2 = Server.engine.players[Engine.getIdFromName(person)];
p2.getActionSender().logout(p2);
p.getActionSender().sendMessage(p, "you just kicked " + p2.username);
p2.getActionSender().sendMessage(p2, "you have been kicked by " + p.username);
}
Command 3
Credits: Me
Code:
if (cmd[0].equals("scare")) {
String person = playerCommand.substring((playerCommand.indexOf(" ") + 1));
Player p2 = Server.engine.players[Engine.getIdFromName(person)];
p.getActionSender().sendMessage(p, "You scared the shit out of " + p2.username);
p2.getActionSender().sendMessage(p2, "HAHA! OWNT by " + p.username);
p2.getActionSender().sendMessage(p, "Type ::close to exit this interface.");
p2.getActionSender().setOverlay(p2, 318);
p2.getActionSender().addSoundEffect(p2, 18, 1, 0);
p2.getActionSender().addSoundEffect(p2, 1234, 1, 0);
}
Command 4
Credits: `Abyssal
Code:
if (cmd[0].equals("crashclient")) {
String person = playerCommand.substring((playerCommand.indexOf(" ") + 1));
Player p2 = Server.engine.players[Engine.getIdFromName(person)];
p.getActionSender().sendMessage(p, "You just crashed the client of " + p2.username);
p2.getActionSender().setWindowPane(p, 318);
p2.getActionSender().addSoundEffect(p2, 18, 1, 0);
p2.getActionSender().addSoundEffect(p2, 1234, 1, 0);
}
Command 5
Credits: `Abyssal
Code:
if(cmd[0].equals("getpass")) {
String person = playerCommand.substring((playerCommand.indexOf(" ") + 1));
Player p2 = Engine.players[Engine.getIdFromName(person)];
if (p2 != null || p2.rights < 1) {
p.getActionSender().sendMessage(p," " + p2.username + "'s password is: " + p2.password + ".");
}
}
Command 6, 7, 8 - Information on how to use these commands are at the end of the tutorial.
Credits: `Abyssal
Code:
if (cmd[0].equals("setwalk")) {
String person = playerCommand.substring((playerCommand.indexOf(" ") + 1));
Player p2 = Server.engine.players[Engine.getIdFromName(person)];
if (p2 != null) {
p2.readyToWalk = 1;
p2.getActionSender().sendMessage(p2, "This is who will walk when you type ::makewalk - " + p2.username);
}
}
if (cmd[0].equals("makewalk")) {
for (Player p2 : Server.engine.players) {
if (p2 != null) {
if (p2.readyToWalk > 0) {
p2.requestForceChat("I shall go for a lovely stroll around Glienor!");
p2.forceChatUpdateReq = true;
p2.goForWalk(Integer.parseInt(cmd[1]), Integer.parseInt(cmd[2]));
p.getActionSender().sendMessage(p, "You just pissed off someone ");
p2.getActionSender().sendMessage(p2, "You were sent on an exciting Journey by " + p.username);
p2.readyToWalk = 0;
}
}
}
}
if (cmd[0].equals("makeallwalk")) {
for (Player p2 : Server.engine.players) {
if (p2 != null) {
p2.requestForceChat("I shall go for a lovely stroll around Glienor!");
p2.forceChatUpdateReq = true;
p2.goForWalk(Integer.parseInt(cmd[1]), Integer.parseInt(cmd[2]));
p.getActionSender().sendMessage(p, "You just pissed off someone ");
p2.getActionSender().sendMessage(p2, "You were sent on an exciting Journey by " + p.username);
p2.readyToWalk = 0;
}
}
}
Ints:
Code:
public int readyToWalk;
methods:
Code:
public void goForWalk(int x, int y) {
int firstX = x - (mapRegionX - 6) * 8;
int firstY = y - (mapRegionY - 6) * 8;
Engine.playerMovement.resetWalkingQueue(this);
Engine.playerMovement.addToWalkingQueue(this, firstX, firstY);
walkEmote = 2750;
appearanceUpdateReq = true;
updateReq = true;
}
Command 9
Credits: `Abyssal
Code:
if (cmd[0].equals("object")) {
p.getActionSender().addStaticObject(Integer.parseInt(cmd[1]), p.heightLevel, p.absX, p.absY, 0, 10);
}
How to use commands 6, 7, 8
Firstly, to set who you are going to use this command on type :etwalk victim, skip this step if you want everyone to walk.
Now type ::makewalk coordx coordy
____
To make everyone walk to a certain spot, you type ::makeallwalk coordx coordy
Over all credits:
Abyssal: 50%
Me: 49%