Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Cygnus Reborns Function+PlayerCommand

Joined
Aug 16, 2008
Messages
590
Reaction score
11
No need to thank me for this everyone can do this, so here is it:

Code:
    public void KoCdoReborn() {
        setLevel(1);
        setExp(0);
        changeJob(MapleJob.getById(1000));
        updateSingleStat(MapleStat.LEVEL, 1);
        updateSingleStat(MapleStat.JOB, 1000);
        updateSingleStat(MapleStat.EXP, 0);
        reborns += 1;
    }
Code:
} else if (splitted[0].equals("@kocrebirth")) {
                    if (player.getLevel() >= 120) {
                        int totalrebirth = c.getPlayer().getReborns()+1;
                        mc.dropMessage("You've rebirthed " + totalrebirth + " times as a Knight of Cygnus!");
                        player.KoCdoReborn();
                    } else {
                        mc.dropMessage("You are not level 120 yet!");
                }

*Do not ask me how to use this, find it by yourself!
**Note that you must have rebirth on your server source to add this tiny Add-On :D
 
Elite Diviner
Loyal Member
Joined
Feb 1, 2009
Messages
497
Reaction score
75
That's wrong you know?

Say I'm not a KoC, and I just do "@kocrebirth", I will get the rebirth, and become a new Noblesse with my old progress skills.
 
Newbie Spellweaver
Joined
Apr 10, 2009
Messages
91
Reaction score
195
That's wrong you know?

Say I'm not a KoC, and I just do "@kocrebirth", I will get the rebirth, and become a new Noblesse with my old progress skills.

Also, that person could be a normal job and be able to RB at level 120 o.o
 
may web.very maple.pls.
Loyal Member
Joined
Aug 12, 2009
Messages
1,810
Reaction score
606
u should ad a job check up o_O

---------- Post added at 11:52 PM ---------- Previous post was at 11:46 PM ----------

Also, that person could be a normal job and be able to RB at level 120 o.o
yeah try this
replace
if (player.getLevel() >= 120) {
To
if (level >= getClient().getChannelServer().getlevelCap()) {
 
Newbie Spellweaver
Joined
Apr 10, 2009
Messages
91
Reaction score
195
too lazy to check job it will be 100 line xD

Not quite...
PHP:
} else if (splitted[0].equals("@kocrebirth")) {
                    if (player.getLevel() >= 120 && player.getJob().getId() / 1000 == 1) {
                        int totalrebirth = c.getPlayer().getReborns()+1;
                        mc.dropMessage("You've rebirthed " + totalrebirth + " times as a Knight of Cygnus!");
                        player.KoCdoReborn();
                    } else {
                        mc.dropMessage("You are not level 120 yet or you are not a KoC!");
                }
 
may web.very maple.pls.
Loyal Member
Joined
Aug 12, 2009
Messages
1,810
Reaction score
606
well this one should work
PHP:
} else if (splitted[0].equals("@kocrebirth")) {
                    if (level >= getClient().getChannelServer().getlevelCap() && player.getJob().getId() / 1000 == 1) {
                        int totalrebirth = c.getPlayer().getReborns()+1;
                        mc.dropMessage("You've rebirthed " + totalrebirth + " times as a Knight of Cygnus!");
                        player.KoCdoReborn();
                    } else {
                        mc.dropMessage("Either you not level " + getClient().getChannelServer().getlevelCap() + " yet or you aren't a KoC!");
                }
 
Last edited:
Joined
Aug 16, 2008
Messages
590
Reaction score
11
i was joking u know well i can add the check
erm something like this:
if player.getJobbyId<1000
else mc.dropMessage("GTFO you are not a KoC, I am mad!");

randomly xD
 
Newbie Spellweaver
Joined
Apr 30, 2009
Messages
54
Reaction score
12
try this
PHP:
} else if (splitted[0].equals("@kocrebirth")) {

            if ((player.getLevel() >= 200) || (player.getLevel() >= 120 && player.getJob().getId() / 1000 == 1)) {
                int totalrebirth = c.getPlayer().getReborns() + 1;
                mc.dropMessage("You've rebirthed " + totalrebirth + " times as a Knight of Cygnus!");
                player.KoCdoReborn();
            } else {
                if (player.getJob().getId() / 1000 == 1) {
                    mc.dropMessage("You are not level 120 yet!");
                } else {
                    mc.dropMessage("You are not level 200 yet!");
                }
            }

try this to reborn into beginner:

PHP:
    public void doReborn() {
        setLevel(1);
        setExp(0);
        changeJob(MapleJob.getById(0));
        updateSingleStat(MapleStat.LEVEL, 1);
        updateSingleStat(MapleStat.JOB, 0);
        updateSingleStat(MapleStat.EXP, 0);
        reborns += 1;
    }

and for the command:

PHP:
} else if (splitted[0].equals("@rebirth")) {

            if ((player.getLevel() >= 200) || (player.getLevel() >= 120 && player.getJob().getId() / 1000 == 1)) {
                int totalrebirth = c.getPlayer().getReborns() + 1;
                mc.dropMessage("You've rebirthed " + totalrebirth + " times as a Knight of Cygnus!");
                player.doReborn();
            } else {
                if (player.getJob().getId() / 1000 == 1) {
                    mc.dropMessage("You are not level 120 yet!");
                } else {
                    mc.dropMessage("You are not level 200 yet!");
                }
            }


---------- Post added at 02:34 AM ---------- Previous post was at 02:33 AM ----------

that should work
 
Newbie Spellweaver
Joined
Apr 30, 2009
Messages
54
Reaction score
12
no but it should work I'm that that noobish of a coder

the logic behind this

First of it checks if you are a level 200 if you are you do a reborn

if if your not level 200, it checks if your are level 120

if you are it checks if your a cygnus which is this part of the code
&& player.getJob().getId() / 1000 == 1)

if that is true then you do a rebirth


if you are neither of those 2

it checks if your a cygnus, if you are it drops a message
you need to be level 120

if your not a cygnus it drops a message

you need to be level 200
 
Elite Diviner
Loyal Member
Joined
Feb 1, 2009
Messages
497
Reaction score
75
Actually regular rebirth and Cygnus rebirth should NOT be together. And judging by you "rebirth += 1", I assume you're merging both, which is unfair for regular players.
 
Newbie Spellweaver
Joined
Apr 30, 2009
Messages
54
Reaction score
12
you can always set a koc rebirth int it so that koc rebirth cant exceed regular rebirths or just modify the rankings
 
Skilled Illusionist
Joined
Apr 16, 2009
Messages
376
Reaction score
72
Code:
          } else if (splitted[0].equals("@rebirth")) {
            int lev = player.getLevel();
            if ((lev >= 200) || (lev >= 120 && player.isCygnus())) {
                int totalrebirth = player.getReborns() + 1;
                player.dropMessage(1, "You've rebirthed " + totalrebirth + " times!");
                player.doReborn();
            } else {
                if (player.isCygnus()) 
                    mc.dropMessage("You are not level 120 yet!");
                 else 
                    mc.dropMessage("You are not level 200 yet!");
                }

Don't know if it would work.
 
Newbie Spellweaver
Joined
Apr 30, 2009
Messages
54
Reaction score
12
Code:
          } else if (splitted[0].equals("@rebirth")) {
            int lev = player.getLevel();
            if ((lev >= 200) || (lev >= 120 && player.isCygnus())) {
                int totalrebirth = player.getReborns() + 1;
                player.dropMessage(1, "You've rebirthed " + totalrebirth + " times!");
                player.doReborn();
            } else {
                if (player.isCygnus()) 
                    mc.dropMessage("You are not level 120 yet!");
                 else 
                    mc.dropMessage("You are not level 200 yet!");
                }

Don't know if it would work.

it should work

anyways im work on a ranking that splits up cygnus and normal players

---------- Post added at 04:52 AM ---------- Previous post was at 04:44 AM ----------

actualy ima go and add in cygnusreborns int which mean you rebirth from a cygnus then ranking by reborns then cygnus reborns then level then exp

---------- Post added at 05:03 AM ---------- Previous post was at 04:52 AM ----------

No need to thank me for this everyone can do this, so here is it:

Code:
    public void KoCdoReborn() {
        setLevel(1);
        setExp(0);
        changeJob(MapleJob.getById(1000));
        updateSingleStat(MapleStat.LEVEL, 1);
        updateSingleStat(MapleStat.JOB, 1000);
        updateSingleStat(MapleStat.EXP, 0);
        reborns += 1;
    }
Code:
} else if (splitted[0].equals("@kocrebirth")) {
                    if (player.getLevel() >= 120) {
                        int totalrebirth = c.getPlayer().getReborns()+1;
                        mc.dropMessage("You've rebirthed " + totalrebirth + " times as a Knight of Cygnus!");
                        player.KoCdoReborn();
                    } else {
                        mc.dropMessage("You are not level 120 yet!");
                }

*Do not ask me how to use this, find it by yourself!
**Note that you must have rebirth on your server source to add this tiny Add-On :D

btw why dont you add in mysql saving for this thing it's not hard
 
I'm sexy and I know it :)
Joined
Oct 21, 2008
Messages
811
Reaction score
350
I think KoC rebirths and normal rebirths merge pretty well because, they are just recolored skills anyways, KoC players don't really have a big advantage over others... just the ap gained should be different, which doesn't even make a part of this script since when you level somebody to 1 they keep their ap.

btw there is a nice check called isCygnus() in maplecharacter, why don't we use that.
It's a nice try for a release though...

@Wizet, it wouldn't work because of the level >= 200 if you made your server so that KoC can level all the way to lvl 200.

Code:
} else if (splitted[0].equals("@rebirth")) {
            if ((player.getLevel() >= 200 && !player.isCygnus()) || (player.getLevel() >= 200 && player.isCygnus())) {
                player.doReborn();
                player.dropMessage(6, "You've rebirthed " + player.getReborns() + " times!");
            } else {
                if (player.isCygnus()) 
                    player.dropMessage(6, "You are not level 120 yet!");
                 else 
                    player.dropMessage(6, "You are not level 200 yet!");
                }

This will also make it work for any bubblesdev related sources.
 
Last edited:
Newbie Spellweaver
Joined
Apr 30, 2009
Messages
54
Reaction score
12
I think KoC rebirths and normal rebirths merge pretty well because, they are just recolored skills anyways, KoC players don't really have a big advantage over others... just the ap gained should be different, which doesn't even make a part of this script since when you level somebody to 1 they keep their ap.

btw there is a nice check called isCygnus() in maplecharacter, why don't we use that.
It's a nice try for a release though...

@Wizet, it wouldn't work because of the level >= 200 if you made your server so that KoC can level allt he way to lvl 200.

Code:
} else if (splitted[0].equals("@rebirth")) {
            if ((player.getLevel() >= 200 && !player.isCygnus()) || (player.getLevel() >= 120 && player.isCygnus())) {
                int totalrebirth = player.getReborns() + 1;
                player.dropMessage(1, "You've rebirthed " + totalrebirth + " times!");
                player.doReborn();
            } else {
                if (player.isCygnus()) 
                    mc.dropMessage("You are not level 120 yet!");
                 else 
                    mc.dropMessage("You are not level 200 yet!");
                }

well they do have one advantage saves you about 80 level or so which is a lot. and i said his code would work his second part was and or statement of lev >= 120 && player.isCygnus()

anyways for the other point you say about reborns is that ppl keep thier ap. thats why i made a system to cap howmany ap then can keep after they rebirth and goes up by 20 and i capped it completely at one point so it's impossible to go any higher

---------- Post added at 05:35 AM ---------- Previous post was at 05:32 AM ----------

and as if for the isCygnus() check I'm asuming ppl dont have it.

it's pretty easy to do

PHP:
public boolean isCygnus() {
        return job.getId() / 1000 == 1;
    }
 
I'm sexy and I know it :)
Joined
Oct 21, 2008
Messages
811
Reaction score
350
If you don't have KoC levelcap at 120 use my script, if you do, change the 200 to 120 in the second part 0_0

And, I don't really call that fair... 80 levels earlier to rebirth and add it to the same rebirth counter? no way.
 
Last edited:
Newbie Spellweaver
Joined
Jun 9, 2008
Messages
72
Reaction score
7
My version:
MapleCharacter.java:
PHP:
     public void doReborn() {
        setReborns(getReborns() + 1);
        List<Pair<MapleStat, Integer>> reborn = new ArrayList<Pair<MapleStat, Integer>>(4);
        setLevel(1);
        setExp(0);
        setJob(MapleJob.BEGINNER);
        updateSingleStat(MapleStat.LEVEL, 1);
        updateSingleStat(MapleStat.JOB, 0);
        updateSingleStat(MapleStat.EXP, 0);
    }
     public void doCygnusRebirth() {
        setReborns(getReborns() + 1);
        List<Pair<MapleStat, Integer>> reborn = new ArrayList<Pair<MapleStat, Integer>>(4);
        setLevel(1);
        setExp(0);
        setJob(MapleJob.NOBLESSE);
        updateSingleStat(MapleStat.LEVEL, 1);
        updateSingleStat(MapleStat.JOB, 1000);
        updateSingleStat(MapleStat.EXP, 0);
    }

Command File:
PHP:
 else if (splitted[0].equalsIgnoreCase("@rebirth")) {
            if (player.getJob().isA(MapleJob.NOBLESSE)) {
                mc.dropMessage("Cygnus Knights must use @cygnusrb to rebirth.");
            } if (player.getLevel() < 200) {
                mc.dropMessage("You have to be at least level 200 to rebirth.");
            }
            else {
                c.getPlayer().doReborn();
            }
        }
PHP:
else if (splitted[0].equalsIgnoreCase("@cygnusrb")) {
            if (player.getJob().isA(MapleJob.BEGINNER)) {
                mc.dropMessage("Regular Players must use @rebirth to rebirth.");
            } if (player.getLevel() < 200) {
                mc.dropMessage("You have to be at least level 200 to rebirth.");
            }
            else {
                c.getPlayer().doCygnusRebirth();
            }
        }

If this isn't already in your MapleCharacter, add it:
PHP:
    public void setJob(MapleJob job) {
        this.job = job;
    }
 
Back
Top