EXP system & Mob buffs/diseases optimization
Solved a problem within EXP distribution system that would hand out less overall EXP than the expected when the amount to be earned is low. Optimized mob buffs and diseases, now using a dedicated thread to process all status expirations on a batch. Refactored MonitoredLockTypes names to something more easily identificable. Added a delay on mob effect applications, to be registered in after the cast animation time. Fixed Flame Thrower acting passively when a attacking skill is used by the player.
This commit is contained in:
@@ -49,7 +49,7 @@ function start() {
|
||||
if (cm.getLevel() >= 10 && cm.canGetFirstJob(jobType))
|
||||
cm.sendNext("So you decided to become a #rBowman#k?");
|
||||
else {
|
||||
cm.sendOk("Train a bit more and I can show you the way of the #rBowman#k.");
|
||||
cm.sendOk("Train a bit more until you reach #blevel 10, " + cm.getFirstJobStatRequirement(jobType) + "#k and I can show you the way of the #rBowman#k.");
|
||||
cm.dispose();
|
||||
}
|
||||
} else if (cm.getLevel() >= 30 && cm.getJobId() == 300) {
|
||||
|
||||
@@ -50,7 +50,7 @@ function start() {
|
||||
if (cm.getLevel() >= 10 && cm.canGetFirstJob(jobType))
|
||||
cm.sendNext("Do you want to become a Warrior? You need to meet some criteria in order to do so.#b You should be at least in level 10, with at least 35 in STR#k. Let's see...");
|
||||
else {
|
||||
cm.sendOk("Train a bit more and I can show you the way of the #rWarrior#k.");
|
||||
cm.sendOk("Train a bit more until you reach #blevel 10, " + cm.getFirstJobStatRequirement(jobType) + "#k and I can show you the way of the #rWarrior#k.");
|
||||
cm.dispose();
|
||||
}
|
||||
} else if (cm.getLevel() >= 30 && cm.getJobId() == 100) {
|
||||
|
||||
@@ -50,7 +50,7 @@ function start() {
|
||||
if (cm.getLevel() >= 8 && cm.canGetFirstJob(jobType))
|
||||
cm.sendNext("Want to be a magician? There are some standards to meet. because we can't just accept EVERYONE in... #bYour level should be at least 8#k, with getting INT as your top priority. Let's see.");
|
||||
else {
|
||||
cm.sendOk("Train a bit more and I can show you the way of the #rMagician#k.");
|
||||
cm.sendOk("Train a bit more until you reach #blevel 10, " + cm.getFirstJobStatRequirement(jobType) + "#k and I can show you the way of the #rMagician#k.");
|
||||
cm.dispose();
|
||||
}
|
||||
} else if (cm.getLevel() >= 30 && cm.getJobId() == 200) {
|
||||
|
||||
@@ -49,7 +49,7 @@ function start() {
|
||||
if (cm.getLevel() >= 10 && cm.canGetFirstJob(jobType))
|
||||
cm.sendNext("Want to be a thief? There are some standards to meet. because we can't just accept EVERYONE in... #bYour level should be at least 10, with your DEX over 25#k. Let's see.");
|
||||
else {
|
||||
cm.sendOk("Train a bit more and I can show you the way of the #rThief#k.");
|
||||
cm.sendOk("Train a bit more until you reach #blevel 10, " + cm.getFirstJobStatRequirement(jobType) + "#k and I can show you the way of the #rThief#k.");
|
||||
cm.dispose();
|
||||
}
|
||||
} else if (cm.getLevel() >= 30 && cm.getJobId() == 400) {
|
||||
|
||||
@@ -49,7 +49,7 @@ function start() {
|
||||
if (cm.getLevel() >= 10 && cm.canGetFirstJob(jobType))
|
||||
cm.sendNext("Want to be a pirate? There are some standards to meet. because we can't just accept EVERYONE in... #bYour level should be at least 10#k. Let's see.");
|
||||
else {
|
||||
cm.sendOk("Train a bit more and I can show you the way of the #rPirate#k.");
|
||||
cm.sendOk("Train a bit more until you reach #blevel 10, " + cm.getFirstJobStatRequirement(jobType) + "#k and I can show you the way of the #rPirate#k.");
|
||||
cm.dispose();
|
||||
}
|
||||
} else if (cm.getLevel() >= 30 && cm.getJobId() == 500) {
|
||||
|
||||
@@ -19,34 +19,34 @@
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
status = -1;
|
||||
|
||||
function start() {
|
||||
if(cm.haveItem(4031847))
|
||||
cm.sendNext("The hungry calf is drinking all the milk! The bottle remains empty...");
|
||||
else if(cm.haveItem(4031848) || cm.haveItem(4031849) || cm.haveItem(4031850)){
|
||||
cm.sendNext("The hungry calf is drinking all the milk! The bottle is now empty.");
|
||||
if(cm.haveItem(4031848))
|
||||
cm.gainItem(4031848,-1);
|
||||
else if(cm.haveItem(4031849))
|
||||
cm.gainItem(4031849, -1);
|
||||
else
|
||||
cm.gainItem(4031850, -1);
|
||||
cm.gainItem(4031847, 1);
|
||||
if(cm.getQuestProgress(2180, 0) == 1) {
|
||||
cm.sendNext("You have taken milk from this cow recently, check another cow.");
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
function action(mode, type, selection){
|
||||
if(mode == -1)
|
||||
cm.dispose();
|
||||
else if(mode == 0){
|
||||
status--;
|
||||
start();
|
||||
}else
|
||||
status++;
|
||||
if(status == 0)
|
||||
cm.sendPrev("The hungry calf isn't interested in the empty bottle.");
|
||||
else if(status == 1)
|
||||
cm.dispose();
|
||||
|
||||
if (cm.canHold(4031848) && cm.haveItem(4031847)) {
|
||||
cm.sendNext("Now filling up the bottle with milk. The bottle is now 1/3 full of milk.");
|
||||
cm.gainItem(4031847, -1);
|
||||
cm.gainItem(4031848, 1);
|
||||
|
||||
cm.setQuestProgress(2180, 0, 1);
|
||||
} else if (cm.canHold(4031849, 1) && cm.haveItem(4031848)) {
|
||||
cm.sendNext("Now filling up the bottle with milk. The bottle is now 2/3 full of milk.");
|
||||
cm.gainItem(4031848, -1);
|
||||
cm.gainItem(4031849, 1);
|
||||
|
||||
cm.setQuestProgress(2180, 0, 1);
|
||||
} else if (cm.canHold(4031850) && cm.haveItem(4031849)) {
|
||||
cm.sendNext("Now filling up the bottle with milk. The bottle is now completely full of milk.");
|
||||
cm.gainItem(4031849, -1);
|
||||
cm.gainItem(4031850, 1);
|
||||
|
||||
cm.setQuestProgress(2180, 0, 1);
|
||||
} else {
|
||||
cm.sendNext("Your inventory is full, and there's no room for a milk bottle.");
|
||||
}
|
||||
cm.dispose();
|
||||
}
|
||||
@@ -20,34 +20,33 @@
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
status = -1;
|
||||
|
||||
function start() {
|
||||
if (cm.haveItem(4031847))
|
||||
cm.sendNext("The hungry calf is drinking all the milk! The bottle remains empty...");
|
||||
else if (cm.haveItem(4031848) || cm.haveItem(4031849) || cm.haveItem(4031850)) {
|
||||
cm.sendNext("The hungry calf is drinking all the milk! The bottle is now empty.");
|
||||
if (cm.haveItem(4031848))
|
||||
cm.gainItem(4031848,-1);
|
||||
else if (cm.haveItem(4031849))
|
||||
cm.gainItem(4031849, -1);
|
||||
else
|
||||
cm.gainItem(4031850, -1);
|
||||
cm.gainItem(4031847, 1);
|
||||
if(cm.getQuestProgress(2180, 0) == 2) {
|
||||
cm.sendNext("You have taken milk from this cow recently, check another cow.");
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
function action(mode, type, selection){
|
||||
if (mode == -1)
|
||||
cm.dispose();
|
||||
else if (mode == 0) {
|
||||
status--;
|
||||
start();
|
||||
} else
|
||||
status++;
|
||||
if (status == 0)
|
||||
cm.sendPrev("The hungry calf isn't interested in the empty bottle.");
|
||||
else if (status == 1)
|
||||
cm.dispose();
|
||||
|
||||
if (cm.canHold(4031848) && cm.haveItem(4031847)){
|
||||
cm.sendNext("Now filling up the bottle with milk. The bottle is now 1/3 full of milk.");
|
||||
cm.gainItem(4031847, -1);
|
||||
cm.gainItem(4031848, 1);
|
||||
|
||||
cm.setQuestProgress(2180, 0, 2);
|
||||
} else if(cm.canHold(4031849) && cm.haveItem(4031848)){
|
||||
cm.sendNext("Now filling up the bottle with milk. The bottle is now 2/3 full of milk.");
|
||||
cm.gainItem(4031848, -1);
|
||||
cm.gainItem(4031849, 1);
|
||||
|
||||
cm.setQuestProgress(2180, 0, 2);
|
||||
} else if(cm.canHold(4031850) && cm.haveItem(4031849)){
|
||||
cm.sendNext("Now filling up the bottle with milk. The bottle is now completely full of milk.");
|
||||
cm.gainItem(4031849, -1);
|
||||
cm.gainItem(4031850, 1);
|
||||
|
||||
cm.setQuestProgress(2180, 0, 2);
|
||||
} else {
|
||||
cm.sendNext("Your inventory is full, and there's no room for a milk bottle.");
|
||||
}
|
||||
cm.dispose();
|
||||
}
|
||||
@@ -19,21 +19,34 @@
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
status = -1;
|
||||
|
||||
function start() {
|
||||
if (cm.canHold(4031848) && cm.haveItem(4031847)) {
|
||||
cm.sendNext("Now filling up the bottle with milk. The bottle is now 1/3 full of milk.");
|
||||
cm.gainItem(4031847, -1);
|
||||
cm.gainItem(4031848, 1);
|
||||
} else if (cm.canHold(4031849, 1) && cm.haveItem(4031848)) {
|
||||
cm.sendNext("Now filling up the bottle with milk. The bottle is now 2/3 full of milk.");
|
||||
cm.gainItem(4031848, -1);
|
||||
cm.gainItem(4031849, 1);
|
||||
} else if (cm.canHold(4031850) && cm.haveItem(4031849)) {
|
||||
cm.sendNext("Now filling up the bottle with milk. The bottle is now completely full of milk.");
|
||||
cm.gainItem(4031849, -1);
|
||||
cm.gainItem(4031850, 1);
|
||||
} else
|
||||
cm.sendNext("Your inventory is full, and there's no room for a milk bottle.");
|
||||
cm.dispose();
|
||||
if(cm.haveItem(4031847))
|
||||
cm.sendNext("The hungry calf is drinking all the milk! The bottle remains empty...");
|
||||
else if(cm.haveItem(4031848) || cm.haveItem(4031849) || cm.haveItem(4031850)){
|
||||
cm.sendNext("The hungry calf is drinking all the milk! The bottle is now empty.");
|
||||
if(cm.haveItem(4031848))
|
||||
cm.gainItem(4031848,-1);
|
||||
else if(cm.haveItem(4031849))
|
||||
cm.gainItem(4031849, -1);
|
||||
else
|
||||
cm.gainItem(4031850, -1);
|
||||
cm.gainItem(4031847, 1);
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
|
||||
function action(mode, type, selection){
|
||||
if(mode == -1)
|
||||
cm.dispose();
|
||||
else if(mode == 0){
|
||||
status--;
|
||||
start();
|
||||
}else
|
||||
status++;
|
||||
if(status == 0)
|
||||
cm.sendPrev("The hungry calf isn't interested in the empty bottle.");
|
||||
else if(status == 1)
|
||||
cm.dispose();
|
||||
}
|
||||
@@ -20,20 +20,34 @@
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
status = -1;
|
||||
|
||||
function start() {
|
||||
if (cm.canHold(4031848) && cm.haveItem(4031847)){
|
||||
cm.sendNext("Now filling up the bottle with milk. The bottle is now 1/3 full of milk.");
|
||||
cm.gainItem(4031847, -1);
|
||||
cm.gainItem(4031848, 1);
|
||||
} else if(cm.canHold(4031849) && cm.haveItem(4031848)){
|
||||
cm.sendNext("Now filling up the bottle with milk. The bottle is now 2/3 full of milk.");
|
||||
cm.gainItem(4031848, -1);
|
||||
cm.gainItem(4031849, 1);
|
||||
} else if(cm.canHold(4031850) && cm.haveItem(4031849)){
|
||||
cm.sendNext("Now filling up the bottle with milk. The bottle is now completely full of milk.");
|
||||
cm.gainItem(4031849, -1);
|
||||
cm.gainItem(4031850, 1);
|
||||
if (cm.haveItem(4031847))
|
||||
cm.sendNext("The hungry calf is drinking all the milk! The bottle remains empty...");
|
||||
else if (cm.haveItem(4031848) || cm.haveItem(4031849) || cm.haveItem(4031850)) {
|
||||
cm.sendNext("The hungry calf is drinking all the milk! The bottle is now empty.");
|
||||
if (cm.haveItem(4031848))
|
||||
cm.gainItem(4031848,-1);
|
||||
else if (cm.haveItem(4031849))
|
||||
cm.gainItem(4031849, -1);
|
||||
else
|
||||
cm.gainItem(4031850, -1);
|
||||
cm.gainItem(4031847, 1);
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
|
||||
function action(mode, type, selection){
|
||||
if (mode == -1)
|
||||
cm.dispose();
|
||||
else if (mode == 0) {
|
||||
status--;
|
||||
start();
|
||||
} else
|
||||
cm.sendNext("Your inventory is full, and there's no room for a milk bottle.");
|
||||
cm.dispose();
|
||||
status++;
|
||||
if (status == 0)
|
||||
cm.sendPrev("The hungry calf isn't interested in the empty bottle.");
|
||||
else if (status == 1)
|
||||
cm.dispose();
|
||||
}
|
||||
@@ -144,6 +144,7 @@ function writeFeatureTab_Serverpotentials() {
|
||||
addFeature("Enhanced auto-pot system: smart pet potion handle.");
|
||||
addFeature("Enhanced buff system: best buffs effects takes place.");
|
||||
addFeature("Enhanced AP auto-assigner: focus on eqp demands.");
|
||||
addFeature("Consistent experience gain system.");
|
||||
addFeature("NPC crafters won't take items freely anymore.");
|
||||
addFeature("Duey: pkg rcvd popup and many delivery mechanics.");
|
||||
addFeature("Pet pickup gives preference to player attacks.");
|
||||
@@ -169,6 +170,7 @@ function writeFeatureTab_AdminGMcommands() {
|
||||
|
||||
function writeFeatureTab_CustomNPCs() {
|
||||
addFeature("Spiegelmann: automatized rock-refiner.");
|
||||
addFeature("Asia: scroll & rarities shop NPC.");
|
||||
addFeature("Abdula: lists droppers of needed skill/mastery books.");
|
||||
addFeature("Agent E: accessory crafter.");
|
||||
addFeature("Donation Box: automatized item-buyer.");
|
||||
@@ -197,6 +199,7 @@ function writeFeatureTab_Project() {
|
||||
addFeature("Reviewed many Java aspects that needed attention.");
|
||||
addFeature("Reviewed SQL data, eliminating duplicated entries.");
|
||||
addFeature("Protected many flaws with login management system.");
|
||||
addFeature("Developed many survey tools for content management.");
|
||||
addFeature("ThreadTracker: runtime tool for deadlock detection.");
|
||||
addFeature("Heavily reviewed future task management, spawning much less threads and relieving task overload on the TimerManager.");
|
||||
}
|
||||
|
||||
@@ -22,8 +22,8 @@ function end(mode, type, selection) {
|
||||
qm.sendYesNo("Have you made your decision? The decision will be final, so think carefully before deciding what to do. Are you sure you want to become a Dawn Warrior?");
|
||||
} else if (status == 1) {
|
||||
if(!qm.canGetFirstJob(jobType)) {
|
||||
cm.sendOk("Train a bit more and I can show you the way of the #rDawn Warrior#k.");
|
||||
cm.dispose();
|
||||
qm.sendOk("Train a bit more until you reach #blevel 10, " + qm.getFirstJobStatRequirement(jobType) + "#k and I can show you the way of the #rDawn Warrior#k.");
|
||||
qm.dispose();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -22,8 +22,8 @@ function end(mode, type, selection) {
|
||||
qm.sendYesNo("Have you made your decision? The decision will be final, so think carefully before deciding what to do. Are you sure you want to become a Blaze Wizard?");
|
||||
} else if (status == 1) {
|
||||
if(!qm.canGetFirstJob(jobType)) {
|
||||
cm.sendOk("Train a bit more and I can show you the way of the #rBlaze Wizard#k.");
|
||||
cm.dispose();
|
||||
qm.sendOk("Train a bit more until you reach #blevel 10, " + qm.getFirstJobStatRequirement(jobType) + "#k and I can show you the way of the #rBlaze Wizard#k.");
|
||||
qm.dispose();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -22,8 +22,8 @@ function end(mode, type, selection) {
|
||||
qm.sendYesNo("Have you made your decision? The decision will be final, so think carefully before deciding what to do. Are you sure you want to become a Wind Archer?");
|
||||
} else if (status == 1) {
|
||||
if(!qm.canGetFirstJob(jobType)) {
|
||||
cm.sendOk("Train a bit more and I can show you the way of the #rWind Archer#k.");
|
||||
cm.dispose();
|
||||
qm.sendOk("Train a bit more until you reach #blevel 10, " + qm.getFirstJobStatRequirement(jobType) + "#k and I can show you the way of the #rWind Archer#k.");
|
||||
qm.dispose();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -22,8 +22,8 @@ function end(mode, type, selection) {
|
||||
qm.sendYesNo("Have you made your decision? The decision will be final, so think carefully before deciding what to do. Are you sure you want to become a Night Walker?");
|
||||
} else if (status == 1) {
|
||||
if(!qm.canGetFirstJob(jobType)) {
|
||||
cm.sendOk("Train a bit more and I can show you the way of the #rNight Walker#k.");
|
||||
cm.dispose();
|
||||
qm.sendOk("Train a bit more until you reach #blevel 10, " + qm.getFirstJobStatRequirement(jobType) + "#k and I can show you the way of the #rNight Walker#k.");
|
||||
qm.dispose();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -22,8 +22,8 @@ function end(mode, type, selection) {
|
||||
qm.sendYesNo("Have you made your decision? The decision will be final, so think carefully before deciding what to do. Are you sure you want to become a Thunder Breaker?");
|
||||
} else if (status == 1) {
|
||||
if(!qm.canGetFirstJob(jobType)) {
|
||||
cm.sendOk("Train a bit more and I can show you the way of the #rThunder Breaker#k.");
|
||||
cm.dispose();
|
||||
qm.sendOk("Train a bit more until you reach #blevel 10, " + qm.getFirstJobStatRequirement(jobType) + "#k and I can show you the way of the #rThunder Breaker#k.");
|
||||
qm.dispose();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ function end(mode, type, selection) {
|
||||
if (status == 0) {
|
||||
if(qm.haveItem(5460000)) {
|
||||
qm.sendOk("You got the Pet Snack! Thanks! You can use these to feed multiple pets at once!");
|
||||
qm.teachSkill(0008, 1, 1, -1);
|
||||
qm.teachSkill(8, 1, 1, -1);
|
||||
qm.gainItem(5460000, -1, false);
|
||||
qm.completeQuest();
|
||||
qm.dispose();
|
||||
|
||||
@@ -20,5 +20,5 @@
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
function act(){
|
||||
rm.spawnMonster(9400112);
|
||||
rm.spawnMonster(9400112, 1, 420, 160);
|
||||
}
|
||||
Reference in New Issue
Block a user