GMS-like Wedding + Scissors of Karma + Maple Life + Buyback

Properly developed the Marriage feature in the source.
Added TRAVEL_RATE server flag, a modifier for the travel frequency rate.
Corrected stance for players in 3rd party view when entering a map to work similarly as GMS.
Fixed mobs spamming skills incoherently.
Added code support for old GMS-like PQ NPCs, where party leaders just need to click once to start a new PQ.
Implemented podium system for the Hall of Fame PlayerNPCs.
Improved character load-out system, now using way less queries to the DB in the process.
Fixed birthday field for accounts not being read correctly.
Further implemented the incomplete yet-existing Scissors of Karma mechanic.
Fixed Duey not propagating item flags when packaging an item.
Added a custom buyback system.
Refactored the character creation system, now offering support for Maple Life.
Fixed some issues with the PlayerNPC positioning system.
Added server flag allowing AP assignment for novices (beginners under level 11).
Fixed Strategy Time (GPQ) announcement being sent twice to guilds in certain cases.
Tweaked mount EXP system now awarding it accordingly with the amount of tiredness healed.
Removed the randomness aspect of closeness gain when feeding the pet, now acting accordingly with amount of fullness gained.
Fixed an exploit with Arwen script.
Fixed travel-back from Florina forcefully sending players to Lith Harbor in certain situations.
Thoroughly reviewed job skill questlines for Explorers and Aran.
Localhost edit: removed MTS block in certain maps (useful for the buyback system).
Localhost edit: removed party blocks for novices.
Localhost edit: removed AP assigning block for novices.
Localhost edit: removed speed cap.
Localhost edit: removed Maker block popping up when inputting ATK gems on non-weapons.
This commit is contained in:
ronancpl
2018-06-05 02:40:53 -03:00
230 changed files with 11510 additions and 3591 deletions

View File

