- Joined
- Dec 21, 2008
- Messages
- 11
- Reaction score
- 7
PHP:
/* [NPC]
All-In-One Job Advancer Randi
*/
var status = 0;
var job = 0;
var newJob = 0;
var lvl = 1;
var jobs = Array(**** 120, 130, 210, 220, 230, 310, 320, 410, 420, 510, 520, **** 121, 131, 211, 221, 231, 311, 321, 411, 421, 511, 521, **** 122, 1*** 212, 222, 2*** 312, 322, 412, 422, 512, 522);
function start()
{
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == -1) {
cm.voteMSG();
cm.dispose();
} else {
if (mode == 1) {
status++;
} else {
status--;
}
if (status == 0) {
job = cm.getJobId();
lvl = cm.getPlayer().getLevel();
if (lvl < 10){
cm.sendOk("Sorry, but you have to be at least level 10 to get a job advance.");
cm.dispose();
} else if (job == 0) {
if (lvl < 30){
cm.sendSimple("Choose What Job you want to be #b\r\n#L0# Warrior#l\r\n#L1# Magician#l\r\n#L2# Archer#l\r\n#L3# Thief#l\r\n#L4# Pirate#l");
status = 9;
} else if (lvl < 70) {
cm.sendSimple("Choose What Job you want to be #b\r\n#L0# Fighter#l\r\n#L1# page#l\r\n#L2# spearman#l\r\n#L3# fire wizard#l\r\n#L4# Ice wizard#l\r\n#L5# Cleric#l\r\n#L6# Bowman#l\r\n#L7# Cross Bowman#l\r\n#L8# Assasin#l\r\n#L9# Bandit#l\r\n#L10# Brawler#l\r\n#L11# GunSlinger#l");
status = 199;
} else if (lvl < 120) {
cm.sendSimple("Choose What Job you want to be #b\r\n#L12# Crusader#l\r\n#L13# Knight#l\r\n#L14# Dragon Knight#l\r\n#L15# fire Mage#l\r\n#L16# Ice Mage#l\r\n#L17# Preist#l\r\n#L18# Ranger#l\r\n#L19# Sniper#l\r\n#L20# Hermit#l\r\n#L21# Cheif Bandit#l\r\n#L22# Marauder#l\r\n#L23# Outlaw#l");
status = 199;
} else if (lvl >= 120) {
cm.sendSimple("Choose What Job you want to be #b\r\n#L24# Hero#l\r\n#L25# Paladin#l\r\n#L26# Dark Knight#l\r\n#L27# Fire ArchMage#l\r\n#L28# Ice ArchMage#l\r\n#L29# Bishop#l\r\n#L30# BowMaster#l\r\n#L31# MarksMan#l\r\n#L32# NightLord#l\r\n#L33# Shadower#l\r\n#L34# Buccaneer#l\r\n#L35# Corsair#l");
status = 199;
} else {
cm.sendOk("under construction");
}
} else if (job >= 100 && job % 100 == 0 ) {
var fuck = "Hi nub!";
if (lvl < 70){
if (job >= 100 && job < 200 && lvl >= 30) {
fuck = " Choose the Job you want : #b\r\n#L0# Fighter#l\r\n#L1# Page#l\r\n#L2# Spearman#l\r\n";
} else if (job >= 200 && job < 300 && lvl >= 30) {
fuck = " Choose the Job You want : #b\r\n#L3# Fire Wizard#l\r\n#L4# Ice Wizard#l\r\n#L5# Cleric#l\r\n";
} else if (job >= 300 && job < 400 && lvl >= 30) {
fuck = " Choose the Job You want : #b\r\n#L6# Bow Man#l\r\n#L7# Cross Bow Man#l\r\n";
} else if (job >= 400 && job < 500 && lvl >= 30) {
fuck = " Choose the Job You want : #b\r\n#L8# Assasin#l\r\n#L9# Bandit#l\r\n";
} else if (job >= 500 && job < 600 && lvl >= 30) {
fuck = " Choose the Job You want : #b\r\n#L10# Brawler#l\r\n#L11# GunSlinger#l\r\n";
} else {
cm.voteMSG();
cm.dispose();
}
} else if (lvl < 120) {
if (job >= 100 && job < 200 && lvl >= 70) {
fuck = " Choose the Job you want : #b\r\n#L12# Crusader#l\r\n#L13# Knight#l\r\n#L14# DragonKnight#l\r\n";
} else if (job >= 200 && job < 300 && lvl >= 70) {
fuck = " Choose the Job You want : #b\r\n#L15# Fire Mage#l\r\n#L16# Ice Magel\r\n#L17# Preist#l\r\n";
} else if (job >= 300 && job < 400 && lvl >= 70) {
fuck = " Choose the Job You want : #b\r\n#L18# Ranger#l\r\n#L19# Sniper#l\r\n";
} else if (job >= 400 && job < 500 && lvl >= 70) {
fuck = " Choose the Job You want : #b\r\n#L20# Hermit#l\r\n#L21# Cheif Bandit#l\r\n";
} else if (job >= 500 && job < 600 && lvl >= 70) {
fuck = " Choose the Job You want : #b\r\n#L22# Marauder#l\r\n#L23# Outlaw#l\r\n";
} else {
cm.voteMSG();
cm.dispose();
}
} else if (lvl >= 120) {
if (job >= 100 && job < 200 && lvl >= 120) {
fuck = " Choose the Job you want : #b\r\n#L24# Hero#l\r\n#L25# Paladin#l\r\n#L26# Darknight#l\r\n";
} else if (job >= 200 && job < 300 && lvl >= 120) {
fuck = " Choose the Job You want : #b\r\n#L27# Fire ArchMage#l\r\n#L28# Ice ArchMage#l\r\n#L29# Bishop#l\r\n";
} else if (job >= 300 && job < 400 && lvl >= 120) {
fuck = " Choose the Job You want : #b\r\n#L30# Bow Master#l\r\n#L31# MarksMan#l\r\n";
} else if (job >= 400 && job < 500 && lvl >= 120) {
fuck = " Choose the Job You want : #b\r\n#L32# NightLord#l\r\n#L33# Shadower#l\r\n";
} else if (job >= 500 && job < 600 && lvl >= 120) {
fuck = " Choose the Job You want : #b\r\n#L34# Buccaneer#l\r\n#L35# Corsair#l\r\n";
} else {
cm.voteMSG();
cm.dispose();
}
}
cm.sendSimple(fuck);
status = 199;
} else if (job >= 100 && job % 10 == 0) {
if (lvl >= 70 && lvl < 120){
newJob = (job + 1);
cm.changeJobById(newJob);
cm.sendOk("There you go. Have Fun");
status = 99;
} else if (lvl >= 120){
newJob = (job + 2);
cm.changeJobById(newJob);
cm.sendOk("There you go. Have Fun");
status = 99;
} else {
cm.voteMSG();
cm.dispose();
}
} else if (job >= 100 && job %10 == 1) {
if (lvl >= 120){
newJob = (job + 1);
cm.changeJobById(newJob);
cm.sendOk("There you go. Have Fun");
status = 99;
} else {
cm.voteMSG();
cm.dispose();
}
} else {
cm.voteMSG();
cm.dispose();
}
} else if (status == 10){
cm.changeJobById((selection + 1) * 100);
cm.sendOk("There u go. Have fun");
status = 99;
} else if (status == 200){
cm.changeJobById(jobs[selection]);
cm.sendOk("there u go. Have fun");
status = 99;
} else {
cm.voteMSG();
cm.dispose();
}
}
}
1) it doesnt check for stats
2) it can change your job straight to 4th job if you have level 120 .
This is for servers with 'laid-back' game play.
note: remember to edit the jobs array . its just job id arranged in order. RZ censored it ><
you will have to add a couple of functions in npcconversationmanager.java
PHP:
public void changeJobById(int a) {
getPlayer().changeJob(MapleJob.getById(a));
}
public void voteMSG(){
sendOk("Don't forget to vote for us #r#h #. #bhttp://your vote link bitch.#k");
}
public int getJobId(){
return getJob().getId();
}
Credits: I don't remember copying it from some one. iDolly for helping me I guess.
Last edited: