- 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),
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: