a little fix for HT death animation and ppl who use SBossMapMonitor

Status
Not open for further replies.
Newbie Spellweaver
Joined
Jul 12, 2008
Messages
55
Reaction score
0
when i was designing the SBossMapMonitor.java back in odinms forums, my onli goal is to get the animation out.it seem like i miss out the HT drops, well actually i killed all monster which include mob 8810018 which is essential for the animation, with drop disable(kinda like using the killall command).

so heres a little fix for my silly mistake.

in SBossMapMonitor.java
change
PHP:
                //special event happen
                map.killAllMonster();

to this
PHP:
                //special event happen
                map.killAllMonster(true);

in MapleMap.java
find this
PHP:
   public void killAllMonster()
   {
      List<MapleMapObject> monsters = getMapObjectsInRange(new Point(0,0), Double.POSITIVE_INFINITY, Arrays
                    .asList(MapleMapObjectType.MONSTER));
            for (MapleMapObject monstermo : monsters) {
                MapleMonster monster = (MapleMonster) monstermo;
                    spawnedMonstersOnMap.decrementAndGet();
                    monster.setHp(0);
                    broadcastMessage(MaplePacketCreator.killMonster(monster.getObjectId(), true), monster.getPosition());
                    removeMapObject(monster);                    
            }
   }

add this below it
PHP:
   public void killAllMonster(boolean drop)
   {
      List<MapleMapObject> players=null;
      if(drop)players=getAllPlayer();
      List<MapleMapObject> monsters = getMapObjectsInRange(new Point(0,0), Double.POSITIVE_INFINITY, Arrays
                    .asList(MapleMapObjectType.MONSTER));
            for (MapleMapObject monstermo : monsters) {
                MapleMonster monster = (MapleMonster) monstermo;
                    spawnedMonstersOnMap.decrementAndGet();
                    monster.setHp(0);
                    broadcastMessage(MaplePacketCreator.killMonster(monster.getObjectId(), true), monster.getPosition());
                    removeMapObject(monster);
                    if(drop)
                    {
                        int random=(int)(Math.random()*(playerCount()-0))+0;
                        dropFromMonster((MapleCharacter)players.get(random), monster);
                    }
            }       
   }

EDIT i miss out this
add this below it too
PHP:
    private List<MapleMapObject> getAllPlayer()
    {        
      return getMapObjectsInRange(new Point(0,0), Double.POSITIVE_INFINITY, Arrays
                    .asList(MapleMapObjectType.PLAYER));
    }

==========================================================================
EDIT: donehttp://forum.ragezone.com/showthread.php?t=439230

the section below here is concern abt further development/improvement mainly on the design issue
dun bother with this if u could;t help

and i was thinking abt re-defining SBossMapMonitor such that it will monitor zakum arms as well(to control whether zakum can attack) in fact any boss that comes in parts.

so it might include a enum which look like this
PHP:
public enum type{ZAKUM,HORNTAIL}

HORNTAIL type- monitor the map for the existence of dead parts, once all dead part exist, kill all monster(currently used)
ZAKUM type- monitor the map for the existence of all arms,if all arms exist, make zakum body stop attacking ppl or taking dmg

if anyone has a better design let mi noe.
let me noe the following as well
if u noe how to make a monster freeze/or stop doing anything
 
Last edited:
Re: [Release]a little fix for HT death animation and ppl who use SBossMapMonitor

Wow thanks for the release gona test this out :D
btw sorry for being noob but where do i add this?
PHP:
public enum type{ZAKUM,HORNTAIL}
 
Re: [Release]a little fix for HT death animation and ppl who use SBossMapMonitor

Wow thanks for the release gona test this out :D
btw sorry for being noob but where do i add this?
PHP:
public enum type{ZAKUM,HORNTAIL}

well that is for my further development(maybe not doing it) as explained in the first post

so u dun really nid to bother with that now,its for ppl who noe abt defining a java class (design issue)
 
Re: [Release]a little fix for HT death animation and ppl who use SBossMapMonitor

Ahh i see okay thanks :) oh btw about making 8810018 as a boss mob, how do i do that ? im using XML wz files.
 
Re: [Release]a little fix for HT death animation and ppl who use SBossMapMonitor

Ahh i see okay thanks :) oh btw about making 8810018 as a boss mob, how do i do that ? im using XML wz files.

u edit the xml files.
the server i used for developing is not using xml files.im using pure wz (this requires additional coding which make the class design to be crappy(like only meant for 1 monster which is pretty stupid))

im pretty sure someone else here will tell u how to go abt doing it.
 
Re: [Release]a little fix for HT death animation and ppl who use SBossMapMonitor

i have a problem with this

Code:
if(drop)players=getAllPlayer();
 
Re: [Release]a little fix for HT death animation and ppl who use SBossMapMonitor

i have a problem with this

Code:
if(drop)players=getAllPlayer();

sry i miss out this. always happen to me

below this
PHP:
public void killAllMonster(boolean drop)
{
....
}

add
PHP:
    private List<MapleMapObject> getAllPlayer()
    {        
      return getMapObjectsInRange(new Point(0,0), Double.POSITIVE_INFINITY, Arrays
                    .asList(MapleMapObjectType.PLAYER));
    }
 
Re: [Release]a little fix for HT death animation and ppl who use SBossMapMonitor

sry i miss out this. always happen to me

below this
PHP:
public void killAllMonster(boolean drop)
{
....
}
add
PHP:
    private List<MapleMapObject> getAllPlayer()
    {        
      return getMapObjectsInRange(new Point(0,0), Double.POSITIVE_INFINITY, Arrays
                    .asList(MapleMapObjectType.PLAYER));
    }
thanks!
anyway..if i delete that part,will it affect the Ht?
 
Re: [Release]a little fix for HT death animation and ppl who use SBossMapMonitor

Code:
init:
deps-jar:
Compiling 1 source file to C:\Documents and Settings\Kylie\Desktop\AlpheusMS V4 - Copy\AlpheusMS V2\AlpheusMS V2\dist\build\classes
C:\Documents and Settings\Kylie\Desktop\AlpheusMS V4 - Copy\AlpheusMS V2\AlpheusMS V2\src\net\sf\odinms\server\maps\MapleMap.java:609: cannot find symbol
symbol  : method getPosition()
location: class net.sf.odinms.server.life.SpawnPoint
                spawnMonsterOnGroudBelow(mob, sp.getPosition());
                                                ^
C:\Documents and Settings\Kylie\Desktop\AlpheusMS V4 - Copy\AlpheusMS V2\AlpheusMS V2\src\net\sf\odinms\server\maps\MapleMap.java:820: cannot find symbol
symbol  : method boatArrivePacket()
location: class net.sf.odinms.tools.MaplePacketCreator
                            chr.getClient().getSession().write((MaplePacketCreator.boatArrivePacket()));
                                                                                  ^
2 errors
BUILD FAILED (total time: 6 seconds)
Could u help me out with these errors ?
 
Re: [Release]a little fix for HT death animation and ppl who use SBossMapMonitor

Code:
init:
deps-jar:
Compiling 1 source file to C:\Documents and Settings\Kylie\Desktop\AlpheusMS V4 - Copy\AlpheusMS V2\AlpheusMS V2\dist\build\classes
C:\Documents and Settings\Kylie\Desktop\AlpheusMS V4 - Copy\AlpheusMS V2\AlpheusMS V2\src\net\sf\odinms\server\maps\MapleMap.java:609: cannot find symbol
symbol  : method getPosition()
location: class net.sf.odinms.server.life.SpawnPoint
                spawnMonsterOnGroudBelow(mob, sp.getPosition());
                                                ^
C:\Documents and Settings\Kylie\Desktop\AlpheusMS V4 - Copy\AlpheusMS V2\AlpheusMS V2\src\net\sf\odinms\server\maps\MapleMap.java:820: cannot find symbol
symbol  : method boatArrivePacket()
location: class net.sf.odinms.tools.MaplePacketCreator
                            chr.getClient().getSession().write((MaplePacketCreator.boatArrivePacket()));
                                                                                  ^
2 errors
BUILD FAILED (total time: 6 seconds)
Could u help me out with these errors ?

those are errors not cause by the code i posted, u might have miss a brace or something

thanks!
anyway..if i delete that part,will it affect the Ht?

which part?
 
Re: [Release]a little fix for HT death animation and ppl who use SBossMapMonitor

Anyone can post the SBossMapMonitor.java? Clean one or something.. I don't even have it.
 
Re: [Release]a little fix for HT death animation and ppl who use SBossMapMonitor

anyway..do u have a fix for reactor or something?
 
Re: [Release]a little fix for HT death animation and ppl who use SBossMapMonitor

i get this error
init:
deps-jar:
Compiling 1 source file to C:\Documents and Settings\David H\Desktop\SeanPack v5.9 Beta\build\classes
C:\Documents and Settings\David H\Desktop\SeanPack v5.9 Beta\SeanSource V.5.9\src\net\sf\odinms\server\maps\SBossMapMonitor.java:84: killAllmonster() in net.sf.odinms.server.maps.MapleMap cannot be applied to (boolean)
map.killAllmonster(true);
1 error
BUILD FAILED (total time: 1 second)
 
Status
Not open for further replies.
Back