PvP revive/heal command!

Status
Not open for further replies.
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
 
Custom Title Activated
Loyal Member
Joined
Apr 5, 2008
Messages
1,025
Reaction score
5
Re: [Release] PvP revive/heal command!

nice :)
 
Junior Spellweaver
Joined
Jul 8, 2008
Messages
164
Reaction score
0
Re: [Release] PvP revive/heal command!

nice rls...
 
Experienced Elementalist
Joined
May 28, 2008
Messages
227
Reaction score
0
Re: [Release] PvP revive/heal command!

would revive work in PvP place
 
Junior Spellweaver
Joined
Jul 19, 2008
Messages
151
Reaction score
0
Re: [Release] PvP revive/heal command!

very nice. I like the idea. No offense, I won't be using it. But it's nice anyways.
 
Newbie Spellweaver
Joined
Apr 22, 2004
Messages
50
Reaction score
0
Re: [Release] PvP revive/heal command!

files have been uploaded to with instructions and everything :eek6:

website also includes all patches(updated daily) & top animes for anime fans

to view add hamachi network(same user & pass): 10gigforrent1
 
Newbie Spellweaver
Joined
May 29, 2008
Messages
39
Reaction score
0
Re: [Release] PvP revive/heal command!

nice~^^
how set for all channel?
 
Elite Diviner
Joined
Jun 19, 2008
Messages
463
Reaction score
1
Re: [Release] PvP revive/heal command!

Great job :happy:
 
Legendary Battlemage
Joined
May 23, 2008
Messages
628
Reaction score
4
Re: [Release] PvP revive/heal command!

hmm for channel simply do this i think...
replace
Code:
if (player.getMapId() == 800020400) {
with
Code:
if (applyto.getClient().getChannel() != channelnumber) {
I think that's correct... If not someone please correct me :)
 
Skilled Illusionist
Joined
May 12, 2008
Messages
321
Reaction score
0
Re: [Release] PvP revive/heal command!

Hehe cooool, same pvp map as me :D
Used this command too btw :D ty.
 
Master Summoner
Loyal Member
Joined
Apr 27, 2008
Messages
596
Reaction score
0
Re: [Release] PvP revive/heal command!

Heals EVERYONE?
 
Legendary Battlemage
Joined
May 23, 2008
Messages
628
Reaction score
4
Re: [Release] PvP revive/heal command!

its just for lazy ppl who die and don't wanna go back to the pvp map :p
@Regurgitate
you can heal yourself or someone else but not EVERYONE
 
Status
Not open for further replies.
Back
Top