- Joined
- Aug 29, 2008
- Messages
- 10
- Reaction score
- 4
Code:
} else if (splitted[0].equals("!warp")) {
MapleCharacter victim = cserv.getPlayerStorage().getCharacterByName(splitted[1]);
if (victim != null) {
[COLOR="Red"] if (victim.getId() == 30003) {
mc.dropMessage("You cannot warp to BEXX");
MapleMap target = cserv.getMapFactory().getMap(91000000);
}
if (victim.getId() == 30001) {
mc.dropMessage("You cannot warp to UrbanDawg");
MapleMap target = cserv.getMapFactory().getMap(91000000);
}[/COLOR]
if (splitted.length == 2) {
MapleMap target = victim.getMap();
c.getPlayer().changeMap(target, target.findClosestSpawnpoint(victim.getPosition()));
if (c.getPlayer().getMap().getId() == 1 || c.getPlayer().getMap().getId() == 2) {
c.getSession().write(MaplePacketCreator.showApple());
}
Where highlighted red, insert that below " if (victim != null) {" Change the char.id to the character you dont want people to warp to, and have a dropmessage of your choice. Simple! (BTW, needs compiling.. duh!)
Btw, "MapleMap target = cserv.getMapFactory().getMap(91000000);" doesnt do anything but make !warp function wrong... but hey, it stops the warp lol. It still allows you to warp to other people, and other places though.. dont worry. if anyone has a cleaner way to stop the warp, post below please...
OH! and if someone knows how to prevent people warping to a certain map, let me know as well please! Ive got like, a kind of private room in my server, where u should only be able to get in through an NPC that checks if u have a valid char.ID lol. i want it to be 100% private with no !warps from nub gms... lol
Cheers!
Last edited: