[RELEASE] GM Invincibility

Experienced Elementalist
Joined
Sep 7, 2006
Messages
245
Reaction score
0
MapleCharacter.java​
Code:
private boolean invincible;

Code:
        public boolean getInvincible() {
            return invincible;
        }
        
        public void setInvincible(boolean set) {
            this.invincible = set;
        }

CharCommands.java​

Code:

Code:
else if (splitted[0].equals("!god")) {
                    boolean choice = true;
                    int set = Integer.parseInt(splitted[1]);
                    if (set == 1) {
                        choice = true;
                    }
                    else if (set == 2) {
                        choice = false;
                    }
                    player.setInvincible(choice);
                }

and

Code:
new CommandDefinition("god", "", "", 100),
with the rest of the CommandDefinitions

TakeDamageHandler.java​

Code:
if (!player.isHidden() && !smokescreen)) {

to

Code:
if (!player.isHidden() && !smokescreen && !player.getInvincible()) {

Credits to Anujan of Valhalla Dev for the initial idea and everything except the command to enable/disable

!god 1 = ON
!god 2 = OFF
 
Last edited:
Nvm
Code:
    } else if (splitted[0].equals("!godmode")) {
                    player.setInvincible(true);
    } else if (splitted[0].equals("!godemodeoff")) {
                   player.setInvincible(false);
}
 
Lol, nice job leeching then adding a tiny if else statement...you leeched the idea from Anujan, then the rest from Generic, you added an if else statement....
Anyway, it's better just to do
Code:
    } else if (splitted[0].equals("!godmode")) {
                    player.setInvincible(true);
    } else if (splitted[0].equals("!godemodeoff")) {
                   player.setInvincible(false);
}
I'm Generic from Valhalla. Lol. PM me there, and I'll respond if you want proof.

Also, I like using 1 command instead of 2. D:

Also :

I released it on RageZone and gave you credits for everything except the command. I hope that's alright, if not I'll remove it.

EDIT: It doesn't have your world.properties thing. Just the && isGM thing.
 
Looks pretty useful, but GM's take 1 damage anyways because of all of their stats usually, so it's nice to have but not a life saver. :D
 
Why do people release stuff from Valhalla on Ragezone, its a bit annoying..
 
Why do people release stuff from Valhalla on Ragezone, its a bit annoying..
I'm the one who put it on Valhalla, Read a few posts up. I think I can put it here.

EDIT: Well, put half of it on Valhalla, and Anujan told me to release and take all the credits.
 
MapleCharacter.java​
Code:
private boolean invincible;

Code:
        public boolean getInvincible() {
            return invincible;
        }
        
        public void setInvincible(boolean set) {
            this.invincible = set;
        }

CharCommands.java​

Code:

Code:
else if (splitted[0].equals("!god")) {
                    boolean choice = true;
                    int set = Integer.parseInt(splitted[1]);
                    if (set == 1) {
                        choice = true;
                    }
                    else if (set == 2) {
                        choice = false;
                    }
                    player.setInvincible(choice);
                }

TakeDamageHandler.java​

Code:
if (!player.isHidden() && !smokescreen)) {

to

Code:
if (!player.isHidden() && !smokescreen && !player.getInvincible()) {

Credits to Anujan of Valhalla Dev for the initial idea and everything except the command to enable/disable

!god 1 = ON
!god 2 = OFF

Better than your EXP cards D:< Jayy <3
 
Back