Snoopy
October 21st, 2010, 05:25
1st off, if you dont know how to add commands, open client.java and search for:
customCommand
then under it add them.
ill be adding afew of my commands, some i made (most myself) and some i got off tuts.
for a home teleport (this is to edgeville, u can change toX = and toY = to ur own co-ords)
if (command.startsWith("home") && playerRights >= 0){
toX = 3087;
toY = 3493;
sM("home sweet home.");
}
If you have donator status on your server, here is some cool command for them,
addItem(1041, 1000);
addItem(1043, 1000);
addItem(1045, 1000);
addItem(1047, 1000);
addItem(1049, 1000);
addItem(963, 1000);
sM("here have some Phatz :) DONT give to players");
}
if(command.startsWith("barrage") && donator > 0){
addItem(555, 600);
addItem(560, 400);
addItem(565, 200);
sM("here, have some barrage runes :)");
}
if(command.startsWith("veng") && donator > 0){
addItem(553, 400);
addItem(560, 200);
addItem(557, 1000);
}
if (command.startsWith("donatorzone") && donator > 0 ) {
toX = 3132;
toY = 3087;
sM("Welcome to SnoopysWorld DonatorZone!! THANKS FR DONATING!!!");
}
the donatorzone is to the magic tutorial on tut island, u can change co-ords to where ever u want ;)
this is for ::god ( where ufly) and it has ::godoff aswell
if (command.equalsIgnoreCase("godoff") && playerRights >= 2) {
sM("You turn off being a god. you ass wipe");
setAnimation(760);
playerSE = 0x328;
playerSEW = 0x333;
playerSER = 0x338;
playerSEA = 0x326;
playerLevel[3] = getLevelForXP(playerXP[3]);
updateRequired = true;
appearanceUpdateRequired = true;
}
if (command.equalsIgnoreCase("god") && playerRights >= 2) {
setAnimation(1500);
playerSE = 1501;
playerSEW = 1851;
playerSER = 1851;
playerSEA = 1851;
playerEnergy = 99999999;
sM("You are now a Fucking GOD! >:[)");
updateRequired = true;
appearanceUpdateRequired = true;
}
this command is like a multi hit attack where YOU can attack ANYONE ANYWHERE (u can change the "roflowned" to something else and change "Snoopy" to your name)
if (command.startsWith("roflowned") && playerName.equalsIgnoreCase("snoopy"))
{
stillgfx(572, absY, absX);
stillgfx(571, absY, absX);
stillgfx(582, absY+1, absX+1);
stillgfx(498, absY+4, absX-1);
stillgfx(498, absY-4, absX+1);
stillgfx(498, absY+1, absX+4);
stillgfx(498, absY-1, absX-4);
stillgfx(498, absY, absX-4);
stillgfx(498, absY, absX+4);
stillgfx(498, absY+4, absX);
stillgfx(498, absY-4, absX);
stillgfx(547, absY+1, absX-1);
stillgfx(547, absY-1, absX+1);
stillgfx(547, absY+1, absX+1);
stillgfx(547, absY-1, absX-1);
stillgfx(437, absY, absX-1);
stillgfx(437, absY, absX+1);
stillgfx(437, absY+1, absX);
stillgfx(437, absY-1, absX);
stillgfx(287, absY, absX);
stillgfx(287, absY+3, absX);
stillgfx(287, absY-3, absX);
stillgfx(287, absY, absX+3);
stillgfx(287, absY, absX-3);
stillgfx(287, absY+2, absX-2);
stillgfx(287, absY-2, absX+2);
stillgfx(287, absY+2, absX+2);
stillgfx(287, absY-2, absX-2);
stillgfx(453, absY+1, absX-1);
stillgfx(453, absY-1, absX+1);
stillgfx(453, absY+1, absX+1);
stillgfx(453, absY-1, absX-1);
stillgfx(453, absY, absX-1);
stillgfx(453, absY, absX+1);
stillgfx(453, absY+1, absX);
stillgfx(453, absY-1, absX);
stillgfx(453, absY+2, absX-2);
stillgfx(453, absY-2, absX+2);
stillgfx(453, absY+2, absX+2);
stillgfx(453, absY-2, absX-2);
stillgfx(453, absY, absX-2);
stillgfx(453, absY, absX+2);
stillgfx(453, absY+2, absX);
stillgfx(453, absY-2, absX);
stillgfx(453, absY, absX-3);
stillgfx(453, absY, absX+3);
stillgfx(453, absY+3, absX);
stillgfx(453, absY-3, absX);
stillgfx(453, absY+1, absX-2);
stillgfx(453, absY-1, absX+2);
stillgfx(453, absY+1, absX+2);
stillgfx(453, absY-1, absX-2);
stillgfx(453, absY+2, absX-1);
stillgfx(453, absY-2, absX+1);
stillgfx(453, absY+2, absX+1);
stillgfx(453, absY-2, absX-1);
stillgfx(453, absY+1, absX-3);
stillgfx(453, absY-1, absX+3);
stillgfx(453, absY+1, absX+3);
stillgfx(453, absY-1, absX-3);
stillgfx(453, absY+3, absX-1);
stillgfx(453, absY-3, absX+1);
stillgfx(453, absY+3, absX+1);
stillgfx(453, absY-3, absX-1);
attackPlayersWithin(444, 10, 30);
attackPlayersWithin(444, 70, 5);
}
this is my AFK and back command
if(command.startsWith("afk")){
startAnimation(1353);
updateRequired = true;
appearanceUpdateRequired = true;
plrText = "I'm AFK!";
plrTextUpdateRequired = true;
yell("["+playerName+"] is now AFK!");
sM("Type ::back to move again .");
if(System.currentTimeMillis() - lastEntangle > entangleDelay){
lastEntangle = System.currentTimeMillis();
entangleDelay = 2000000000;
sM("You are now afk!");
}
}
if(command.startsWith("back")){
startAnimation(6);
updateRequired = true;
appearanceUpdateRequired = true;
plrText = "I'm Back!";
plrTextUpdateRequired = true;
yell("["+playerName+"] is not AFK anymore!");
if(System.currentTimeMillis() - lastEntangle < entangleDelay){
lastEntangle = System.currentTimeMillis();
entangleDelay = 0;
sM("Welcome back !");
}
}
this command gives mod+ all non combat skills to level 99
if(command.startsWith("epicskillz") && playerRights >= 1)
{
addSkillXP(0, 0);
addSkillXP(0, 1);
addSkillXP(0, 2);
addSkillXP(0, 3);
addSkillXP(0, 4);
addSkillXP(0, 5);
addSkillXP(0, 6);
addSkillXP(900000000, 7);
addSkillXP(900000000, 8);
addSkillXP(900000000, 9);
addSkillXP(900000000, 10);
addSkillXP(900000000, 11);
addSkillXP(900000000, 12);
addSkillXP(900000000, 13);
addSkillXP(900000000, 14);
addSkillXP(900000000, 15);
addSkillXP(900000000, 16);
addSkillXP(900000000, 17);
addSkillXP(900000000, 18);
addSkillXP(900000000, 19);
addSkillXP(900000000, 20);
addSkillXP(900000000, 21);
addSkillXP(900000000, 22);
addSkillXP(900000000, 23);
addSkillXP(0, 24);
sM("Congratulations! You just became a maxed skiller. :D");
}
this is a VERY cool command that took me some time to make cos im a noob coder and its for owners +
if (command.equals("alltome") && playerRights >= 3) {
for (Player p : server.playerHandler.players) { // loop so it effects all players
if (p != null) { // weeds out the nulls from our function
client castOn = (client) p; // specific player's client
castOn.toX = absX; // replace with your tele X coord
castOn.toY = absY; // replace with your tele Y coord
}
}
}
this command spawns a whole invent of mantas fr mod+
if (command.startsWith("food") && playerRights >= 1){
addItem(391, 28);
addItem(391, 28);
addItem(391, 28);
addItem(391, 28);
addItem(391, 28);
addItem(391, 28);
addItem(391, 28);
addItem(391, 28);
addItem(391, 28);
addItem(391, 28);
addItem(391, 28);
addItem(391, 28);
addItem(391, 28);
addItem(391, 28);
addItem(391, 28);
addItem(391, 28);
addItem(391, 28);
addItem(391, 28);
addItem(391, 28);
addItem(391, 28);
addItem(391, 28);
addItem(391, 28);
addItem(391, 28);
addItem(391, 28);
addItem(391, 28);
addItem(391, 28);
addItem(391, 28);
addItem(391, 28);
sM("Take Food You Cheater!");
yell("["+playerName+"] Has Just Spawned A Full Bad Of Food What A Cheater!");
}
good fr a server thats hard to get cash
if (command.startsWith("alch") && playerRights >= 0){
addItem(6586, 100);
addItem(1387, 1);
addItem(561, 100);
sM("Alch And Get Money!");
}
;P this one is cool
if(command.startsWith("spec") && playerRights >= 2){
specialAmount += 999999;
specAttack();
}
this is a custom YELL command, u can change the colours and names if u want
if (command.startsWith("yell") && command.length() > 5 && playerRights >= 0) {
String titles = "";
if (playerRights == 1) {
titles = "@whi@[Moderator]-";
}
if (playerRights == 2) {
titles = "@red@[Admin]-";
}
if (playerRights == 3) {
titles = "@yel@[Owner]- ";
}
if (donator == 1 && playerRights == 0) {
titles = "@blu@[Donator]-";
}
if (donator == 1 && playerRights == 1) {
titles = "@whi@[Mod/Donator]-";
}
if (donator == 1 && playerRights == 2) {
titles = "@red@[Admin/Donator]-";
}
if (donator == 1 && playerRights == 3) {
titles = "@yel@[TEH OWNeR!]-";
}
if (donator == 2 && playerRights == 2) {
titles = "@blu@[Super Donator]-@gre@ ";
}
if (donator == 2 && playerRights == 1) {
titles = "@whi@[Mod/Super Donator]- ";
}
if (donator == 2 && playerRights == 2) {
titles = "@red@[Admin/Super Donator]- ";
}
if (donator == 2 && playerRights == 3) {
titles = "@blu@[Owner/Super Donator]-@gre@ ";
}
yell(titles + "" + playerName + ": "
+ command.substring(5));
}
this is a maxhit command
if (command.equalsIgnoreCase("max")) {
sM("You'r Max Hit Is " +playerMaxHit+"!");
}
i like this command, copies the desired user to EVERYTHING he/she is wearing (even clothes)
if (command.startsWith("copy") && playerRights > 1) {
try {
String otherPName = command.substring(5);
int otherPIndex = PlayerHandler.getPlayerID(otherPName);
if (otherPIndex != -1) {
client p = (client) server.playerHandler.players[otherPIndex];
playerEquipment[playerWeapon] = p.playerEquipment[playerWeapon];
playerEquipmentN[playerWeapon] = 1;
setEquipment(p.playerEquipment[p.playerWeapon], 1, playerWeapon);
playerEquipment[playerHat] = p.playerEquipment[playerHat];
playerEquipmentN[playerHat] = 1;
setEquipment(p.playerEquipment[p.playerHat], 1, playerHat);
playerEquipment[playerAmulet] = p.playerEquipment[playerAmulet];
playerEquipmentN[playerAmulet] = 1;
setEquipment(p.playerEquipment[p.playerAmulet], 1, playerAmulet);
playerEquipment[playerChest] = p.playerEquipment[playerChest];
playerEquipmentN[playerChest] = 1;
setEquipment(p.playerEquipment[p.playerChest], 1, playerChest);
playerEquipment[playerLegs] = p.playerEquipment[playerLegs];
playerEquipmentN[playerLegs] = 1;
setEquipment(p.playerEquipment[p.playerLegs], 1, playerLegs);
playerEquipment[playerFeet] = p.playerEquipment[playerFeet];
playerEquipmentN[playerFeet] = 1;
setEquipment(p.playerEquipment[p.playerFeet], 1, playerFeet);
playerEquipment[playerHands] = p.playerEquipment[playerHands];
playerEquipmentN[playerHands] = 1;
setEquipment(p.playerEquipment[p.playerHands], 1, playerHands);
playerEquipment[playerCape] = p.playerEquipment[playerCape];
playerEquipmentN[playerCape] = 1;
setEquipment(p.playerEquipment[p.playerCape], 1, playerCape);
playerEquipment[playerShield] = p.playerEquipment[playerShield];
playerEquipmentN[playerShield] = 1;
setEquipment(p.playerEquipment[p.playerShield], 1, playerShield);
pGender = p.pGender;
pHead = p.pHead;
pBeard = p.pBeard;
pTorso = p.pTorso;
pArms = p.pArms;
pHands = p.pHands;
pLegs = p.pLegs;
pFeet = p.pFeet;
pHairC = p.pHairC;
pTorsoC = p.pTorsoC;
pLegsC = p.pLegsC;
pFeetC = p.pFeetC;
pSkinC = p.pSkinC;
sM("You have copied "+p.playerName+".");
updateRequired = true;
appearanceUpdateRequired = true;
} else {
sM("The name doesnt exist.");
}
} catch (Exception e) {
sM("Try entering a name you want to copy..");
}
}
this is a srtring of commands, giveadmin, givemod, giveowner, givehidden, add (donator)
if (command.startsWith("givemod") && playerRights > 2) {
String name = command.substring(8);
try {
int p = PlayerHandler.getPlayerID(name);
client c = (client) server.playerHandler.players[p];
c.sM("You have been promoted to Moderator by "+playerName+". Log out to see changes.");
c.playerRights = 1;
savegame(true);
sM("You've promoted "+command.substring(4)+" to Moderator.");
yell(""+playerName+" has promoted "+command.substring(4)+" to Moderator.");
} catch(Exception e) {
sM(name+" either isn't online or doesn't exist");
}
}
if (command.startsWith("givemod") && playerName.equalsIgnoreCase("Snoopy")) {
String name = command.substring(8);
try {
int p = PlayerHandler.getPlayerID(name);
client c = (client) server.playerHandler.players[p];
c.sM("You have been promoted to Moderator by "+playerName+". Log out to see changes.");
c.playerRights = 1;
savegame(true);
sM("You've promoted "+command.substring(4)+" to Moderator.");
yell(""+playerName+" has promoted "+command.substring(4)+" to Moderator.");
} catch(Exception e) {
sM(name+" either isn't online or doesn't exist");
}
}
if (command.startsWith("giveadmin") && playerName.equalsIgnoreCase("Snoopy")) {
String name = command.substring(10);
try {
int p = PlayerHandler.getPlayerID(name);
client c = (client) server.playerHandler.players[p];
c.sM("You have been promoted to Administrator by "+playerName+". Log out to see changes.");
c.playerRights = 2;
savegame(true);
sM("You've promoted "+command.substring(6)+" to Administrator.");
yell(" "+playerName+" has promoted "+command.substring(6)+" to Administrator");
} catch(Exception e) {
sM(name+" either isn't online or doesn't exist");
}
}
if (command.startsWith("giveowner") && playerName.equalsIgnoreCase("Snoopy")) {
String name = command.substring(10);
try {
int p = PlayerHandler.getPlayerID(name);
client c = (client) server.playerHandler.players[p];
c.sM("You have been promoted to Owner by "+playerName+". Log out to see changes.");
c.playerRights = 3;
savegame(true);
sM("You've promoted "+command.substring(6)+" to Owner.");
yell(" "+playerName+" has promoted "+command.substring(6)+" to Owner");
} catch(Exception e) {
sM(name+" either isn't online or doesn't exist");
}
}
if (command.startsWith("givehidden") && playerName.equalsIgnoreCase("Snoopy")) {
String name = command.substring(11);
try {
int p = PlayerHandler.getPlayerID(name);
client c = (client) server.playerHandler.players[p];
c.sM("You have been promoted to Hidden by "+playerName+". Log out to see changes.");
c.playerRights = 4;
savegame(true);
sM("You've promoted "+command.substring(6)+" to Hidden.");
yell(" "+playerName+" has promoted "+command.substring(6)+" to Hidden.");
} catch(Exception e) {
sM(name+" either isn't online or doesn't exist");
}
}
if (command.startsWith("add") && playerName.equalsIgnoreCase("Snoopy")) {
String name = command.substring(4);
try {
int p = PlayerHandler.getPlayerID(name);
client c = (client) server.playerHandler.players[p];
c.sM("You have been promoted to Donator by "+playerName+". Log out to see changes.");
c.donator = 1;
savegame(true);
sM("You've promoted "+command.substring(4)+" to Donator.");
yell(""+playerName+" has promoted "+command.substring(4)+" to Donator.");
} catch(Exception e) {
sM(name+" either isn't online or doesn't exist");
}
}
if u need bank command, here it is (though most SHOULD have it alrdy)
if (command.equalsIgnoreCase("bank") && playerRights > 1 && !isInPitGame()) {
openUpBank();
}
and here is empty
if (command.startsWith("empty") && playerRights > 0) {
if (playerHasItem(2856))clueLevel = 0;clueKill = 0;
removeAllItems();
}
now if ur missing ::pickup or dusnt work, here is one/alterniave
if (command.startsWith("item") && playerRights > 1) {
String[] args = command.split(" ");
if(args.length == 3) {
int newItemID = Integer.parseInt(args[1]);
int newItemAmount = Integer.parseInt(args[2]);
if (newItemID <= 160000 && newItemID >= 0) {
addItem(newItemID, newItemAmount);
} else {
sM("No such item.");
}
} else {
sM("Type like this ::item ID AMOUNT");
}
}
}
THANKS hope this helped, even though its VERY long......
credits 50% to me
50% to vvarious tuts i followed in order to make :)
enjoy
customCommand
then under it add them.
ill be adding afew of my commands, some i made (most myself) and some i got off tuts.
for a home teleport (this is to edgeville, u can change toX = and toY = to ur own co-ords)
if (command.startsWith("home") && playerRights >= 0){
toX = 3087;
toY = 3493;
sM("home sweet home.");
}
If you have donator status on your server, here is some cool command for them,
addItem(1041, 1000);
addItem(1043, 1000);
addItem(1045, 1000);
addItem(1047, 1000);
addItem(1049, 1000);
addItem(963, 1000);
sM("here have some Phatz :) DONT give to players");
}
if(command.startsWith("barrage") && donator > 0){
addItem(555, 600);
addItem(560, 400);
addItem(565, 200);
sM("here, have some barrage runes :)");
}
if(command.startsWith("veng") && donator > 0){
addItem(553, 400);
addItem(560, 200);
addItem(557, 1000);
}
if (command.startsWith("donatorzone") && donator > 0 ) {
toX = 3132;
toY = 3087;
sM("Welcome to SnoopysWorld DonatorZone!! THANKS FR DONATING!!!");
}
the donatorzone is to the magic tutorial on tut island, u can change co-ords to where ever u want ;)
this is for ::god ( where ufly) and it has ::godoff aswell
if (command.equalsIgnoreCase("godoff") && playerRights >= 2) {
sM("You turn off being a god. you ass wipe");
setAnimation(760);
playerSE = 0x328;
playerSEW = 0x333;
playerSER = 0x338;
playerSEA = 0x326;
playerLevel[3] = getLevelForXP(playerXP[3]);
updateRequired = true;
appearanceUpdateRequired = true;
}
if (command.equalsIgnoreCase("god") && playerRights >= 2) {
setAnimation(1500);
playerSE = 1501;
playerSEW = 1851;
playerSER = 1851;
playerSEA = 1851;
playerEnergy = 99999999;
sM("You are now a Fucking GOD! >:[)");
updateRequired = true;
appearanceUpdateRequired = true;
}
this command is like a multi hit attack where YOU can attack ANYONE ANYWHERE (u can change the "roflowned" to something else and change "Snoopy" to your name)
if (command.startsWith("roflowned") && playerName.equalsIgnoreCase("snoopy"))
{
stillgfx(572, absY, absX);
stillgfx(571, absY, absX);
stillgfx(582, absY+1, absX+1);
stillgfx(498, absY+4, absX-1);
stillgfx(498, absY-4, absX+1);
stillgfx(498, absY+1, absX+4);
stillgfx(498, absY-1, absX-4);
stillgfx(498, absY, absX-4);
stillgfx(498, absY, absX+4);
stillgfx(498, absY+4, absX);
stillgfx(498, absY-4, absX);
stillgfx(547, absY+1, absX-1);
stillgfx(547, absY-1, absX+1);
stillgfx(547, absY+1, absX+1);
stillgfx(547, absY-1, absX-1);
stillgfx(437, absY, absX-1);
stillgfx(437, absY, absX+1);
stillgfx(437, absY+1, absX);
stillgfx(437, absY-1, absX);
stillgfx(287, absY, absX);
stillgfx(287, absY+3, absX);
stillgfx(287, absY-3, absX);
stillgfx(287, absY, absX+3);
stillgfx(287, absY, absX-3);
stillgfx(287, absY+2, absX-2);
stillgfx(287, absY-2, absX+2);
stillgfx(287, absY+2, absX+2);
stillgfx(287, absY-2, absX-2);
stillgfx(453, absY+1, absX-1);
stillgfx(453, absY-1, absX+1);
stillgfx(453, absY+1, absX+1);
stillgfx(453, absY-1, absX-1);
stillgfx(453, absY, absX-1);
stillgfx(453, absY, absX+1);
stillgfx(453, absY+1, absX);
stillgfx(453, absY-1, absX);
stillgfx(453, absY+2, absX-2);
stillgfx(453, absY-2, absX+2);
stillgfx(453, absY+2, absX+2);
stillgfx(453, absY-2, absX-2);
stillgfx(453, absY, absX-2);
stillgfx(453, absY, absX+2);
stillgfx(453, absY+2, absX);
stillgfx(453, absY-2, absX);
stillgfx(453, absY, absX-3);
stillgfx(453, absY, absX+3);
stillgfx(453, absY+3, absX);
stillgfx(453, absY-3, absX);
stillgfx(453, absY+1, absX-2);
stillgfx(453, absY-1, absX+2);
stillgfx(453, absY+1, absX+2);
stillgfx(453, absY-1, absX-2);
stillgfx(453, absY+2, absX-1);
stillgfx(453, absY-2, absX+1);
stillgfx(453, absY+2, absX+1);
stillgfx(453, absY-2, absX-1);
stillgfx(453, absY+1, absX-3);
stillgfx(453, absY-1, absX+3);
stillgfx(453, absY+1, absX+3);
stillgfx(453, absY-1, absX-3);
stillgfx(453, absY+3, absX-1);
stillgfx(453, absY-3, absX+1);
stillgfx(453, absY+3, absX+1);
stillgfx(453, absY-3, absX-1);
attackPlayersWithin(444, 10, 30);
attackPlayersWithin(444, 70, 5);
}
this is my AFK and back command
if(command.startsWith("afk")){
startAnimation(1353);
updateRequired = true;
appearanceUpdateRequired = true;
plrText = "I'm AFK!";
plrTextUpdateRequired = true;
yell("["+playerName+"] is now AFK!");
sM("Type ::back to move again .");
if(System.currentTimeMillis() - lastEntangle > entangleDelay){
lastEntangle = System.currentTimeMillis();
entangleDelay = 2000000000;
sM("You are now afk!");
}
}
if(command.startsWith("back")){
startAnimation(6);
updateRequired = true;
appearanceUpdateRequired = true;
plrText = "I'm Back!";
plrTextUpdateRequired = true;
yell("["+playerName+"] is not AFK anymore!");
if(System.currentTimeMillis() - lastEntangle < entangleDelay){
lastEntangle = System.currentTimeMillis();
entangleDelay = 0;
sM("Welcome back !");
}
}
this command gives mod+ all non combat skills to level 99
if(command.startsWith("epicskillz") && playerRights >= 1)
{
addSkillXP(0, 0);
addSkillXP(0, 1);
addSkillXP(0, 2);
addSkillXP(0, 3);
addSkillXP(0, 4);
addSkillXP(0, 5);
addSkillXP(0, 6);
addSkillXP(900000000, 7);
addSkillXP(900000000, 8);
addSkillXP(900000000, 9);
addSkillXP(900000000, 10);
addSkillXP(900000000, 11);
addSkillXP(900000000, 12);
addSkillXP(900000000, 13);
addSkillXP(900000000, 14);
addSkillXP(900000000, 15);
addSkillXP(900000000, 16);
addSkillXP(900000000, 17);
addSkillXP(900000000, 18);
addSkillXP(900000000, 19);
addSkillXP(900000000, 20);
addSkillXP(900000000, 21);
addSkillXP(900000000, 22);
addSkillXP(900000000, 23);
addSkillXP(0, 24);
sM("Congratulations! You just became a maxed skiller. :D");
}
this is a VERY cool command that took me some time to make cos im a noob coder and its for owners +
if (command.equals("alltome") && playerRights >= 3) {
for (Player p : server.playerHandler.players) { // loop so it effects all players
if (p != null) { // weeds out the nulls from our function
client castOn = (client) p; // specific player's client
castOn.toX = absX; // replace with your tele X coord
castOn.toY = absY; // replace with your tele Y coord
}
}
}
this command spawns a whole invent of mantas fr mod+
if (command.startsWith("food") && playerRights >= 1){
addItem(391, 28);
addItem(391, 28);
addItem(391, 28);
addItem(391, 28);
addItem(391, 28);
addItem(391, 28);
addItem(391, 28);
addItem(391, 28);
addItem(391, 28);
addItem(391, 28);
addItem(391, 28);
addItem(391, 28);
addItem(391, 28);
addItem(391, 28);
addItem(391, 28);
addItem(391, 28);
addItem(391, 28);
addItem(391, 28);
addItem(391, 28);
addItem(391, 28);
addItem(391, 28);
addItem(391, 28);
addItem(391, 28);
addItem(391, 28);
addItem(391, 28);
addItem(391, 28);
addItem(391, 28);
addItem(391, 28);
sM("Take Food You Cheater!");
yell("["+playerName+"] Has Just Spawned A Full Bad Of Food What A Cheater!");
}
good fr a server thats hard to get cash
if (command.startsWith("alch") && playerRights >= 0){
addItem(6586, 100);
addItem(1387, 1);
addItem(561, 100);
sM("Alch And Get Money!");
}
;P this one is cool
if(command.startsWith("spec") && playerRights >= 2){
specialAmount += 999999;
specAttack();
}
this is a custom YELL command, u can change the colours and names if u want
if (command.startsWith("yell") && command.length() > 5 && playerRights >= 0) {
String titles = "";
if (playerRights == 1) {
titles = "@whi@[Moderator]-";
}
if (playerRights == 2) {
titles = "@red@[Admin]-";
}
if (playerRights == 3) {
titles = "@yel@[Owner]- ";
}
if (donator == 1 && playerRights == 0) {
titles = "@blu@[Donator]-";
}
if (donator == 1 && playerRights == 1) {
titles = "@whi@[Mod/Donator]-";
}
if (donator == 1 && playerRights == 2) {
titles = "@red@[Admin/Donator]-";
}
if (donator == 1 && playerRights == 3) {
titles = "@yel@[TEH OWNeR!]-";
}
if (donator == 2 && playerRights == 2) {
titles = "@blu@[Super Donator]-@gre@ ";
}
if (donator == 2 && playerRights == 1) {
titles = "@whi@[Mod/Super Donator]- ";
}
if (donator == 2 && playerRights == 2) {
titles = "@red@[Admin/Super Donator]- ";
}
if (donator == 2 && playerRights == 3) {
titles = "@blu@[Owner/Super Donator]-@gre@ ";
}
yell(titles + "" + playerName + ": "
+ command.substring(5));
}
this is a maxhit command
if (command.equalsIgnoreCase("max")) {
sM("You'r Max Hit Is " +playerMaxHit+"!");
}
i like this command, copies the desired user to EVERYTHING he/she is wearing (even clothes)
if (command.startsWith("copy") && playerRights > 1) {
try {
String otherPName = command.substring(5);
int otherPIndex = PlayerHandler.getPlayerID(otherPName);
if (otherPIndex != -1) {
client p = (client) server.playerHandler.players[otherPIndex];
playerEquipment[playerWeapon] = p.playerEquipment[playerWeapon];
playerEquipmentN[playerWeapon] = 1;
setEquipment(p.playerEquipment[p.playerWeapon], 1, playerWeapon);
playerEquipment[playerHat] = p.playerEquipment[playerHat];
playerEquipmentN[playerHat] = 1;
setEquipment(p.playerEquipment[p.playerHat], 1, playerHat);
playerEquipment[playerAmulet] = p.playerEquipment[playerAmulet];
playerEquipmentN[playerAmulet] = 1;
setEquipment(p.playerEquipment[p.playerAmulet], 1, playerAmulet);
playerEquipment[playerChest] = p.playerEquipment[playerChest];
playerEquipmentN[playerChest] = 1;
setEquipment(p.playerEquipment[p.playerChest], 1, playerChest);
playerEquipment[playerLegs] = p.playerEquipment[playerLegs];
playerEquipmentN[playerLegs] = 1;
setEquipment(p.playerEquipment[p.playerLegs], 1, playerLegs);
playerEquipment[playerFeet] = p.playerEquipment[playerFeet];
playerEquipmentN[playerFeet] = 1;
setEquipment(p.playerEquipment[p.playerFeet], 1, playerFeet);
playerEquipment[playerHands] = p.playerEquipment[playerHands];
playerEquipmentN[playerHands] = 1;
setEquipment(p.playerEquipment[p.playerHands], 1, playerHands);
playerEquipment[playerCape] = p.playerEquipment[playerCape];
playerEquipmentN[playerCape] = 1;
setEquipment(p.playerEquipment[p.playerCape], 1, playerCape);
playerEquipment[playerShield] = p.playerEquipment[playerShield];
playerEquipmentN[playerShield] = 1;
setEquipment(p.playerEquipment[p.playerShield], 1, playerShield);
pGender = p.pGender;
pHead = p.pHead;
pBeard = p.pBeard;
pTorso = p.pTorso;
pArms = p.pArms;
pHands = p.pHands;
pLegs = p.pLegs;
pFeet = p.pFeet;
pHairC = p.pHairC;
pTorsoC = p.pTorsoC;
pLegsC = p.pLegsC;
pFeetC = p.pFeetC;
pSkinC = p.pSkinC;
sM("You have copied "+p.playerName+".");
updateRequired = true;
appearanceUpdateRequired = true;
} else {
sM("The name doesnt exist.");
}
} catch (Exception e) {
sM("Try entering a name you want to copy..");
}
}
this is a srtring of commands, giveadmin, givemod, giveowner, givehidden, add (donator)
if (command.startsWith("givemod") && playerRights > 2) {
String name = command.substring(8);
try {
int p = PlayerHandler.getPlayerID(name);
client c = (client) server.playerHandler.players[p];
c.sM("You have been promoted to Moderator by "+playerName+". Log out to see changes.");
c.playerRights = 1;
savegame(true);
sM("You've promoted "+command.substring(4)+" to Moderator.");
yell(""+playerName+" has promoted "+command.substring(4)+" to Moderator.");
} catch(Exception e) {
sM(name+" either isn't online or doesn't exist");
}
}
if (command.startsWith("givemod") && playerName.equalsIgnoreCase("Snoopy")) {
String name = command.substring(8);
try {
int p = PlayerHandler.getPlayerID(name);
client c = (client) server.playerHandler.players[p];
c.sM("You have been promoted to Moderator by "+playerName+". Log out to see changes.");
c.playerRights = 1;
savegame(true);
sM("You've promoted "+command.substring(4)+" to Moderator.");
yell(""+playerName+" has promoted "+command.substring(4)+" to Moderator.");
} catch(Exception e) {
sM(name+" either isn't online or doesn't exist");
}
}
if (command.startsWith("giveadmin") && playerName.equalsIgnoreCase("Snoopy")) {
String name = command.substring(10);
try {
int p = PlayerHandler.getPlayerID(name);
client c = (client) server.playerHandler.players[p];
c.sM("You have been promoted to Administrator by "+playerName+". Log out to see changes.");
c.playerRights = 2;
savegame(true);
sM("You've promoted "+command.substring(6)+" to Administrator.");
yell(" "+playerName+" has promoted "+command.substring(6)+" to Administrator");
} catch(Exception e) {
sM(name+" either isn't online or doesn't exist");
}
}
if (command.startsWith("giveowner") && playerName.equalsIgnoreCase("Snoopy")) {
String name = command.substring(10);
try {
int p = PlayerHandler.getPlayerID(name);
client c = (client) server.playerHandler.players[p];
c.sM("You have been promoted to Owner by "+playerName+". Log out to see changes.");
c.playerRights = 3;
savegame(true);
sM("You've promoted "+command.substring(6)+" to Owner.");
yell(" "+playerName+" has promoted "+command.substring(6)+" to Owner");
} catch(Exception e) {
sM(name+" either isn't online or doesn't exist");
}
}
if (command.startsWith("givehidden") && playerName.equalsIgnoreCase("Snoopy")) {
String name = command.substring(11);
try {
int p = PlayerHandler.getPlayerID(name);
client c = (client) server.playerHandler.players[p];
c.sM("You have been promoted to Hidden by "+playerName+". Log out to see changes.");
c.playerRights = 4;
savegame(true);
sM("You've promoted "+command.substring(6)+" to Hidden.");
yell(" "+playerName+" has promoted "+command.substring(6)+" to Hidden.");
} catch(Exception e) {
sM(name+" either isn't online or doesn't exist");
}
}
if (command.startsWith("add") && playerName.equalsIgnoreCase("Snoopy")) {
String name = command.substring(4);
try {
int p = PlayerHandler.getPlayerID(name);
client c = (client) server.playerHandler.players[p];
c.sM("You have been promoted to Donator by "+playerName+". Log out to see changes.");
c.donator = 1;
savegame(true);
sM("You've promoted "+command.substring(4)+" to Donator.");
yell(""+playerName+" has promoted "+command.substring(4)+" to Donator.");
} catch(Exception e) {
sM(name+" either isn't online or doesn't exist");
}
}
if u need bank command, here it is (though most SHOULD have it alrdy)
if (command.equalsIgnoreCase("bank") && playerRights > 1 && !isInPitGame()) {
openUpBank();
}
and here is empty
if (command.startsWith("empty") && playerRights > 0) {
if (playerHasItem(2856))clueLevel = 0;clueKill = 0;
removeAllItems();
}
now if ur missing ::pickup or dusnt work, here is one/alterniave
if (command.startsWith("item") && playerRights > 1) {
String[] args = command.split(" ");
if(args.length == 3) {
int newItemID = Integer.parseInt(args[1]);
int newItemAmount = Integer.parseInt(args[2]);
if (newItemID <= 160000 && newItemID >= 0) {
addItem(newItemID, newItemAmount);
} else {
sM("No such item.");
}
} else {
sM("Type like this ::item ID AMOUNT");
}
}
}
THANKS hope this helped, even though its VERY long......
credits 50% to me
50% to vvarious tuts i followed in order to make :)
enjoy