- Joined
- Jun 29, 2008
- Messages
- 12
- Reaction score
- 0
Simple command to warp everyone in your map to a Map ID of your choice. It was suggested by a friend of mine, figured I'd put it here.
As requested, the same function with actual map names (Untested):
Code:
} else if (splitted[0].equals("!warpmap")) {
for (MapleCharacter mch : c.getPlayer().getMap().getCharacters()) {
if (mch != null) {
int mapid = Integer.parseInt(splitted[1]);
MapleMap target = ChannelServer.getInstance(c.getChannel()).getMapFactory().getMap(mapid);
mch.changeMap(target, target.getPortal(0));
}
}
As requested, the same function with actual map names (Untested):
Code:
} else if (splitted[0].equals("!mapgoto")) {
int[] gotomapid = {
180000000, //GmMap
60000, //Southperry
1010000, //Amherst
100000000, //henesys
101000000, //ellinia
102000000, //perion
103000000, //kerning
104000000, //lith
105040300, //sleepywood
110000000, //florina
200000000, //orbis
209000000, //happy
211000000, //elnath
220000000, //ludi
230000000, //aqua
240000000, //leafre
250000000, //mulung
251000000, //herb
221000000, //omega
222000000, //korean (Folk Town)
600000000, //nlc (New Leaf City)
990000000, //excavation (Sharenian/Excavation Site)
230040420, //Pianus cave
240060200, //Horned Tail's cave
100000005, //Mushmom
240020101, //Griffey
240020401, //Manon
682000001, //Headless Horseman
105090900, //Jr.Balrog
280030000, //Zakum's Altar
220080001, //Papulatus map
801000000, //showa Town
200000301, //Guild HeadQuarters
800000000, //Shrine (Mushroom Shrine)
910000000, //Free Market Entrance
240040511, //Skelegon map (Leafre)
109020001, //PVP map (Quiz X and O)
};
String[] gotomapname = {
"gmmap",
"southperry",
"amherst",
"henesys",
"ellinia",
"perion",
"kerning",
"lith",
"sleepywood",
"florina",
"orbis",
"happy",
"elnath",
"ludi",
"aqua",
"leafre",
"mulung",
"herb",
"omega",
"korean",
"nlc",
"excavation",
"pianus",
"horntail",
"mushmom",
"griffey",
"manon",
"horseman",
"balrog",
"zakum",
"papu",
"showa",
"guild",
"shrine",
"fm",
"skelegon",
"pvp"
};
if (splitted.length < 2) { //If no arguments, list options.
mc.dropMessage("Syntax: !goto <mapname> <optional_target>, where target is char name and mapname is one of:");
mc.dropMessage("gmmap, southperry, amherst, henesys, ellinia, perion, kerning, lith, sleepywood, florina,");
mc.dropMessage("orbis, happy, elnath, ludi, aqua, leafre, mulung, herb, omega, korean, nlc, excavation, pianus");
mc.dropMessage("horntail, mushmom, griffey, manon, horseman, balrog, zakum, papu, showa, guild, shrine, fm, skelegon, pvp");
} else {
for (int i = 0; gotomapid[i] != 0 && gotomapname[i] != null; ++i) {
if (splitted[1].equals(gotomapname[i])) {
MapleMap target = cserv.getMapFactory().getMap(gotomapid[i]);
MaplePortal targetPortal = target.getPortal(0);
for (MapleCharacter mch : c.getPlayer().getMap().getCharacters()) {
mch.changeMap(target, targetPortal);
}
}
}
}
Last edited: