Using Java ThreadPool + Mob Skills & Event Instance patch + Eqp Merge

Server source now uses Java ThreadPool, recycling used thread resources for next uses.
Added Grenade visual effect for other players.
Implemented an attempt towards unsynced mob behavior, where reportedly players were able to pin same mob in different sections of the map.
Solved several deadlock issues, mostly regarding character synchronized methods, event instance scripts and player/item vision-unvision.
Solved an issue where mobs would not cast some skills of it's skillset. Frequent behavior on low-leveled mobs.
Fixed a bug on 2nd Maker quest where players could complete it by merely disassembling an equipment.
New custom mechanic: equipment merge. Similarly to the Bazaar NPC, every equipment after the selected one is used up, and a fraction of their stat amounts are used as stat gains on the currently equipped items. If restrictions are enabled, players must be high-leveled and Maker lv3 to use it.
Skill Storm Break no longer uses up arrows.
Added a server flag to allow access for all Aran job skills from the beginning.
Implemented Battleship and Super Transformation questline scripts.
Fixed a desynchronization within pet position and cash inventory position, that could potentially lead to some inventory issues until relogin.
Improved timestamp handling in some handler classes. Spam detection is entirely a server-side matter, hence removed usage of client-sided timestamp content.
Refactored some pet response packets, improving some of their behaviors.
Fixed some quest issues: Maker lv1 and Omega Sector meteorite one.
This commit is contained in:
ronancpl
2018-11-10 17:48:35 -02:00
parent 00675ab95d
commit 5ee0cd1c98
120 changed files with 7424 additions and 6387 deletions

View File

@@ -33,8 +33,39 @@ spawnPnpc = false;
spawnPnpcFee = 7000000;
jobType = 5;
var advQuest = 0;
function start() {
if (parseInt(cm.getJobId() / 100) == jobType && cm.canSpawnPlayerNpc(Packages.constants.GameConstants.getHallOfFameMapid(cm.getJob()))) {
if (cm.isQuestStarted(6330)) {
if (cm.getEventInstance() != null) { // missing script for skill test found thanks to Lost(tm)
advQuest = 5; // string visibility thanks to iPunchEm & Glvelturall
cm.sendNext("Not bad at all. Let's discuss this outside!");
cm.setQuestProgress(6330, 0, 1);
} else if (cm.getQuestProgress(6330, 0) == 0) {
advQuest = 1;
cm.sendNext("You're ready, right? Now try to withstand my attacks for 2 minutes. I won't go easy on you. Good luck, because you will need it.");
} else {
advQuest = 3;
cm.teachSkill(5121003, 0, 10, -1);
cm.forceCompleteQuest(6330);
cm.sendNext("Congratulations. You have managed to pass my test. I'll teach you a new skill called \"Super Transformation\".\r\n\r\n #s5221003# #b#q5221003##k");
}
} else if (cm.isQuestStarted(6370)) {
if (cm.getEventInstance() != null) {
advQuest = 6;
cm.sendNext("Not bad at all. Let's discuss this outside!");
cm.setQuestProgress(6370, 0, 1);
} else if (cm.getQuestProgress(6370, 0) == 0) {
advQuest = 2;
cm.sendNext("You're ready, right? Now try to withstand my attacks for 2 minutes. I won't go easy on you. Good luck, because you will need it.");
} else {
advQuest = 4;
cm.teachSkill(5221006, 0, 10, -1);
cm.forceCompleteQuest(6370);
cm.sendNext("Congratulations. You have managed to pass my test. I'll teach you a new skill called \"Battleship\".\r\n\r\n #s5221006# #b#q5221006##k");
}
} else if (parseInt(cm.getJobId() / 100) == jobType && cm.canSpawnPlayerNpc(Packages.constants.GameConstants.getHallOfFameMapid(cm.getJob()))) {
spawnPnpc = true;
var sendStr = "You have walked a long way to reach the power, wisdom and courage you hold today, haven't you? What do you say about having right now #ra NPC on the Hall of Fame holding the current image of your character#k? Do you like it?";
@@ -82,7 +113,24 @@ function action(mode, type, selection) {
start();
return;
} else {
if(spawnPnpc) {
if (advQuest > 0) {
if (advQuest < 3) {
var em = cm.getEventManager(advQuest == 1 ? "4jship" : "4jsuper");
if(!em.startInstance(cm.getPlayer())) {
cm.sendOk("Someone is already challenging the test. Please try again later.");
}
} else if (advQuest < 5) {
if (advQuest == 3) {
cm.sendOk("It is similar to that of 'Transformation', but it's much more powerful than that. Keep training, and hope to see you around.");
} else {
cm.sendOk("Unlike most of the other skills you used as a Pirate, this one definitely is different. You can actually ride the 'Battleship' and attack enemies with it. Your DEF level will increase for the time you're on board, so that'll help you tremendously in combat situations. May you become the best Gunslinger out there...");
}
} else {
cm.warp(120000101);
}
cm.dispose();
} else if(spawnPnpc) {
if(mode > 0) {
if(cm.getMeso() < spawnPnpcFee) {
cm.sendOk("Sorry, you don't have enough mesos to purchase your place on the Hall of Fame.");