- Joined
- Apr 7, 2008
- Messages
- 570
- Reaction score
- 31
in maplemap.java
replace the killmonster function with this (there are 2, select them both, then replace)
in takedamagehandler.java
add the imports
find if (!player.isHidden()) {
replace that "function" with
in maplecharacter.java
find
add this beneath it
then find
add this beneath it
find
add this beneath it
now for the npcs
i used this for a npc, 2012025
so make 2012025.js
Now guon, the npc in the pvp map
2094002.js
This is just the small release, nejevoli wanted me to release it..
im not here to fix errors, make sure you make a backup of your 2 files
Credits: Nejevoli for the idea, Nejevoli for helping me with the bombs effect
Me, for actually making it, and releasing here
please note: there may come an update in the future with a system that if you kill someone you get a Point
and you can exchange that points for like, items and stuff
enjoy
replace the killmonster function with this (there are 2, select them both, then replace)
Code:
public void killMonster (final MapleMonster monster, final MapleCharacter chr, final boolean withDrops) {
killMonster(monster, chr, withDrops, false, 1);
}
@SuppressWarnings("static-access")
public void killMonster (final MapleMonster monster, final MapleCharacter chr, final boolean withDrops, final boolean secondTime, int animation) {
if (monster.getId() == 8810018 && !secondTime) {
TimerManager.getInstance().schedule(new Runnable() {
@Override
public void run() {
killMonster(monster, chr, withDrops, true, 1);
killAllMonsters(false);
}
}, 3000);
return;
}
if (monster.getBuffToGive() > -1) {
MapleItemInformationProvider mii = MapleItemInformationProvider.getInstance();
MapleStatEffect statEffect = mii.getItemEffect(monster.getBuffToGive());
for (MapleMapObject mmo : this.getAllPlayer()) {
MapleCharacter character = (MapleCharacter) mmo;
statEffect.applyTo(character);
}
}
if (monster.getId() == 8810018) {
MaplePacket packet = MaplePacketCreator.serverNotice(6, "To the crew who have defeated Horntail after numerous attempts, we salute you! You are the true heroes of Leafre!");
try {
chr.getClient().getChannelServer().getInstance(chr.getClient().getChannel()).getWorldInterface().broadcastMessage(chr.getName(), packet.getBytes());
} catch (RemoteException e) {
chr.getClient().getChannelServer().reconnectWorld();
}
}
spawnedMonstersOnMap.decrementAndGet();
monster.setHp(0);
broadcastMessage(MaplePacketCreator.killMonster(monster.getObjectId(), animation), monster.getPosition());
removeMapObject(monster);
if (monster.getId() >= 8800003 || monster.getId() <= 8800010) {
boolean makeZakReal = false;
Collection<MapleMapObject> objects = getMapObjects();
for (MapleMapObject object : objects) {
MapleMonster mons = getMonsterByOid(object.getObjectId());
if (mons != null) {
switch (mons.getId()) {
case 8800003:
case 8800004:
case 8800005:
case 8800006:
case 8800007:
case 8800008:
case 8800009:
case 8800010:
makeZakReal = true;
break;
}
}
}
if (makeZakReal) {
for (MapleMapObject object : objects) {
MapleMonster mons = chr.getMap().getMonsterByOid(object.getObjectId());
if (mons != null) {
if (mons.getId() == 8800000) {
broadcastMessage(MaplePacketCreator.makeMonsterReal(mons));
updateMonsterController(mons);
}
}
}
}
}
MapleCharacter dropOwner = monster.killBy(chr);
if (withDrops && !monster.dropsDisabled()) {
if (dropOwner == null) {
dropOwner = chr;
}
dropFromMonster(dropOwner, monster);
}
}
add the imports
Code:
import net.sf.odinms.net.MaplePacket;
import net.sf.odinms.client.MapleStat;
find if (!player.isHidden()) {
replace that "function" with
Code:
if (!player.isHidden()) {
if (monsteridfrom == 9300166) {
player.setBombPoints(player.getBombPoints() - 1);
if (player.getBombPoints() < 1) {
player.setHp(0);
player.updateSingleStat(MapleStat.HP, 0);
player.setBombPoints(5);
MaplePacket packet = MaplePacketCreator.serverNotice(0, "[Update] Player " + player.getName() + " is dead");
c.getPlayer().getMap().broadcastMessage(packet);
return;
} else {
MaplePacket packet = MaplePacketCreator.serverNotice(0, "[Update] Player " + player.getName() + " now has " + player.getBombPoints() + " points");
c.getPlayer().getMap().broadcastMessage(packet);
return;
}
} else {
player.getMap().broadcastMessage(player,
MaplePacketCreator.damagePlayer(damagefrom, monsteridfrom, player.getId(), damage, fake, direction, is_pgmr, pgmr, is_pg, oid, pos_x, pos_y), false);
player.checkBerserk();
}
}
in maplecharacter.java
find
Code:
private int gmlevel;
Code:
private int bombpoints;
then find
Code:
public int getGender() {
return gender;
}
add this beneath it
Code:
public int getBombPoints() {
return bombpoints;
}
find
Code:
public void setGender(int gender) {
this.gender = gender;
}
add this beneath it
Code:
public void setBombPoints(int bombpoints) {
this.bombpoints = bombpoints;
}
now for the npcs
i used this for a npc, 2012025
so make 2012025.js
Code:
var status = 0;
var pvpmap = 925100700;
function start() {
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();
} else {
if (mode == 0) {
cm.sendOk("OK then, see you next time!");
cm.dispose();
return;
}
if (mode == 1)
status++;
else
status--;
if (status == 0) {
cm.sendYesNo("Hey, Do you want to do the Bomberman PVP?");
} else {
cm.gainItem(2100067, -(cm.itemQuantity(2100067)));
cm.gainItem(2100067, 100);
cm.warp(pvpmap);
cm.dispose();
}
}
}
Now guon, the npc in the pvp map
2094002.js
Code:
var status = 0;
var mapid = 925100700;
function start() {
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();
} else {
if (mode == 0) {
cm.sendOk("OK then, see you next time!");
cm.dispose();
return;
}
if (mode == 1)
status++;
else
status--;
if (status == 0) {
cm.sendSimple("#b#L1#I wanna restore bombs#l\r\n#L2#I want to get out#k#l");
} else {
if (selection == 1) {
if (cm.itemQuantity(2100067) <= 10) {
cm.gainItem(2100067, 25);
cm.dispose();
} else {
cm.sendOk("you have more then 10 bombs\r\nSo its not time to restore yet");
cm.dispose();
}
} else {
cm.warp(100000000);
cm.gainItem(2100067, -(cm.itemQuantity(2100067)));
cm.dispose();
}
}
}
}
This is just the small release, nejevoli wanted me to release it..
im not here to fix errors, make sure you make a backup of your 2 files
Credits: Nejevoli for the idea, Nejevoli for helping me with the bombs effect
Me, for actually making it, and releasing here
please note: there may come an update in the future with a system that if you kill someone you get a Point
and you can exchange that points for like, items and stuff
enjoy
Last edited: