DB improvement + 2nd job info

Fixed a major performance problem with installing over 10000 threads when a given amount of accounts exists on the DB.
Added information for the available 2nd jobs of the Explorers, introducing to the players the gists of each job branch.
This commit is contained in:
ronancpl
2017-12-02 18:50:15 -02:00
parent a3b6cf563b
commit 8dba6957df
7 changed files with 85 additions and 39 deletions

View File

@@ -82,8 +82,8 @@ function action(mode, type, selection) {
if (cm.getJobId() == 0){
cm.changeJobById(500);
cm.gainItem(1492000, 1);
cm.gainItem(1482000, 1);
cm.gainItem(2330000, 1000);
cm.gainItem(1482000, 1);
cm.gainItem(2330000, 1000);
cm.resetStats();
}
cm.sendNext("Alright, from here out, you are a part of us! You'll be living the life of a wanderer at ..., but just be patient as soon, you'll be living the high life. Alright, it ain't much, but I'll give you some of my abilities... HAAAHHH!!!");
@@ -94,7 +94,9 @@ function action(mode, type, selection) {
} else if (status == 2)
cm.sendNextPrev("You've gotten much stronger now. Plus every single one of your inventories have added slots. A whole row, to be exact. Go see for it yourself. I just gave you a little bit of #bSP#k. When you open up the #bSkill#k menu on the lower left corner of the screen, there are skills you can learn by using SP's. One warning, though: You can't raise it all together all at once. There are also skills you can acquire only after having learned a couple of skills first.");
else if (status == 3)
cm.sendNextPrev("One more warning. Once you have chosen, you (Incomplete)");
cm.sendNextPrev("Now a reminder. Once you have chosen, you cannot change up your mind and try to pick another path. Go now, and live as a proud Pirate.");
else
cm.dispose();
} else if(actionx["2ndJob"]){
if (status == 0){
if (cm.isQuestCompleted(2191) || cm.isQuestCompleted(2192))
@@ -104,11 +106,16 @@ function action(mode, type, selection) {
} else if (status == 1){
if (!cm.isQuestCompleted(2191) && !cm.isQuestCompleted(2192)){
// Pirate works differently from the other jobs. It warps you directly in.
actionx["2ndJobT"] = true;
cm.sendYesNo("Would you like to take the test now?");
actionx["2ndJobT"] = true;
cm.sendYesNo("Would you like to take the test now?");
} else {
if (selection < 3) {
cm.sendNext("Not done.");
if(selection == 0) { //brawler
cm.sendNext("Pirates that master #rKnuckles#k.\r\n\r\n#bBrawlers#k are melee, close-ranged fist fighters who deal lots of damage and have high HP. Armed with #rCorkscrew Blow#k, one can deal massive damage to multiple targets at once. #rOak Barrel#k permits one to scout or disguise themselves in middle of difficult fights, enabling a possible escaping route in front of danger.");
} else if(selection == 1) { //gunslinger
cm.sendNext("Pirates that master #rGuns#k.\r\n\r\n#bGunslingers#k are faster and ranged attackers. With the #rWings#k skill, Gunslingers can hover in the air, allowing for a longer, more sustained jump than a regular jump. #rBlank Shot#k allows to deal Stun status to multiple targets nearby.");
}
status -= 2;
} else
cm.sendNextPrev("You have a long road ahead of you still, but being a pirate will help you get there. Just keep that in mind and you will do fine.");
@@ -129,14 +136,16 @@ function action(mode, type, selection) {
return;
}
} else {
if(cm.isQuestCompleted(2191))
job = 510;
else if(cm.isQuestCompleted(2192))
job = 520;
if(cm.isQuestCompleted(2191) && cm.isQuestCompleted(2192))
job = (Math.random() < 0.5) ? 510 : 520;
else if(cm.isQuestCompleted(2191))
job = 510;
else if(cm.isQuestCompleted(2192))
job = 520;
cm.sendYesNo("So you want to make the second job advancement as the " + (job == 510 ? "#bBrawler#k" : "#bGunslinger#k") + "? You know you won't be able to choose a different job for the 2nd job advancement once you make your decision here, right?");
}
} else if (status == 3){
cm.sendYesNo("So you want to make the second job advancement as the " + (job == 510 ? "#bBrawler#k" : "#bGunslinger#k") + "? You know you won't be able to choose a different job for the 2nd job advancement once you make your decision here, right?");
}
} else if (status == 3){
if (cm.haveItem(4031012))
cm.gainItem(4031012, -1);
@@ -150,7 +159,7 @@ function action(mode, type, selection) {
else if (status == 5)
cm.sendNextPrev("I have also given you a little bit of #bSP#k. Open the #bSkill Menu#k located at the bottom left corner. you'll be able to boost up the newer acquired 2nd level skills. A word of warning, though. You can't boost them up all at once. Some of the skills are only available after you have learned other skills. Make sure yo remember that.");
else if (status == 6)
cm.sendNextPrev((job == 510 ? "Brawlers" : "Gunslingers") + " need to be strong. But remember that you can't abuse that power and use it on a weaking. Please use your enormous power the right way, because... for you to use that the right way, that is much harden than just getting stronger. Please find me after you have advanced much further. I'll be waiting for you.");
cm.sendNextPrev((job == 510 ? "Brawlers" : "Gunslingers") + " need to be strong. But remember that you can't abuse that power and use it on a weakling. Please use your enormous power the right way, because... for you to use that the right way, that is much harden than just getting stronger. Please find me after you have advanced much further. I'll be waiting for you.");
} else if (actionx["3thJobI"]){
if (status == 0){
if (cm.getPlayer().gotPartyQuestItem("JB3")){