Masteria NPCs & Quests

Added more NPCs for the Phantom Woods and Crimsonwood areas. Enabled
more quests on that area.
This commit is contained in:
ronancpl
2017-07-10 23:42:24 -03:00
parent b7c0bb6c07
commit 57125a70ce
43 changed files with 776 additions and 80 deletions

View File

@@ -32,11 +32,11 @@ function action(mode, type, selection) {
}
if (status == 0) {
var selStr = "Hey traveler! Come, come closer... We offer a #bhuge opportunity of business#k to you. If you want to know what it is, keep listening..."
var selStr = "Hey traveler! Come, come closer... We offer a #bhuge opportunity of business#k to you. If you want to know what it is, keep listening...";
cm.sendNext(selStr);
}
else if (status == 1) {
var selStr = "We've got here the knowledge to synthetize the mighty #b#t2049100##k! Of course, making one is not an easy task... But worry not! Just gather some material to me and a fee of #b1,200,000 mesos#k for our services to #bobtain it#k. You still want to do it?"
var selStr = "We've got here the knowledge to synthetize the mighty #b#t2049100##k! Of course, making one is not an easy task... But worry not! Just gather some material to me and a fee of #b1,200,000 mesos#k for our services to #bobtain it#k. You still want to do it?";
cm.sendYesNo(selStr);
}

125
scripts/npc/9201096.js Normal file
View File

@@ -0,0 +1,125 @@
/* Jack
Refining NPC:
* ITEMMAKE
*
* By RonanLana
*/
var status = 0;
var selectedType = -1;
var selectedItem = -1;
var item;
var mats;
var matQty;
var cost;
var qty;
var equip;
var last_use; //last item is a use item
function start() {
cm.getPlayer().setCS(true);
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == 1)
status++;
else {
cm.sendOk("Very well, see you around.");
cm.dispose();
return;
}
if (status == 0) {
var selStr = "Hey, are you aware about the expeditions running right now at the Crimsonwood Keep? So, there is a great opportunity for one to improve themselves, one can rack up experience and loot pretty fast there.";
cm.sendNext(selStr);
}
else if (status == 1) {
var selStr = "Said so, methinks making use of some strong utility potions can potentially create some differential on the front, and by this I mean to start crafting #b#t2022284##k's to help on the efforts. So, getting right down to business, I'm currently pursuing #rplenty#k of those items: #r#t4032010##k, #r#t4032011##k, #r#t4032012##k, and some funds to support the cause. Would you want to get some of these boosters?";
cm.sendYesNo(selStr);
}
else if (status == 2) {
//selectedItem = selection;
selectedItem = 0;
var itemSet = new Array(2022284, 7777777);
var matSet = new Array(new Array(4032010, 4032011, 4032012));
var matQtySet = new Array(new Array(60, 60, 45));
var costSet = new Array(75000, 7777777);
item = itemSet[selectedItem];
mats = matSet[selectedItem];
matQty = matQtySet[selectedItem];
cost = costSet[selectedItem];
var prompt = "Ok, I'll be crafting some #t" + item + "#. In that case, how many of those do you want me to make?";
cm.sendGetNumber(prompt,1,1,100)
}
else if (status == 3) {
qty = selection;
last_use = false;
var prompt = "So, you want me to make ";
if (qty == 1)
prompt += "a #t" + item + "#?";
else
prompt += qty + " #t" + item + "#?";
prompt += " In that case, I'm going to need specific items from you in order to make it. And make sure you have room in your inventory!#b";
if (mats instanceof Array){
for (var i = 0; i < mats.length; i++) {
prompt += "\r\n#i"+mats[i]+"# " + matQty[i] * qty + " #t" + mats[i] + "#";
}
} else {
prompt += "\r\n#i"+mats+"# " + matQty * qty + " #t" + mats + "#";
}
if (cost > 0) {
prompt += "\r\n#i4031138# " + cost * qty + " meso";
}
cm.sendYesNo(prompt);
}
else if (status == 4) {
var complete = true;
if (cm.getMeso() < cost * qty) {
cm.sendOk("Well, I DID say I would be needing some funds to craft it, wasn't it?");
}
else if(!cm.canHold(item, qty)) {
cm.sendOk("You didn't check if you got a slot to spare on your inventory before crafting, right?");
}
else {
if (mats instanceof Array) {
for (var i = 0; complete && i < mats.length; i++) {
if (matQty[i] * qty == 1) {
complete = cm.haveItem(mats[i]);
} else {
complete = cm.haveItem(mats[i], matQty[i] * qty);
}
}
} else {
complete = cm.haveItem(mats, matQty * qty);
}
if (!complete)
cm.sendOk("There are not enough resources on your inventory. Please check it again.");
else {
if (mats instanceof Array) {
for (var i = 0; i < mats.length; i++){
cm.gainItem(mats[i], -matQty[i] * qty);
}
} else {
cm.gainItem(mats, -matQty * qty);
}
cm.gainMeso(-cost * qty);
cm.gainItem(item, qty);
cm.sendOk("There it is! Thanks for your cooperation.");
}
}
cm.dispose();
}
}

View File

@@ -71,14 +71,20 @@ function start() {
}
function action(mode, type, selection) {
if (mode == 0) {
cm.sendOk("Hmmm...it shouldn't be a bad deal for you. Come see me at the right time and you may get a much better item to be offered. Anyway, let me know when you have a change of mind.");
if (mode <= 0) {
cm.sendOk("Hmmm...it shouldn't be a bad deal for you. Come see me at the right time and you may get a much better item to be offered. Anyway, let me know if you have a change of mind.");
cm.dispose();
return;
}
status++;
if (status == 0) { // first interaction with NPC
if(cm.getQuestStatus(8225) != 2) {
cm.sendNext("Hey, I'm not a bandit, ok?");
cm.dispose();
return;
}
cm.sendNext("Hey, got a little bit of time? Well, my job is to collect items here and sell them elsewhere, but these days the monsters have become much more hostile so it have been difficult to get good items... What do you think? Do you want to do some business with me?");
} else if (status == 1) {
cm.sendYesNo("The deal is simple. You get me something I need, I get you something you need. The problem is, I deal with a whole bunch of people, so the items I have to offer may change every time you see me. What do you think? Still want to do it?");

21
scripts/npc/9201098.js Normal file
View File

@@ -0,0 +1,21 @@
/**
*9201098 - Lukan
*@author Ronan
*/
function start() {
if(cm.getQuestStatus(8223) == 2) {
if(cm.haveItem(3992041)) cm.sendOk("We, defenders of Yore, are currenly meeting at the Inner Sactum inside the Keep, about to start an offensive against the Twisted Masters and their army. Join us there anytime.");
else {
if(!cm.canHold(3992041)) cm.sendOk("Please make a slot on your SETUP ready for the key I have to give to you. It is fundamental to enter the Inner Sanctum, inside the Keep.");
else {
cm.sendOk("So you did lost your key, right? Very well, I will craft you another one, but please don't lose it again. It is fundamental to enter the Inner Sanctum, inside the Keep.");
cm.gainItem(3992041, 1);
}
}
} else {
cm.sendOk("O, brave adventurer. The Stormcasters house, from which I belong, guards the surrounding area of Yore, this landscape, from the forces of the Twisted Masters' guard that daily threathens the citizens. Please help us on the defense of Yore.");
}
cm.dispose();
}

14
scripts/npc/9201099.js Normal file
View File

@@ -0,0 +1,14 @@
/**
*9201098 - Mo
*@author Ronan
*/
function start() {
if(cm.getQuestStatus(8224) == 2) {
cm.openShopNPC(9201099);
} else {
cm.sendOk("Hm, at who do you think you are looking at?");
}
cm.dispose();
}

14
scripts/npc/9201100.js Normal file
View File

@@ -0,0 +1,14 @@
/**
*9201100 - Taggrin
*@author Ronan
*/
function start() {
if(cm.getQuestStatus(8224) == 2) {
cm.sendOk("Well met, fellow clan member. If you need anything we can be of help, try talking to one of our members.");
} else {
cm.sendOk("Hello there, stranger. We are the renowned Raven Claw clan of mercenaries, and I'm their leader.");
}
cm.dispose();
}

10
scripts/npc/9201103.js Normal file
View File

@@ -0,0 +1,10 @@
/**
*9201103 - Sage
*@author Ronan
*/
function start() {
if(cm.getLevel() >= 100) cm.sendOk("Expeditions are frequently being held inside the Crimsonwood Keep by adventurers like you, where many people from many parties cooperate together, solving puzzles therein and taking down strong enemies, being able to get many prizes in the process. To find more info about this, go ahead inside the keep at the top-right room there.");
else cm.sendOk("Inside the Keep, expeditions can be formed to attempt the Crimsonwood Keep PQ, which requires maplers from level 100 or more. It seems you are not suitable for attempting it yet, train some more if you want to attempt it.");
cm.dispose();
}

12
scripts/npc/9201104.js Normal file
View File

@@ -0,0 +1,12 @@
/**
*9201104 - Sage
*@author Ronan
*/
function start() {
if(cm.getMapId() == 610020000) cm.sendOk("O, brave adventurer. Just by reaching this spot, you are truly distinct among the masses, congratulations. However, #rpay heed#k: on the path ahead, which leads to the mighty fortress of #bCrimsonwood Keep#k, #rdeadly Menhirs#k are deployed as traps for those unaware of the dangers ahead. #rOne hit from it is enough to take you down#k, so beware. If you aim to reach the Keep, follow the trail ahead carefully.");
else if(cm.getMapId() == 610020003) cm.sendOk("You seem worthy now to receive a hint for what lies ahead. Once inside the main room of the Keep, make sure you remember the layout of the statue you see there. That's it.");
else if(cm.getMapId() == 610020004) cm.sendOk("You seem worthy now to receive a hint for what lies ahead. Devices known as Sigils are activated by detection when some skills of certain jobs are activated nearby, make sure your team is made whole for when the time comes. That's it.");
else cm.sendOk("So far your progress is splendid, good job. However, to make it to the Keep, you must face and accomplish this ordeal, carry on.");
cm.dispose();
}

10
scripts/npc/9201105.js Normal file
View File

@@ -0,0 +1,10 @@
/**
*9201105 - Sage
*@author Ronan
*/
function start() {
if(cm.getMapId() == 610020005) cm.sendOk("The Crimsonwood Keep lies right ahead, a great feat has been made by you this day, salute to thee. Pass through these woods to enter the gates of the Keep.");
else cm.sendOk("So far your progress is splendid, good job. However, to make it to the Keep, you must face and accomplish this ordeal, carry on.");
cm.dispose();
}

View File

@@ -7,7 +7,7 @@ function start() {
cm.sendOk("As every Thief knows, the best attack is the one you never see coming. So, to best illustrate this, you'll be in a chamber with platforms and ledges that you can only get to with Haste, as well as All-Seeing Eyes that your dagger or claw must close--permanently. After all the All-Seeing Eyes have been eliminated, get ti the Thief Statue and lay claim to the Primal Claw! Good luck!");
break;
case 610030000:
cm.sendOk("Once known as the 'Prince of Shadows', Grandmaster Ryo possessed supreme speed and power with short-ranged daggers and longer chain-like Claw. A part-time member of the Bosshunters, he was reowned for unparalleled ability to blend into the very nigth itself. His legend grew during a battle with Crimson Balrog, where he moved so swiftly that Balrog's attacks only caught air. Ryo also performed occasional 'retrievals' for those less fortunate than himself.");
cm.sendOk("Once known as the 'Prince of Shadows', Grandmaster Ryo possessed supreme speed and power with short-ranged daggers and longer chain-like Claw. A part-time member of the Bosshunters, he was reowned for unparalleled ability to blend into the very night itself. His legend grew during a battle with Crimson Balrog, where he moved so swiftly that Balrog's attacks only caught air. Ryo also performed occasional 'retrievals' for those less fortunate than himself.");
break;
case 610030530:
if (cm.isAllReactorState(6108004, 1)) {

View File

@@ -56,7 +56,7 @@ function action(mode, type, selection) {
cm.sendOk("You do not meet the criteria to take attempt Crimsonwood Keep Party Quest!");
cm.dispose();
} else if (expedition == null) { //Start an expedition
cm.sendSimple("#e#b<Party Quest: Crimsonwood Keep>\r\n#k#n" + em.getProperty("party") + "\r\n\r\nWould you like to assemble a team to attempt a #rCrimsonwood Keep Party Quest#k?\r\n#b#L1#Lets get this going!#l\r\n\#L2#No, I think I'll wait a bit...#l");
cm.sendSimple("#e#b<Party Quest: Crimsonwood Keep>\r\n#k#n" + em.getProperty("party") + "\r\n\r\nWould you like to assemble a team to attempt the #rCrimsonwood Keep Party Quest#k?\r\n#b#L1#Lets get this going!#l\r\n\#L2#No, I think I'll wait a bit...#l");
status = 1;
} else if (expedition.isLeader(player)) { //If you're the leader, manage the exped
cm.sendSimple(list);

View File

@@ -19,12 +19,14 @@
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/>.
*/
/* Door that warps you inside the CWKPQ start map. Needs GMS-like checks.
/* Door that warps you inside the CWKPQ start map.
*
* @Author Alan (SharpAceX)
* @Author Ronan
*/
function start() {
cm.warp(610030020);
if(cm.haveItem(3992041, 1)) cm.warp(610030020);
else cm.getPlayer().dropMessage(5, "The giant gate of iron will not budge no matter what, however there is a key-shaped socket visible.");
cm.dispose();
}