Commands Script's
If you don't know how to edit the commands read Pixie Tutorial befor.
Commands:
Spawn Npc (In-Game)
Code:
if (command.startsWith("npc") && playerRights >= 2) {
try
{
int newNPC = Integer.parseInt(command.substring(4));
if (newNPC >= 0)
{
server.npcHandler.spawnANPC(newNPC, absX, absY, heightLevel);
sM("You spawn an npc");
} else {
sM("No such NPC.");
}
} catch(Exception e) {
sM("Wrong Syntax! Use as ::npc 1");
}
}
Brb (Do Brb and back When back) << THIS IS AWESOME
Code:
if (command.startsWith("brb")) {
startAnimation(1353);
updateRequired = true;
appearanceUpdateRequired = true;
plrText = "Brb";
plrTextUpdateRequired = true;
}
if (command.startsWith("back")) {
startAnimation(1);
updateRequired = true;
appearanceUpdateRequired = true;
plrText = "Back";
plrTextUpdateRequired = true;
}
Teleport Command:
Yellow: Command
Orange: Rights
Lime: Extra
Magenta: Coordinates
Code:
if(command.startsWith("MyPlace") && playerRights >= 0) {
if(wildyLevel > 20 && isInWilderness(absX, absY, 1)){
sM("You cannot teleport above level 20 wilderness!");
} else { // It say it self...
toX = 2000;
toY = 2000;
sM("Here U can put a Message! :P");
resetfollowers();
}
}