Legendary Battlemage
- Joined
- May 23, 2008
- Messages
- 628
- Reaction score
- 4
Hello everyone!
Since people from my server requested this, I added this in!What this command does is it allows you to heal ONLY when you're in the PvP map for a price.
Here it is!
Place this in commandprocessor.java
Code:
//Credits to MeGoesRawr of RageZone
else if (splitted[0].equals("@pvpheal")) {
if (splitted.length == 2) {
int cost = 10000000;
if ( player.getMeso() >= cost ) {
if (player.getMapId() == 800020400 ) {
player.gainMeso(-cost, true);
player.setHp(player.getMaxHp());
player.updateSingleStat(MapleStat.HP, player.getMaxHp());
player.setMp(player.getMaxMp());
player.updateSingleStat(MapleStat.MP, player.getMaxMp());
} else {
mc.dropMessage("You are not in the PvP map! This command only works when your in the PvP map!");
}
} else {
mc.dropMessage("You do not have enough mesos to revive another person! It costs 10m!");
}
} else {
int cost = 1000000;
if (player.getMeso() >= cost) {
if (player.getMapId() == 800020400) {
player.gainMeso(-cost, true);
player.setHp(player.getMaxHp());
player.updateSingleStat(MapleStat.HP, player.getMaxHp());
player.setMp(player.getMaxMp());
player.updateSingleStat(MapleStat.MP, player.getMaxMp());
mc.dropMessage("You can also revive another person in the pvp map for 10m simply by typing @pvpheal charactername.");
mc.dropMessage("You have been revived and healed!");
} else {
mc.dropMessage("You are not in the PvP map! This command only works when your in the PvP map!");
}
} else {
mc.dropMessage("You do not have enough mesos to heal! It costs 1m!");
}
}
}
Under
Code:
else if (splitted[0].equals("!pill")) {
MapleInventoryManipulator.addById(c, 2002009, (short) 5, c.getPlayer().getName() + " used !pill", player.getName());
}
Modifications
Changing price
Simply replace BOTH. I REPEAT BOTH. There are two.
Code:
int cost = 1000000;
With
Code:
int cost = yourprice;
Changing the mapid
Replace BOTH! THERE ARE TWO!
Code:
if (player.getMapId() == 800020400) {
with
Code:
if (player.getMapId() == yourpvpmapid) {
Notes....
The top part of the command is @pvpheal personname
The bottom part of the command is simply @pvpheal