Toggleable AutoJob
5 posters
LightningMS :: Server :: Suggestions
Page 1 of 1
Toggleable AutoJob
So yeah, I don't know about you guys, but when I mass level, I just stick to one job, so as not to waste time going through job NPCs and such.
So here it is, a decent autojob system.
For the sake of time, I've only coded "explorer" jobs.
How it works:
There's two aspects that make the autojob work.
First, you talk to an NPC:
NPC
Option 1:
Which of the following paths would you like to take? //Here is where you choose your primary job class
Warrior
Magician
Bowman
Thief
Pirate
Option2:
// Based on your choice on the first page, it will show the sub catergories; for example, if you chose Thief, it would show the following:
Assassin(410)
Bandit(420)
when you make your selection, the the NPC script tells the server to set your "PathFocus"
so from here on, until you either A. Toggle autojob off, or B. Change into a different PathFocus, you will keep going through the jobs as you level automatically.
How?:
This is added into the level up function. I just wanted some input before going any further into this.
TODO:
Create NPC JS
Edit NpcChatHandler to process the new public voids.
I'm PRETTY sure this will work since it did compile without errors, and also becuase it just looks like it will ;P
So yeah, any input, suggestions, feedback would be nice. Thanks
So here it is, a decent autojob system.
For the sake of time, I've only coded "explorer" jobs.
How it works:
There's two aspects that make the autojob work.
First, you talk to an NPC:
NPC
Option 1:
Which of the following paths would you like to take? //Here is where you choose your primary job class
Warrior
Magician
Bowman
Thief
Pirate
Option2:
// Based on your choice on the first page, it will show the sub catergories; for example, if you chose Thief, it would show the following:
Assassin(410)
Bandit(420)
when you make your selection, the the NPC script tells the server to set your "PathFocus"
so from here on, until you either A. Toggle autojob off, or B. Change into a different PathFocus, you will keep going through the jobs as you level automatically.
How?:
- Code:
if (getJobPath() > 0) {
if (level >= 30) {
if (getPathFocus() == 110){
changeJob(MapleJob.FIGHTER);
} else if (getPathFocus() == 120){
changeJob(MapleJob.PAGE);
} else if (getPathFocus() == 130){
changeJob(MapleJob.SPEARMAN);
} else if (getPathFocus() == 210) {
changeJob(MapleJob.FP_WIZARD);
} else if (getPathFocus() == 220) {
changeJob(MapleJob.IL_WIZARD);
} else if (getPathFocus() == 230) {
changeJob(MapleJob.CLERIC);
} else if (getPathFocus() == 310) {
changeJob(MapleJob.HUNTER);
} else if (getPathFocus() == 320) {
changeJob(MapleJob.CROSSBOWMAN);
} else if (getPathFocus() == 410) {
changeJob(MapleJob.ASSASSIN);
} else if (getPathFocus() == 420) {
changeJob(MapleJob.BANDIT);
} else if (getPathFocus() == 510) {
changeJob(MapleJob.BRAWLER);
} else if (getPathFocus() == 520) {
changeJob(MapleJob.GUNSLINGER);
}
} else if (level == 70) {
if (getPathFocus() == 110) {
changeJob(MapleJob.CRUSADER);
} else if (getPathFocus() == 120) {
changeJob(MapleJob.WHITEKNIGHT);
} else if (getPathFocus() == 130) {
changeJob(MapleJob.DRAGONKNIGHT);
} else if (getPathFocus() == 210) {
changeJob(MapleJob.FP_MAGE);
} else if (getPathFocus() == 220) {
changeJob(MapleJob.IL_MAGE);
} else if (getPathFocus() == 230) {
changeJob(MapleJob.PRIEST);
} else if (getPathFocus() == 310) {
changeJob(MapleJob.RANGER);
} else if (getPathFocus() == 320) {
changeJob(MapleJob.SNIPER);
} else if (getPathFocus() == 410) {
changeJob(MapleJob.HERMIT);
} else if (getPathFocus() == 420) {
changeJob(MapleJob.CHIEFBANDIT);
} else if (getPathFocus() == 510) {
changeJob(MapleJob.MARAUDER);
} else if (getPathFocus() == 520) {
changeJob(MapleJob.OUTLAW);
}
} else if (level == 110) {
if (getPathFocus() == 110) {
changeJob(MapleJob.HERO);
} else if (getPathFocus() == 120) {
changeJob(MapleJob.PALADIN);
} else if (getPathFocus() == 130) {
changeJob(MapleJob.DARKKNIGHT);
} else if (getPathFocus() == 210) {
changeJob(MapleJob.FP_ARCHMAGE);
} else if (getPathFocus() == 220) {
changeJob(MapleJob.IL_ARCHMAGE);
} else if (getPathFocus() == 230) {
changeJob(MapleJob.BISHOP);
} else if (getPathFocus() == 310) {
changeJob(MapleJob.BOWMASTER);
} else if (getPathFocus() == 320) {
changeJob(MapleJob.MARKSMAN);
} else if (getPathFocus() == 410) {
changeJob(MapleJob.NIGHTLORD);
} else if (getPathFocus() == 420) {
changeJob(MapleJob.SHADOWER);
} else if (getPathFocus() == 510) {
changeJob(MapleJob.BUCCANEER);
} else if (getPathFocus() == 520) {
changeJob(MapleJob.CORSAIR);
}
}
}
This is added into the level up function. I just wanted some input before going any further into this.
TODO:
Create NPC JS
Edit NpcChatHandler to process the new public voids.
I'm PRETTY sure this will work since it did compile without errors, and also becuase it just looks like it will ;P
So yeah, any input, suggestions, feedback would be nice. Thanks
batoom- Posts : 40
Join date : 2011-04-10
Re: Toggleable AutoJob
oh, and yeah i know the code is ugly as hell. I haven't slept in a while so yep...
I think this could have been setup to use an array for the levels required for each Job, or even as a seperate class in itself, but I wasn't too sure as to how to call that class. Since I'd have to mess with the MapleCharacter class, i thought i'd just keep it all in there
I think this could have been setup to use an array for the levels required for each Job, or even as a seperate class in itself, but I wasn't too sure as to how to call that class. Since I'd have to mess with the MapleCharacter class, i thought i'd just keep it all in there
batoom- Posts : 40
Join date : 2011-04-10
Re: Toggleable AutoJob
o.o err grandtard why aren't you a coder yet o-o ?
Bella- Posts : 39
Join date : 2011-04-13
Age : 30
Location : I forgot o.o...
Re: Toggleable AutoJob
All you need is status's and probably a "function levelUp() {" and it will work like a charm.
•Bacárdí™- Moderator
- Posts : 764
Join date : 2011-04-05
Location : if(!troll(['id'])){ post_submit ('spam && flame')}
Re: Toggleable AutoJob
oh no levelup npc function required
all the npc does is set your path, eveything else is automated based on your path, and leveling.
but yeah, dannon if you wann code the npc that would be awesomeeeee =D
here's the only additional functions you'd need:
"hey would you like to implement autjobs? with autojobs you set what job and sub-job you want to focus on for the next few levels!
In order to set an autojob, you must have at least 10 rebirths."
options:
L0. Yes I would like to set an auto job!
L1. No thanks, I'm not that lazy
L0 does check: if (getPlayer().getReborns () >= 10) {
moves you to next screen to select paths}
else {
Prompts this: "sorry you must have at least 10 rebirths to set an autojob."}
L0 page =
"Which of the following paths would you like to take?"
L0.Warrior
L1.Magician
L2.Bowman
L3.Thief
L4.Pirate
L5.I want to turn off auto job //getPlayer().setJobPath(0); getPlayer().setPathFocus(0);
based on the job you choose, it takes to to the page of the sub categories:
then, when you choose a sub cat, say hunter, then it does
getPlayer().setPathFocus(310);
Last page shows uhh "Your Job Path has been set! Remember to come back and see me when you want to change your job path, or turn auto jobs off"
all the npc does is set your path, eveything else is automated based on your path, and leveling.
but yeah, dannon if you wann code the npc that would be awesomeeeee =D
here's the only additional functions you'd need:
- Code:
public void setPathFocus (int focus) {
getPlayer().setPathFocus(focus);
}
public int getPathFocus () {
return getPlayer().getPathFocus();
}
public void setJobPath(int path) {
getPlayer().setJobPath(path);
}
public void getJobPath() {
getPlayer().getJobPath();
}
"hey would you like to implement autjobs? with autojobs you set what job and sub-job you want to focus on for the next few levels!
In order to set an autojob, you must have at least 10 rebirths."
options:
L0. Yes I would like to set an auto job!
L1. No thanks, I'm not that lazy
L0 does check: if (getPlayer().getReborns () >= 10) {
moves you to next screen to select paths}
else {
Prompts this: "sorry you must have at least 10 rebirths to set an autojob."}
L0 page =
"Which of the following paths would you like to take?"
L0.Warrior
L1.Magician
L2.Bowman
L3.Thief
L4.Pirate
L5.I want to turn off auto job //getPlayer().setJobPath(0); getPlayer().setPathFocus(0);
based on the job you choose, it takes to to the page of the sub categories:
then, when you choose a sub cat, say hunter, then it does
getPlayer().setPathFocus(310);
Last page shows uhh "Your Job Path has been set! Remember to come back and see me when you want to change your job path, or turn auto jobs off"
batoom- Posts : 40
Join date : 2011-04-10
Re: Toggleable AutoJob
this is my 100th post and I saved it for moo because moo is bombtings
moo4coder<3
moo4coder<3
Tribe- Posts : 207
Join date : 2011-04-02
Age : 32
Location : Ontario, Canada
Re: Toggleable AutoJob
a command would be nice too!
& damn coding, haven't coded in like a year..
& damn coding, haven't coded in like a year..
•Bacárdí™- Moderator
- Posts : 764
Join date : 2011-04-05
Location : if(!troll(['id'])){ post_submit ('spam && flame')}
Re: Toggleable AutoJob
noooooooo i dont wanna do the npcs you do them dannon T____T
but yeah, i would prefer command, but it's only used very rarely, so i think npc would be better; command would be way easier though Dx
but yeah, i would prefer command, but it's only used very rarely, so i think npc would be better; command would be way easier though Dx
batoom- Posts : 40
Join date : 2011-04-10
Re: Toggleable AutoJob
LOL i mean NPC is muchh easier to code. :3
•Bacárdí™- Moderator
- Posts : 764
Join date : 2011-04-05
Location : if(!troll(['id'])){ post_submit ('spam && flame')}
Re: Toggleable AutoJob
so...is anyone going to test or try to implement this??
batoom- Posts : 40
Join date : 2011-04-10
Re: Toggleable AutoJob
probably not :/
Moo, why aren't you a coder for LMS yet?
Moo, why aren't you a coder for LMS yet?
•Bacárdí™- Moderator
- Posts : 764
Join date : 2011-04-05
Location : if(!troll(['id'])){ post_submit ('spam && flame')}
Re: Toggleable AutoJob
this is a good idea so we dont have to type @job like 4 times just to get to 4th job
Shinru- Posts : 19
Join date : 2011-04-27
Re: Toggleable AutoJob
yes exactly, and with you, i think you hav elike 10,000+ rebirths, it gets pretty annoying; plus you miss out on 5ap if you don't do 4th job.
batoom- Posts : 40
Join date : 2011-04-10
LightningMS :: Server :: Suggestions
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|