• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

Entire Pink Bean Fight with Statues, and Hp bar

Newbie Spellweaver
Joined
Aug 23, 2009
Messages
8
Reaction score
1
Since Dbz leeched it off my code, I'd thought I'd release it for everyone.

In src.server.life.MapleMonster

Find
Code:
public boolean isBoss() {
        return stats.isBoss() || isHT();
    }
Replace old return with this.
Code:
return stats.isBoss() || isHT()[B] || isPb()[/B];

Find
Code:
public boolean hasBossHPBar() {
        return (isBoss() && getTagColor() > 0) || isHT();
    }
Replace old return with this:
Code:
return (isBoss() && getTagColor() > 0) || isHT() || isPB();
Under that add this:
Code:
private boolean isPB() {
        return (getId() >= 8820010 && getId() <= 8820014);
    }

In src.server.maps.MapleMap

find
Code:
public boolean damageMonster
inside
Code:
if (!monster.isAlive()) {
add
Code:
else if ((monster.getId() >= 8820002 && monster.getId() <= 8820006) || (monster.getId() >= 8820015 && monster.getId() <= 8820018))
                            for (MapleMapObject object : chr.getMap().getMapObjects()) {
                                MapleMonster mons = chr.getMap().getMonsterByOid(object.getObjectId());
                                if (mons != null)
                                    if (mons.getId() >= 8820010 && mons.getId() <= 8820014)
                                        damageMonster(chr, mons, monsterhp);
                            }
after
Code:
if (monster.getId() >= 8810002 && monster.getId() <= 8810009)
                            for (MapleMapObject object : chr.getMap().getMapObjects()) {
                                MapleMonster mons = chr.getMap().getMonsterByOid(object.getObjectId());
                                if (mons != null)
                                    if (mons.getId() == 8810018 || mons.getId() == 8810026)
                                        damageMonster(chr, mons, monsterhp);
                            }
You have to add it right before the closing braket for
Code:
if (!monster.isAlive()) {

Add
Code:
else if ((monster.getId() >= 8820002 && monster.getId() <= 8820006) || (monster.getId() >= 8820015 && monster.getId() <= 8820018))
                        for (MapleMapObject object : chr.getMap().getMapObjects()) {
                            MapleMonster mons = chr.getMap().getMonsterByOid(object.getObjectId());
                            if (mons != null)
                                if (mons.getId() >= 8820010 && mons.getId() <= 8820014)
                                    damageMonster(chr, mons, damage);
                        }
After
Code:
else if (monster.getId() >= 8810002 && monster.getId() <= 8810009)//HT
                        for (MapleMapObject object : chr.getMap().getMapObjects()) {
                            MapleMonster mons = chr.getMap().getMonsterByOid(object.getObjectId());
                            if (mons != null)
                                if (mons.getId() == 8810018 || mons.getId() == 8810026)
                                    damageMonster(chr, mons, damage);
                        }
You have to add it right before the closing bracket for
Code:
if (damage > 0) {

Also add this at the end of MapleMap
Code:
public void spawnPB() {
        killAllMonsters();
        spawnMonsterwithpos(MapleLifeFactory.getMonster(8820009),new Point(7,-42));
    }

Make a new js and add this into it
scripts>map>onFirstUserEnter>PinkBeen_before.js

PHP:
function start(ms) {
        ms.getPlayer().getMap().spawnPB();
}

npc>2141001.js
PHP:
var status = 0;  
	
function start() {  
    status = -1;  
    action(1, 0, 0);  
}  

function action(mode, type, selection) {   
    if (mode == -1) {  
        cm.dispose();  
    }  
    else {   
        if (mode == 0) {      
            cm.dispose();   
            return;   
        }
        if (mode == 1) {
            status++;  
        }      
        else {  
            status--;  
        }  
        if (status == 0) {
		var pbMap = cm.getClient().getChannelServer().getMapFactory().getMap(270050100);
			if (pbMap.getCharacters().size() == 0) {
				cm.sendYesNo("Looks like no one is inside. Would you like to go in?");
			} else { // someone is inside
				for (var i = 0; i < 5; i++) {
					if (pbMap.getMonsterById(8820002 + 1) != null) {
						cm.getPlayer().dropMessage("The fight is already began");
						cm.dispose();
					}
				}
				for (var i = 0; i < 4; i++) {
					if (pbMap.getMonsterById(8820015 + 1) != null) {
						cm.getPlayer().dropMessage("The fight is already began");
						cm.dispose();
					}
				}
					if (pbMap.getMonsterById(8820001) != null) {
						cm.getPlayer().dropMessage("The fight is already began");
						cm.dispose();
					}
				else
				cm.sendYesNo("Looks like the fight hasnt started. Would you like to go in?");
}
        }
        else if (status == 1) {
			cm.warp(270050100);
            cm.sendOk("Good Luck");
            cm.dispose();
        }
    }
}

And lastly npc>1041002.js

PHP:
var status = 0;  
	
function start() {  
    status = -1;
    action(1, 0, 0);  
}  

function action(mode, type, selection) {   
    if (mode == -1) {  
        cm.dispose();  
    }  
    else {   
        if (mode == 0) {      
            cm.dispose();   
            return;   
        }
        if (mode == 1) {
            status++;  
        }      
        else {  
            status--;  
        }  
        if (status == 0) {			
            if (cm.getPlayer().getMap().getMonsterById(8820009) != null) {
				cm.sendYesNo("Would you like to summon PB?");
			} else {
				cm.sendOk("PB has already been spawned");
				cm.dispose();
			}
        }
        else if (status == 1) {
		cm.getPlayer().getMap().killMonster(cm.getPlayer().getMap().getMonsterById(8820009), cm.getPlayer(), false);
            cm.sendOk("Good Luck");
            cm.dispose();
        }
    }
}

To start just talk to the npc at 270050000.
 
may web.very maple.pls.
Loyal Member
Joined
Aug 12, 2009
Messages
1,810
Reaction score
606
for v62 or v75?
 
Custom Title Activated
Loyal Member
Joined
Apr 8, 2008
Messages
1,125
Reaction score
330
@iAkira

Pink Bean.... v75?
 
Junior Spellweaver
Joined
Sep 19, 2009
Messages
138
Reaction score
92
wow seriously, this kind of handling will cost server a lot of CPU on the entire PB fight.
Use pointers instead, luckily I didn't release mine for the public xD
 
Newbie Spellweaver
Joined
Aug 23, 2009
Messages
8
Reaction score
1
wow seriously, this kind of handling will cost server a lot of CPU on the entire PB fight.
Use pointers instead, luckily I didn't release mine for the public xD

Er thanks.
 
Last edited:
Newbie Spellweaver
Joined
Feb 6, 2009
Messages
13
Reaction score
20
Lol this was released on KryptoDEV by someone else:p
 
Junior Spellweaver
Joined
Sep 30, 2009
Messages
180
Reaction score
76
The other one wasn't exactly the same; however this is not a horrible release unlike what i've been seeing before. If you made this, good job.
 
Newbie Spellweaver
Joined
Oct 3, 2009
Messages
23
Reaction score
1
Good release, but i can't find spawnMonsterwithpos :(:
 
Newbie Spellweaver
Joined
Jul 29, 2009
Messages
75
Reaction score
13
@minikevin12
Real world programs consumes memory.
Of course we would want to optimize as much as possible.
 
Newbie Spellweaver
Joined
Oct 3, 2009
Messages
23
Reaction score
1
i don't have spawnMonsterwithpos in my MapleMap :closedeyes:
help pls :):
 
Infraction Baɴɴed
Loyal Member
Joined
Apr 9, 2008
Messages
1,416
Reaction score
169
Do you use NetBeans for this??
Do you have to compile after you do it??

no you copy-pasted it and hope that it is playable when you start your server.

... yes you use netbeens to compile. any change in the source you need to compile. anything other like the .js files, you dont need to compile again.
 
Junior Spellweaver
Joined
Jan 12, 2010
Messages
101
Reaction score
4
Since Dbz leeched it off my code, I'd thought I'd release it for everyone.

In src.server.life.MapleMonster

Find
Code:
public boolean isBoss() {
        return stats.isBoss() || isHT();
    }
Replace old return with this.
Code:
return stats.isBoss() || isHT()[B] || isPb()[/B];

Find
Code:
public boolean hasBossHPBar() {
        return (isBoss() && getTagColor() > 0) || isHT();
    }
Replace old return with this:
Code:
return (isBoss() && getTagColor() > 0) || isHT() || isPB();
Under that add this:
Code:
private boolean isPB() {
        return (getId() >= 8820010 && getId() <= 8820014);
    }

In src.server.maps.MapleMap

find
Code:
public boolean damageMonster
inside
Code:
if (!monster.isAlive()) {
add
Code:
else if ((monster.getId() >= 8820002 && monster.getId() <= 8820006) || (monster.getId() >= 8820015 && monster.getId() <= 8820018))
                            for (MapleMapObject object : chr.getMap().getMapObjects()) {
                                MapleMonster mons = chr.getMap().getMonsterByOid(object.getObjectId());
                                if (mons != null)
                                    if (mons.getId() >= 8820010 && mons.getId() <= 8820014)
                                        damageMonster(chr, mons, monsterhp);
                            }
after
Code:
if (monster.getId() >= 8810002 && monster.getId() <= 8810009)
                            for (MapleMapObject object : chr.getMap().getMapObjects()) {
                                MapleMonster mons = chr.getMap().getMonsterByOid(object.getObjectId());
                                if (mons != null)
                                    if (mons.getId() == 8810018 || mons.getId() == 8810026)
                                        damageMonster(chr, mons, monsterhp);
                            }
You have to add it right before the closing braket for
Code:
if (!monster.isAlive()) {

Add
Code:
else if ((monster.getId() >= 8820002 && monster.getId() <= 8820006) || (monster.getId() >= 8820015 && monster.getId() <= 8820018))
                        for (MapleMapObject object : chr.getMap().getMapObjects()) {
                            MapleMonster mons = chr.getMap().getMonsterByOid(object.getObjectId());
                            if (mons != null)
                                if (mons.getId() >= 8820010 && mons.getId() <= 8820014)
                                    damageMonster(chr, mons, damage);
                        }
After
Code:
else if (monster.getId() >= 8810002 && monster.getId() <= 8810009)//HT
                        for (MapleMapObject object : chr.getMap().getMapObjects()) {
                            MapleMonster mons = chr.getMap().getMonsterByOid(object.getObjectId());
                            if (mons != null)
                                if (mons.getId() == 8810018 || mons.getId() == 8810026)
                                    damageMonster(chr, mons, damage);
                        }
You have to add it right before the closing bracket for
Code:
if (damage > 0) {

Also add this at the end of MapleMap
Code:
public void spawnPB() {
        killAllMonsters();
        spawnMonsterwithpos(MapleLifeFactory.getMonster(8820009),new Point(7,-42));
    }

Make a new js and add this into it
scripts>map>onFirstUserEnter>PinkBeen_before.js

PHP:
function start(ms) {
        ms.getPlayer().getMap().spawnPB();
}

npc>2141001.js
PHP:
var status = 0;  
	
function start() {  
    status = -1;  
    action(1, 0, 0);  
}  

function action(mode, type, selection) {   
    if (mode == -1) {  
        cm.dispose();  
    }  
    else {   
        if (mode == 0) {      
            cm.dispose();   
            return;   
        }
        if (mode == 1) {
            status++;  
        }      
        else {  
            status--;  
        }  
        if (status == 0) {
		var pbMap = cm.getClient().getChannelServer().getMapFactory().getMap(270050100);
			if (pbMap.getCharacters().size() == 0) {
				cm.sendYesNo("Looks like no one is inside. Would you like to go in?");
			} else { // someone is inside
				for (var i = 0; i < 5; i++) {
					if (pbMap.getMonsterById(8820002 + 1) != null) {
						cm.getPlayer().dropMessage("The fight is already began");
						cm.dispose();
					}
				}
				for (var i = 0; i < 4; i++) {
					if (pbMap.getMonsterById(8820015 + 1) != null) {
						cm.getPlayer().dropMessage("The fight is already began");
						cm.dispose();
					}
				}
					if (pbMap.getMonsterById(8820001) != null) {
						cm.getPlayer().dropMessage("The fight is already began");
						cm.dispose();
					}
				else
				cm.sendYesNo("Looks like the fight hasnt started. Would you like to go in?");
}
        }
        else if (status == 1) {
			cm.warp(270050100);
            cm.sendOk("Good Luck");
            cm.dispose();
        }
    }
}

And lastly npc>1041002.js

PHP:
var status = 0;  
	
function start() {  
    status = -1;
    action(1, 0, 0);  
}  

function action(mode, type, selection) {   
    if (mode == -1) {  
        cm.dispose();  
    }  
    else {   
        if (mode == 0) {      
            cm.dispose();   
            return;   
        }
        if (mode == 1) {
            status++;  
        }      
        else {  
            status--;  
        }  
        if (status == 0) {			
            if (cm.getPlayer().getMap().getMonsterById(8820009) != null) {
				cm.sendYesNo("Would you like to summon PB?");
			} else {
				cm.sendOk("PB has already been spawned");
				cm.dispose();
			}
        }
        else if (status == 1) {
		cm.getPlayer().getMap().killMonster(cm.getPlayer().getMap().getMonsterById(8820009), cm.getPlayer(), false);
            cm.sendOk("Good Luck");
            cm.dispose();
        }
    }
}

To start just talk to the npc at 270050000.

return stats.isBoss() || isHT() || isPb(); Change To
return stats.isBoss() || isHT() || isPB();

+ NPC script Id Were Wrong And When it Summon I got dc
 
Back
Top