Services unrestrained to channels + Event scripts placeholder
Fixed an inconsistent scenario where player data would remain in world player storage even though they were no longer online. Implemented missing functionality for "Safety Charm" which allows 30% MaxHP/MP heal on return. Improved services facility, no longer tightly related to channels. Implemented a world service for "save players" (services acts as a monitor). Reviewed the event script initialization approach. Players no longer are retained from logging in on a channel whilst the events don't finish loadup. Fixed certain quest items not showing up, which would happen due to them not being quest requisites. Fixed NPC Pi crashing players when trying to craft arrows. Fixed pet re-evolution quest not working on Robos. Fixed boss HPBar not disappearing in certain situations. Revised gathered mob info on linked mobs, no longer marshaling stats. Fixed two possible deadlock scenarios within the cancel effect method. Added lock auditing support for read-write locks. Implemented code support for Cygnus intro clip. Reviewed updateBuffEffect, now properly checking for pirate buffs in order to send the expected packet. Reviewed unnecessary load of field objects, which would be doing so just for fetching the predicted map names. Fixed mob buff tooltips not showing on "fake" mobs in the event of them turning into "real". Reviewed usage of "unique" constraint on petid within the inventoryitems table. Fixed portal in Ariant unexpectedly leading players who completed the "secret passageway" of Sleepywood into it. Fixed a loop case in quest scripts from Magatia's broker having ore request.
This commit is contained in:
25
scripts/map/onUserEnter/cygnusJobTutorial.js
Normal file
25
scripts/map/onUserEnter/cygnusJobTutorial.js
Normal file
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
This file is part of the OdinMS Maple Story Server
|
||||
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
|
||||
Matthias Butz <matze@odinms.de>
|
||||
Jan Christian Meyer <vimes@odinms.de>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as
|
||||
published by the Free Software Foundation version 3 as published by
|
||||
the Free Software Foundation. You may not use, modify or distribute
|
||||
this program under any other version of the GNU Affero General Public
|
||||
License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
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/>.
|
||||
*/
|
||||
|
||||
function start(ms) {
|
||||
ms.displayCygnusIntro();
|
||||
}
|
||||
5
scripts/map/onUserEnter/startEreb.js
Normal file
5
scripts/map/onUserEnter/startEreb.js
Normal file
@@ -0,0 +1,5 @@
|
||||
function start(ms) {
|
||||
if (ms.getJobId() == 1000 && ms.getLevel() >= 10) {
|
||||
ms.unlockUI();
|
||||
}
|
||||
}
|
||||
@@ -72,7 +72,7 @@ function action(mode, type, selection) {
|
||||
} else if (status == 2){
|
||||
cm.dispose();
|
||||
if (beauty == 1){
|
||||
if (cm.haveItem(5420002)){
|
||||
if (cm.haveItem(5420002)){ // thanks MedicOP for noticing uncoded functionality for Hair Membership coupons
|
||||
cm.setHair(hairnew[selection]);
|
||||
cm.sendOk("Enjoy your new and improved hairstyle!");
|
||||
} else if (cm.haveItem(5150001)){
|
||||
|
||||
@@ -18,7 +18,6 @@ function action(mode, type, selection) {
|
||||
cm.sendNext("All right! Let's go!");
|
||||
} else if (status == 1) {
|
||||
cm.removeNPC(579711);
|
||||
cm.removeNPC2(579711);
|
||||
cm.updateInfo("fire", "0");
|
||||
cm.playSound("cannonshooter/fire");
|
||||
cm.sendDirectionInfo("Effect/Direction4.img/effect/cannonshooter/flying/0", 7000, 0, 0, -1, -1);
|
||||
|
||||
@@ -172,19 +172,7 @@ function action(mode, type, selection) {
|
||||
matQty = matQtySet[selectedItem];
|
||||
cost = costSet[selectedItem];
|
||||
}
|
||||
|
||||
if (selectedType == 5){ //arrow refine
|
||||
var itemSet = new Array(2060000,2061000,2060001,2061001,2060002,2061002);
|
||||
var matSet = new Array(new Array (4003001,4003004),new Array (4003001,4003004),new Array (4011000,4003001,4003004),new Array (4011000,4003001,4003004),
|
||||
new Array (4011001,4003001,4003005),new Array (4011001,4003001,4003005));
|
||||
var matQtySet = new Array (new Array (1,1),new Array (1,1),new Array (1,3,10),new Array (1,3,10),new Array (1,5,15),new Array (1,5,15));
|
||||
var costSet = new Array (0,0,0,0,0,0);
|
||||
item = itemSet[selectedItem];
|
||||
mats = matSet[selectedItem];
|
||||
matQty = matQtySet[selectedItem];
|
||||
cost = costSet[selectedItem];
|
||||
}
|
||||
|
||||
|
||||
var prompt = "So, you want me to make some #t" + item + "#s? In that case, how many do you want me to make?";
|
||||
|
||||
cm.sendGetNumber(prompt,1,1,100)
|
||||
@@ -197,6 +185,19 @@ function action(mode, type, selection) {
|
||||
}
|
||||
else
|
||||
qty = (selection > 0) ? selection : (selection < 0 ? -selection : 1);
|
||||
|
||||
// thanks kvmba for noticing arrow selection crashing players
|
||||
if (selectedType == 5){ //arrow refine
|
||||
var itemSet = new Array(2060000,2061000,2060001,2061001,2060002,2061002);
|
||||
var matSet = new Array(new Array (4003001,4003004),new Array (4003001,4003004),new Array (4011000,4003001,4003004),new Array (4011000,4003001,4003004),
|
||||
new Array (4011001,4003001,4003005),new Array (4011001,4003001,4003005));
|
||||
var matQtySet = new Array (new Array (1,1),new Array (1,1),new Array (1,3,10),new Array (1,3,10),new Array (1,5,15),new Array (1,5,15));
|
||||
var costSet = new Array (0,0,0,0,0,0);
|
||||
item = itemSet[selectedItem];
|
||||
mats = matSet[selectedItem];
|
||||
matQty = matQtySet[selectedItem];
|
||||
cost = costSet[selectedItem];
|
||||
}
|
||||
|
||||
var prompt = "You want me to make ";
|
||||
if (qty == 1)
|
||||
|
||||
@@ -77,7 +77,7 @@ function writeFeatureTab_Quests() {
|
||||
addFeature("3rd job quiz with all 40-question pool available.");
|
||||
addFeature("Item raising functional.");
|
||||
addFeature("Cleared issue with player movement during NPC talk.");
|
||||
addFeature("Reviewed usage of quest progress data as requirement.");
|
||||
addFeature("Reviewed usage of quest progress data as requisite.");
|
||||
}
|
||||
|
||||
function writeFeatureTab_PlayerSocialNetwork() {
|
||||
@@ -287,6 +287,7 @@ function writeFeatureTab_Project() {
|
||||
addFeature("Remodeled item scripts, properly using NPC dialogs.");
|
||||
addFeature("ThreadTracker: runtime tool for deadlock detection.");
|
||||
addFeature("Channel, World and Server-wide timer management.");
|
||||
addFeature("Developed services as preemptive task scheduler.");
|
||||
addFeature("Thoroughly reviewed encapsulation for player stats.");
|
||||
addFeature("Heavily reviewed future task management, spawning much less threads and relieving task overload on the TimerManager.");
|
||||
}
|
||||
@@ -327,7 +328,7 @@ function action(mode, type, selection) {
|
||||
status--;
|
||||
|
||||
if (status == 0) {
|
||||
var sendStr = "HeavenMS was developed on the timespan of 3 years, based on where Solaxia left. I'm glad to say the development itself had continuously been agraciated by dozens of contributors and cheerers (truly thanks for the trusting vow, guys & gals!).\r\n\r\nTalking about results: many nice features emerged, development aimed to get back the old GMS experience. Now many of these so-long missing features are gracefully presented to you in the shape of this server. Long live MapleStory!!\r\n\r\nThese are the features from #bHeavenMS#k:\r\n\r\n";
|
||||
var sendStr = "HeavenMS was developed on the timespan of 4 years, based on where Solaxia left. I'm glad to say the development itself had continuously been agraciated by dozens of contributors and cheerers (truly thanks for the trusting vow, guys & gals!).\r\n\r\nTalking about results: many nice features emerged, development aimed to get back the old GMS experience. Now many of these so-long missing features are gracefully presented to you in the shape of this server. Long live MapleStory!!\r\n\r\nThese are the features from #bHeavenMS#k:\r\n\r\n";
|
||||
for(var i = 0; i < tabs.length; i++) {
|
||||
sendStr += "#L" + i + "##b" + tabs[i] + "#k#l\r\n";
|
||||
}
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
|
||||
// Author: Ronan
|
||||
function enter(ms) {
|
||||
// thanks kvmba for noticing some issues running this script
|
||||
ms.runMapScript();
|
||||
return false;
|
||||
}
|
||||
@@ -1,9 +1,6 @@
|
||||
function enter(pi) {
|
||||
if(pi.isQuestCompleted(20730) || pi.isQuestCompleted(21734)) { // puppeteer defeated, newfound secret path
|
||||
pi.playPortalSound(); pi.warp(105040201,2);
|
||||
return true;
|
||||
}
|
||||
|
||||
pi.openNpc(1063011, "ThiefPassword");
|
||||
// unexpected warp condition noticed thanks to IxianMace
|
||||
|
||||
pi.openNpc(1063011, "ThiefPassword");
|
||||
return false;
|
||||
}
|
||||
@@ -31,7 +31,7 @@ function start(mode, type, selection) {
|
||||
} else if (status == 4) {
|
||||
qm.forceStartQuest();
|
||||
qm.forceCompleteQuest();
|
||||
//qm.warp(913040100, 0);
|
||||
qm.warp(913040100, 0);
|
||||
qm.dispose();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,32 +28,39 @@
|
||||
var status = -1;
|
||||
var oreArray;
|
||||
|
||||
function start(mode, type, selection) {
|
||||
}
|
||||
|
||||
function end(mode, type, selection) {
|
||||
if (mode == -1 || (mode == 0 && type > 0)) {
|
||||
qm.dispose();
|
||||
if (mode == -1) {
|
||||
qm.dispose();
|
||||
} else {
|
||||
oreArray = getOreArray();
|
||||
if (status == -1) {
|
||||
if (mode == 0 && type > 0) {
|
||||
qm.dispose();
|
||||
return;
|
||||
}
|
||||
if (mode == 1)
|
||||
status++;
|
||||
else
|
||||
status--;
|
||||
|
||||
if (status == 0) {
|
||||
oreArray = getOreArray();
|
||||
if (oreArray.length > 0) {
|
||||
status++;
|
||||
qm.sendSimple("Oh, looks like someone's ready to make a deal. You want to join Zenumist so badly, huh? I really don't understand you, but that's just fine. What will you give me in return?\r\n" + getOreString(oreArray));
|
||||
} else {
|
||||
qm.sendOk("What is this, you don't have the ores with you. No ore, no deal.");
|
||||
qm.sendOk("What is this, you don't have the #rjewel ores#k with you. No ore, no deal.");
|
||||
qm.dispose();
|
||||
return;
|
||||
}
|
||||
} else if (status == 0) {
|
||||
} else if (status == 1) {
|
||||
if (!qm.haveItem(oreArray[selection], 2)) {
|
||||
qm.sendNext("What's this, you haven't got the ores. No ores no deal!");
|
||||
qm.sendNext("What's this, you haven't got the #rjewel ores#k. No ores no deal!");
|
||||
qm.dispose();
|
||||
return;
|
||||
}
|
||||
|
||||
qm.gainItem(oreArray[selection], -2); // Take 2 ores
|
||||
qm.sendNext("Then wait for awhile. I'll go and get the stuff to help you pass the test of Chief Zenumist.");
|
||||
qm.forceCompleteQuest();
|
||||
} else if (status == 1) {
|
||||
} else if (status == 2) {
|
||||
qm.dispose();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,32 +28,39 @@
|
||||
var status = -1;
|
||||
var oreArray;
|
||||
|
||||
function start(mode, type, selection) {
|
||||
}
|
||||
|
||||
function end(mode, type, selection) {
|
||||
if (mode == -1 || (mode == 0 && type > 0)) {
|
||||
qm.dispose();
|
||||
if (mode == -1) {
|
||||
qm.dispose();
|
||||
} else {
|
||||
oreArray = getOreArray();
|
||||
if (status == -1) {
|
||||
if (mode == 0 && type > 0) {
|
||||
qm.dispose();
|
||||
return;
|
||||
}
|
||||
if (mode == 1)
|
||||
status++;
|
||||
else
|
||||
status--;
|
||||
|
||||
if (status == 0) {
|
||||
oreArray = getOreArray();
|
||||
if (oreArray.length > 0) {
|
||||
status++;
|
||||
qm.sendSimple("Oh, looks like someone's ready to make a deal. You want to join Alcadno so badly, huh? I really don't understand you, but that's just fine. What will you give me in return?\r\n" + getOreString(oreArray));
|
||||
qm.sendSimple("Oh, looks like someone's ready to make a deal. You want to join Zenumist so badly, huh? I really don't understand you, but that's just fine. What will you give me in return?\r\n" + getOreString(oreArray));
|
||||
} else {
|
||||
qm.sendOk("What is this, you don't have the ores with you. No ore, no deal.");
|
||||
qm.sendOk("What is this, you don't have the #rjewel ores#k with you. No ore, no deal."); // script would loop undefinitely at completion, thanks IxianMace for noticing
|
||||
qm.dispose();
|
||||
return;
|
||||
}
|
||||
} else if (status == 0) {
|
||||
} else if (status == 1) {
|
||||
if (!qm.haveItem(oreArray[selection], 2)) { // thanks resinate for noticing a function missing here
|
||||
qm.sendNext("What's this, you haven't got the ores. No ores no deal!");
|
||||
qm.sendNext("What's this, you haven't got the #rjewel ores#k. No ores no deal!");
|
||||
qm.dispose();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
qm.gainItem(oreArray[selection], -2); // Take 2 ores
|
||||
qm.sendNext("Then wait for awhile. I'll go and get the stuff to help you pass the test of Chief Alcadno.");
|
||||
qm.sendNext("Then wait for awhile. I'll go and get the stuff to help you pass the test of Chief Zenumist.");
|
||||
qm.forceCompleteQuest();
|
||||
} else if (status == 1) {
|
||||
} else if (status == 2) {
|
||||
qm.dispose();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,39 +47,46 @@ function end(mode, type, selection) {
|
||||
} else if (status == 1) {
|
||||
qm.sendNextPrev("Then here we go...! #rHYAHH!#k");
|
||||
} else if (status == 2) {
|
||||
var pet = 0;
|
||||
if (qm.getPlayer().getPet(0).getItemId() >= 5000029 && qm.getPlayer().getPet(0).getItemId() <= 5000033) {
|
||||
var pet = 0;
|
||||
} else if (qm.getPlayer().getPet(1).getItemId() >= 5000029 && qm.getPlayer().getPet(1).getItemId() <= 5000033) {
|
||||
var pet = 1;
|
||||
} else if (qm.getPlayer().getPet(2).getItemId() >= 5000029 && qm.getPlayer().getPet(2).getItemId() <= 5000033) {
|
||||
var pet = 2;
|
||||
} else {
|
||||
qm.sendOk("Something wrong, try again.");
|
||||
qm.dispose();
|
||||
var petidx = -1;
|
||||
var petItemid;
|
||||
for (var i = 0; i < 3; i++) {
|
||||
var pet = qm.getPlayer().getPet(pet);
|
||||
if (pet != null) {
|
||||
var id = pet.getItemId();
|
||||
if (id >= 5000029 && id <= 5000033) {
|
||||
petItemid = 5000030;
|
||||
petidx = i;
|
||||
break;
|
||||
} else if (id >= 5000048 && id <= 5000053) { // thanks Conrad for noticing Robo pets not being able to re-evolve
|
||||
petItemid = 5000049;
|
||||
petidx = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (petidx == -1) {
|
||||
qm.sendOk("Something wrong, try again.");
|
||||
qm.dispose();
|
||||
return;
|
||||
}
|
||||
var id = qm.getPlayer().getPet(pet).getItemId();
|
||||
if (id < 5000029 || id > 5000033) {
|
||||
qm.sendOk("Something wrong, try again.");
|
||||
qm.dispose();
|
||||
return;
|
||||
}
|
||||
var rand = 1 + Math.floor(Math.random() * 10);
|
||||
var after = 0;
|
||||
if (rand >= 1 && rand <= 3) {
|
||||
after = 5000030;
|
||||
} else if (rand >= 4 && rand <= 6) {
|
||||
after = 5000031;
|
||||
} else if (rand >= 7 && rand <= 9) {
|
||||
after = 5000032;
|
||||
} else if (rand == 10) {
|
||||
after = 5000033;
|
||||
} else {
|
||||
qm.sendOk("Something wrong. Try again.");
|
||||
qm.dispose();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
var pool = (petItemid == 5000030) ? 10 : 11;
|
||||
do {
|
||||
var rand = 1 + Math.floor(Math.random() * pool);
|
||||
var after = 0;
|
||||
if (rand >= 1 && rand <= 3) {
|
||||
after = petItemid;
|
||||
} else if (rand >= 4 && rand <= 6) {
|
||||
after = petItemid + 1;
|
||||
} else if (rand >= 7 && rand <= 9) {
|
||||
after = petItemid + 2;
|
||||
} else if (rand == 10) {
|
||||
after = petItemid + 3;
|
||||
} else {
|
||||
after = petItemid + 4;
|
||||
}
|
||||
} while (after == pet.getItemId());
|
||||
|
||||
/*if (name.equals(MapleItemInformationProvider.getInstance().getName(id))) {
|
||||
name = MapleItemInformationProvider.getInstance().getName(after);
|
||||
@@ -87,7 +94,7 @@ function end(mode, type, selection) {
|
||||
|
||||
qm.gainMeso(-10000);
|
||||
qm.gainItem(5380000, -1);
|
||||
qm.evolvePet(pet, after);
|
||||
qm.evolvePet(petidx, after);
|
||||
|
||||
qm.sendOk("Woo! It worked again! #rYou may find your new pet under your 'CASH' inventory.\r #kIt used to be a #b#i" + id + "##t" + id + "##k, and now it's \r a#b #i" + after + "##t" + after + "##k! \r\n Come back with 10,000 mesos and another Rock of Evolution if you don't like it!\r\n\r\n#fUI/UIWindow.img/QuestIcon/4/0#\r\n#v"+after+"# #t"+after+"#");
|
||||
} else if (status == 3) {
|
||||
|
||||
Reference in New Issue
Block a user