PHP Code:
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation. You may not use, modify
or distribute this program under any other version of the
GNU Affero General Public License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package net.sf.odinms.client.messages.commands;
import net.sf.odinms.client.MapleCharacter;
import net.sf.odinms.client.MapleCharacterUtil;
import net.sf.odinms.client.MapleClient;
import net.sf.odinms.client.messages.Command;
import net.sf.odinms.client.messages.CommandDefinition;
import net.sf.odinms.client.messages.IllegalCommandSyntaxException;
import net.sf.odinms.client.messages.MessageCallback;
import net.sf.odinms.server.life.MapleLifeFactory;
import net.sf.odinms.server.life.MapleMonster;
import net.sf.odinms.tools.MaplePacketCreator;
public class EventCommands implements Command {
private int mobid;
public void execute(MapleClient c, MessageCallback mc, String[] splitted) throws Exception, IllegalCommandSyntaxException {
String yo = splitted[0].toLowerCase();
if (yo.equals("!papulatus"))
mobid = 8500001;
else if (yo.equals("!jrbalrog"))
mobid = 8130100;
else if (yo.equals("!balrog"))
mobid = 8150000;
else if (yo.equals("!mushmom"))
mobid = 6130101;
else if (yo.equals("!undeadmushmom"))
mobid = 6300005;
else if (yo.equals("!bluemushmom"))
mobid = 9400205;
else if (yo.equals("!theboss"))
mobid = 9400300;
else if (yo.equals("!shark"))
mobid = 8150100;
else if (yo.equals("!pianus"))
mobid = 8510000;
else
mobid = 0;
if (mobid != 0) {
MapleMonster mob = MapleLifeFactory.getMonster(mobid);
c.getPlayer().getMap().spawnMonsterOnGroundBelow(mob, c.getPlayer().getPosition());
}
if (splitted[0].equals("!nxslimes")) {
for (int i = 0; i <= 10; i++) {
MapleMonster mob = MapleLifeFactory.getMonster(9400202);
c.getPlayer().getMap().spawnMonsterOnGroundBelow(mob, c.getPlayer().getPosition());
}
} else if (splitted[0].equals("!bossfamily")) {
for (int i = 9400100; i <= 9400103; i++) {
MapleMonster mob0 = MapleLifeFactory.getMonster(i);
c.getPlayer().getMap().spawnMonsterOnGroundBelow(mob0, c.getPlayer().getPosition());
}
for (int i = 9400110; i <= 9400113; i++) {
MapleMonster mob2 = MapleLifeFactory.getMonster(i);
c.getPlayer().getMap().spawnMonsterOnGroundBelow(mob2, c.getPlayer().getPosition());
}
for (int i = 9400121; i <= 9400122; i++) {
MapleMonster mob2 = MapleLifeFactory.getMonster(i);
c.getPlayer().getMap().spawnMonsterOnGroundBelow(mob2, c.getPlayer().getPosition());
}
MapleMonster mob3 = MapleLifeFactory.getMonster(9400300);
c.getPlayer().getMap().spawnMonsterOnGroundBelow(mob3, c.getPlayer().getPosition());
} else if (splitted[0].equals("!zakum")) {
MapleMonster mob0 = MapleLifeFactory.getMonster(8800000);
c.getPlayer().getMap().spawnFakeMonsterOnGroundBelow(mob0, c.getPlayer().getPosition());
for (int i = 8800003; i <= 8800010; i++) {
MapleMonster mob1 = MapleLifeFactory.getMonster(i);
c.getPlayer().getMap().spawnMonsterOnGroundBelow(mob1, c.getPlayer().getPosition());
}
}
}
@Override
public CommandDefinition[] getDefinition() {
return new CommandDefinition[] {
new CommandDefinition("papulatus", "", "", 5),
new CommandDefinition("nxslimes", "", "", 5),
new CommandDefinition("jrbalrog", "", "", 5),
new CommandDefinition("balrog", "", "", 5),
new CommandDefinition("bossfamily", "", "", 5),
new CommandDefinition("mushmom", "", "", 5),
new CommandDefinition("undeadmushmom", "", "", 5),
new CommandDefinition("bluemushmom", "", "", 5),
new CommandDefinition("theboss", "", "", 5),
new CommandDefinition("shark", "", "", 5),
new CommandDefinition("pianus", "", "", 5),
new CommandDefinition("zakum", "", "", 5),
};
}
}
Have fun.