Code:
var status = 0;
var jobName;
var job;
function start() {
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();
} else {
if (mode == 1)
status++;
else
status--;
if (status == 0) {
cm.sendNext("Hello, I'm in charge of Job Advancing.");
} else if (status == 1) {
if (cm.getLevel() < 200 && cm.getJobId()==0) {
if (cm.getLevel() < 8) {
cm.sendNext("Sorry, but you have to be at least level 8 to use my services.");
status = 98;
} else if (cm.getLevel() < 10) {
cm.sendYesNo("Congratulations of reaching such a high level. Would you like to make the #rFirst Job Advancement#k as a #rMagician#k?");
status = 150;
} else {
cm.sendYesNo("Congratulations on reaching such a high level. Would you like to make the #rFirst Job Advancement#k?");
status = 153;
}
} else if (cm.getLevel() < 30) {
cm.sendNext("Sorry, but you have to be at least level 30 to make the #rSecond Job Advancement#k.");
status = 98;
} else if (cm.getJobId()==400) {
cm.sendSimple("Congratulations on reaching such a high level. Which would you like to be? #b\r\n#L0#Assassin#l\r\n#L1#Bandit#l#k");
} else if (cm.getJobId()==100) {
cm.sendSimple("Congratulations on reaching such a high level. Which would you like to be? #b\r\n#L2#Fighter#l\r\n#L3#Page#l\r\n#L4#Spearman#l#k");
} else if (cm.getJobId()==200) {
cm.sendSimple("Congratulations on reaching such a high level. Which would you like to be? #b\r\n#L5#Ice Lightning Wizard#l\r\n#L6#Fire Poison Wizard#l\r\n#L7#Cleric#l#k");
} else if (cm.getJobId()==300) {
cm.sendSimple("Congratulations on reaching such a high level. Which would you like to be? #b\r\n#L8#Hunter#l\r\n#L9#Crossbowman#l#k");
} else if (cm.getJobId()==500) {
cm.sendSimple("Congratulations on reaching such a high level. Which would you like to be? #b\r\n#L10#Brawler#l\r\n#L11#Gunslinger#l#k");
} else if (cm.getJobId()==1200) {
cm.sendSimple("Congratulations on reaching such a high level. Do you want to job advance? #b\r\n#L12#Yes#l\r\n#L13#No#l#k");
} else if (cm.getJobId()==1100) {
cm.sendSimple("Congratulations on reaching such a high level. Do you want to job advance? #b\r\n#L14#Yes#l\r\n#L15#No#l#k");
} else if (cm.getJobId()==1400) {
cm.sendSimple("Congratulations on reaching such a high level. Do you want to job advance? #b\r\n#L16#Yes#l\r\n#L17#No#l#k");
} else if (cm.getJobId()==1300) {
cm.sendSimple("Congratulations on reaching such a high level. Do you want to job advance? #b\r\n#L18#Yes#l\r\n#L19#No#l#k");
} else if (cm.getJobId()==1500) {
cm.sendSimple("Congratulations on reaching such a high level. Do you want to job advance? #b\r\n#L20#Yes#l\r\n#L21#No#l#k");
} else if (cm.getLevel() < 70) {
cm.sendNext("Sorry, but you have to be at least level 70 to make the #rThird Job Advancement#k.");
status = 98;
} else if (cm.getJobId()==410) {
status = 63;
cm.sendYesNo("Congratulations on reaching such a high level. Do you want to Job Advance now?");
} else if (cm.getJobId()==420) {
status = 66;
cm.sendYesNo("Congratulations on reaching such a high level. Do you want to Job Advance now?");
} else if (cm.getJobId()==310) {
status = 69;
cm.sendYesNo("Congratulations on reaching such a high level. Do you want to Job Advance now?");
} else if (cm.getJobId()==320) {
status = 72;
cm.sendYesNo("Congratulations on reaching such a high level. Do you want to Job Advance now?");
} else if (cm.getJobId()==210) {
status = 75;
cm.sendYesNo("Congratulations on reaching such a high level. Do you want to Job Advance now?");
} else if (cm.getJobId()==220) {
status = 78;
cm.sendYesNo("Congratulations on reaching such a high level. Do you want to Job Advance now?");
} else if (cm.getJobId()==230) {
status = 81;
cm.sendYesNo("Congratulations on reaching such a high level. Do you want to Job Advance now?");
} else if (cm.getJobId()==110) {
status = 84;
cm.sendYesNo("Congratulations on reaching such a high level. Do you want to Job Advance now?");
} else if (cm.getJobId()==120) {
status = 87;
cm.sendYesNo("Congratulations on reaching such a high level. Do you want to Job Advance now?");
} else if (cm.getJobId()==130) {
status = 90;
cm.sendYesNo("Congratulations on reaching such a high level. Do you want to Job Advance now?");
} else if (cm.getJobId()==520) {
status = 95;
cm.sendYesNo("Congratulations on reaching such a high level. Do you want to Job Advance now?");
} else if (cm.getJobId()==510) {
status = 92;
cm.sendYesNo("Congratulations on reaching such a high level. Do you want to Job Advance now?");
} else if (cm.getJobId()==1210) {
status = 169;
cm.sendYesNo("Congratulations on reaching such a high level. Do you want to Job Advance now?");
} else if (cm.getJobId()==1110) {
status = 172;
cm.sendYesNo("Congratulations on reaching such a high level. Do you want to Job Advance now?");
} else if (cm.getJobId()==1410) {
status = 175;
cm.sendYesNo("Congratulations on reaching such a high level. Do you want to Job Advance now?");
} else if (cm.getJobId()==1310) {
status = 178;
cm.sendYesNo("Congratulations on reaching such a high level. Do you want to Job Advance now?");
} else if (cm.getJobId()==1510) {
status = 181;
cm.sendYesNo("Congratulations on reaching such a high level. Do you want to Job Advance now?");
} else if (cm.getLevel() < 120) {
cm.sendNext("Sorry, but you have to be at least level 120 to make the #rForth Job Advancement#k.");
status = 98;
} else if (cm.getJobId()==411) {
status = 105;
cm.sendYesNo("Congratulations on reaching such a high level. Do you want to Job Advance now?");
} else if (cm.getJobId()==421) {
status = 108;
cm.sendYesNo("Congratulations on reaching such a high level. Do you want to Job Advance now?");
} else if (cm.getJobId()==311) {
status = 111;
cm.sendYesNo("Congratulations on reaching such a high level. Do you want to Job Advance now?");
} else if (cm.getJobId()==321) {
status = 114;
cm.sendYesNo("Congratulations on reaching such a high level. Do you want to Job Advance now?");
} else if (cm.getJobId()==211) {
status = 117;
cm.sendYesNo("Congratulations on reaching such a high level. Do you want to Job Advance now?");
} else if (cm.getJobId()==221) {
status = 120;
cm.sendYesNo("Congratulations on reaching such a high level. Do you want to Job Advance now?");
} else if (cm.getJobId()==231) {
status = 123;
cm.sendYesNo("Congratulations on reaching such a high level. Do you want to Job Advance now?");
} else if (cm.getJobId()==111) {
status = 126;
cm.sendYesNo("Congratulations on reaching such a high level. Do you want to Job Advance now?");
} else if (cm.getJobId()==121) {
status = 129;
cm.sendYesNo("Congratulations on reaching such a high level. Do you want to Job Advance now?");
} else if (cm.getJobId()==131) {
status = 132;
cm.sendYesNo("Congratulations on reaching such a high level. Do you want to Job Advance now?");
} else if (cm.getJobId()==511) {
status = 133;
cm.sendYesNo("Congratulations on reaching such a high level. Do you want to Job Advance now?");
} else if (cm.getJobId()==521) {
status = 134;
cm.sendYesNo("Congratulations on reaching such a high level. Do you want to Job Advance now?");
} else if (cm.getLevel() < 200) {
cm.sendNext("Sorry, but you have already attained the highest level of your job's mastery. \r\n\r\nHowever, you can #rrebirth#k when you are level 200.");
status = 98;
} else {
cm.dispose();
}
} else if (status == 2) {
if (selection == 0) {
jobName = "Assassin";
job = 410;
}
if (selection == 1) {
jobName = "Bandit";
job = 420;
}
if (selection == 2) {
jobName = "Fighter";
job = 110;
}
if (selection == 3) {
jobName = "Page";
job = 120;
}
if (selection == 4) {
jobName = "Spearman";
job = 130;
}
if (selection == 5) {
jobName = "Ice Lightning Wizard";
job = 220;
}
if (selection == 6) {
jobName = "Fire Poison Wizard";
job = 210;
}
if (selection == 7) {
jobName = "Cleric";
job = 230;
}
if (selection == 8) {
jobName = "Hunter";
job = 310;
}
if (selection == 9) {
jobName = "Crossbowman";
job = 320;
}
if (selection == 10) {
jobName = "Brawler";
job = 510;
}
if (selection == 11) {
jobName = "Gunslinger";
job = 520;
}
if (selection == 12) {
jobName = "Level 2 Blaze Wizard";
job = 1210;
}
if (selection == 13) {
cm.sendOk("Come back to me when you are ready.");
cm.dispose();
}
if (selection == 14) {
jobName = "Level 2 Dawn Warrior";
job = 1110;
}
if (selection == 15) {
cm.sendOk("Come back to me when you are ready.");
cm.dispose();
}
if (selection == 16) {
jobName = "Level 2 Night Walker";
job = 1410;
}
if (selection == 17) {
cm.sendOk("Come back to me when you are ready.");
cm.dispose();
}
if (selection == 18) {
jobName = "Level 2 Wind Archer";
job = 1310;
}
if (selection == 19) {
cm.sendOk("Come back to me when you are ready.");
cm.dispose();
}
if (selection == 20) {
jobName = "Level 2 Thunder Breaker";
job = 1510;
}
if (selection == 21) {
cm.sendOk("Come back to me when you are ready.");
cm.dispose();
}
cm.sendYesNo("Do you want to become a #r" + jobName + "#k?");
} else if (status == 3) {
cm.changeJobById(job);
cm.sendOk("There you go. Hope you enjoy it. See you around in the future maybe :)");
cm.dispose();
} else if (status == 61) {
if (cm.getJobId()==410) {
status = 63;
cm.sendYesNo("Congratulations on reaching such a high level. Do you want to Job Advance now?");
} else if (cm.getJobId()==420) {
status = 66;
cm.sendYesNo("Congratulations on reaching such a high level. Do you want to Job Advance now?");
} else if (cm.getJobId()==310) {
status = 69;
cm.sendYesNo("Congratulations on reaching such a high level. Do you want to Job Advance now?");
} else if (cm.getJobId()==320) {
status = 72;
cm.sendYesNo("Congratulations on reaching such a high level. Do you want to Job Advance now?");
} else if (cm.getJobId()==210) {
status = 75;
cm.sendYesNo("Congratulations on reaching such a high level. Do you want to Job Advance now?");
} else if (cm.getJobId()==220) {
status = 78;
cm.sendYesNo("Congratulations on reaching such a high level. Do you want to Job Advance now?");
} else if (cm.getJobId()==230) {
status = 81;
cm.sendYesNo("Congratulations on reaching such a high level. Do you want to Job Advance now?");
} else if (cm.getJobId()==110) {
status = 84;
cm.sendYesNo("Congratulations on reaching such a high level. Do you want to Job Advance now?");
} else if (cm.getJobId()==120) {
status = 87;
cm.sendYesNo("Congratulations on reaching such a high level. Do you want to Job Advance now?");
} else if (cm.getJobId()==130) {
status = 90;
cm.sendYesNo("Congratulations on reaching such a high level. Do you want to Job Advance now?");
} else if (cm.getJobId()==520) {
status = 98;
cm.sendYesNo("Congratulations on reaching such a high level. Do you want to Job Advance now?");
} else if (cm.getJobId()==510) {
status = 93;
cm.sendYesNo("Congratulations on reaching such a high level. Do you want to Job Advance now?");
} else if (cm.getJobId()==1210) {
status = 170;
cm.sendYesNo("Congratulations on reaching such a high level. Do you want to Job Advance now?");
} else if (cm.getJobId()==1110) {
status = 173;
cm.sendYesNo("Congratulations on reaching such a high level. Do you want to Job Advance now?");
} else if (cm.getJobId()==1410) {
status = 176;
cm.sendYesNo("Congratulations on reaching such a high level. Do you want to Job Advance now?");
} else if (cm.getJobId()==1310) {
status = 179;
cm.sendYesNo("Congratulations on reaching such a high level. Do you want to Job Advance now?");
} else if (cm.getJobId()==1510) {
status = 182;
cm.sendYesNo("Congratulations on reaching such a high level. Do you want to Job Advance now?");
} else {
cm.dispose();
}
} else if (status == 64) {
cm.changeJobById(411);
cm.sendOk("There you go. Hope you enjoy it. See you around in the future maybe :)");
cm.dispose();
} else if (status == 67) {
cm.changeJobById(421);
cm.sendOk("There you go. Hope you enjoy it. See you around in the future maybe :)");
cm.dispose();
} else if (status == 70) {
cm.changeJobById(311);
cm.sendOk("There you go. Hope you enjoy it. See you around in the future maybe :)");
cm.dispose();
} else if (status == 73) {
cm.changeJobById(321);
cm.sendOk("There you go. Hope you enjoy it. See you around in the future maybe :)");
cm.dispose();
} else if (status == 76) {
cm.changeJobById(211);
cm.sendOk("There you go. Hope you enjoy it. See you around in the future maybe :)");
cm.dispose();
} else if (status == 79) {
cm.changeJobById(221);
cm.sendOk("There you go. Hope you enjoy it. See you around in the future maybe :)");
cm.dispose();
} else if (status == 82) {
cm.changeJobById(231);
cm.sendOk("There you go. Hope you enjoy it. See you around in the future maybe :)");
cm.dispose();
} else if (status == 85) {
cm.changeJobById(111);
cm.sendOk("There you go. Hope you enjoy it. See you around in the future maybe :)");
cm.dispose();
} else if (status == 88) {
cm.changeJobById(121);
cm.sendOk("There you go. Hope you enjoy it. See you around in the future maybe :)");
cm.dispose();
} else if (status == 91) {
cm.changeJobById(131);
cm.sendOk("There you go. Hope you enjoy it. See you around in the future maybe :)");
cm.dispose();
} else if (status == 93) {
cm.changeJobById(511);
cm.sendOk("There you go. Hope you enjoy it. See you around in the future maybe :)");
cm.dispose();
} else if (status == 96) {
cm.changeJobById(521);
cm.sendOk("There you go. Hope you enjoy it. See you around in the future maybe :)");
cm.dispose();
} else if (status == 170) {
cm.changeJobById(1211);
cm.sendOk("There you go. Hope you enjoy it. See you around in the future maybe :)");
cm.dispose();
} else if (status == 173) {
cm.changeJobById(1111);
cm.sendOk("There you go. Hope you enjoy it. See you around in the future maybe :)");
cm.dispose();
} else if (status == 176) {
cm.changeJobById(1411);
cm.sendOk("There you go. Hope you enjoy it. See you around in the future maybe :)");
cm.dispose();
} else if (status == 179) {
cm.changeJobById(1311);
cm.sendOk("There you go. Hope you enjoy it. See you around in the future maybe :)");
cm.dispose();
} else if (status == 182) {
cm.changeJobById(1511);
cm.sendOk("There you go. Hope you enjoy it. See you around in the future maybe :)");
cm.dispose();
} else if (status == 99) {
cm.sendOk("Good luck on your training.");
cm.dispose();
} else if (status == 102) {
if (cm.getJobId()==411) {
status = 105;
cm.sendYesNo("Congratulations on reaching such a high level. Do you want to Job Advance now?");
} else if (cm.getJobId()==421) {
status = 108;
cm.sendYesNo("Congratulations on reaching such a high level. Do you want to Job Advance now?");
} else if (cm.getJobId()==311) {
status = 111;
cm.sendYesNo("Congratulations on reaching such a high level. Do you want to Job Advance now?");
} else if (cm.getJobId()==321) {
status = 114;
cm.sendYesNo("Congratulations on reaching such a high level. Do you want to Job Advance now?");
} else if (cm.getJobId()==211) {
status = 117;
cm.sendYesNo("Congratulations on reaching such a high level. Do you want to Job Advance now?");
} else if (cm.getJobId()==221) {
status = 120;
cm.sendYesNo("Congratulations on reaching such a high level. Do you want to Job Advance now?");
} else if (cm.getJobId()==231) {
status = 123;
cm.sendYesNo("Congratulations on reaching such a high level. Do you want to Job Advance now?");
} else if (cm.getJobId()==111) {
status = 126;
cm.sendYesNo("Congratulations on reaching such a high level. Do you want to Job Advance now?");
} else if (cm.getJobId()==121) {
status = 129;
cm.sendYesNo("Congratulations on reaching such a high level. Do you want to Job Advance now?");
} else if (cm.getJobId()==131) {
status = 132;
cm.sendYesNo("Congratulations on reaching such a high level. Do you want to Job Advance now?");
} else if (cm.getJobId()==511) {
status = 134;
cm.sendYesNo("Congratulations on reaching such a high level. Do you want to Job Advance now?");
} else if (cm.getJobId()==521) {
status = 136;
cm.sendYesNo("Congratulations on reaching such a high level. Do you want to Job Advance now?");
} else {
cm.dispose();
}
} else if (status == 106) {
cm.changeJobById(412);
cm.sendOk("There you go. Hope you enjoy it.");
cm.dispose();
} else if (status == 109) {
cm.changeJobById(422);
cm.sendOk("There you go. Hope you enjoy it.");
cm.dispose();
} else if (status == 112) {
cm.changeJobById(312);
cm.sendOk("There you go. Hope you enjoy it.");
cm.dispose();
} else if (status == 115) {
cm.changeJobById(322);
cm.sendOk("There you go. Hope you enjoy it.");
cm.dispose();
} else if (status == 118) {
cm.changeJobById(212);
cm.sendOk("There you go. Hope you enjoy it.");
cm.dispose();
} else if (status == 121) {
cm.changeJobById(222);
cm.sendOk("There you go. Hope you enjoy it.");
cm.dispose();
} else if (status == 124) {
cm.changeJobById(232);
cm.sendOk("There you go. Hope you enjoy it.");
cm.dispose();
} else if (status == 127) {
cm.changeJobById(112);
cm.sendOk("There you go. Hope you enjoy it.");
cm.dispose();
} else if (status == 130) {
cm.changeJobById(122);
cm.sendOk("There you go. Hope you enjoy it.");
cm.dispose();
} else if (status == 133) {
cm.changeJobById(132);
cm.sendOk("There you go. Hope you enjoy it.");
cm.dispose();
} else if (status == 134) {
cm.changeJobById(512);
cm.sendOk("There you go. Hope you enjoy it.");
cm.dispose();
} else if (status == 135) {
cm.changeJobById(522);
cm.sendOk("There you go. Hope you enjoy it.");
cm.dispose();
} else if (status == 154) {
cm.sendSimple("Which would you like to be?#r#l\r\n\r\nAdventurer#k#b #b\r\n#L0#Warrior#l\r\n#L1#Magician#l\r\n#L2#Bowman#l\r\n#L3#Thief#l\r\n#L4#Pirate#k#r#l\r\n\r\nKnight Of Cygnus?#k#b\r\n#L5#Dawn Warrior#l\r\n#L6#Night Walker#l\r\n#L7#Blaze Wizard#l\r\n#L8#Wind Archer#l\r\n#L9#Thunder Breaker#l#k");
} else if (status == 155) {
if (selection == 0) {
jobName = "Warrior";
job = 100;
}
if (selection == 1) {
jobName = "Magician";
job = 200;
}
if (selection == 2) {
jobName = "Bowman";
job = 300;
}
if (selection == 3) {
jobName = "Thief";
job = 400;
}
if (selection == 4) {
jobName = "Pirate";
job = 500;
}
if (selection == 5) {
jobName = "Dawn Warrior";
job = 1100;
}
if (selection == 6) {
jobName = "Night Walker";
job = 1400;
}
if (selection == 7) {
jobName = "Blaze Wizard";
job = 1200;
}
if (selection == 8) {
jobName = "Wind Archer";
job = 1300;
}
if (selection == 9) {
jobName = "Thunder Breaker";
job = 1500;
}
cm.sendYesNo("Do you want to become a #r" + jobName + "#k?");
} else if (status == 156) {
cm.changeJobById(job);
cm.sendOk("There you go. Hope you enjoy it. See you around in the future maybe :)");
cm.dispose();
}
}
}
Seperate Warper.
Code:
var bossmaps = Array(100000005, 105070002, 105090900, 230040420, 280030000, 220080000, 240020402, 240020**** 801040**** 240060200, 610010005, 610010012, 610010013, 610010**** 610010**** 610010102, 610010103, 610010104);
var monstermaps = Array(100040001, 101010**** 104040000, 103000**** 103000**** 101030**** 106000002, 101030103, 101040001, 101040003, 101030001, 104010001, 105070001, 105090300, 105040306, 230020000, 230010400, 211041400, 222010000, 220080000, 220070301, 220070201, 220050300, 220010500, 250020000, 251010000, 200040000, 200010301, 240020**** 240040500, 240040000, 600020300, 801040004, 800020130, 800020400);
var townmaps = Array(130000000, 300000000, 1010000, 680000000, 230000000, 101000000, 211000000, 100000000, 251000000, 103000000, 222000000, 104000000, 240000000, 220000000, 250000000, 800000000, 600000000, 221000000, 200000000, 102000000, 801000000, 105040300, 610010004, 260000000, 540010000, 120000000);
var chosenMap = -1;
var monsters = 0;
var towns = 0;
var bosses = 0;
importPackage(net.sf.odinms.client);
function start() {
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();
}
else {
if (status >= 3 && mode == 0) {
cm.sendOk("See you next time!.");
cm.dispose();
return;
}
if (mode == 1) {
status++;
}
else {
status--;
}
if (status == 0) {
cm.sendSimple("What would you like to do?\r\n#L0#World Tour#l\r\n#L1#Leave#l");
}
else if (status == 1) {
if (selection == 0) {
cm.sendSimple("What would you like to do\r\n#L0#Towns#l\r\n#L1#Monstermaps#l\r\n#L2#Bossmaps#l");
}
else if (selection == 1) {
cm.dispose();
}
}
else if (status == 2) {
if (selection == 0) {
var selStr = "Select your destination.#b";
for (var i = 0; i < townmaps.length; i++) {
selStr += "\r\n#L" + i + "##m" + townmaps[i] + "#";
}
cm.sendSimple(selStr);
towns = 1;
}
if (selection == 1) {
var selStr = "Select your destination.#b";
for (var i = 0; i < monstermaps.length; i++) {
selStr += "\r\n#L" + i + "##m" + monstermaps[i] + "#";
}
cm.sendSimple(selStr);
monsters = 1;
}
if (selection == 2) {
var selStr = "Select your destination.#b";
for (var i = 0; i < bossmaps.length; i++) {
selStr += "\r\n#L" + i + "##m" + bossmaps[i] + "#";
}
cm.sendSimple(selStr);
bosses = 1;
}
}
else if (status == 3) {
if (towns == 1) {
cm.sendYesNo("Do you want to go to #m" + townmaps[selection] + "#?");
chosenMap = selection;
towns = 2;
}
else if (monsters == 1) {
cm.sendYesNo("Do you want to go to #m" + monstermaps[selection] + "#?");
chosenMap = selection;
monsters = 2;
}
else if (bosses == 1) {
cm.sendYesNo("Do you want to go to #m" + bossmaps[selection] + "#?");
chosenMap = selection;
bosses = 2;
}
}
else if (status == 4) {
if (towns == 2) {
cm.warp(townmaps[chosenMap], 0);
cm.dispose();
}
else if (monsters == 2) {
cm.warp(monstermaps[chosenMap], 0);
cm.dispose();
}
else if (bosses == 2) {
cm.warp(bossmaps[chosenMap], 0);
cm.dispose();
}
}
}
}
Optional: