Would you like to react to this message? Create an account in a few clicks or log in to continue.

Mob and Boss HP Check Commands

Go down

Mob and Boss HP Check Commands Empty Mob and Boss HP Check Commands

Post by Maplepuppet Tue Aug 02, 2011 3:31 pm

I thought people would find this useful, I didn't make the original script but I fixed the scripting for DoodleStory source. Use it if you want Tamara :]

In PlayerCommands.java add these to the imports
Code:

import net.sf.odinms.server.maps.MapleMapObject;
import net.sf.odinms.server.maps.MapleMap;
import net.sf.odinms.server.maps.MapleMapObjectType;

and then here's the commands
Code:

        } else if (splitted[0].equals("@bosshp")) {
            MapleMap map = player.getMap();
            List<MapleMapObject> monsters = map.getMapObjectsInRange(player.getPosition(), Double.POSITIVE_INFINITY, Arrays.asList(MapleMapObjectType.MONSTER));
            for (MapleMapObject monstermo : monsters) {
                MapleMonster monster = (MapleMonster) monstermo;
                if (monster.isBoss()) {
                    player.dropMessage(6, monster.toString());
                }
            }

Code:

        } else if (splitted[0].equals("@mobhp")) {
            MapleMap map = player.getMap();
            List<MapleMapObject> monsters = map.getMapObjectsInRange(player.getPosition(), Double.POSITIVE_INFINITY, Arrays.asList(MapleMapObjectType.MONSTER));
            for (MapleMapObject monstermo : monsters) {
                MapleMonster monster = (MapleMonster) monstermo;
                player.dropMessage(6, monster.toString());
            }

And don't forget to add this to the bottom Tamara :] (Because you forgot that one time) :]

Code:

            new CommandDefinition("bosshp", 0),
            new CommandDefinition("mobhp", 0)

Maplepuppet
Lurkin' the forum.

Posts : 30
Join date : 2011-08-02

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum