Excellzone

Forum and disscussions since 2010


You are not connected. Please login or register

View previous topic View next topic Go down Message [Page 1 of 1]

#1


In src.server.life.MapleMonster

Find
Code:
public boolean isBoss() {
return stats.isBoss() || isHT();
}

Replace old return with this.
Code:
return stats.isBoss() || isHT() || isPb();

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 Code:
function start(ms) {

ms.getPlayer().getMap().spawnPB();

}



npc>2141001.js
PHP Code:
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 Code:
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.

View user profile

View previous topic View next topic Back to top Message [Page 1 of 1]


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