Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

How to add some a GM exception and a range for the command in the post?

Newbie Spellweaver
Joined
Apr 11, 2017
Messages
28
Reaction score
0
HELLO!

So, I've been trying to edit the TiredStory source to my liking and I'm like so freaking fresh at Java. So, the questions I may ask now are probably so stupid but please bear with me <3


1. How do I add a feature to this !killnear command where it does not affect GMs and is there anyway I can control it's range to be suitable to use in tag.

Code:
} else if (splitted[0].equals("killnear")) { 
             MapleMap map = player.getMap(); 
             List<MapleMapObject> players = map.getMapObjectsInRange(player.getPosition(), (double) 50000, Arrays.asList(MapleMapObjectType.PLAYER));
             for (MapleMapObject closeplayers : players) { 
             MapleCharacter playernear = (MapleCharacter) closeplayers;
             if (playernear.isAlive() && playernear != player);
             playernear.setHp(0);
             playernear.updateSingleStat(MapleStat.HP, 0);
             playernear.dropMessage(6, "You were too close to a GM.");            }


Thank you in advance,
akh01999~
 
Back
Top