[Release] My Hitall Command
I tried to find this command, but seems there is nothing in the forum.
therefore, i created this simple command from the !killall command.
What this command do is set all the monsters in the map to be a certain HP.
I think this is better than just Killing the monster, as we wont get any drops
}else if (splitted[0].equals("!hitall")){
MapleMap map = c.getPlayer().getMap();
double range = Double.POSITIVE_INFINITY;
if (splitted.length > 1) {
int irange = Integer.parseInt(splitted[1]);
range = irange * irange;
}
List<MapleMapObject> monsters = map.getMapObjectsInRange(c.getPlayer().getPosition(), range, Arrays
.asList(MapleMapObjectType.MONSTER));
for(MapleMapObject monstermo : monsters) {
MapleMonster monster = (MapleMonster) monstermo;
monster.setHp(10000);
}
Re: [Release] My Hitall Command
There is a fix to make killall command gives exp and drop anyway Good Job
Re: [Release] My Hitall Command
yah dun want ppl to keep calling me leecher.
at least this shows i am a programmer :)
Re: [Release] My Hitall Command
PHP Code:
}else if (splitted[0].equals("!hitall")){
MapleMap map = c.getPlayer().getMap();
double range = Double.POSITIVE_INFINITY;
if (splitted.length > 1) {
int irange = Integer.parseInt(splitted[1]);
range = irange * irange;
}
List<MapleMapObject> monsters = map.getMapObjectsInRange(c.getPlayer().getPosition (), range, Arrays
.asList(MapleMapObjectType.MONSTER));
for(MapleMapObject monstermo : monsters) {
MapleMonster monster = (MapleMonster) monstermo;
monster.setHp(10000);
}
So basically, you just set the monsters HP to 10k?
Re: [Release] My Hitall Command
Nice job. Thanks for sharing
Re: [Release] My Hitall Command
where do we put
}else if (splitted[0].equals("!hitall")){
MapleMap map = c.getPlayer().getMap();
double range = Double.POSITIVE_INFINITY;
if (splitted.length > 1) {
int irange = Integer.parseInt(splitted[1]);
range = irange * irange;
}
List<MapleMapObject> monsters = map.getMapObjectsInRange(c.getPlayer().getPosition (), range, Arrays
.asList(MapleMapObjectType.MONSTER));
for(MapleMapObject monstermo : monsters) {
MapleMonster monster = (MapleMonster) monstermo;
monster.setHp(10000);
}
o_0
Re: [Release] My Hitall Command
@HydroBenZ : U can set the HP to whatever number that you like. To make it more challenging, u can change it to 1 million.
@Rick: this is a command... so u put it in commandprocessor?
Re: [Release] My Hitall Command
She has a point there.
All scripts for Private Servers INCLUDING NPCs = JavaSCRIPT <---Edit
=P
Re: [Release] My Hitall Command
Quote:
Originally Posted by
HydroBenZ
She has a point there.
All scripts for Private Servers INCLUDING NPCs = Java
=P
HE has a point, and NPC scripting is not java its JavaScript
COMPLETELY DIFFERNT CODING TYPES
Re: [Release] My Hitall Command
Quote:
Originally Posted by
Clysse
HE has a point, and NPC scripting is not java its JavaScript
COMPLETELY DIFFERNT CODING TYPES
Oops, my bad
forgot
.js = java script =P
Re: [Release] My Hitall Command
This could be usefull during an event. set it to like 2b and summon snails.
Re: [Release] My Hitall Command
Re: [Release] My Hitall Command
thanks all for the good and bad feedbacks :)
Re: [Release] My Hitall Command
So, you put !hitall, and mosnter have 10,000HP, plus, If i'm not wrong, it's !hitall <range> =/
btw, 10k is a lot.
Re: [Release] My Hitall Command
Quote:
Originally Posted by
XxOsirisxX
So, you put !hitall, and mosnter have 10,000HP, plus, If i'm not wrong, it's !hitall <range> =/
btw, 10k is a lot.
You can make snails having 10k hp or even 100k Hp, that will be fun.
Or u can make horntail having only 10 HP, the number can be changed