- Joined
- Aug 3, 2008
- Messages
- 138
- Reaction score
- 11
Hi everyone,
I've worked on a command for 2nd to 4th job advances.
I've originally written it exclusively for my server, but realized it would be nice to share it with you guys.
To advance to 2nd, type @jobadv <job>.
Further advances would only require you to type @jobadv.
The system also allows you to go from 2nd to 4th job in case you overleveled, and generally advancing to 2nd is available at all times you're above 30 and 1st job, so you can't be stuck.
I've worked hard to type out all of it (idea and sketch came up at school), and as a loyable member of the OdinTeh project, I would like to ask you all not to post this anywhere else with my permission.
This is intended to be a player command, but feel free to change it to a GM command.
Make sure to include MapleJob and MapleCharacter in your imports before reporting any failed compiles. Informative messages are included, by the way.
Pirates not included due to them being too buggy to be used in an actual server at this time. If you really need them, look at the code and make the required modifications.
Your comments are more than welcome.
I've worked on a command for 2nd to 4th job advances.
I've originally written it exclusively for my server, but realized it would be nice to share it with you guys.
To advance to 2nd, type @jobadv <job>.
Further advances would only require you to type @jobadv.
The system also allows you to go from 2nd to 4th job in case you overleveled, and generally advancing to 2nd is available at all times you're above 30 and 1st job, so you can't be stuck.
I've worked hard to type out all of it (idea and sketch came up at school), and as a loyable member of the OdinTeh project, I would like to ask you all not to post this anywhere else with my permission.
This is intended to be a player command, but feel free to change it to a GM command.
Make sure to include MapleJob and MapleCharacter in your imports before reporting any failed compiles. Informative messages are included, by the way.
Code:
else if (splitted[0].equals("@jobadv")) {
MapleCharacter player = c.getPlayer();
int level = player.getLevel();
MapleJob job = player.getJob();
int done = 0;
if (done == 0) {
if (level >= 70 && level <= 119) {
if (job == net.sf.odinms.client.MapleJob.ASSASSIN) {
player.changeJob(net.sf.odinms.client.MapleJob.HERMIT);
mc.dropMessage("Congratulations, you have successfully taken the 3rd job advancement as a Hermit.");
}
else if (job == net.sf.odinms.client.MapleJob.BANDIT) {
player.changeJob(net.sf.odinms.client.MapleJob.CHIEFBANDIT);
mc.dropMessage("Congratulations, you have successfully taken the 3rd job advancement as a Chief Bandit.");
}
else if (job == net.sf.odinms.client.MapleJob.HUNTER) {
player.changeJob(net.sf.odinms.client.MapleJob.RANGER);
mc.dropMessage("Congratulations, you have successfully taken the 3rd job advancement as a Ranger.");
}
else if (job == net.sf.odinms.client.MapleJob.CROSSBOWMAN) {
player.changeJob(net.sf.odinms.client.MapleJob.SNIPER);
mc.dropMessage("Congratulations, you have successfully taken the 3rd job advancement as a Sniper.");
}
else if (job == net.sf.odinms.client.MapleJob.FIGHTER) {
player.changeJob(net.sf.odinms.client.MapleJob.CRUSADER);
mc.dropMessage("Congratulations, you have successfully taken the 3rd job advancement as a Crusader.");
}
else if (job == net.sf.odinms.client.MapleJob.PAGE) {
player.changeJob(net.sf.odinms.client.MapleJob.WHITEKNIGHT);
mc.dropMessage("Congratulations, you have successfully taken the 3rd job advancement as a White Knight.");
}
else if (job == net.sf.odinms.client.MapleJob.SPEARMAN) {
player.changeJob(net.sf.odinms.client.MapleJob.DRAGONKNIGHT);
mc.dropMessage("Congratulations, you have successfully taken the 3rd job advancement as a Dragon Knight.");
}
else if (job == net.sf.odinms.client.MapleJob.IL_WIZARD) {
player.changeJob(net.sf.odinms.client.MapleJob.IL_MAGE);
mc.dropMessage("Congratulations, you have successfully taken the 3rd job advancement as an Ice/Lightning Mage.");
}
else if (job == net.sf.odinms.client.MapleJob.FP_WIZARD) {
player.changeJob(net.sf.odinms.client.MapleJob.FP_MAGE);
mc.dropMessage("Congratulations, you have successfully taken the 3rd job advancement as a Fire/Poison Mage.");
}
else if (job == net.sf.odinms.client.MapleJob.CLERIC) {
player.changeJob(net.sf.odinms.client.MapleJob.PRIEST);
mc.dropMessage("Congratulations, you have successfully taken the 3rd job advancement as a Priest.");
}
else {
}
done = 1;
}
else if (level >= 120) {
if (job == net.sf.odinms.client.MapleJob.ASSASSIN || job == net.sf.odinms.client.MapleJob.HERMIT) {
player.changeJob(net.sf.odinms.client.MapleJob.NIGHTLORD);
mc.dropMessage("Congratulations, you have successfully taken the 4th job advancement as a Night Lord.");
}
else if (job == net.sf.odinms.client.MapleJob.BANDIT || job == net.sf.odinms.client.MapleJob.CHIEFBANDIT) {
player.changeJob(net.sf.odinms.client.MapleJob.SHADOWER);
mc.dropMessage("Congratulations, you have successfully taken the 4th job advancement as a Shadower.");
}
else if (job == net.sf.odinms.client.MapleJob.HUNTER || job == net.sf.odinms.client.MapleJob.RANGER) {
player.changeJob(net.sf.odinms.client.MapleJob.BOWMASTER);
mc.dropMessage("Congratulations, you have successfully taken the 4th job advancement as a Bowmaster.");
}
else if (job == net.sf.odinms.client.MapleJob.CROSSBOWMAN || job == net.sf.odinms.client.MapleJob.SNIPER) {
player.changeJob(net.sf.odinms.client.MapleJob.CROSSBOWMASTER);
mc.dropMessage("Congratulations, you have successfully taken the 4th job advancement as a Marksman.");
}
else if (job == net.sf.odinms.client.MapleJob.IL_WIZARD || job == net.sf.odinms.client.MapleJob.IL_MAGE) {
player.changeJob(net.sf.odinms.client.MapleJob.IL_ARCHMAGE);
mc.dropMessage("Congratulations, you have successfully taken the 4th job advancement as an Ice/Lightning Arch Mage.");
}
else if (job == net.sf.odinms.client.MapleJob.FP_WIZARD || job == net.sf.odinms.client.MapleJob.FP_MAGE) {
player.changeJob(net.sf.odinms.client.MapleJob.FP_ARCHMAGE);
mc.dropMessage("Congratulations, you have successfully taken the 4th job advancement as a Fire/Poison Arch Mage.");
}
else if (job == net.sf.odinms.client.MapleJob.CLERIC || job == net.sf.odinms.client.MapleJob.PRIEST) {
player.changeJob(net.sf.odinms.client.MapleJob.BISHOP);
mc.dropMessage("Congratulations, you have successfully taken the 4th job advancement as a Bishop.");
}
else if (job == net.sf.odinms.client.MapleJob.FIGHTER || job == net.sf.odinms.client.MapleJob.CRUSADER) {
player.changeJob(net.sf.odinms.client.MapleJob.HERO);
mc.dropMessage("Congratulations, you have successfully taken the 4th job advancement as a Hero.");
}
else if (job == net.sf.odinms.client.MapleJob.SPEARMAN || job == net.sf.odinms.client.MapleJob.DRAGONKNIGHT) {
player.changeJob(net.sf.odinms.client.MapleJob.DARKKNIGHT);
mc.dropMessage("Congratulations, you have successfully taken the 4th job advancement as a Dark Knight.");
}
else if (job == net.sf.odinms.client.MapleJob.PAGE || job == net.sf.odinms.client.MapleJob.WHITEKNIGHT) {
player.changeJob(net.sf.odinms.client.MapleJob.PALADIN);
mc.dropMessage("Congratulations, you have successfully taken the 4th job advancement as a Paladin.");
}
else {
}
done = 1;
}
if (level >= 30) {
if ((splitted[1].equals("spearman")) && job == (net.sf.odinms.client.MapleJob.WARRIOR)) {
player.changeJob(net.sf.odinms.client.MapleJob.SPEARMAN);
mc.dropMessage("Congratulations, you have successfully taken the 2nd job advancement as a Spearman.");
}
else if ((splitted[1].equals("fighter")) && job == (net.sf.odinms.client.MapleJob.WARRIOR)) {
player.changeJob(net.sf.odinms.client.MapleJob.FIGHTER);
mc.dropMessage("Congratulations, you have successfully taken the 2nd job advancement as a Fighter.");
}
else if ((splitted[1].equals("page")) && job == (net.sf.odinms.client.MapleJob.WARRIOR)) {
player.changeJob(net.sf.odinms.client.MapleJob.PAGE);
mc.dropMessage("Congratulations, you have successfully taken the 2nd job advancement as a Page.");
}
else if ((splitted[1].equals("ilwizard")) && job == (net.sf.odinms.client.MapleJob.MAGICIAN)) {
player.changeJob(net.sf.odinms.client.MapleJob.IL_WIZARD);
mc.dropMessage("Congratulations, you have successfully taken the 2nd job advancement as an Ice/Lightning Wizard.");
}
else if ((splitted[1].equals("fpwizard")) && job == (net.sf.odinms.client.MapleJob.MAGICIAN)) {
player.changeJob(net.sf.odinms.client.MapleJob.FP_WIZARD);
mc.dropMessage("Congratulations, you have successfully taken the 2nd job advancement as a Fire/Poison Wizard.");
}
else if ((splitted[1].equals("cleric")) && job == (net.sf.odinms.client.MapleJob.MAGICIAN)) {
player.changeJob(net.sf.odinms.client.MapleJob.CLERIC);
mc.dropMessage("Congratulations, you have successfully taken the 2nd job advancement as a Cleric.");
}
else if ((splitted[1].equals("hunter")) && job == (net.sf.odinms.client.MapleJob.BOWMAN)) {
player.changeJob(net.sf.odinms.client.MapleJob.HUNTER);
mc.dropMessage("Congratulations, you have successfully taken the 2nd job advancement as a Hunter.");
}
else if ((splitted[1].equals("crossbowman")) && job == (net.sf.odinms.client.MapleJob.BOWMAN)) {
player.changeJob(net.sf.odinms.client.MapleJob.CROSSBOWMAN);
mc.dropMessage("Congratulations, you have successfully taken the 2nd job advancement as a Crossbowman.");
}
else if ((splitted[1].equals("assassin")) && job == (net.sf.odinms.client.MapleJob.THIEF)) {
player.changeJob(net.sf.odinms.client.MapleJob.ASSASSIN);
mc.dropMessage("Congratulations, you have successfully taken the 2nd job advancement as an Assassin.");
}
else if ((splitted[1].equals("bandit")) && job == (net.sf.odinms.client.MapleJob.THIEF)) {
player.changeJob(net.sf.odinms.client.MapleJob.BANDIT);
mc.dropMessage("Congratulations, you have successfully taken the 2nd job advancement as a Bandit.");
}
done = 1;
if (splitted[1].equals("help")) {
mc.dropMessage("To perform a 2nd job advancement, type @jobadv <desiredjob>.");
mc.dropMessage("<desiredjob> can be any of the following:");
mc.dropMessage("fighter, spearman, page, ilwizard, fpwizard, cleric, hunter, crossbowman, assassin, bandit.");
mc.dropMessage("Future job advances only require you to type @jobadv.");
done = 1;
}
}
if (done == 0) {
mc.dropMessage("This system allows you to perform all job advances from 2nd to 4th.");
mc.dropMessage("To perform a 2nd job advancement, type @jobadv <desiredjob>.");
mc.dropMessage("<desiredjob> can be any of the following:");
mc.dropMessage("fighter, spearman, page, ilwizard, fpwizard, cleric, hunter, crossbowman, assassin, bandit.");
mc.dropMessage("Future job advances only require you to type @jobadv.");
mc.dropMessage("For your first job advance, talk to your respective job instructor.");
}
}
}
Pirates not included due to them being too buggy to be used in an actual server at this time. If you really need them, look at the code and make the required modifications.
Your comments are more than welcome.

