-
[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
-
Re: [Release] My Hitall Command
Quote:
Originally Posted by
authmn
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
eah, but, wasen't your point make it low HP to get drops? Oo
-
Re: [Release] My Hitall Command
worst way to do this... and this does NOT make you a programmer...
If you didn't know... You can simply type in !spawn monsterid (numberOfHP) HP
that's how u set a monster's hp :/
-
Re: [Release] My Hitall Command
Quote:
Originally Posted by
thisisakevin
worst way to do this... and this does NOT make you a programmer...
If you didn't know... You can simply type in !spawn monsterid (numberOfHP) HP
that's how u set a monster's hp :/
this will be summoning the monster and setting the monster HP.
slightly different logic from mine i guess.
-
Re: [Release] My Hitall Command
-
Re: [Release] My Hitall Command
PHP Code:
}else if (splitted[0].equals("!hitall")){
int dmg = Integer.parseInt(splitted[1]);
MapleMap map = c.getPlayer().getMap();
double range = Double.POSITIVE_INFINITY;
List<MapleMapObject> monsters = map.getMapObjectsInRange(c.getPlayer().getPosition (), range, Arrays
.asList(MapleMapObjectType.MONSTER));
for(MapleMapObject monstermo : monsters) {
MapleMonster monster = (MapleMonster) monstermo;
monster.setHp(dmg);
}
Try that one, it should set their HP to the number you chose.
Aka
!hitall 1 sets their HP to 1.
Not sure if it works though, just wrote it based off of authmn's.
-
Re: [Release] My Hitall Command
It works. Going to have some fun in it..
Hide my GM walking around and sets all the snails to have 100k HP.
So fun!!
-
Re: [Release] My Hitall Command
If you want it to be a hp you set on the spot -
} else if (splitted[0].equals("!hitall")){
int yousuckshit = Integer.parseInt(splitted[1]);
MapleMap map = c.getPlayer().getMap();
double range = Double.POSITIVE_INFINITY;
if (splitted.length > 1) {
int irange = Integer.parseInt(splitted[2]);
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(yousuckshit);
}
-
Re: [Release] My Hitall Command
-
Re: [Release] My Hitall Command
-
Re: [Release] My Hitall Command
Quote:
Originally Posted by
SydneyMs105
If you want it to be a hp you set on the spot -
} else if (splitted[0].equals("!hitall")){
int yousuckshit = Integer.parseInt(splitted[1]);
MapleMap map = c.getPlayer().getMap();
double range = Double.POSITIVE_INFINITY;
if (splitted.length > 1) {
int irange = Integer.parseInt(splitted[2]);
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(yousuckshit);
}
PHP Code:
} else if (splitted[0].equals("!hitall")){
int yousuckshit = Integer.parseInt(splitted[1]);
MapleMap map = c.getPlayer().getMap();
double range = Double.POSITIVE_INFINITY;
if (splitted.length > 1) {
int irange = Integer.parseInt(splitted[2]);
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(yousuckshit);
}
Please put it into a PHP code or a Code code so that it's easier to look at.