I have no idea what you want npcid and itemid to doCode:case "npc": Mob mob = new Mob(Integer.parseInt(args[1]), true, new Location(player.getLocation())); player.send(new SendMessage("Spawned NPC index: " + mob.getIndex())); return true;
|
Hey i realize you can just get any of these commands from any simple server, but mine is a bit different, it's in a format like this.
case "item":
if (parser.hasNext()) {
int id = parser.nextInt();
int amount = 1;
if (parser.hasNext()) {
long temp = Long.parseLong(parser.nextString().toLowerCase().r eplaceAll("k", "000").replaceAll("m", "000000").replaceAll("b","000000000"));
if (temp > Integer.MAX_VALUE) {
amount = Integer.MAX_VALUE;
} else {
amount = (int) temp;
}
}
if (player.inWGGame()) {
return true;
}
player.getInventory().add(id, amount);
ItemDefinition def = GameDefinitionLoader.getItemDef(id);
player.send(new SendMessage("You have spawed x@red@" + Utility.format(amount) + "</col> of the item @red@" + def.getName() + "</col>."));
}
return true;
I have no idea what you want npcid and itemid to doCode:case "npc": Mob mob = new Mob(Integer.parseInt(args[1]), true, new Location(player.getLocation())); player.send(new SendMessage("Spawned NPC index: " + mob.getIndex())); return true;
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |