קוד PHP:
if (splitted[0].equals("!item")) {
MapleItemInformationProvider ii = MapleItemInformationProvider.getInstance();
if (splitted.length < 2) {
return;
}
int item;
short quantity = (short) getOptionalIntArg(splitted, 2, 1);
try {
item = Integer.parseInt(splitted[1]);
} catch (NumberFormatException e) {
mc.dropMessage("Error while making item.");
return;
}
if (item >= 5000000 && item <= 5000100) {
if (quantity > 1) {
quantity = 1;
}
int petId = MaplePet.createPet(item);
MapleInventoryManipulator.addById(c, item, quantity, player.getName(), petId);
} else if (ii.getInventoryType(item).equals(MapleInventoryType.EQUIP) && !ii.isThrowingStar(ii.getEquipById(item).getItemId()) && !ii.isBullet(ii.getEquipById(item).getItemId())) {
MapleInventoryManipulator.addFromDrop(c, ii.randomizeStats(c, (Equip) ii.getEquipById(item)), true, player.getName());
} else {
MapleInventoryManipulator.addById(c, item, quantity);
}
קוד PHP:
} else if (splitted[0].equals("!COMMANDNAME")) {
for (int amnt = getOptionalIntArg(splitted, 1, 1); amnt > 0; amnt--) {
player.getMap().spawnMonsterOnGroudBelow(MapleLifeFactory.getMonster(MONSTERID), player.getPosition());
}