@@ -5,6 +5,7 @@
importPackage(Packages.client);
var status = -1;
var jobType = 1;
function end(mode, type, selection) {
if (mode == 0) {
@@ -20,6 +21,12 @@ function end(mode, type, selection) {
if (status == 0) {
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();
return;
}
qm.sendNext("I have just molded your body to make it perfect for a Dawn Warrior. If you wish to become more powerful, use Stat Window (S) to raise the appropriate stats. If you aren't sure what to raise, just click on #bAuto#k.");
if (qm.getPlayer().getJob().getId() != 1100) {
qm.gainItem(1302077, 1);

View File

@@ -5,6 +5,7 @@
importPackage(Packages.client);
var status = -1;
var jobType = 2;
function end(mode, type, selection) {
if (mode == 0) {
@@ -20,6 +21,12 @@ function end(mode, type, selection) {
if (status == 0) {
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();
return;
}
qm.sendNext("I have just molded your body to make it perfect for a Blaze Wizard. If you wish to become more powerful, use Stat Window (S) to raise the appropriate stats. If you aren't sure what to raise, just click on #bAuto#k.");
if (qm.getPlayer().getJob().getId() != 1200) {
qm.gainItem(1372043, 1);

View File

@@ -1,9 +1,11 @@
/*
* Cygnus 1st Job advancement - Wind Archer
*/
importPackage(Packages.client);
var status = -1;
var jobType = 3;
function end(mode, type, selection) {
if (mode == 0) {
@@ -19,6 +21,12 @@ function end(mode, type, selection) {
if (status == 0) {
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();
return;
}
qm.sendNext("I have just molded your body to make it perfect for a Wind Archer. If you wish to become more powerful, use Stat Window (S) to raise the appropriate stats. If you aren't sure what to raise, just click on #bAuto#k.");
if (qm.getPlayer().getJob().getId() != 1300) {
qm.gainItem(2060000, 2000);

View File

@@ -1,9 +1,11 @@
/*
* Cygnus 1st Job advancement - Night Walker
*/
importPackage(Packages.client);
var status = -1;
var jobType = 4;
function end(mode, type, selection) {
if (mode == 0) {
@@ -19,6 +21,12 @@ function end(mode, type, selection) {
if (status == 0) {
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();
return;
}
qm.sendNext("I have just molded your body to make it perfect for a Night Walker. If you wish to become more powerful, use Stat Window (S) to raise the appropriate stats. If you aren't sure what to raise, just click on #bAuto#k.");
if (qm.getPlayer().getJob().getId() != 1400) {
qm.gainItem(1472061, 1);

View File

@@ -1,10 +1,11 @@
/*
* Cygnus 1st Job advancement - Thunder Breaker
*/
importPackage(Packages.client);
var status = -1;
var jobType = 5;
function end(mode, type, selection) {
if (mode == 0) {
@@ -20,6 +21,12 @@ function end(mode, type, selection) {
if (status == 0) {
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();
return;
}
qm.sendNext("I have just molded your body to make it perfect for a Thunder Breaker. If you wish to become more powerful, use Stat Window (S) to raise the appropriate stats. If you aren't sure what to raise, just click on #bAuto#k.");
if (qm.getPlayer().getJob().getId() != 1500) {
qm.gainItem(1482014, 1);

View File

@@ -1,49 +0,0 @@
/*
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/>.
*/
/*
Author : Generic (http://cronusemu.net)
NPC Name: Dalair
Map(s): Every town
Description: Quest - Title Challenge - Celebrity!
Quest ID : 29002
*/
var status = -1;
function start(mode, type, selection) {
if (mode == -1) {
qm.sendNext("Come back when you're ready.");
qm.dispose();
} else {
if (mode > 0)
status++;
else
status--;
if (status == 0) {// Picture of Celebrity Medal(+blue text "Celebrity Medal"
qm.sendAcceptDecline("#v1142003# #e#b#t1142003##k \r\n- Time Limit 30 Days \r\n- Popularity 1000Increase \r\n#nDo you want to test your skills to see if you're worthy of this title?");
} else if (status == 1) {
qm.sendNext("I'll give you 30 days to reach your goal. Once you're finished, come back and see me. Remember that you have to come back and see me within the time limit in order for it to be approved. Also, unless you complete this challenge or quit first, you can't try out for another title.");
qm.forceStartQuest();
}
}
}

View File

@@ -1,64 +0,0 @@
/*
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/>.
*/
/*
Author : kevintjuh93
Description: Quest - Veteran Hunter
Quest ID : 29400
*/
var status = -1;
function start(mode, type, selection) {
status++;
if (mode != 1) {
qm.sendNext("Come back when you're ready.");
qm.dispose();
return;
}
if (status == 0)
qm.sendAcceptDecline("#v1142004# #e#b#t1142004##k\r\n\r - Time Limit 30 Days\r - Hunt 100,000 Monsters\r #n *Only monsters that are at your level or higher are approved.\r\nDo you want to test your skills to see if you're worthy of this title?");
else if (status == 1) {
qm.sendNext("Current Ranking \r\n1. #bMoople#k : #r538,673#k monsters\r\n2. #bZeroQuanta#k : #r111,421#k monsters\r\nDon't forget that the record resets at the beginning of each month.");//TODO
} else if (status == 2) {
qm.sendNextPrev("I'll give you 30 days to reach your hunting goal. Once you are finished, come back and see me. Remember, you have to come back and see me within the time limit in order to be approved. Also, you are prohibited from trying out for another title unless you first complete or forfeit this challenge.");
} else if (status == 3) {
qm.forceStartQuest();
qm.dispose();
}
}
function end(mode, type, selection) {
status++;
if (mode != 1) {
if(type == 1 && mode == 0) return;
else{
qm.dispose();
return;
}
if (status == 0) {
qm.sendOk("Not coded yet.");
qm.dispose();
}
}
}

20
scripts/quest/29927.js Normal file
View File

@@ -0,0 +1,20 @@
var status = -1;
function start(mode, type, selection) {
if (qm.canHold(1142132) && !qm.haveItem(1142132,1) && qm.getPlayer().getLevel() >= 120 && ((qm.getPlayer().getJob() / 100) | 0) == 21) {
qm.gainItem(1142132,1);
qm.forceStartQuest();
qm.forceCompleteQuest();
}
qm.dispose();
}
function end(mode, type, selection) {
if (qm.canHold(1142132) && !qm.haveItem(1142132,1) && qm.getPlayer().getLevel() >= 120 && ((qm.getPlayer().getJob() / 100) | 0) == 21) {
qm.gainItem(1142132,1);
qm.forceStartQuest();
qm.forceCompleteQuest();
}
qm.dispose();
}

View File

@@ -24,7 +24,7 @@
Map(s): New Leaf City
Description: Quest - Pet Evolution
*/
importPackage(Packages.client);
importPackage(Packages.client.inventory.manipulator);
importPackage(Packages.server);
var status = -1;

View File

@@ -43,18 +43,17 @@ function end(mode, type, selection) {
} else if (status == 1) {
if(qm.getQuestProgress(6033) == 1 && qm.haveItem(4260003, 1)) {
qm.sendNext("You indeed have crafted a fine piece of Monster Crystal, I see. You passed! Now, I shall teach you the next steps of the Maker skill. Keep the monster crystal with you as well, it's your work.");
var skillid = Math.floor(qm.getPlayer().getJob().getId() / 1000) * 10000000 + 1007;
qm.teachSkill(skillid, 2, 3, -1);
qm.gainExp(230000 * qm.getPlayer().getExpRate());
qm.forceCompleteQuest();
} else {
qm.sendNext("Hey, what's wrong? I did tell you to make a monster crystal to pass my test, didn't I? Buying one or crafting before the start of the test is NOT part of the deal. Go craft me an #b#t4260003##k.");
qm.dispose();
return;
}
} else {
var skillid = Math.floor(qm.getPlayer().getJob().getId() / 1000) * 10000000 + 1007;
qm.teachSkill(skillid, 2, 3, -1);
qm.gainExp(230000 * qm.getPlayer().getExpRate());
qm.forceCompleteQuest();
qm.dispose();
}
}

View File

@@ -43,16 +43,19 @@ function end(mode, type, selection) {
} else if (status == 1) {
if(qm.haveItem(4031980, 1)) {
qm.sendNext("You crafted a #b#t4031980##k?! How comes, how did you do it?? ... Well, that can't be helped, I guess. The student surpassed the teacher! Youth sure do wonders to one's perception capabilities.\r\n\r\nYou are now ready to take the last step on mastering the Maker skill, contemplate it at it's finest form!");
qm.gainItem(4031980, -1);
var skillid = Math.floor(qm.getPlayer().getJob().getId() / 1000) * 10000000 + 1007;
qm.teachSkill(skillid, 3, 3, -1);
qm.gainExp(300000 * qm.getPlayer().getExpRate());
qm.forceCompleteQuest();
} else {
qm.sendNext("... Please step aside, I can't finish this work if I'm being distracted at every moment.");
qm.dispose();
return;
}
} else {
qm.gainItem(4031980, -1);
var skillid = Math.floor(qm.getPlayer().getJob().getId() / 1000) * 10000000 + 1007;
qm.teachSkill(skillid, 3, 3, -1);
qm.gainExp(300000 * qm.getPlayer().getExpRate());
qm.forceCompleteQuest();
qm.dispose();
}

View File

@@ -8,16 +8,16 @@ function start(mode, type, selection) {
qm.forceCompleteQuest();
var medalname = qm.getMedalName();
qm.message("<" + medalname + "> has been awarded.");
qm.message("<" + medalname + "> is not coded.");
qm.earnTitle("<" + medalname + "> has been awarded.");
qm.dispose();
}
function complete(mode, type, selection) {
function end(mode, type, selection) {
qm.forceCompleteQuest();
var medalname = qm.getMedalName();
qm.message("<" + medalname + "> has been awarded.");
qm.message("<" + medalname + "> is not coded.");
qm.earnTitle("<" + medalname + "> has been awarded.");
qm.dispose();
}