Skillbook announcer update + Encoded temporary mob buffs + Slot gains patch
Encoded temporary mob buffs on mob control request/spawn packets. Improved scroll generator NPC, now testing other bucket set possibilities. Fixed slot gain method recently updated leading to a temporary visual glitch (inventory would show as normal after relogin). Reviewed mobid check by name, no longer trying to generate a whole mob instance for info retrieval. Added debuff purge when applying a buyback. Reviewed skillbook announcer not informing properly storybooks, reactor or script loots. Fixed autoaggro not working properly as soon as a player enters the field. Fixed "fake" mobs disappearing as soon as its controller changes.
This commit is contained in:
@@ -88,7 +88,7 @@ function setEventRewards(eim) {
|
||||
function afterSetup(eim) {}
|
||||
|
||||
function setup(channel) {
|
||||
var eim = em.newInstance("Horntail" + channel); // thanks Thora for reporting an issue with misleading event name here
|
||||
var eim = em.newInstance("Horntail" + channel); // thanks Thora (Arufonsu) for reporting an issue with misleading event name here
|
||||
eim.setProperty("canJoin", 1);
|
||||
eim.setProperty("defeatedBoss", 0);
|
||||
eim.setProperty("defeatedHead", 0);
|
||||
|
||||
@@ -125,7 +125,7 @@ function action(mode, type, selection) {
|
||||
sendStr += " #L" + i + "# " + mobList[i] + "#l\r\n";
|
||||
}
|
||||
|
||||
sendStr += "\r\n";
|
||||
sendStr += "\r\n\r\n";
|
||||
}
|
||||
} else {
|
||||
sendStr = "\r\n\r\n";
|
||||
|
||||
@@ -353,7 +353,7 @@ function calculateScrollTiers() {
|
||||
return tiers;
|
||||
}
|
||||
|
||||
function getRandomScroll(tiers) {
|
||||
function getRandomScrollFromTiers(tiers) {
|
||||
var typeTier = tiers[0], subtypeTier = tiers[1], successTier = tiers[2];
|
||||
var scrollTypePool = getScrollTypePool(typeTier);
|
||||
var scrollPool = getAvailableScrollsPool(scrollTypePool, subtypeTier, successTier);
|
||||
@@ -365,6 +365,36 @@ function getRandomScroll(tiers) {
|
||||
}
|
||||
}
|
||||
|
||||
function getRandomScrollFromRightPermutations(tiers) {
|
||||
for (var i = 2; i >= 0; i--) {
|
||||
for (var j = i - 1; j >= 0; j--) {
|
||||
if (tiers[i] >= 3) {
|
||||
break;
|
||||
} else if (tiers[j] > 1) {
|
||||
tiers[i]++;
|
||||
tiers[j]--;
|
||||
|
||||
var itemid = getRandomScrollFromTiers(tiers);
|
||||
if (itemid != -1) {
|
||||
return itemid;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
function getRandomScroll(tiers) {
|
||||
var itemid = getRandomScrollFromTiers(tiers);
|
||||
if (itemid == -1) {
|
||||
// worst case shift-right permutations...
|
||||
itemid = getRandomScrollFromRightPermutations(tiers);
|
||||
}
|
||||
|
||||
return itemid;
|
||||
}
|
||||
|
||||
function performExchange(sgItemid, sgCount) {
|
||||
if (cm.getMeso() < sgAppliedMeso) {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user