Bleh, I'm getting bored, so I'm deciding to release some things >_<
The following go into your Command.java if you're using shootsource, Whichever command file in OdinTeh / KryptoDEV that you wanna use, or a command file of your choice.
!event command:
(Note: This was made for the last ShootSource Moogra released. If you want to use it with other sources, add a ! before event, and replace all the sub[0] with splitted[0]
@event Command:
(Same as above, this was also made for the ShootSource that Moogra released. Replace the sub[0] with splitted[0] and add a @ before event to use with other sources)
Add the following in ChannelServer.java
(net>sf>odinms>net>channel>ChannelServer.java) (Other Odin-Based Sources)
(net>channel>ChannelServer.java) (ShootSource)
(org>communication>ChannelServer.java) (KryptoDEV)
Okay, so look for something like this:
And add these three lines below it
Compile, Run, and Knock yourselves out.
The following go into your Command.java if you're using shootsource, Whichever command file in OdinTeh / KryptoDEV that you wanna use, or a command file of your choice.
!event command:
(Note: This was made for the last ShootSource Moogra released. If you want to use it with other sources, add a ! before event, and replace all the sub[0] with splitted[0]
PHP:
else if (sub[0].equals("event")) {
if (sub[1].equalsIgnoreCase("on")) {
if (c.getPlayer().getClient().getChannelServer().eventOn == true) {
player.dropMessage("The event is already running at " +c.getPlayer().getClient().getChannelServer().eventMap);
} else {
if (c.getPlayer().getClient().getChannelServer().eventOn == false) {
int mapid = getOptionalIntArg(sub, 1, c.getPlayer().getMapId());
c.getPlayer().getClient().getChannelServer().eventOn = true;
c.getPlayer().getClient().getChannelServer().eventMap = mapid;
c.getPlayer().getClient().getChannelServer().eventHoster = c.getPlayer().getName();
try {
c.getChannelServer().getWorldInterface().broadcastMessage(null, MaplePacketCreator.sendYellowTip("[Event] An event has started in Channel " + c.getChannel() + " in " + player.getMapId() + "! Use @event to join in!").getBytes());
} catch (RemoteException e) {
c.getChannelServer().reconnectWorld();
}
}
}
} else if (sub[1].equalsIgnoreCase("off")) {
if (c.getPlayer().getClient().getChannelServer().eventOn == false) {
player.dropMessage("There is no event running at the moment.");
} else {
c.getPlayer().getClient().getChannelServer().eventOn = false;
try {
c.getChannelServer().getWorldInterface().broadcastMessage(null, MaplePacketCreator.sendYellowTip("[Event] The event has ended. Please use @event to leave. Thanks to all those who participated.").getBytes());
} catch (RemoteException e) {
c.getChannelServer().reconnectWorld();
}
}
} else if (sub[1].equalsIgnoreCase("status")) {
if (c.getPlayer().getClient().getChannelServer().eventOn = false) {
player.dropMessage("The event is not running.");
} else if (c.getPlayer().getClient().getChannelServer().eventOn = true) {
player.dropMessage("The event is currently running at map "+c.getPlayer().getClient().getChannelServer().eventMap);
player.dropMessage("And is hosted by "+c.getPlayer().getClient().getChannelServer().eventHoster);
}
} else {
player.dropMessage("Syntax Helper: /event on/off/status");
}
}
@event Command:
(Same as above, this was also made for the ShootSource that Moogra released. Replace the sub[0] with splitted[0] and add a @ before event to use with other sources)
PHP:
else if (sub[0].equals("event")) {
if (c.getPlayer().getClient().getChannelServer().eventOn == false) {
MapleMap target = cserv.getMapFactory().getMap(910000000);
MaplePortal targetPortal = target.getPortal(0);
player.changeMap(target, targetPortal);
player.dropMessage("You have been warped out of the event.");
} else {
MapleMap newMap = cserv.getMapFactory().getMap(c.getPlayer().getClient().getChannelServer().eventMap);
MaplePortal newPortal = newMap.getPortal(0);
player.changeMap(newMap, newPortal);
player.dropMessage("You have been warped to the event!");
}
}
Add the following in ChannelServer.java
(net>sf>odinms>net>channel>ChannelServer.java) (Other Odin-Based Sources)
(net>channel>ChannelServer.java) (ShootSource)
(org>communication>ChannelServer.java) (KryptoDEV)
Okay, so look for something like this:
PHP:
private int port = 7575;
private static WorldRegistry worldRegistry;
private PlayerStorage players = new PlayerStorage();
private int channel;
private String key;
private ChannelWorldInterface cwi;
private WorldChannelInterface wci = null;
private IoAcceptor acceptor;
private String ip;
private boolean shutdown = false;
private boolean finishedShutdown = false;
private MapleMapFactory mapFactory;
private EventScriptManager eventSM;
private static Map<Integer, ChannelServer> instances = new HashMap<Integer, ChannelServer>();
private static Map<String, ChannelServer> pendingInstances = new HashMap<String, ChannelServer>();
private Map<Integer, MapleGuildSummary> gsStore = new HashMap<Integer, MapleGuildSummary>();
private Boolean worldReady = true;
private int instanceId = 0;
private Map<MapleSquadType, MapleSquad> mapleSquads = new HashMap<MapleSquadType, MapleSquad>();
And add these three lines below it
PHP:
public boolean eventOn = false;
public int eventMap = 0;
public String eventHoster = null;
Compile, Run, and Knock yourselves out.
Last edited:

