• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

[Help] ViciousMS

Experienced Elementalist
Joined
May 10, 2013
Messages
213
Reaction score
6
I plan to use the ViciousMS source posted like a year ago, but I want to add a rebirth system to it but the reborn stuff is already added to MapleCharacter.java, so I was wondering what the reborn command would be. Thanks.
 
Interesting...
Loyal Member
Joined
Oct 25, 2008
Messages
1,372
Reaction score
604
Well then if you checked the command files and you didn't find the command then it probably doesn't exist. If the source has the code for rebirth in MapleCharacter already, you can just make your own command or take the command from a source that has it.
 
Upvote 0
Experienced Elementalist
Joined
May 10, 2013
Messages
213
Reaction score
6
Well then if you checked the command files and you didn't find the command then it probably doesn't exist. If the source has the code for rebirth in MapleCharacter already, you can just make your own command or take the command from a source that has it.

Alright, thanks for the help!



I found this command in another source:
Code:
public static class Rebirth extends CommandExecute {   
    @[I][B][URL="http://forum.ragezone.com/members/2000004426.html"]Override[/URL][/B][/I]
    public int execute(MapleClient c, String[] splitted) {
    int expfix = c.getPlayer().getExp();
            if (c.getPlayer().getLevel() >= 200) {
         c.getPlayer().setLevel(1);
        c.getPlayer().changeJob(0); // should be short in a v100+ no?
        c.getPlayer().setExp(0);
        c.getPlayer().updateSingleStat(MapleStat.EXP, c.getPlayer().getExp());
        return 1;
        } else {
                c.getPlayer().dropMessage("Rebirth is only available at level 200+");
                player.update();
        }
        return 1;
   }
}
But when, I put it into PlayerCommands.java, the following things cause the build to fail:
Code:
expfix
c.getPlayer().setLevel(1);
c.getPlayer().changeJob(0);
c.getPlayer().dropMessage("Rebirth is only available at level 200+");
player



Here is an image.
 
Upvote 0
Legendary Battlemage
Joined
Jun 16, 2011
Messages
610
Reaction score
347
You donot have the functions there also change player.update to c.getPlayer().update(); and find out if setLevel has moe than 1 contructer and changeJob o bviousl doesnt exist so find changejob in the repack u lookied in
 
Upvote 0
Experienced Elementalist
Joined
May 10, 2013
Messages
213
Reaction score
6
I edited the command and was wondering if this would work since I didn't get any build errors.
Code:
public static class rebirth extends CommandExecute { 
       [USER=2000004426]Override[/USER]
        public int execute(MapleClient c, String[] splitted) { 
        if (c.getPlayer().getLevel() < 200) { 
            c.getPlayer().dropMessage(5, "You are not level 200."); 
            return 0; 
        } else { 
            c.getPlayer().doReborn();
            c.getPlayer().dropMessage(5, "You have got your reborn."); 
        } 
        return 1; 
    } 
}



It works, but only issue is that it doesn't add one to reborns/rebirths in table.
 
Upvote 0
Experienced Elementalist
Joined
May 10, 2013
Messages
213
Reaction score
6
Go in your saveToDB method in MapleCharacter and make sure one of the lines is reborns. If not, then add it somewhere.

Yes Reborns is in there. I edited the doReborn function a little, I am testing again.
 
Upvote 0
Skilled Illusionist
Joined
Jun 23, 2012
Messages
349
Reaction score
144
horrible source, ur better off using ourstory rice fixed vicious up a lot
 
Upvote 0
Experienced Elementalist
Joined
May 10, 2013
Messages
213
Reaction score
6
Edit: You have to logout and back in for the rebirths to update in table.



Can I get a link to Ourstory source???



Wait, Ourstory is 142, I am making a 117.2 server.



I added c.getPlayer().update(); to the command, maybe that will work? Edit. That didn't work
 
Upvote 0
Skilled Illusionist
Joined
Jun 23, 2012
Messages
349
Reaction score
144
^ what he said

Edit: You have to logout and back in for the rebirths to update in table.



Can I get a link to Ourstory source???



Wait, Ourstory is 142, I am making a 117.2 server.[/COLOR]

o i thought u wer using v142 vicious
 
Upvote 0
Experienced Elementalist
Joined
May 10, 2013
Messages
213
Reaction score
6
Ok, I added to the command itself, testing it now! Thanks for all the help, now to add a msi command since I plan to turn it into a high rate.



Thanks, that worked 100%, it now updates without relogging!
 
Upvote 0
Back
Top