Hey Ragezoners This is My first Release i do not know if anything like this has been released before so please do not flame if it has been.
Command
} else if (splitted[0].equals("@superrb")) {
if (c.getPlayer().getStr() == 32767 && c.getPlayer().getDex() == 32767 && c.getPlayer().getInt() == 32767 && c.getPlayer().getLuk() == 32767) { // required
if (c.getPlayer().haveItem1(
Itemid1) == false) { // If you do not have this you gain this item
c.getPlayer().setStr(4);
c.getPlayer().setDex(4);
c.getPlayer().setInt(4);
c.getPlayer().setLuk(4);
c.getPlayer().updateSingleStat(MapleStat.STR, 4);
c.getPlayer().updateSingleStat(MapleStat.DEX, 4);
c.getPlayer().updateSingleStat(MapleStat.INT, 4);
c.getPlayer().updateSingleStat(MapleStat.LUK, 4);
MapleInventoryManipulator.addById(c,
Itemid1, (short) 1, c.getPlayer().getName()); // Your Custom Item here
c.getChannelServer().worldMessage("Congratulations to " + c.getPlayer().getName() + " on reaching a super rebirth~");
} else { // Have the Itemid1
if (c.getPlayer().haveItem1(
Itemid2) == false) { // if you do NOT have the Itemid2, it does the underlined
c.getPlayer().setStr(4);
c.getPlayer().setDex(4);
c.getPlayer().setInt(4);
c.getPlayer().setLuk(4);
c.getPlayer().updateSingleStat(MapleStat.STR, 4);
c.getPlayer().updateSingleStat(MapleStat.DEX, 4);
c.getPlayer().updateSingleStat(MapleStat.INT, 4);
c.getPlayer().updateSingleStat(MapleStat.LUK, 4);
MapleInventoryManipulator.addById(c,
Itemid2, (short) 1, c.getPlayer().getName()); // Your Custom Item here
c.getChannelServer().worldMessage("Congratulations to " + c.getPlayer().getName() + " on reaching his/her second super rebirth~");
} else { // having item 1 + 2
if (c.getPlayer().haveItem1(
Itemid3) == false) { // last item...
c.getPlayer().setStr(4);
c.getPlayer().setDex(4);
c.getPlayer().setInt(4);
c.getPlayer().setLuk(4);
c.getPlayer().updateSingleStat(MapleStat.STR, 4);
c.getPlayer().updateSingleStat(MapleStat.DEX, 4);
c.getPlayer().updateSingleStat(MapleStat.INT, 4);
c.getPlayer().updateSingleStat(MapleStat.LUK, 4);
MapleInventoryManipulator.addById(c,
itemid3, (short) 1, c.getPlayer().getName()); // Your Custom item here.
c.getChannelServer().worldMessage("Congratulations to " + c.getPlayer().getName() + " on reaching his/her third super rebirth~");
} else {
c.getPlayer().dropMessage(6, "You have the max amount of superrebirths.");
}
}
}
} else { // does not have required.
c.getPlayer().dropMessage(6, "You are not ready to super rebirth yet.\r\nYou currently have :\r\n " + c.getPlayer().getStr() + " Str, " + c.getPlayer().getDex() + " Dex, " + c.getPlayer().getInt() + " Int and " + c.getPlayer().getLuk() + " Luk.");
}
and in your MapleCharacter.Java Add
PHP Code:
public boolean haveItem1(int itemid) {
return haveItem(itemid, 1, true, true);
}
public boolean haveItem(int itemid, int quantity, boolean checkEquipped, boolean greaterOrEquals) {
int possesed = inventory[MapleItemInformationProvider.getInstance().getInventoryType(itemid).ordinal()].countById(itemid);
if (checkEquipped)
possesed += inventory[MapleInventoryType.EQUIPPED.ordinal()].countById(itemid);
return greaterOrEquals ? possesed >= quantity : possesed == quantity;
}
IF YOU ALREADY HAVE A HaveItem1 boolean REPLACE IT if not add it under
PHP Code:
public void modifyCSPoints(int type, int quantity) {
switch (type) {
case 1:
this.paypalnx += quantity;
break;
case 2:
this.maplepoints += quantity;
break;
case 4:
this.cardnx += quantity;
break;
}
}
this is for a server with Max stats of 32767.
THIS IS WORKING 100% Spoonfed :)
add the above as a player command.
where you see the red coloured writing input as your servers custom maxed stat item if you don't have any don't ask me to make one for you. as i only helped with the command
PHP Code:
Credits: Me for releasing & ?? << Not sure
Please give thanks if helped :)
Thanks lightstory for the idea of cleaning up :D