Storybook announce + AOE Mobskills & Autopot & Inventory check Patch

Implemented storybook detection for the skillbook announcer.
Fixed an issue with AOE mob skills not locating players properly in certain situations.
Reviewed interaction of players within same remote network on multiclient system.
Patched messages when leaving the expedition area showing up for leaving players.
Patched some skill questline item chances unexpectedly too low.
Reviewed Rush questline-exclusive area not allowing multiple players in the room.
Fixed meso capacity check on shop owner happening after item transaction.
Patched server-side autopot settings, now using threshold cooling method to determine a player's updated settings.
Reviewed locking flow regarding world/channel deployment on main class.
Fixed a scenario where items collectable by party members would not show up in case those were the only items to be dropped and none needed by the last-hitter.
Patched an issue in the inventory space checking algorithm that would allow a transaction for multiple of the same equipments.
Refactored Dojo entry/exit modules.
Patched a check on Maker skill.
Fixed Cygnus FA buff getting reapplied each time the skill procs.
This commit is contained in:
ronancpl
2019-11-26 01:13:15 -03:00
parent 661dcf0a96
commit bb586a7c0b
49 changed files with 658 additions and 372 deletions

View File

@@ -242,8 +242,8 @@ function scheduledTimeout(eim) {
function changedMap(eim, player, mapid) {
if (mapid < minMapId || mapid > maxMapId) {
if (eim.isEventTeamLackingNow(true, minPlayers, player)) {
eim.dropMessage(5, "[Expedition] Either the leader has quit the expedition or there is no longer the minimum number of members required to continue it.");
eim.unregisterPlayer(player);
eim.dropMessage(5, "[Expedition] Either the leader has quit the expedition or there is no longer the minimum number of members required to continue it.");
end(eim);
}
else {
@@ -310,8 +310,8 @@ function playerRevive(eim, player) {
function playerDisconnected(eim, player) {
if (eim.isEventTeamLackingNow(true, minPlayers, player)) {
eim.dropMessage(5, "[Expedition] Either the leader has quit the expedition or there is no longer the minimum number of members required to continue it.");
eim.unregisterPlayer(player);
eim.dropMessage(5, "[Expedition] Either the leader has quit the expedition or there is no longer the minimum number of members required to continue it.");
end(eim);
}
else {

View File

@@ -127,8 +127,8 @@ function scheduledTimeout(eim) {
function changedMap(eim, player, mapid) {
if (mapid < minMapId || mapid > maxMapId) {
if (eim.isExpeditionTeamLackingNow(true, minPlayers, player)) {
eim.dropMessage(5, "[Expedition] Either the leader has quit the expedition or there is no longer the minimum number of members required to continue it.");
eim.unregisterPlayer(player);
eim.dropMessage(5, "[Expedition] Either the leader has quit the expedition or there is no longer the minimum number of members required to continue it.");
end(eim);
}
else {
@@ -156,8 +156,8 @@ function playerRevive(eim, player) {
function playerDisconnected(eim, player) {
if (eim.isExpeditionTeamLackingNow(true, minPlayers, player)) {
eim.dropMessage(5, "[Expedition] Either the leader has quit the expedition or there is no longer the minimum number of members required to continue it.");
eim.unregisterPlayer(player);
eim.dropMessage(5, "[Expedition] Either the leader has quit the expedition or there is no longer the minimum number of members required to continue it.");
end(eim);
}
else {

View File

@@ -129,8 +129,8 @@ function scheduledTimeout(eim) {
function changedMap(eim, player, mapid) {
if (mapid < minMapId || mapid > maxMapId) {
if (eim.isExpeditionTeamLackingNow(true, minPlayers, player)) {
eim.dropMessage(5, "[Expedition] Either the leader has quit the expedition or there is no longer the minimum number of members required to continue it.");
eim.unregisterPlayer(player);
eim.dropMessage(5, "[Expedition] Either the leader has quit the expedition or there is no longer the minimum number of members required to continue it.");
end(eim);
}
else {
@@ -170,8 +170,8 @@ function monsterRevive(eim, mob) {
function playerDisconnected(eim, player) {
if (eim.isExpeditionTeamLackingNow(true, minPlayers, player)) {
eim.dropMessage(5, "[Expedition] Either the leader has quit the expedition or there is no longer the minimum number of members required to continue it.");
eim.unregisterPlayer(player);
eim.dropMessage(5, "[Expedition] Either the leader has quit the expedition or there is no longer the minimum number of members required to continue it.");
end(eim);
}
else {

View File

@@ -113,8 +113,8 @@ function scheduledTimeout(eim) {
function changedMap(eim, player, mapid) {
if (mapid < minMapId || mapid > maxMapId) {
if (eim.isExpeditionTeamLackingNow(true, minPlayers, player)) {
eim.dropMessage(5, "[Expedition] Either the leader has quit the expedition or there is no longer the minimum number of members required to continue it.");
eim.unregisterPlayer(player);
eim.dropMessage(5, "[Expedition] Either the leader has quit the expedition or there is no longer the minimum number of members required to continue it.");
end(eim);
}
else {
@@ -142,8 +142,8 @@ function playerRevive(eim, player) {
function playerDisconnected(eim, player) {
if (eim.isExpeditionTeamLackingNow(true, minPlayers, player)) {
eim.dropMessage(5, "[Expedition] Either the leader has quit the expedition or there is no longer the minimum number of members required to continue it.");
eim.unregisterPlayer(player);
eim.dropMessage(5, "[Expedition] Either the leader has quit the expedition or there is no longer the minimum number of members required to continue it.");
end(eim);
}
else {

View File

@@ -120,8 +120,8 @@ function scheduledTimeout(eim) {
function changedMap(eim, player, mapid) {
if (mapid < minMapId || mapid > maxMapId) {
if (eim.isExpeditionTeamLackingNow(true, minPlayers, player)) {
eim.dropMessage(5, "[Expedition] Either the leader has quit the expedition or there is no longer the minimum number of members required to continue it.");
eim.unregisterPlayer(player);
eim.dropMessage(5, "[Expedition] Either the leader has quit the expedition or there is no longer the minimum number of members required to continue it.");
end(eim);
}
else {
@@ -151,8 +151,8 @@ function playerRevive(eim, player) {
function playerDisconnected(eim, player) {
if (eim.isExpeditionTeamLackingNow(true, minPlayers, player)) {
eim.dropMessage(5, "[Expedition] Either the leader has quit the expedition or there is no longer the minimum number of members required to continue it.");
eim.unregisterPlayer(player);
eim.dropMessage(5, "[Expedition] Either the leader has quit the expedition or there is no longer the minimum number of members required to continue it.");
end(eim);
}
else {

View File

@@ -117,8 +117,8 @@ function scheduledTimeout(eim) {
function changedMap(eim, player, mapid) {
if (mapid < minMapId || mapid > maxMapId) {
if (eim.isExpeditionTeamLackingNow(true, minPlayers, player)) {
eim.dropMessage(5, "[Expedition] Either the leader has quit the expedition or there is no longer the minimum number of members required to continue it.");
eim.unregisterPlayer(player);
eim.dropMessage(5, "[Expedition] Either the leader has quit the expedition or there is no longer the minimum number of members required to continue it.");
end(eim);
}
else {
@@ -146,8 +146,8 @@ function playerRevive(eim, player) {
function playerDisconnected(eim, player) {
if (eim.isExpeditionTeamLackingNow(true, minPlayers, player)) {
eim.dropMessage(5, "[Expedition] Either the leader has quit the expedition or there is no longer the minimum number of members required to continue it.");
eim.unregisterPlayer(player);
eim.dropMessage(5, "[Expedition] Either the leader has quit the expedition or there is no longer the minimum number of members required to continue it.");
end(eim);
}
else {

View File

@@ -31,15 +31,12 @@ function start(ms) {
var stage = Math.floor(ms.getMapId() / 100) % 100;
var callBoss = false;
if (stage % 6 == 1) {
ms.getClient().getChannelServer().startDojoSchedule(ms.getMapId());
} else if(stage % 6 == 0) {
if (stage % 6 == 0) {
ms.getClient().getChannelServer().dismissDojoSchedule(ms.getMapId(), ms.getParty());
}
ms.getClient().getChannelServer().setDojoProgress(ms.getMapId());
} else {
callBoss = ms.getClient().getChannelServer().setDojoProgress(ms.getMapId());
callBoss = ms.getClient().getChannelServer().setDojoProgress(ms.getMapId());
if (stage % 6 > 0) {
var realstage = stage - ((stage / 6) | 0);
var mob = ms.getMonsterLifeFactory(9300183 + realstage);
if (callBoss && mob != null && ms.getPlayer().getMap().getMonsterById(9300216) == null) {

View File

@@ -26,6 +26,7 @@
*/
importPackage(Packages.config);
importPackage(Packages.constants.game);
var disabled = false;
var belts = Array(1132000, 1132001, 1132002, 1132003, 1132004);
@@ -69,7 +70,7 @@ function action(mode, type, selection) {
if(status == 0) {
if (isRestingSpot(cm.getPlayer().getMap().getId())) {
var text = "I'm surprised you made it this far! But it won't be easy from here on out. You still want the challenge?\r\n\r\n#b#L0#I want to continue#l\r\n#L1#I want to leave#l\r\n";
if (!cm.getPlayer().getDojoParty()) {
if (!GameConstants.isDojoPartyArea(cm.getPlayer().getMapId())) {
text += "#L2#I want to record my score up to this point#l";
}
cm.sendSimple(text);
@@ -99,7 +100,7 @@ function action(mode, type, selection) {
cm.dispose();
return;
} else {
var avDojo = cm.getClient().getChannelServer().getAvailableDojo(true);
var avDojo = cm.getClient().getChannelServer().ingressDojo(true, 0);
if(avDojo < 0) {
if(avDojo == -1) cm.sendOk("All Dojo's are being used already. Wait for awhile before trying again.");
@@ -107,7 +108,6 @@ function action(mode, type, selection) {
}
else {
cm.getClient().getChannelServer().getMapFactory().getMap(925020010 + avDojo).resetMapObjects();
cm.getClient().getChannelServer().resetDojo(925020010 + avDojo);
cm.resetDojoEnergy();
cm.warp(925020010 + avDojo, 0);
@@ -120,9 +120,11 @@ function action(mode, type, selection) {
} else if (cm.getPlayer().getDojoStage() > 0) {
dojoWarp = cm.getPlayer().getDojoStage();
cm.getPlayer().setDojoStage(0);
cm.sendYesNo("The last time you took the challenge by yourself, you went up to level #b" + dojoWarp + "#k. I can take you there right now. Do you want to go there? (Select #rNo#k to erase this record.)");
var stageWarp = ((dojoWarp / 6) | 0) * 5;
cm.sendYesNo("The last time you took the challenge by yourself, you went up to round #b" + stageWarp + "#k. I can take you there right now. Do you want to go there? (Select #rNo#k to erase this record.)");
} else {
var avDojo = cm.getClient().getChannelServer().getAvailableDojo(false);
var avDojo = cm.getClient().getChannelServer().ingressDojo(false, dojoWarp);
if(avDojo < 0) {
if(avDojo == -1) cm.sendOk("All Dojo's are being used already. Wait for awhile before trying again.");
@@ -132,7 +134,6 @@ function action(mode, type, selection) {
} else {
var warpDojoMap = 925020000 + (dojoWarp + 1) * 100 + avDojo;
cm.getClient().getChannelServer().resetDojoMap(warpDojoMap);
cm.getClient().getChannelServer().resetDojo(warpDojoMap);
cm.resetDojoEnergy();
cm.warp(warpDojoMap, 0);
@@ -164,14 +165,13 @@ function action(mode, type, selection) {
cm.dispose();
return;
} else {
var avDojo = cm.getClient().getChannelServer().getAvailableDojo(true, cm.getParty());
var avDojo = cm.getClient().getChannelServer().ingressDojo(true, cm.getParty(), 0);
if(avDojo < 0) {
if(avDojo == -1) cm.sendOk("All Dojo's are being used already. Wait for awhile before trying again.");
else cm.sendOk("Either your party is already using the Dojo or your party's allotted time on the Dojo has not expired yet. Wait for them to finish to enter.");
} else {
cm.getClient().getChannelServer().resetDojoMap(925030100 + avDojo);
cm.getClient().getChannelServer().resetDojo(925030100 + avDojo);
cm.resetPartyDojoEnergy();
cm.warpParty(925030100 + avDojo);
@@ -299,7 +299,7 @@ function action(mode, type, selection) {
}
}
avDojo = cm.getClient().getChannelServer().getAvailableDojo(hasParty, cm.getParty());
avDojo = cm.getClient().getChannelServer().ingressDojo(hasParty, cm.getParty(), Math.floor((cm.getPlayer().getMap().getId()) / 100) % 100);
firstEnter = true;
}
@@ -313,7 +313,6 @@ function action(mode, type, selection) {
var dojoWarpMap = baseStg + (nextStg * 100) + avDojo;
if(firstEnter) {
cm.getClient().getChannelServer().resetDojoMap(dojoWarpMap);
cm.getClient().getChannelServer().resetDojo(dojoWarpMap, nextStg - 1);
}
//non-leader party members can progress whilst having the record saved if they don't command to enter the next stage

View File

@@ -26,6 +26,8 @@
* @Map(s): Dojo Hall
*/
importPackage(Packages.constants.game);
var disabled = false;
var belts = Array(1132000, 1132001, 1132002, 1132003, 1132004);
var belt_level = Array(25, 35, 45, 60, 75);
@@ -45,7 +47,7 @@ function start() {
if (isRestingSpot(cm.getPlayer().getMap().getId())) {
var text = "I'm surprised you made it this far! But it won't be easy from here on out. You still want the challenge?\r\n\r\n#b#L0#I want to continue#l\r\n#L1#I want to leave#l\r\n";
if (!cm.getPlayer().getDojoParty()) {
if (!GameConstants.isDojoPartyArea(cm.getPlayer().getMapId())) {
text += "#L2#I want to record my score up to this point#l";
}
cm.sendSimple(text);

View File

@@ -24,7 +24,7 @@
* @author Ronan Lana
*/
importPackage(Packages.client.processor);
importPackage(Packages.client.processor.action);
importPackage(Packages.config);
var status;

View File

@@ -87,30 +87,50 @@ function action(mode, type, selection) {
} else if(status == 1) {
var sendStr = "The following books are currently available:\r\n\r\n";
if(selected == 0) selected = selection;
table = (selected == 1) ? skillbook : masterybook;
for(var i = 0; i < table.length; i++) {
sendStr += " #L" + i + "# #i" + table[i] + "# #t" + table[i] + "##l\r\n";
if (selected == 1) {
table = skillbook;
for(var i = 0; i < table.length; i++) {
if (table[i] > 0) {
var itemid = table[i];
sendStr += " #L" + i + "# #i" + itemid + "# #t" + itemid + "##l\r\n";
} else {
var skillid = -table[i];
sendStr += " #L" + i + "# #s" + skillid + "# #q" + skillid + "##l\r\n";
}
}
} else {
table = masterybook;
for(var i = 0; i < table.length; i++) {
var itemid = table[i];
sendStr += " #L" + i + "# #i" + itemid + "# #t" + itemid + "##l\r\n";
}
}
cm.sendSimple(sendStr);
} else if(status == 2) {
selected = selection;
var mobList = cm.getNamesWhoDropsItem(table[selected]);
var sendStr;
if(mobList.length == 0) {
sendStr = "No mobs drop '#b#t" + table[selected] + "##k'.\r\n\r\n";
} else {
sendStr = "The following mobs drop '#b#t" + table[selected] + "##k':\r\n\r\n";
for(var i = 0; i < mobList.length; i++) {
sendStr += " #L" + i + "# " + mobList[i] + "#l\r\n";
}
var sendStr;
if (table[selected] > 0) {
var mobList = cm.getNamesWhoDropsItem(table[selected]);
sendStr += "\r\n";
if(mobList.length == 0) {
sendStr = "No mobs drop '#b#t" + table[selected] + "##k'.\r\n\r\n";
} else {
sendStr = "The following mobs drop '#b#t" + table[selected] + "##k':\r\n\r\n";
for(var i = 0; i < mobList.length; i++) {
sendStr += " #L" + i + "# " + mobList[i] + "#l\r\n";
}
sendStr += "\r\n";
}
} else {
sendStr = "\r\n\r\n";
}
sendStr += cm.getSkillBookInfo(table[selected]);
cm.sendNext(sendStr);

View File

@@ -13,7 +13,7 @@ var name_cursor, role_cursor;
// new server names are to be appended at the start of the name stack, building up the chronology.
// make sure the server names are lexicograffically equivalent to their correspondent function.
var servers = ["HeavenMS", "MapleSolaxia", "MoopleDEV", "MetroMS", "BubblesDEV", "OdinMS", "Contributors"];
var servers = ["HeavenMS", "MapleSolaxia", "MoopleDEV", "BubblesDEV", "MetroMS", "OdinMS", "Contributors"];
var servers_history = [];
function addPerson(name, role) {
@@ -65,20 +65,20 @@ function writeServerStaff_MoopleDEV() {
setHistory(2010, 2012);
}
function writeServerStaff_MetroMS() {
addPerson("David!", "Developer");
addPerson("XxOsirisxX", "Contributor");
addPerson("Generic", "Contributor");
setHistory(2009, 2010);
}
function writeServerStaff_BubblesDEV() {
addPerson("David!", "Developer");
addPerson("Moogra", "Developer");
addPerson("XxOsirisxX", "Contributor");
addPerson("MrMysterious", "Contributor");
setHistory(2009, 2010);
}
function writeServerStaff_MetroMS() {
addPerson("David!", "Developer");
addPerson("XxOsirisxX", "Contributor");
addPerson("Generic", "Contributor");
setHistory(2009, 2009);
}

View File

@@ -29,6 +29,8 @@ function enter(pi) {
if (pi.getPlayer().getMap().getMonsterById(9300216) != null) {
pi.getPlayer().enteredScript("dojang_Msg", pi.getPlayer().getMap().getId());
pi.getPlayer().setFinishedDojoTutorial();
pi.getClient().getChannelServer().resetDojo(pi.getPlayer().getMap().getId());
pi.getClient().getChannelServer().dismissDojoSchedule(pi.getPlayer().getMap().getId(), pi.getParty());
pi.playPortalSound(); pi.warp(925020001, 0);
return true;
} else {

View File

@@ -25,6 +25,7 @@
* @maps: All Dojo fighting maps
*/
importPackage(Packages.constants.game);
function enter(pi) {
try {
@@ -32,7 +33,7 @@ function enter(pi) {
pi.goDojoUp();
pi.getPlayer().getMap().setReactorState();
var stage = Math.floor(pi.getPlayer().getMapId() / 100) % 100;
if ((stage - (stage / 6) | 0) == pi.getPlayer().getVanquisherStage() && !pi.getPlayer().getDojoParty()) // we can also try 5 * stage / 6 | 0 + 1
if ((stage - (stage / 6) | 0) == pi.getPlayer().getVanquisherStage() && !GameConstants.isDojoPartyArea(pi.getPlayer().getMapId())) // we can also try 5 * stage / 6 | 0 + 1
pi.getPlayer().setVanquisherKills(pi.getPlayer().getVanquisherKills() + 1);
} else {
pi.getPlayer().message("There are still some monsters remaining.");

View File

@@ -25,15 +25,8 @@
*/
function enter(pi) {
if(pi.isQuestStarted(6110)) {
if(pi.getWarpMap(910500100).countPlayers() == 0) {
pi.resetMapObjects(910500100);
pi.playPortalSound(); pi.warp(910500100, 0);
return true;
} else {
pi.getPlayer().message("Some other player is currently inside.");
return false;
}
pi.playPortalSound(); pi.warp(910500100, 0);
return true;
} else {
pi.getPlayer().message("A mysterious force won't let you in.");
return false;