Reformat and clean up npc scripts

This commit is contained in:
P0nk
2021-09-09 23:35:02 +02:00
parent 0c1545f81d
commit d893309b4f
665 changed files with 19932 additions and 19046 deletions

File diff suppressed because one or more lines are too long

View File

@@ -32,33 +32,39 @@ function start() {
function action(mode, type, selection) {
status++;
if (mode != 1)
if((mode == 0 && type == 1) || mode == -1 || (mode == 0 && status == 1)){
if(type == 1)
if (mode != 1) {
if ((mode == 0 && type == 1) || mode == -1 || (mode == 0 && status == 1)) {
if (type == 1) {
cm.sendNext("You must have some business to take care of here. You must be tired from all that traveling and hunting. Go take some rest, and if you feel like changing your mind, then come talk to me.");
}
cm.dispose();
return;
} else
} else {
status -= 2;
if (selection == 0)
}
}
if (selection == 0) {
status++;
if(status == 1){
if(selection == 1)
}
if (status == 1) {
if (selection == 1) {
cm.sendYesNo("So you have a #bVIP Ticket to Florina Beach#k? You can always head over to Florina Beach with that. Alright then, but just be aware that you may be running into some monsters there too. Okay, would you like to head over to Florina Beach right now?");
else if (selection == 2)
} else if (selection == 2) {
cm.sendNext("You must be curious about a #bVIP Ticket to Florina Beach#k. Haha, that's very understandable. A VIP Ticket to Florina Beach is an item where as long as you have in possession, you may make your way to Florina Beach for free. It's such a rare item that even we had to buy those, but unfortunately I lost mine a few weeks ago during my precious summer break.");
} else if (status == 2){
if(type != 1 && selection != 0) {
}
} else if (status == 2) {
if (type != 1 && selection != 0) {
cm.sendNextPrev("I came back without it, and it just feels awful not having it. Hopefully someone picked it up and put it somewhere safe. Anyway, this is my story and who knows, you may be able to pick it up and put it to good use. If you have any questions, feel free to ask.");
cm.dispose();
} else{
if (cm.getMeso() < 1500 && selection == 0)
cm.dispose();
} else {
if (cm.getMeso() < 1500 && selection == 0) {
cm.sendNext("I think you're lacking mesos. There are many ways to gather up some money, you know, like... selling your armor... defeating monsters... doing quests... you know what I'm talking about.");
else if(!cm.haveItem(4031134) && selection != 0){
} else if (!cm.haveItem(4031134) && selection != 0) {
cm.sendNext("Hmmm, so where exactly is your #bVIP Ticket to Florina\r\nBeach#k? Are you sure you have one? Please double-check.");
}else{
if(selection == 0)
} else {
if (selection == 0) {
cm.gainMeso(-1500);
}
cm.getPlayer().saveLocation("FLORINA");
cm.warp(110000000, "st00");
}

View File

@@ -25,45 +25,46 @@
Description: Extends Buddy List
*/
var status = 0;
function start() {
status = -1;
action(1, 0, 0);
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();
} else {
if (status == 0 && mode == 0) {
cm.sendNext("I see... you don't have as many friends as I thought you would. Hahaha, just kidding! Anyway if you feel like changing your mind, please feel free to come back and we'll talk business. If you make a lot of friends, then you know ... hehe ...");
cm.dispose();
return;
} else if (status >= 1 && mode == 0) {
cm.sendNext("I see... I don't think you don't have as many friends as I thought you would. If not, you just don't have 240,000 mesos with you right this minute? Anyway, if you ever change your mind, come back and we'll talk business. That is, of course, once you have get some financial relief. .. hehe ...");
cm.dispose();
return;
}
if (mode == 1)
status++;
else
status--;
if (status == 0) {
cm.sendYesNo("I hope I can make as much as yesterday... well, hello! Don't you want to extend your buddy list? You look like someone who'd have a whole lot of friends... well, what do you think? With some money I can make it happen for you. Remember, though, it only applies to one character at a time, so it won't affect any of your other characters on your account. Do you want to extend your buddy list?");
} else if (status == 1) {
cm.sendYesNo("Alright, good call! It's not that expensive actually. #b240,000 mesos and I'll add 5 more slots to your buddy list#k. And no, I won't be selling them individually. Once you buy it, it's going to be permanently on your buddy list. So if you're one of those that needs more space there, then you might as well do it. What do you think? Will you spend 240,000 mesos for it?");
} else if (status == 2) {
var capacity = cm.getPlayer().getBuddylist().getCapacity();
if (capacity >= 50 || cm.getMeso() < 240000){
cm.sendNext("Hey... are you sure you have #b240,000 mesos#k? If so, then check and see if you have extended your buddy list to the max. Even if you pay up, the most you can have on your buddy list is #b50#k.");
if (mode == -1) {
cm.dispose();
} else {
if (status == 0 && mode == 0) {
cm.sendNext("I see... you don't have as many friends as I thought you would. Hahaha, just kidding! Anyway if you feel like changing your mind, please feel free to come back and we'll talk business. If you make a lot of friends, then you know ... hehe ...");
cm.dispose();
} else {
var newcapacity = capacity + 5;
cm.gainMeso(-240000);
cm.getPlayer().setBuddyCapacity(newcapacity)
cm.sendOk("Alright! Your buddy list will have 5 extra slots by now. Check and see for it yourself. And if you still need more room on your buddy list, you know who to find. Of course, it isn't going to be for free ... well, so long ...");
cm.dispose();
}
}
}
return;
} else if (status >= 1 && mode == 0) {
cm.sendNext("I see... I don't think you don't have as many friends as I thought you would. If not, you just don't have 240,000 mesos with you right this minute? Anyway, if you ever change your mind, come back and we'll talk business. That is, of course, once you have get some financial relief. .. hehe ...");
cm.dispose();
return;
}
if (mode == 1) {
status++;
} else {
status--;
}
if (status == 0) {
cm.sendYesNo("I hope I can make as much as yesterday... well, hello! Don't you want to extend your buddy list? You look like someone who'd have a whole lot of friends... well, what do you think? With some money I can make it happen for you. Remember, though, it only applies to one character at a time, so it won't affect any of your other characters on your account. Do you want to extend your buddy list?");
} else if (status == 1) {
cm.sendYesNo("Alright, good call! It's not that expensive actually. #b240,000 mesos and I'll add 5 more slots to your buddy list#k. And no, I won't be selling them individually. Once you buy it, it's going to be permanently on your buddy list. So if you're one of those that needs more space there, then you might as well do it. What do you think? Will you spend 240,000 mesos for it?");
} else if (status == 2) {
var capacity = cm.getPlayer().getBuddylist().getCapacity();
if (capacity >= 50 || cm.getMeso() < 240000) {
cm.sendNext("Hey... are you sure you have #b240,000 mesos#k? If so, then check and see if you have extended your buddy list to the max. Even if you pay up, the most you can have on your buddy list is #b50#k.");
cm.dispose();
} else {
var newcapacity = capacity + 5;
cm.gainMeso(-240000);
cm.getPlayer().setBuddyCapacity(newcapacity)
cm.sendOk("Alright! Your buddy list will have 5 extra slots by now. Check and see for it yourself. And if you still need more room on your buddy list, you know who to find. Of course, it isn't going to be for free ... well, so long ...");
cm.dispose();
}
}
}
}

View File

@@ -20,14 +20,14 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
-- Odin JavaScript --------------------------------------------------------------------------------
VIP Cab - Victoria Road : Lith Harbor (104000000)
-- By ---------------------------------------------------------------------------------------------
Xterminator
-- Version Info -----------------------------------------------------------------------------------
1.0 - First Version by Xterminator
---------------------------------------------------------------------------------------------------
**/
-- Odin JavaScript --------------------------------------------------------------------------------
VIP Cab - Victoria Road : Lith Harbor (104000000)
-- By ---------------------------------------------------------------------------------------------
Xterminator
-- Version Info -----------------------------------------------------------------------------------
1.0 - First Version by Xterminator
---------------------------------------------------------------------------------------------------
**/
var status = 0;
var cost = 10000;
@@ -38,21 +38,21 @@ function start() {
function action(mode, type, selection) {
status++;
if (mode == -1){
if (mode == -1) {
cm.dispose();
return;
} else if (mode == 0) {
cm.sendOk("This town also has a lot to offer. Find us if and when you feel the need to go to the Ant Tunnel Park.");
cm.dispose();
return;
cm.dispose();
return;
}
if (status == 1) {
cm.sendYesNo(cm.getJobId() == 0 ? "We have a special 90% discount for beginners. The Ant Tunnel is located deep inside in the dungeon that's placed at the center of the Victoria Island, where the 24 Hr Mobile Store is. Would you like to go there for #b1,000 mesos#k?" : "The regular fee applies for all non-beginners. The Ant Tunnel is located deep inside in the dungeon that's placed at the center of the Victoria Island, where 24 Hr Mobile Store is. Would you like to go there for #b10,000 mesos#k?");
cost /= ((cm.getJobId() == 0) ? 10 : 1);
} else if (status == 2) {
if (cm.getMeso() < cost)
if (cm.getMeso() < cost) {
cm.sendNext("It looks like you don't have enough mesos. Sorry but you won't be able to use this without it.")
else {
} else {
cm.gainMeso(-cost);
cm.warp(105070001);
}

View File

@@ -5,11 +5,11 @@ var selectedMap = -1;
var mesos;
function start() {
if (cm.hasItem(4032313,1)) {
cm.sendNext("I see that you have a coupon to go to Henesys. One moment, I'll bring you there right over!");
} else {
cm.sendNext("Hello, I drive the Regular Cab. If you want to go from town to town safely and fast, then ride our cab. We'll glady take you to your destination with an affordable price.");
}
if (cm.hasItem(4032313, 1)) {
cm.sendNext("I see that you have a coupon to go to Henesys. One moment, I'll bring you there right over!");
} else {
cm.sendNext("Hello, I drive the Regular Cab. If you want to go from town to town safely and fast, then ride our cab. We'll glady take you to your destination with an affordable price.");
}
}
function action(mode, type, selection) {
@@ -24,41 +24,44 @@ function action(mode, type, selection) {
cm.dispose();
return;
}
if (mode == 1)
if (mode == 1) {
status++;
else
} else {
status--;
}
if (status == 1) {
if (cm.hasItem(4032313,1)) {
if (cm.hasItem(4032313, 1)) {
cm.gainItem(4032313, -1);
cm.warp(maps[0], 0);
cm.dispose();
return;
}
var selStr = "";
if (cm.getJobId() == 0)
if (cm.getJobId() == 0) {
selStr += "We have a special 90% discount for beginners.";
}
selStr += "Choose your destination, for fees will change from place to place.#b";
for (var i = 0; i < maps.length; i++)
for (var i = 0; i < maps.length; i++) {
selStr += "\r\n#L" + i + "##m" + maps[i] + "# (" + (cm.getJobId() == 0 ? cost[i] / 10 : cost[i]) + " mesos)#l";
}
cm.sendSimple(selStr);
} else if (status == 2) {
cm.sendYesNo("You don't have anything else to do here, huh? Do you really want to go to #b#m" + maps[selection] + "##k? It'll cost you #b"+ (cm.getJobId() == 0 ? cost[selection] / 10 : cost[selection]) + " mesos#k.");
cm.sendYesNo("You don't have anything else to do here, huh? Do you really want to go to #b#m" + maps[selection] + "##k? It'll cost you #b" + (cm.getJobId() == 0 ? cost[selection] / 10 : cost[selection]) + " mesos#k.");
selectedMap = selection;
} else if (status == 3) {
if (cm.getJobId() == 0) {
mesos = cost[selectedMap] / 10;
mesos = cost[selectedMap] / 10;
} else {
mesos = cost[selectedMap];
mesos = cost[selectedMap];
}
if (cm.getMeso() < mesos) {
cm.sendNext("You don't have enough mesos. Sorry to say this, but without them, you won't be able to ride the cab.");
cm.dispose();
return;
}
cm.gainMeso(-mesos);
cm.warp(maps[selectedMap], 0);
cm.dispose();

View File

@@ -22,51 +22,55 @@
// Jane the Alchemist
var status = -1;
var amount = -1;
var items = [[2000002,310],[2022003,1060],[2022000,1600],[2001000,3120]];
var items = [[2000002, 310], [2022003, 1060], [2022000, 1600], [2001000, 3120]];
var item;
function start() {
if (cm.isQuestCompleted(2013))
if (cm.isQuestCompleted(2013)) {
cm.sendNext("It's you ... thanks to you I was able to get a lot done. Nowadays I've been making a bunch of items. If you need anything let me know.");
else {
if (cm.isQuestCompleted(2010))
} else {
if (cm.isQuestCompleted(2010)) {
cm.sendNext("You don't seem strong enough to be able to purchase my potion ...");
else
} else {
cm.sendOk("My dream is to travel everywhere, much like you. My father, however, does not allow me to do it, because he thinks it's very dangerous. He may say yes, though, if I show him some sort of a proof that I'm not the weak girl that he thinks I am ...");
}
cm.dispose();
}
}
function action(mode, type, selection) {
status++;
if (mode != 1){
if(mode == 0 && type == 1)
if (mode != 1) {
if (mode == 0 && type == 1) {
cm.sendNext("I still have quite a few of the materials you got me before. The items are all there so take your time choosing.");
}
cm.dispose();
return;
}
if (status == 0){
if (status == 0) {
var selStr = "Which item would you like to buy?#b";
for (var i = 0; i < items.length; i++)
for (var i = 0; i < items.length; i++) {
selStr += "\r\n#L" + i + "##i" + items[i][0] + "# (Price : " + items[i][1] + " mesos)#l";
}
cm.sendSimple(selStr);
} else if (status == 1) {
item = items[selection];
var recHpMp = ["300 HP.","1000 HP.","800 MP","1000 HP and MP."];
var recHpMp = ["300 HP.", "1000 HP.", "800 MP", "1000 HP and MP."];
cm.sendGetNumber("You want #b#t" + item[0] + "##k? #t" + item[0] + "# allows you to recover " + recHpMp[selection] + " How many would you like to buy?", 1, 1, 100);
} else if (status == 2) {
cm.sendYesNo("Will you purchase #r" + selection + "#k #b#t" + item[0] + "#(s)#k? #t" + item[0] + "# costs " + item[1] + " mesos for one, so the total comes out to be #r" + (item[1] * selection) + "#k mesos.");
amount = selection;
} else if (status == 3) {
if (cm.getMeso() < item[1] * amount)
if (cm.getMeso() < item[1] * amount) {
cm.sendNext("Are you lacking mesos by any chance? Please check and see if you have an empty slot available at your etc. inventory, and if you have at least #r" + (item[1] * selectedItem) + "#k mesos with you.");
else {
} else {
if (cm.canHold(item[0])) {
cm.gainMeso(-item[1] * amount);
cm.gainItem(item[0], amount);
cm.sendNext("Thank you for coming. Stuff here can always be made so if you need something, please come again.");
} else
} else {
cm.sendNext("Please check and see if you have an empty slot available at your etc. inventory.");
}
}
cm.dispose();
}

View File

@@ -20,34 +20,37 @@ function action(mode, type, selection) {
cm.dispose();
return;
}
if (mode == 1)
if (mode == 1) {
status++;
else
} else {
status--;
}
if (status == 1) {
var selStr = "";
if (cm.getJobId() == 0)
if (cm.getJobId() == 0) {
selStr += "We have a special 90% discount for beginners.";
}
selStr += "Choose your destination, for fees will change from place to place.#b";
for (var i = 0; i < maps.length; i++)
for (var i = 0; i < maps.length; i++) {
selStr += "\r\n#L" + i + "##m" + maps[i] + "# (" + (cm.getJobId() == 0 ? cost[i] / 10 : cost[i]) + " mesos)#l";
}
cm.sendSimple(selStr);
} else if (status == 2) {
cm.sendYesNo("You don't have anything else to do here, huh? Do you really want to go to #b#m" + maps[selection] + "##k? It'll cost you #b"+ (cm.getJobId() == 0 ? cost[selection] / 10 : cost[selection]) + " mesos#k.");
cm.sendYesNo("You don't have anything else to do here, huh? Do you really want to go to #b#m" + maps[selection] + "##k? It'll cost you #b" + (cm.getJobId() == 0 ? cost[selection] / 10 : cost[selection]) + " mesos#k.");
selectedMap = selection;
} else if (status == 3) {
if (cm.getJobId() == 0) {
mesos = cost[selectedMap] / 10;
mesos = cost[selectedMap] / 10;
} else {
mesos = cost[selectedMap];
mesos = cost[selectedMap];
}
if (cm.getMeso() < mesos) {
cm.sendNext("You don't have enough mesos. Sorry to say this, but without them, you won't be able to ride the cab.");
cm.dispose();
return;
}
cm.gainMeso(-mesos);
cm.warp(maps[selectedMap], 0);
cm.dispose();

View File

@@ -44,151 +44,172 @@ var equip;
function start() {
cm.getPlayer().setCS(true);
var selStr = "Hello. I am Vicious, retired Sniper. However, I used to be the top student of Athena Pierce. Though I no longer hunt, I can make some archer items that will be useful for you...#b"
var options = ["Create a bow","Create a crossbow","Make a glove","Upgrade a glove","Create materials","Create Arrows"];
for (var i = 0; i < options.length; i++)
var options = ["Create a bow", "Create a crossbow", "Make a glove", "Upgrade a glove", "Create materials", "Create Arrows"];
for (var i = 0; i < options.length; i++) {
selStr += "\r\n#L" + i + "# " + options[i] + "#l";
}
cm.sendSimple(selStr);
}
function action(mode, type, selection) {
status++;
if (mode != 1){
if (mode != 1) {
cm.dispose();
return;
}
if (status == 0) {
if (selection == 0) { //bow refine
var selStr = "I may have been a Sniper, but bows and crossbows aren't too much different. Anyway, which would you like to make?#b";
items = [1452002,1452003,1452001,1452000,1452005,1452006,1452007];
for (var i = 0; i < items.length; i++)
items = [1452002, 1452003, 1452001, 1452000, 1452005, 1452006, 1452007];
for (var i = 0; i < items.length; i++) {
selStr += "\r\n#L" + i + "##t" + items[i] + "##k - Bowman Lv. " + (10 + (i * 5)) + "#l#b";
}else if (selection == 1) { //xbow refine
}
} else if (selection == 1) { //xbow refine
var selStr = "I was a Sniper. Crossbows are my specialty. Which would you like me to make for you?#b";
items = [1462001,1462002,1462003,1462000,1462004,1462005,1462006,1462007];
for (var i = 0; i < items.length; i++)
items = [1462001, 1462002, 1462003, 1462000, 1462004, 1462005, 1462006, 1462007];
for (var i = 0; i < items.length; i++) {
selStr += "\r\n#L" + i + "##t" + items[i] + "##k - Bowman Lv. " + (10 + (i * 5)) + "#l#b";
}else if (selection == 2) { //glove refine
}
} else if (selection == 2) { //glove refine
var selStr = "Okay, so which glove do you want me to make?#b";
items = [1082012,1082013,1082016,1082048,1082068,1082071,1082084,1082089];
for (var i = 0; i < items.length; i++)
selStr += "\r\n#L" + i + "##t" + items[i] + "##k - Bowman Lv. " + (15 + (i * 5) > 40 ? ((i-1) * 10) : 15 + (i * 5)) + "#l#b";
}else if (selection == 3) { //glove upgrade
items = [1082012, 1082013, 1082016, 1082048, 1082068, 1082071, 1082084, 1082089];
for (var i = 0; i < items.length; i++) {
selStr += "\r\n#L" + i + "##t" + items[i] + "##k - Bowman Lv. " + (15 + (i * 5) > 40 ? ((i - 1) * 10) : 15 + (i * 5)) + "#l#b";
}
} else if (selection == 3) { //glove upgrade
var selStr = "Upgrade a glove? That shouldn't be too difficult. Which did you have in mind?#b";
items = [1082015,1082014,1082017,1082018,1082049,1082050,1082069,1082070,1082072,1082073,1082085,1082083,1082090,1082091];
for (var i = 0, x = 0; i < items.length; i++, x += (i+1) % 2 == 0 ? 1 : 0)
selStr += "\r\n#L" + i + "##t" + items[i] + "##k" + "##k - Bowman Lv. " + (20 + (x * 5) > 40 ? ((x-1) * 10) : 20 + (x * 5)) + "#l#b";
}else if (selection == 4) { //material refine
items = [1082015, 1082014, 1082017, 1082018, 1082049, 1082050, 1082069, 1082070, 1082072, 1082073, 1082085, 1082083, 1082090, 1082091];
for (var i = 0, x = 0; i < items.length; i++, x += (i + 1) % 2 == 0 ? 1 : 0) {
selStr += "\r\n#L" + i + "##t" + items[i] + "##k" + "##k - Bowman Lv. " + (20 + (x * 5) > 40 ? ((x - 1) * 10) : 20 + (x * 5)) + "#l#b";
}
} else if (selection == 4) { //material refine
var selStr = "Materials? I know of a few materials that I can make for you...#b";
var materials = ["Make Processed Wood with Tree Branch","Make Processed Wood with Firewood","Make Screws (packs of 15)"];
for (var i = 0; i < materials.length; i++)
var materials = ["Make Processed Wood with Tree Branch", "Make Processed Wood with Firewood", "Make Screws (packs of 15)"];
for (var i = 0; i < materials.length; i++) {
selStr += "\r\n#L" + i + "# " + materials[i] + "#l";
}else if (selection == 5) { //arrow refine
}
} else if (selection == 5) { //arrow refine
var selStr = "Arrows? Not a problem at all.#b";
items = [2060000,2061000,2060001,2061001,2060002,2061002];
for (var i = 0; i < items.length; i++)
items = [2060000, 2061000, 2060001, 2061001, 2060002, 2061002];
for (var i = 0; i < items.length; i++) {
selStr += "\r\n#L" + i + "##t" + items[i] + "##l";
}
}
selectedType = selection;
cm.sendSimple(selStr);
if (selection != 4)
if (selection != 4) {
status++;
}else if (status == 1) {
}
} else if (status == 1) {
selectedItem = selection;
items = [4003001,4003001,4003000];
var matSet = [4000003,4000018, [4011000,4011001]];
var matQtySet = [10,5,[1,1]];
items = [4003001, 4003001, 4003000];
var matSet = [4000003, 4000018, [4011000, 4011001]];
var matQtySet = [10, 5, [1, 1]];
item = items[selection];
mats = matSet[selection];
matQty = matQtySet[selection];
cost = 0;
cm.sendGetNumber("So, you want me to make some #t" + item + "#s? In that case, how many do you want me to make?",1,1,100)
}else if (status == 2) {
if (selectedType != 4)
cm.sendGetNumber("So, you want me to make some #t" + item + "#s? In that case, how many do you want me to make?", 1, 1, 100)
} else if (status == 2) {
if (selectedType != 4) {
selectedItem = selection;
else
qty = (selection > 0) ? selection : (selection < 0 ? -selection : 1); // thanks br1337 for showing such a simple exploit with quantity on NPC crafters
} else {
qty = (selection > 0) ? selection : (selection < 0 ? -selection : 1);
} // thanks br1337 for showing such a simple exploit with quantity on NPC crafters
if (selectedType == 0) { //bow refine
var matSet = [[4003001,4000000],[4011001,4003000],[4003001,4000016],[4011001,4021006,4003000],[4011001,4011006,4021003,4021006,4003000],[4011004,4021000,4021004,4003000],[4021008,4011001,4011006,4003000,4000014]];
var matQtySet = [[5,30],[1,3],[30,50],[2,2,8],[5,5,3,3,30],[7,6,3,35],[1,10,3,40,50]];
var costSet = [800,2000,3000,5000,30000,40000,80000];
}else if (selectedType == 1) { //xbow refine
var matSet = [[4003001,4003000],[4011001,4003001,4003000],[4011001,4003001,4003000],[4011001,4021006,4021002,4003000],[4011001,4011005,4021006,4003001,4003000],[4021008,4011001,4011006,4021006,4003000],[4021008,4011004,4003001,4003000],[4021008,4011006,4021006,4003001,4003000]];
var matQtySet = [[7,2],[1,20,5],[1,50,8],[2,1,1,10],[5,5,3,50,15],[1,8,4,2,30],[2,6,30,30],[2,5,3,40,40]];
var costSet = [1000,2000,3000,10000,30000,50000,80000,200000];
}else if (selectedType == 2) { //glove refine
var matSet = [[4000021,4000009],[4000021,4000009,4011001],[4000021,4000009,4011006],[4000021,4011006,4021001],[4011000,4011001,4000021,4003000],[4011001,4021000,4021002,4000021,4003000],[4011004,4011006,4021002,4000030,4003000],[4011006,4011007,4021006,4000030,4003000]];
var matQtySet = [[15,20],[20,20,2],[40,50,2],[50,2,1],[1,3,60,15],[3,1,3,80,25],[3,1,2,40,35],[2,1,8,50,50]];
var costSet = [5000,10000,15000,20000,30000,40000,50000,70000];
}else if (selectedType == 3) { //glove upgrade
var matSet = [[1082013,4021003],[1082013,4021000],[1082016,4021000],[1082016,4021008],[1082048,4021003],[1082048,4021008],[1082068,4011002],[1082068,4011006],[1082071,4011006],[1082071,4021008],[1082084,4011000,4021000],[1082084,4011006,4021008],[1082089,4021000,4021007],[1082089,4021007,4021008]];
var matQtySet = [[1,2],[1,1],[1,3],[1,1],[1,3],[1,1],[1,4],[1,2],[1,4],[1,2],[1,1,5],[1,2,2],[1,5,1],[1,2,2]];
var costSet = [7000,7000,10000,12000,15000,20000,22000,25000,30000,40000,55000,60000,70000,80000];
}else if (selectedType == 5) { //arrow refine
var matSet = [[4003001,4003004],[4003001,4003004],[4011000,4003001,4003004],[4011000,4003001,4003004],[4011001,4003001,4003005],[4011001,4003001,4003005]];
var matQtySet = [[1,1],[1,1],[1,3,10],[1,3,10],[1,5,15],[1,5,15]];
var costSet = [0,0,0,0,0,0]
var matSet = [[4003001, 4000000], [4011001, 4003000], [4003001, 4000016], [4011001, 4021006, 4003000], [4011001, 4011006, 4021003, 4021006, 4003000], [4011004, 4021000, 4021004, 4003000], [4021008, 4011001, 4011006, 4003000, 4000014]];
var matQtySet = [[5, 30], [1, 3], [30, 50], [2, 2, 8], [5, 5, 3, 3, 30], [7, 6, 3, 35], [1, 10, 3, 40, 50]];
var costSet = [800, 2000, 3000, 5000, 30000, 40000, 80000];
} else if (selectedType == 1) { //xbow refine
var matSet = [[4003001, 4003000], [4011001, 4003001, 4003000], [4011001, 4003001, 4003000], [4011001, 4021006, 4021002, 4003000], [4011001, 4011005, 4021006, 4003001, 4003000], [4021008, 4011001, 4011006, 4021006, 4003000], [4021008, 4011004, 4003001, 4003000], [4021008, 4011006, 4021006, 4003001, 4003000]];
var matQtySet = [[7, 2], [1, 20, 5], [1, 50, 8], [2, 1, 1, 10], [5, 5, 3, 50, 15], [1, 8, 4, 2, 30], [2, 6, 30, 30], [2, 5, 3, 40, 40]];
var costSet = [1000, 2000, 3000, 10000, 30000, 50000, 80000, 200000];
} else if (selectedType == 2) { //glove refine
var matSet = [[4000021, 4000009], [4000021, 4000009, 4011001], [4000021, 4000009, 4011006], [4000021, 4011006, 4021001], [4011000, 4011001, 4000021, 4003000], [4011001, 4021000, 4021002, 4000021, 4003000], [4011004, 4011006, 4021002, 4000030, 4003000], [4011006, 4011007, 4021006, 4000030, 4003000]];
var matQtySet = [[15, 20], [20, 20, 2], [40, 50, 2], [50, 2, 1], [1, 3, 60, 15], [3, 1, 3, 80, 25], [3, 1, 2, 40, 35], [2, 1, 8, 50, 50]];
var costSet = [5000, 10000, 15000, 20000, 30000, 40000, 50000, 70000];
} else if (selectedType == 3) { //glove upgrade
var matSet = [[1082013, 4021003], [1082013, 4021000], [1082016, 4021000], [1082016, 4021008], [1082048, 4021003], [1082048, 4021008], [1082068, 4011002], [1082068, 4011006], [1082071, 4011006], [1082071, 4021008], [1082084, 4011000, 4021000], [1082084, 4011006, 4021008], [1082089, 4021000, 4021007], [1082089, 4021007, 4021008]];
var matQtySet = [[1, 2], [1, 1], [1, 3], [1, 1], [1, 3], [1, 1], [1, 4], [1, 2], [1, 4], [1, 2], [1, 1, 5], [1, 2, 2], [1, 5, 1], [1, 2, 2]];
var costSet = [7000, 7000, 10000, 12000, 15000, 20000, 22000, 25000, 30000, 40000, 55000, 60000, 70000, 80000];
} else if (selectedType == 5) { //arrow refine
var matSet = [[4003001, 4003004], [4003001, 4003004], [4011000, 4003001, 4003004], [4011000, 4003001, 4003004], [4011001, 4003001, 4003005], [4011001, 4003001, 4003005]];
var matQtySet = [[1, 1], [1, 1], [1, 3, 10], [1, 3, 10], [1, 5, 15], [1, 5, 15]];
var costSet = [0, 0, 0, 0, 0, 0]
}
if(selectedType != 4){
if (selectedType != 4) {
item = items[selectedItem];
mats = matSet[selectedItem];
matQty = matQtySet[selectedItem];
cost = costSet[selectedItem];
}
var prompt = "You want me to make ";
if (qty == 1)
if (qty == 1) {
prompt += "a #t" + item + "#?";
else
} else {
prompt += qty + " #t" + item + "#?";
}
prompt += " In that case, I'm going to need specific items from you in order to make it. Make sure you have room in your inventory, though!#b";
if (mats instanceof Array)
for(var i = 0; i < mats.length; i++)
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
}
} else {
prompt += "\r\n#i" + mats + "# " + (matQty * qty) + " #t" + mats + "#";
if (cost > 0)
}
if (cost > 0) {
prompt += "\r\n#i4031138# " + (cost * qty) + " meso";
}
cm.sendYesNo(prompt);
}else if (status == 3) {
} else if (status == 3) {
var complete = true;
if (cm.getMeso() < (cost * qty)) {
cm.sendOk("Sorry, but this is how I make my living. No meso, no item.");
cm.dispose();
return;
}
else{
} else {
if (mats instanceof Array) {
for(var i = 0; complete && i < mats.length; i++)
if (!cm.haveItem(mats[i], matQty[i] * qty))
for (var i = 0; complete && i < mats.length; i++) {
if (!cm.haveItem(mats[i], matQty[i] * qty)) {
complete = false;
}else if (!cm.haveItem(mats, matQty * qty))
}
}
} else if (!cm.haveItem(mats, matQty * qty)) {
complete = false;
}
if (!complete)
}
}
if (!complete) {
cm.sendOk("Surely you, of all people, would understand the value of having quality items? I can't do that without the items I require.");
else {
} else {
var recvItem = item, recvQty;
if (item >= 2060000 && item <= 2060002) //bow arrows
{
recvQty = 1000 - (item - 2060000) * 100;
else if (item >= 2061000 && item <= 2061002) //xbow arrows
} else if (item >= 2061000 && item <= 2061002) //xbow arrows
{
recvQty = 1000 - (item - 2061000) * 100;
else if (item == 4003000)//screws
} else if (item == 4003000)//screws
{
recvQty = 15 * qty;
else
} else {
recvQty = qty;
}
if (cm.canHold(recvItem, recvQty)) {
if (mats instanceof Array) {
for (var i = 0; i < mats.length; i++)
for (var i = 0; i < mats.length; i++) {
cm.gainItem(mats[i], -(matQty[i] * qty));
}else
}
} else {
cm.gainItem(mats, -(matQty * qty));
}
cm.gainMeso(-(cost * qty));
cm.gainItem(recvItem, recvQty);
cm.sendOk("A perfect item, as usual. Come and see me if you need anything else.");
}else {
} else {
cm.sendOk("Please make sure you have room in your inventory, and talk to me again.");
}
}

View File

@@ -33,7 +33,7 @@ function start() {
}
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();
} else {
@@ -41,17 +41,17 @@ function action(mode, type, selection) {
cm.dispose();
return;
}
if (mode == 1)
if (mode == 1) {
status++;
else
} else {
status--;
if(status == -1) {
cm.sendNext("Hmm... are you raising one of my kids by any chance? I perfected a spell that uses Water of Life to blow life into a doll. People call it the #bPet#k. If you have one with you, feel free to ask me questions.");
}
else if (status == 0)
if (status == -1) {
cm.sendNext("Hmm... are you raising one of my kids by any chance? I perfected a spell that uses Water of Life to blow life into a doll. People call it the #bPet#k. If you have one with you, feel free to ask me questions.");
} else if (status == 0) {
cm.sendSimple("What do you want to know more of?#b\r\n#L0#Tell me more about Pets.#l\r\n#L1#How do I raise Pets?#l\r\n#L2#Do Pets die too?#l\r\n#L3#What are the commands for Brown and Black Kitty?#l\r\n#L4#What are the commands for Brown Puppy?#l\r\n#L5#What are the commands for Pink and White Bunny?#l\r\n#L6#What are the commands for Mini Kargo?#l\r\n#L7#What are the commands for Rudolph and Dasher?#l\r\n#L8#What are the commands for Black Pig?#l\r\n#L9#What are the commands for Panda?#l\r\n#L10#What are the commands for Husky?#l\r\n#L11#What are the commands for Dino Boy and Dino Girl?#l\r\n#L12#What are the commands for Monkey?#l\r\n#L13#What are the commands for Turkey?#l\r\n#L14#What are the commands for White Tiger?#l\r\n#L15#What are the commands for Penguin?#l\r\n#L16#What are the commands for Golden Pig?#l\r\n#L17#What are the commands for Robot?#l\r\n#L18#What are the commands for Mini Yeti?#l\r\n#L19#What are the commands for Jr. Balrog?#l\r\n#L20#What are the commands for Baby Dragon?#l\r\n#L21#What are the commands for Green/Red/Blue Dragon?#l\r\n#L22#What are the commands for Black Dragon?#l\r\n#L23#What are the commands for Jr. Reaper?#l\r\n#L24#What are the commands for Porcupine?#l\r\n#L25#What are the commands for Snowman?#l\r\n#L26#What are the commands for Skunk?#l\r\n#L27#Please teach me about transferring pet ability points.#l");
else if (status == 1) {
} else if (status == 1) {
sel = selection;
if (selection == 0) {
status = 3;
@@ -62,93 +62,97 @@ function action(mode, type, selection) {
} else if (selection == 2) {
status = 11;
cm.sendNext("Dying... well, they aren't technically ALIVE per se, so I don't know if dying is the right term to use. They are dolls with my magical power and the power of Water of Life to become a live object. Of course while it's alive, it's just like a live animal...");
} else if (selection == 3)
} else if (selection == 3) {
cm.sendNext("These are the commands for #rBrown Kitty and Black Kitty#k. The level mentioned next to the command shows the pet level required for it to respond.\r\n#bsit#k (Level 1 ~ 30)\r\n#bbad, no, badgirl, badboy#k (Level 1 ~ 30)\r\n#bstupid, ihateyou, dummy#k (Level 1 ~ 30)\r\n#biloveyou#k (Level 1~30)\r\n#bpoop#k (Level 1 ~ 30)\r\n#btalk, say, chat#k (Level 10 ~ 30)\r\n#bcutie#k (Level 10 ~ 30)\r\n#bup, stand, rise#k (Level 20 ~ 30)");
else if (selection == 4)
} else if (selection == 4) {
cm.sendNext("These are the commands for #rBrown Puppy#k. The level mentioned next to the command shows the pet level required for it to respond.\r\n#bsit#k (Level 1 ~ 30)\r\n#bbad, no, badgirl, badboy#k (Level 1 ~ 30)\r\n#bstupid, ihateyou, baddog, dummy#k (Level 1 ~ 30)\r\n#biloveyou#k (Level 1~30)\r\n#bpee#k (Level 1 ~ 30)\r\n#btalk, say, chat#k (Level 10 ~ 30)\r\n#bdown#k (Level 10 ~ 30)\r\n#bup, stand, rise#k (Level 20 ~ 30)");
else if (selection == 5)
} else if (selection == 5) {
cm.sendNext("These are the commands for #rPink Bunny and White Bunny#k. The level mentioned next to the command shows the pet level required for it to respond.\r\n#bsit#k (Level 1 ~ 30)\r\n#bbad, no, badgirl, badboy#k (Level 1 ~ 30)\r\n#bup, stand, rise#k (Level 1 ~ 30)\r\n#biloveyou#k (Level 1~30)\r\n#bpoop#k (Level 1 ~ 30)\r\n#btalk, say, chat#k (Level 10 ~ 30)\r\n#bhug#k (Level 10 ~ 30)\r\n#bsleep, sleepy, gotobed#k (Level 20 ~ 30)");
else if (selection == 6)
} else if (selection == 6) {
cm.sendNext("These are the commands for #rMini Kargo#k. The level mentioned next to the command shows the pet level required for it to respond.\r\n#bsit#k (Level 1 ~ 30)\r\n#bbad, no, badgirl, badboy#k (Level 1 ~ 30)\r\n#bup, stand, rise#k (Level 1 ~ 30)\r\n#biloveyou#k (Level 1~30)\r\n#bpee#k (Level 1 ~ 30)\r\n#btalk, say, chat#k (Level 10 ~ 30)\r\n#bthelook, charisma#k (Level 10 ~ 30)\r\n#bdown#k (Level 10 ~ 30)\r\n#bgoodboy, goodgirl#k (Level 20 ~ 30)");
else if (selection == 7)
} else if (selection == 7) {
cm.sendNext("These are the commands for #rRudolph and Dasher#k. The level mentioned next to the command shows the pet level required for it to respond.\r\n#bsit#k (Level 1 ~ 30)\r\n#bbad, no, badgirl, badboy#k (Level 1 ~ 30)\r\n#bup, stand#k (Level 1 ~ 30)\r\n#bstupid, ihateyou, dummy#k (Level 1 ~ 30)\r\n#bmerryxmas, merrychristmas#k (Level 1 ~ 30)\r\n#biloveyou#k (Level 1~30)\r\n#bpoop#k (Level 1 ~ 30)\r\n#btalk, say, chat#k (Level 11 ~ 30)\r\n#blonely, alone#k (Level 11 ~ 30)\r\n#bcutie#k (Level 11 ~ 30)\r\n#bmush, go#k (Level 21 ~ 30)");
else if (selection == 8)
} else if (selection == 8) {
cm.sendNext("These are the commands for #rBlack Pig#k. The level mentioned next to the command shows the pet level required for it to respond.\r\n#bsit#k (Level 1 ~ 30)\r\n#bbad, no, badgirl, badboy#k (Level 1 ~ 30)\r\n#bpoop#k (Level 1 ~ 30)\r\n#biloveyou#k (Level 1~30)\r\n#bhand#k (Level 1 ~ 30)\r\n#bstupid, ihateyou, dummy#k (Level 1 ~ 30)\r\n#btalk, chat, say#k (Level 10 ~ 30)\r\n#bsmile#k (Level 10 ~ 30)\r\n#bthelook, charisma#k (Level 20 ~ 30)");
else if (selection == 9)
} else if (selection == 9) {
cm.sendNext("These are the commands for #rPanda#k. The level mentioned next to the command shows the pet level required for it to respond.\r\n#bsit#k (Level 1 ~ 30)\r\n#bchill, relax#k (Level 1 ~ 30)\r\n#bbad, no, badgirl, badboy#k (Level 1 ~ 30)\r\n#bpoop#k (Level 1 ~ 30)\r\n#biloveyou#k (Level 1 ~ 30)\r\n#bup, stand, rise#k (Level 1 ~ 30)\r\n#btalk, chat, say#k (Level 10 ~ 30)\r\n#bletsplay#k (Level 10 ~ 30)\r\n#bmeh, bleh#k (Level 10 ~ 30)\r\n#bsleep#k (Level 20 ~ 30)");
else if (selection == 10)
} else if (selection == 10) {
cm.sendNext("These are the commands for #rHusky#k. The level mentioned next to the command shows the pet level required for it to respond.\r\n#bsit#k (Level 1 ~ 30)\r\n#bbad, no, badgirl, badboy#k (Level 1 ~ 30)\r\n#bstupid, ihateyou, baddog, dummy#k (Level 1 ~ 30)\r\n#bhand#k (Level 1 ~ 30)\r\n#bpoop#k (Level 1 ~ 30)\r\n#biloveyou#k (Level 1 ~ 30)\r\n#bdown#k (Level 10 ~ 30)\r\n#btalk, chat, say#k (Level 10 ~ 30)\r\n#bup, stand, rise#k (Level 20 ~ 30)");
else if (selection == 11)
} else if (selection == 11) {
cm.sendNext("These are the commands for #rDino Boy and Dino Girl#k. The level mentioned next to the command shows the pet level required for it to respond.\r\n#bsit#k (Level 1 ~ 30)\r\n#bbad, no, badboy, badgirl#k (Level 1 ~ 30)\r\n#biloveyou#k (Level 1 ~ 30)\r\n#bpoop#k (Level 1 ~ 30)\r\n#bsmile, laugh#k (Level 1 ~ 30)\r\n#bstupid, ihateyou, dummy#k (Level 1 ~ 30)\r\n#btalk, chat, say#k (Level 10 ~ 30)\r\n#bcutie#k (Level 10 ~ 30)\r\n#bsleep, nap, sleepy#k (Level 20 ~ 30)");
else if (selection == 12)
} else if (selection == 12) {
cm.sendNext("These are the commands for #rMonkey#k. The level mentioned next to the command shows the pet level required for it to respond.\r\n#bsit#k (Level 1 ~ 30)\r\n#brest#k (Level 1 ~ 30)\r\n#bbad, no, badboy, badgirl#k (Level 1 ~ 30)\r\n#bpee#k (Level 1 ~ 30)\r\n#biloveyou#k (Level 1 ~ 30)\r\n#bup, stand#k (Level 1 ~ 30)\r\n#btalk, chat, say#k (Level 10 ~ 30)\r\n#bplay#k (Level 10 ~ 30)\r\n#bmelong#k (Level 10 ~ 30)\r\n#bsleep, gotobed, sleepy#k (Level 20 ~ 30)");
else if (selection == 13)
} else if (selection == 13) {
cm.sendNext("These are the commands for #rTurkey#k. The level mentioned next to the command shows the pet level required for it to respond.\r\n#bsit#k (Level 1 ~ 30)\r\n#bno, rudeboy, mischief#k (Level 1 ~ 30)\r\n#bstupid#k (Level 1 ~ 30)\r\n#biloveyou#k (Level 1 ~ 30)\r\n#bup, stand#k (Level 1 ~ 30)\r\n#btalk, chat, gobble#k (Level 10 ~ 30)\r\n#byes, goodboy#k (Level 10 ~ 30)\r\n#bsleepy, birdnap, doze#k (Level 20 ~ 30)\r\n#bbirdeye, thanksgiving, fly, friedbird, imhungry#k (Level 30)");
else if (selection == 14)
} else if (selection == 14) {
cm.sendNext("These are the commands for #rWhite Tiger#k. The level mentioned next to the command shows the pet level required for it to respond.\r\n#bsit#k (Level 1 ~ 30)\r\n#bbad, no, badboy, badgirl#k (Level 1 ~ 30)\r\n#biloveyou#k (Level 1 ~ 30)\r\n#bpoop#k (Level 1 ~ 30)\r\n#brest, chill#k (Level 1 ~ 30)\r\n#bstupid, ihateyou, dummy#k (Level 1 ~ 30)\r\n#btalk, chat, say#k (Level 10 ~ 30)\r\n#bactsad, sadlook#k (Level 10 ~ 30)\r\n#bwait#k (Level 20 ~ 30)");
else if (selection == 15)
} else if (selection == 15) {
cm.sendNext("These are the commands for #rPenguin#k. The level mentioned next to the command shows the pet level required for it to respond.\r\n#bsit#k (Level 1 ~ 30)\r\n#bbad, no, badboy, badgirl#k (Level 1 ~ 30)\r\n#bpoop#k (Level 1 ~ 30)\r\n#bup, stand, rise#k (Level 1 ~ 30)\r\n#biloveyou#k (Level 1 ~ 30)\r\n#btalk, chat, say#k (Level 10 ~ 30)\r\n#bhug, hugme#k (Level 10 ~ 30)\r\n#bwing, hand#k (Level 10 ~ 30)\r\n#bsleep#k (Level 20 ~ 30)\r\n#bkiss, smooch, muah#k (Level 20 ~ 30)\r\n#bfly#k (Level 20 ~ 30)\r\n#bcute, adorable#k (Level 20 ~ 30)");
else if (selection == 16)
} else if (selection == 16) {
cm.sendNext("These are the commands for #rGolden Pig#k. The level mentioned next to the command shows the pet level required for it to respond.\r\n#bsit#k (Level 1 ~ 30)\r\n#bbad, no, badboy, badgirl#k (Level 1 ~ 30)\r\n#bpoop#k (Level 1 ~ 30)\r\n#biloveyou#k (Level 1 ~ 30)\r\n#btalk, chat, say#k (Level 11 ~ 30)\r\n#bloveme, hugme#k (Level 11 ~ 30)\r\n#bsleep, sleepy, gotobed#k (Level 21 ~ 30)\r\n#bignore / impressed / outofhere#k (Level 21 ~ 30)\r\n#broll, showmethemoney#k (Level 21 ~ 30)");
else if (selection == 17)
} else if (selection == 17) {
cm.sendNext("These are the commands for #rRobot#k. The level mentioned next to the command shows the pet level required for it to respond.\r\n#bsit#k (Level 1 ~ 30)\r\n#bup, stand, rise#k (Level 1 ~ 30)\r\n#bstupid, ihateyou, dummy#k (Level 1 ~ 30)\r\n#bbad, no, badgirl, badboy#k (Level 1 ~ 30)\r\n#battack, charge#k (Level 1 ~ 30)\r\n#biloveyou#k (Level 1 ~ 30)\r\n#bgood, thelook, charisma#k (Level 11 ~ 30)\r\n#bspeack, talk, chat, say#k (Level 11 ~ 30)\r\n#bdisguise, change, transform#k (Level 11 ~ 30)");
else if (selection == 18)
} else if (selection == 18) {
cm.sendNext("These are the commands for #rMini Yeti#k. The level mentioned next to the command shows the pet level required for it to respond.\r\n#bsit#k (Level 1 ~ 30)\r\n#bbad, no, badboy, badgirl#k (Level 1 ~ 30)\r\n#bpoop#k (Level 1 ~ 30)\r\n#bdance, boogie, shakeit#k (Level 1 ~ 30)\r\n#bcute, cutie, pretty, adorable#k (Level 1 ~ 30)\r\n#biloveyou, likeyou, mylove#k (Level 1 ~ 30)\r\n#btalk, chat, say#k (Level 11 ~ 30)\r\n#bsleep, nap, sleepy, gotobed#k (Level 11 ~ 30)");
else if (selection == 19)
} else if (selection == 19) {
cm.sendNext("These are the commands for #rJr. Balrog#k. The level mentioned next to the command shows the pet level required for it to respond.\r\n#bliedown#k (Level 1 ~ 30)\r\n#bno|bad|badgirl|badboy#k (Level 1 ~ 30)\r\n#biloveyou|mylove|likeyou#k (Level 1 ~ 30)\r\n#bcute|cutie|pretty|adorable#k (Level 1 ~ 30)\r\n#bpoop#k (Level 1 ~ 30)\r\n#bsmirk|crooked|laugh#k (Level 1 ~ 30)\r\n#bmelong#k (Level 11 ~ 30)\r\n#bgood|thelook|charisma#k (Level 11 ~ 30)\r\n#bspeak|talk|chat|say#k (Level 11 ~ 30)\r\n#bsleep|nap|sleepy#k (Level 11 ~ 30)\r\n#bgas#k (Level 21 ~ 30)");
else if (selection == 20)
} else if (selection == 20) {
cm.sendNext("These are the commands for #rBaby Dragon#k. The level mentioned next to the command shows the pet level required for it to respond.\r\n#bsit#k (Level 1 ~ 30)\r\n#bno|bad|badgirl|badboy#k (Level 1 ~ 30)\r\n#biloveyou|loveyou#k (Level 1 ~ 30)\r\n#bpoop#k (Level 1 ~ 30)\r\n#bstupid|ihateyou|dummy#k (Level 1 ~ 30)\r\n#bcutie#k (Level 11 ~ 30)\r\n#btalk|chat|say#k (Level 11 ~ 30)\r\n#bsleep|sleepy|gotobed#k (Level 11 ~ 30)");
else if (selection == 21)
} else if (selection == 21) {
cm.sendNext("These are the commands for #rGreen/Red/Blue Dragon#k. The level mentioned next to the command shows the pet level required for it to respond.\r\n#bsit#k (Level 15 ~ 30)\r\n#bno|bad|badgirl|badboy#k (Level 15 ~ 30)\r\n#biloveyou|loveyou#k (Level 15 ~ 30)\r\n#bpoop#k (Level 15 ~ 30)\r\n#bstupid|ihateyou|dummy#k (Level 15 ~ 30)\r\n#btalk|chat|say#k (Level 15 ~ 30)\r\n#bsleep|sleepy|gotobed#k (Level 15 ~ 30)\r\n#bchange#k (Level 21 ~ 30)");
else if (selection == 22)
} else if (selection == 22) {
cm.sendNext("These are the commands for #rBlack Dragon#k. The level mentioned next to the command shows the pet level required for it to respond.\r\n#bsit#k (Level 15 ~ 30)\r\n#bno|bad|badgirl|badboy#k (Level 15 ~ 30)\r\n#biloveyou|loveyou#k (Level 15 ~ 30)\r\n#bpoop#k (Level 15 ~ 30)\r\n#bstupid|ihateyou|dummy#k (Level 15 ~ 30)\r\n#btalk|chat|say#k (Level 15 ~ 30)\r\n#bsleep|sleepy|gotobed#k (Level 15 ~ 30)\r\n#bcutie, change#k (Level 21 ~ 30)");
else if (selection == 23)
} else if (selection == 23) {
cm.sendNext("These are the commands for #rJr. Reaper#k. The level mentioned next to the command shows the pet level required for it to respond.\r\n#bsit#k (Level 1 ~ 30)\r\n#bno|bad|badgirl|badboy#k (Level 1 ~ 30)\r\n#bplaydead, poop#k (Level 1 ~ 30)\r\n#btalk|chat|say#k (Level 1 ~ 30)\r\n#biloveyou, hug#k (Level 1 ~ 30)\r\n#bsmellmyfeet, rockout, boo#k (Level 1 ~ 30)\r\n#btrickortreat#k (Level 1 ~ 30)\r\n#bmonstermash#k (Level 1 ~ 30)");
else if (selection == 24)
} else if (selection == 24) {
cm.sendNext("These are the commands for #rPorcupine#k. The level mentioned next to the command shows the pet level required for it to respond.\r\n#bsit#k (Level 1 ~ 30)\r\n#bno|bad|badgirl|badboy#k (Level 1 ~ 30)\r\n#biloveyou|hug|goodboy#k (Level 1 ~ 30)\r\n#btalk|chat|say#k (Level 1 ~ 30)\r\n#bcushion|sleep|knit|poop#k (Level 1 ~ 30)\r\n#bcomb|beach#k (Level 10 ~ 30)\r\n#btreeninja#k (Level 20 ~ 30)\r\n#bdart#k (Level 20 ~ 30)");
else if (selection == 25)
} else if (selection == 25) {
cm.sendNext("These are the commands for #rSnowman#k. The level mentioned next to the command shows the pet level required for it to respond.\r\n#bsit#k (Level 1 ~ 30)\r\n#bstupid, ihateyou, dummy#k (Level 1 ~ 30)\r\n#bloveyou, mylove, ilikeyou#k (Level 1 ~ 30)\r\n#bmerrychristmas#k (Level 1 ~ 30)\r\n#bcutie, adorable, cute, pretty#k (Level 1 ~ 30)\r\n#bcomb, beach/bad, no, badgirl, badboy#k (Level 1 ~ 30)\r\n#btalk, chat, say/sleep, sleepy, gotobed#k (Level 10 ~ 30)\r\n#bchang#k (Level 20 ~ 30)");
else if (selection == 26)
} else if (selection == 26) {
cm.sendNext("These are the commands for #rSkunk#k. The level mentioned next to the command shows the pet level required for it to respond.\r\n#bsit#k (Level 1 ~ 30)\r\n#bbad/no/badgirl/badboy#k (Level 1 ~ 30)\r\n#brestandrelax, poop#k (Level 1 ~ 30)\r\n#btalk/chat/say, iloveyou#k (Level 1 ~ 30)\r\n#bsnuggle/hug, sleep, goodboy#k (Level 1 ~ 30)\r\n#bfatty, blind, badbreath#k (Level 10 ~ 30)\r\n#bsuitup, bringthefunk#k (Level 20 ~ 30)");
else if (selection == 27) {
} else if (selection == 27) {
status = 14;
cm.sendNext("In order to transfer the pet ability points, closeness and level, Pet AP Reset Scroll is required. If you take this\r\nscroll to Mar the Fairy in Ellinia, she will transfer the level and closeness of the pet to another one. I am especially giving it to you because I can feel your heart for your pet. However, I can't give this out for free. I can give you this book for 250,000 mesos. Oh, I almost forgot! Even if you have this book, it is no use if you do not have a new pet to transfer the Ability points.");
}
if(selection > 2 && selection < 27)
if (selection > 2 && selection < 27) {
cm.dispose();
}
} else if (status == 2) {
if(sel == 0)
if (sel == 0) {
cm.sendNextPrev("But Water of Life only comes out little at the very bottom of the World Tree, so I can't give him too much time in life... I know, it's very unfortunate... but even if it becomes a doll again I can always bring life back into it so be good to it while you're with it.");
else if (sel == 1)
} else if (sel == 1) {
cm.sendNextPrev("Talk to the pet, pay attention to it and its intimacy level will go up and eventually his overall level will go up too. As the intimacy level rises, the pet's overall level will rise soon after. As the overall level rises, one day the pet may even talk like a person a little bit, so try hard raising it. Of course it won't be easy doing so...");
else if (sel == 2)
} else if (sel == 2) {
cm.sendNextPrev("After some time... that's correct, they stop moving. They just turn back to being a doll, after the effect of magic dies down and Water of Life dries out. But that doesn't mean it's stopped forever, because once you pour Water of Life over, it's going to be back alive.");
else if (sel == 27)
} else if (sel == 27) {
cm.sendYesNo("250,000 mesos will be deducted. Do you really want to buy?");
}
} else if (status == 3) {
if (sel == 0)
if (sel == 0) {
cm.sendNextPrev("Oh yeah, they'll react when you give them special commands. You can scold them, love them... it all\r\ndepends on how you take care of them. They are afraid to leave their masters so be nice to them, show them love. They can get sad and lonely fast...");
else if (sel == 1){
} else if (sel == 1) {
cm.sendNextPrev("It may be a live doll but they also have life so they can feel the hunger too. #bFullness#k shows the level of hunger the pet's in. 100 is the max, and the lower it gets, it means that the pet is getting hungrier. After a while, it won't even follow your command and be on the offensive, so watch out over that.");
return;
}else if (sel == 2)
} else if (sel == 2) {
cm.sendNextPrev("Even if it someday moves again, it's sad to see them stop altogether. Please be nice to them while they are alive and moving. Feed them well, too. Isn't it nice to know that there's something alive that follows and listens to only you?");
else if (sel == 27){
if (cm.getMeso() < 250000 || !cm.canHold(4160011))
} else if (sel == 27) {
if (cm.getMeso() < 250000 || !cm.canHold(4160011)) {
cm.sendOk("Please check if your inventory has empty slot or you don't have enough mesos.");
else {
} else {
cm.gainMeso(-250000);
cm.gainItem(4160011, 1);
}
cm.dispose();
}
} else if (status == 4){
if(sel != 1)
} else if (status == 4) {
if (sel != 1) {
cm.dispose();
}
cm.sendNextPrev("Oh yes! Pets can't eat the normal human food. Instead my disciple #bDoofus#k sells #bPet Food#k at the Henesys Market so if you need food for your pet, find Henesys. It'll be a good idea to buy the food in advance and feed the pet before it gets really hungry.");
} else if (status == 5)
} else if (status == 5) {
cm.sendNextPrev("Oh, and if you don't feed the pet for a long period of time, it goes back home by itself. You can take it out of its home and feed it but it's not really good for the pet's health, so try feeding him on a regular basis so it doesn't go down to that level, alright? I think this will do.");
else
} else {
cm.dispose();
}
}
}

View File

@@ -43,8 +43,9 @@ function action(mode, type, selection) {
if (cm.haveItem(4031035)) {
cm.sendNext("Get that letter, jump over obstacles with your pet, and take that letter to my brother Trainer Frod. Give him the letter and something good is going to happen to your pet.");
cm.dispose();
} else
} else {
cm.sendYesNo("This is the road where you can go take a walk with your pet. You can just walk around with it, or you can train your pet to go through the obstacles here. If you aren't too close with your pet yet, that may present a problem and he will not follow your command as much... So, what do you think? Wanna train your pet?");
}
} else {
cm.sendOk("Hey, are you sure you've met #bMar the Fairy#k? Don't lie to me if you've never met her before because it's obvious. That wasn't even a good lie!!");
cm.dispose();

View File

@@ -19,6 +19,7 @@
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: Xterminator
NPC Name: Trainer Frod
Map(s): Victoria Road : Pet-Walking Road (100000202)
@@ -26,21 +27,21 @@
*/
function start() {
if (cm.haveItem(4031035))
if (cm.haveItem(4031035)) {
cm.sendNext("Eh, that's my brother's letter! Probably scolding me for thinking I'm not working and stuff...Eh? Ahhh...you followed my brother's advice and trained your pet and got up here, huh? Nice!! Since you worked hard to get here, I'll boost your intimacy level with your pet.");
else {
} else {
cm.sendOk("My brother told me to take care of the pet obstacle course, but ... since I'm so far away from him, I can't help but wanting to goof around ...hehe, since I don't see him in sight, might as well just chill for a few minutes.");
cm.dispose();
}
}
function action(mode, type, selection) {
if (mode < 1)
if (mode < 1) {
cm.dispose();
else {
if (cm.getPlayer().getNoPets() == 0)
} else {
if (cm.getPlayer().getNoPets() == 0) {
cm.sendNextPrev("Hmmm ... did you really get here with your pet? These obstacles are for pets. What are you here for without it?? Get outta here!");
else {
} else {
cm.gainItem(4031035, -1);
cm.gainCloseness(2, 0);
cm.sendNextPrev("What do you think? Don't you think you have gotten much closer with your pet? If you have time, train your pet again on this obstacle course...of course, with my brother's permission.");

View File

@@ -6,7 +6,7 @@
var status;
var current;
var omok = [4080000, 4080001, 4080002, 4080003, 4080004, 4080005];
var omok = [4080000, 4080001, 4080002, 4080003, 4080004, 4080005];
var omok1piece = [4030000, 4030000, 4030000, 4030010, 4030011, 4030011];
var omok2piece = [4030001, 4030010, 4030011, 4030001, 4030010, 4030001];
var omokamount = 99;
@@ -15,15 +15,15 @@ var text = "The set also differs based on what kind of pieces you want to use fo
function start() {
current = 0;
status = -1;
action(1,0,0);
action(1, 0, 0);
}
function action(mode, type, selection) {
if(mode == -1 && current > 0) {
if (mode == -1 && current > 0) {
cm.dispose();
return;
} else {
if(mode == 1) {
if (mode == 1) {
status++;
} else {
status--;
@@ -32,7 +32,7 @@ function action(mode, type, selection) {
if (status == 0) {
cm.sendSimple("Hey, you look like you need a breather. You should be enjoying the life, just like I am. Well, if you have a couple of items, I can trade you for an item you can play minigames with. Now... what can I do for you?#b\r\n#L0#Create a minigame item#l\r\n#L1#Explain to me what the minigames are about#l#k");
} else if (status == 1) {
if (selection == 0) {
cm.sendSimple("You want to make the minigame item? Minigames aren't something you can just go ahead and play right off the bat. For each minigame, you'll need a specific set of items. Which minigame it em do you want to make?#b\r\n#L4#Omok Set#l\r\n#L5#A Set of Match Cards#l#k");
@@ -63,7 +63,7 @@ function action(mode, type, selection) {
}
}
} else if (status == 3) {
if (current == 1) {
cm.sendNextPrev("Every game of Omok will cost you #r100 mesos#k. Even if you don't have an #bOmok Set#k, you can enter the room and play. However, if you don't possess 100 mesos, then you won't be allowed to enter in the room at all. The person opening the game room also needs 100 mesos to open the room (or else there's no game). If you run out of mesos during the game, then you're automatically kicked out of the room!");
@@ -71,16 +71,16 @@ function action(mode, type, selection) {
cm.sendNextPrev("Every game of Match Cards will cost you #r100 mesos#k. Even if you don't have #bA set of Match Cards#k, you can enter the room and play. However, if you don't possess 100 mesos, then you won't be allowed to enter in the room at all. The person opening the game room also needs 100 mesos to open the room (or else there's no game). If you run out of mesos during the game, then you're automatically kicked out of the room!");
} else if (current == 3) {
for (var i = 0; i < omok.length; i++)
text += "\r\n#L"+i+"##b#t"+omok[i]+"##k#l";
for (var i = 0; i < omok.length; i++) {
text += "\r\n#L" + i + "##b#t" + omok[i] + "##k#l";
}
cm.sendSimple(text);
}
} else if (status == 4) {
if (current == 1 || current == 2) {
cm.sendNextPrev("Enter the room, and when you're ready to play, click on #bReady#k.\r\nOnce the visitor clicks on #bReady#k, the room owner can press #bStart#k to begin the game. If an unwanted visitor walks in, and you don't want to play with that person, the room owner has the right to kick the visitor out of the room. There will be a square box with x written on the right of that person. Click on that for a cold goodbye, okay?"); //Oh yeah, because people WALK in Omok Rooms.
}
else if (current == 3) {
} else if (current == 3) {
if (cm.haveItem(omok1piece[selection], 99) && cm.haveItem(omok2piece[selection], 99) && cm.haveItem(4030009, 1)) {
cm.gainItem(omok1piece[selection], -omokamount);
cm.gainItem(omok2piece[selection], -omokamount);
@@ -96,7 +96,7 @@ function action(mode, type, selection) {
} else if (status == 5) {
if (current == 1) {
cm.sendNextPrev("When the first fame starts, #bthe room owner goes first#k. Beward that you'll be given a time limit, and you may lose your turn if you don't make your move on time. Normally, 3 x 3 is not allowed, but if there comes a point that it's absolutely necessary to put your piece there or face ending the game, then you can put it there. 3 x 3 is allowed as the last line of defense! Oh, and it won't count if it's #r6 or 7 straight#k. Only 5!");
} else if (current == 2) {
} else if (current == 2) {
cm.sendNextPrev("Oh, and unlike Omok, when you create the game room for Match Cards, you'll need to set your game on the number of cards you'll use for the game. There are 3 modes avaliable, 3x4, 4x5, and 5x6, which will require 12, 20, and 30 cards respectively. Remember that you won't beable to change it up once the room is open, so if you really wish to change it up, you may have to close the room and open another one.");
}
@@ -106,7 +106,7 @@ function action(mode, type, selection) {
} else if (current == 2) {
cm.sendNextPrev("When the first game starts, #bthe room owner goes first.#k Beware that you'll be given a time limit, and you may lose your turn if you don't make your move on time. When you find a matching pair on your turn, you'll get to keep your turn, as long as you keep finding a pair of matching cards. Use your memorizing skills to make a streak.");
}
} else if (status == 7) {
if (current == 1) {
cm.sendPrev("When the next game starts, the loser will go first. Also, no one is allowed to leave in the middle of a game. If you do, you may need to request either a #bforfeit or tie#k. (Of course, if you request a forfeit, you'll lose the game.) And if you click on 'Leave' in the middle of the game and call to leave after the game, you'll leave the room right after the game is over. This will be a much more useful way to leave.");

View File

@@ -26,7 +26,7 @@
*/
status = -1;
actionx = {"1stJob" : false, "2ndjob" : false, "3thJobI" : false, "3thJobC" : false};
actionx = {"1stJob": false, "2ndjob": false, "3thJobI": false, "3thJobC": false};
job = 310;
spawnPnpc = false;
@@ -37,12 +37,12 @@ function start() {
const GameConstants = Java.type('constants.game.GameConstants');
if (parseInt(cm.getJobId() / 100) == jobType && cm.canSpawnPlayerNpc(GameConstants.getHallOfFameMapid(cm.getJob()))) {
spawnPnpc = true;
var sendStr = "You have walked a long way to reach the power, wisdom and courage you hold today, haven't you? What do you say about having right now #ra NPC on the Hall of Fame holding the current image of your character#k? Do you like it?";
if(spawnPnpcFee > 0) {
if (spawnPnpcFee > 0) {
sendStr += " I can do it for you, for the fee of #b " + cm.numberWithCommas(spawnPnpcFee) + " mesos.#k";
}
cm.sendYesNo(sendStr);
} else {
if (cm.getJobId() == 0) {
@@ -50,20 +50,21 @@ function start() {
cm.sendNext("So you decided to become a #rbowman#k? There are some standards to meet, y'know... #bYour level should be at least 10, with at least " + cm.getFirstJobStatRequirement(jobType) + "#k. Let's see."); // thanks Vcoc for noticing a need to state and check requirements on first job adv starting message
} else if (cm.getLevel() >= 30 && cm.getJobId() == 300) {
actionx["2ndJob"] = true;
if (cm.haveItem(4031012))
if (cm.haveItem(4031012)) {
cm.sendNext("Haha...I knew you'd breeze through that test. I'll admit, you are a great bowman. I'll make you much stronger than you're right now. before that, however... you;ll need to choose one of two paths given to you. It'll be a difficult decision for you to make, but... if there's any question to ask, please do so.");
else if (cm.haveItem(4031011)){
} else if (cm.haveItem(4031011)) {
cm.sendOk("Go and see the #b#p1072002##k.");
cm.dispose();
} else
} else {
cm.sendYesNo("Hmmm... you have grown a lot since I last saw you. I don't see the weakling I saw before, and instead, look much more like a bowman now. Well, what do you think? Don't you want to get even more powerful than that? Pass a simple test and I'll do just that for you. Do you want to do it?");
} else if (actionx["3thJobI"] || (cm.getPlayer().gotPartyQuestItem("JB3") && cm.getLevel() >= 70 && cm.getJobId() % 10 == 0 && parseInt(cm.getJobId() / 100) == 3 && !cm.getPlayer().gotPartyQuestItem("JBP"))){
}
} else if (actionx["3thJobI"] || (cm.getPlayer().gotPartyQuestItem("JB3") && cm.getLevel() >= 70 && cm.getJobId() % 10 == 0 && parseInt(cm.getJobId() / 100) == 3 && !cm.getPlayer().gotPartyQuestItem("JBP"))) {
actionx["3thJobI"] = true;
cm.sendNext("There you are. A few days ago, #b#p2020010##k of Ossyria talked to me about you. I see that you are interested in making the leap to the amazing world of the third job advancement for archers. To achieve that goal, I will have to test your strength in order to see whether you are worthy of the advancement. There is an opening in the middle of a deep forest in Victoria Island, where it'll lead you to a secret passage. Once inside, you'll face a clone of myself. Your task is to defeat her and bring #b#t4031059##k back with you.");
} else if (cm.getPlayer().gotPartyQuestItem("JBP") && !cm.haveItem(4031059)){
} else if (cm.getPlayer().gotPartyQuestItem("JBP") && !cm.haveItem(4031059)) {
cm.sendNext("Please, bring me the #b#t4031059##k.");
cm.dispose();
} else if (cm.haveItem(4031059) && cm.getPlayer().gotPartyQuestItem("JBP")){
} else if (cm.haveItem(4031059) && cm.getPlayer().gotPartyQuestItem("JBP")) {
actionx["3thJobC"] = true;
cm.sendNext("Nice work. You have defeated my clone and brought #b#t4031059##k back safely. You have now proven yourself worthy of the 3rd job advancement from the physical standpoint. Now you should give this necklace to #b#p2020011##k in Ossyria to take on the second part of the test. Good luck. You'll need it.");
} else {
@@ -81,14 +82,14 @@ function action(mode, type, selection) {
} else if (mode == 0 && type != 1) {
status -= 2;
}
if (status == -1){
if (status == -1) {
start();
return;
} else {
if(spawnPnpc) {
if(mode > 0) {
if(cm.getMeso() < spawnPnpcFee) {
if (spawnPnpc) {
if (mode > 0) {
if (cm.getMeso() < spawnPnpcFee) {
cm.sendOk("Sorry, you don't have enough mesos to purchase your place on the Hall of Fame.");
cm.dispose();
return;
@@ -96,29 +97,30 @@ function action(mode, type, selection) {
const PlayerNPC = Java.type('server.life.PlayerNPC');
const GameConstants = Java.type('constants.game.GameConstants');
if(PlayerNPC.spawnPlayerNPC(GameConstants.getHallOfFameMapid(cm.getJob()), cm.getPlayer())) {
if (PlayerNPC.spawnPlayerNPC(GameConstants.getHallOfFameMapid(cm.getJob()), cm.getPlayer())) {
cm.sendOk("There you go! Hope you will like it.");
cm.gainMeso(-spawnPnpcFee);
} else {
cm.sendOk("Sorry, the Hall of Fame is currently full...");
}
}
cm.dispose();
return;
} else {
if (mode != 1 || status == 7 && type != 1 || (actionx["1stJob"] && status == 4) || (cm.haveItem(4031008) && status == 2) || (actionx["3thJobI"] && status == 1)){
if (mode == 0 && status == 2 && type == 1)
if (mode != 1 || status == 7 && type != 1 || (actionx["1stJob"] && status == 4) || (cm.haveItem(4031008) && status == 2) || (actionx["3thJobI"] && status == 1)) {
if (mode == 0 && status == 2 && type == 1) {
cm.sendOk("You know there is no other choice...");
if (!(mode == 0 && type != 1)){
}
if (!(mode == 0 && type != 1)) {
cm.dispose();
return;
}
}
}
}
if (actionx["1stJob"]){
if (actionx["1stJob"]) {
if (status == 0) {
if (cm.getLevel() >= 10 && cm.canGetFirstJob(jobType)) {
cm.sendNextPrev("It is an important and final choice. You will not be able to turn back.");
@@ -126,9 +128,9 @@ function action(mode, type, selection) {
cm.sendOk("Train a bit more until you reach the base requirements and I can show you the way of the #rBowman#k.");
cm.dispose();
}
} else if (status == 1){
if (cm.canHold(1452051) && cm.canHold(2070000)){
if (cm.getJobId() == 0){
} else if (status == 1) {
if (cm.canHold(1452051) && cm.canHold(2070000)) {
if (cm.getJobId() == 0) {
cm.changeJobById(300);
cm.gainItem(1452051, 1);
cm.gainItem(2060000, 1000);
@@ -139,68 +141,76 @@ function action(mode, type, selection) {
cm.sendNext("Make some room in your inventory and talk back to me.");
cm.dispose();
}
} else if (status == 2)
} else if (status == 2) {
cm.sendNextPrev("You've gotten much stronger now. Plus every single one of your inventories have added slots. A whole row, to be exact. Go see for it yourself. I just gave you a little bit of #bSP#k. When you open up the #bSkill#k menu on the lower left corner of the screen, there are skills you can learn by using SP's. One warning, though: You can't raise it all together all at once. There are also skills you can acquire only after having learned a couple of skills first.");
else if (status == 3)
} else if (status == 3) {
cm.sendNextPrev("Now a reminder. Once you have chosen, you cannot change up your mind and try to pick another path. Go now, and live as a proud Bowman.");
else
cm.dispose();
} else if(actionx["2ndJob"]){
if (status == 0){
if (cm.haveItem(4031012))
} else {
cm.dispose();
}
} else if (actionx["2ndJob"]) {
if (status == 0) {
if (cm.haveItem(4031012)) {
cm.sendSimple("Alright, when you have made your decision, click on [I'll choose my occupation] at the bottom.#b\r\n#L0#Please explain to me what being the Hunter is all about.\r\n#L1#Please explain to me what being the Crossbowman is all about.\r\n#L3#I'll choose my occupation!");
else {
} else {
cm.sendNext("Good decision. You look strong, but I need to see if you really are strong enough to pass the test, it's not a difficult test, so you'll do just fine. Here, take my letter first... make sure you don't lose it!");
if(!cm.isQuestStarted(100000)) cm.startQuest(100000);
}
} else if (status == 1){
if (!cm.haveItem(4031012)){
if (cm.canHold(4031010)){
if (!cm.haveItem(4031010))
if (!cm.isQuestStarted(100000)) {
cm.startQuest(100000);
}
}
} else if (status == 1) {
if (!cm.haveItem(4031012)) {
if (cm.canHold(4031010)) {
if (!cm.haveItem(4031010)) {
cm.gainItem(4031010, 1);
}
cm.sendNextPrev("Please get this letter to #b#p1072002##k who's around #b#m106010000##k near Henesys. She is taking care of the job of an instructor in place of me. Give her the letter and she'll test you in place of me. Best of luck to you.");
cm.dispose();
} else {
cm.dispose();
} else {
cm.sendNext("Please, make some space in your inventory.");
cm.dispose();
}
} else {
if (selection < 3){
if(selection == 0) { //hunter
if (selection < 3) {
if (selection == 0) { //hunter
cm.sendNext("Archers that master #rBows#k.\r\n\r\n#bHunters#k have a higher damage/minute output in early levels, with attacks having a faster pace but slightly weaker than Crossbowmans. #bHunters#k get #rArrow Bomb#k, a slightly weaker attack that can cause up to 6 enemies to get stunned.");
} else if(selection == 1) { //crossbowman
} else if (selection == 1) { //crossbowman
cm.sendNext("Archers that master #rCrossbows#k.\r\n\r\n#bCrossbowmans'#k attack power grows higher the higher level you are, when compared to Hunters. #bCrossbowmans#k get #rIron Arrow#k, a stronger attack that does not home on enemies but can go through walls.");
}
status -= 2;
} else
} else {
cm.sendSimple("Now... have you made up your mind? Please choose the job you'd like to select for your 2nd job advancement. #b\r\n#L0#Hunter\r\n#L1#Crossbowman");
}
}
} else if (status == 2){
} else if (status == 2) {
job += selection * 10;
cm.sendYesNo("So you want to make the second job advancement as the " + (job == 310 ? "#bHunter#k" : "#bCrossbowman#k") + "? You know you won't be able to choose a different job for the 2nd job advancement once you make your desicion here, right?");
} else if (status == 3){
if (cm.haveItem(4031012))
} else if (status == 3) {
if (cm.haveItem(4031012)) {
cm.gainItem(4031012, -1);
}
cm.sendNext("Alright, you're the " + (job == 310 ? "#bHunter#k" : "#bCrossbowman#k") + " from here on out. " + (job == 310 ? "#bHunter#k" : "#bCrossbowman#k") + "s are the intelligent bunch with incredible vision, able to pierce the arrow through the heart of the monsters with ease... please train yourself each and everyday. I'll help you become even stronger than you already are.");
if (cm.getJobId() != job)
if (cm.getJobId() != job) {
cm.changeJobById(job);
} else if (status == 4)
}
} else if (status == 4) {
cm.sendNextPrev("I have just given you a book that gives you the list of skills you can acquire as a " + (job == 310 ? "hunter" : "crossbowman") + ". Also your etc inventory has expanded by adding another row to it. Your max HP and MP have increased, too. Go check and see for it yourself.");
else if (status == 5)
} else if (status == 5) {
cm.sendNextPrev("I have also given you a little bit of #bSP#k. Open the #bSkill Menu#k located at the bottomleft corner. you'll be able to boost up the newer acquired 2nd level skills. A word of warning, though. You can't boost them up all at once. Some of the skills are only available after you have learned other skills. Make sure yo remember that.");
else if (status == 6)
} else if (status == 6) {
cm.sendNextPrev((job == 310 ? "Hunter" : "Crossbowman") + " need to be strong. But remember that you can't abuse that power and use it on a weakling. Please use your enormous power the right way, because... for you to use that the right way, that is much harden than just getting stronger. Please find me after you have advanced much further. I'll be waiting for you.");
} else if (actionx["3thJobI"]){
if (status == 0){
if (cm.getPlayer().gotPartyQuestItem("JB3")){
}
} else if (actionx["3thJobI"]) {
if (status == 0) {
if (cm.getPlayer().gotPartyQuestItem("JB3")) {
cm.getPlayer().removePartyQuestItem("JB3");
cm.getPlayer().setPartyQuestItemObtained("JBP");
}
cm.sendNextPrev("Since she is a clone of myself, you can expect a tough battle ahead. He uses a number of special attacking skills unlike any you have ever seen, and it is your task to successfully take him one on one. There is a time limit in the secret passage, so it is crucial that you defeat him within the time limit. I wish you the best of luck, and I hope you bring the #b#t4031059##k with you.");
}
} else if (actionx["3thJobC"]){
} else if (actionx["3thJobC"]) {
cm.getPlayer().removePartyQuestItem("JBP");
cm.gainItem(4031059, -1);
cm.gainItem(4031057, 1);

View File

@@ -48,49 +48,56 @@ function action(mode, type, selection) {
cm.dispose();
} else {
status++;
if (status == 0)
if (status == 0) {
cm.sendSimple("I'm the head of this hair salon. If you have a #b#t5150001##k or a #b#t5151001##k allow me to take care of your hairdo. Please choose the one you want.\r\n#L1#Haircut: #i5150001##t5150001##l\r\n#L2#Dye your hair: #i5151001##t5151001##l");
else if (status == 1) {
} else if (status == 1) {
if (selection == 1) {
beauty = 1;
hairnew = Array();
if (cm.getPlayer().getGender() == 0)
for(var i = 0; i < mhair_v.length; i++)
pushIfItemExists(hairnew, mhair_v[i] + parseInt(cm.getPlayer().getHair()% 10));
if (cm.getPlayer().getGender() == 1)
for(var i = 0; i < fhair_v.length; i++)
if (cm.getPlayer().getGender() == 0) {
for (var i = 0; i < mhair_v.length; i++) {
pushIfItemExists(hairnew, mhair_v[i] + parseInt(cm.getPlayer().getHair() % 10));
}
}
if (cm.getPlayer().getGender() == 1) {
for (var i = 0; i < fhair_v.length; i++) {
pushIfItemExists(hairnew, fhair_v[i] + parseInt(cm.getPlayer().getHair() % 10));
}
}
cm.sendStyle("I can totally change up your hairstyle and make it look so good. Why don't you change it up a bit? If you have #b#t5150001##k I'll change it for you. Choose the one to your liking~.", hairnew);
} else if (selection == 2) {
beauty = 2;
haircolor = Array();
var current = parseInt(cm.getPlayer().getHair()/10)*10;
for(var i = 0; i < 8; i++)
var current = parseInt(cm.getPlayer().getHair() / 10) * 10;
for (var i = 0; i < 8; i++) {
pushIfItemExists(haircolor, current + i);
}
cm.sendStyle("I can totally change your haircolor and make it look so good. Why don't you change it up a bit? With #b#t51051001##k I'll change it for you. Choose the one to your liking.", haircolor);
}
} else if (status == 2){
} else if (status == 2) {
cm.dispose();
if (beauty == 1){
if (cm.haveItem(5420002)){ // thanks MedicOP for noticing uncoded functionality for Hair Membership coupons
if (beauty == 1) {
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)){
} else if (cm.haveItem(5150001)) {
cm.gainItem(5150001, -1);
cm.setHair(hairnew[selection]);
cm.sendOk("Enjoy your new and improved hairstyle!");
} else
} else {
cm.sendOk("Hmmm...it looks like you don't have our designated coupon...I'm afraid I can't give you a haircut without it. I'm sorry...");
}
}
if (beauty == 2){
if (cm.haveItem(5151001)){
if (beauty == 2) {
if (cm.haveItem(5151001)) {
cm.gainItem(5151001, -1);
cm.setHair(haircolor[selection]);
cm.sendOk("Enjoy your new and improved haircolor!");
} else
} else {
cm.sendOk("Hmmm...it looks like you don't have our designated coupon...I'm afraid I can't dye your hair without it. I'm sorry...");
}
}
if (beauty == 0){
if (beauty == 0) {
if (selection == 0 && cm.getMeso() >= hairprice) {
cm.gainMeso(-hairprice);
cm.gainItem(5150001, 1);
@@ -99,8 +106,9 @@ function action(mode, type, selection) {
cm.gainMeso(-haircolorprice);
cm.gainItem(5151001, 1);
cm.sendOk("Enjoy!");
} else
} else {
cm.sendOk("You don't have enough mesos to buy a coupon!");
}
}
}
}

View File

@@ -39,6 +39,7 @@ function pushIfItemExists(array, itemid) {
array.push(itemid);
}
}
function start() {
status = -1;
action(1, 0, 0);
@@ -48,10 +49,11 @@ function action(mode, type, selection) {
if (mode < 1) { // disposing issue with stylishs found thanks to Vcoc
cm.dispose();
} else {
if (mode == 1)
if (mode == 1) {
status++;
else
} else {
status--;
}
if (status == 0) {
cm.sendSimple("I'm Brittany the assistant. If you have #b#t5150000##k, #b#t5150010##k or #b#t5151000##k by any chance, then how about letting me change your hairdo?\r\n#L0#Haircut: #i5150000##t5150000##l\r\n#L1#Haircut: #i5150010##t5150010##l\r\n#L2#Dye your hair: #i5151000##t5151000##l");
} else if (status == 1) {
@@ -59,62 +61,66 @@ function action(mode, type, selection) {
beauty = 3;
hairnew = Array();
if (cm.getPlayer().getGender() == 0) {
for(var i = 0; i < mhair_r.length; i++)
pushIfItemExists(hairnew, mhair_r[i] + parseInt(cm.getPlayer().getHair()% 10));
for (var i = 0; i < mhair_r.length; i++) {
pushIfItemExists(hairnew, mhair_r[i] + parseInt(cm.getPlayer().getHair() % 10));
}
}
if (cm.getPlayer().getGender() == 1) {
for(var i = 0; i < fhair_r.length; i++)
for (var i = 0; i < fhair_r.length; i++) {
pushIfItemExists(hairnew, fhair_r[i] + parseInt(cm.getPlayer().getHair() % 10));
}
}
cm.sendYesNo("If you use the REG coupon your hair will change RANDOMLY with a chance to obtain a new experimental style that even you didn't think was possible. Are you going to use #b#t5150000##k and really change your hairstyle?");
} else if (selection == 1) {
beauty = 1;
hairnew = Array();
if (cm.getPlayer().getGender() == 0) {
for(var i = 0; i < mhair_e.length; i++)
pushIfItemExists(hairnew, mhair_e[i] + parseInt(cm.getPlayer().getHair()% 10));
for (var i = 0; i < mhair_e.length; i++) {
pushIfItemExists(hairnew, mhair_e[i] + parseInt(cm.getPlayer().getHair() % 10));
}
}
if (cm.getPlayer().getGender() == 1) {
for(var i = 0; i < fhair_e.length; i++)
for (var i = 0; i < fhair_e.length; i++) {
pushIfItemExists(hairnew, fhair_e[i] + parseInt(cm.getPlayer().getHair() % 10));
}
}
cm.sendYesNo("If you use the EXP coupon your hair will change RANDOMLY with a chance to obtain a new experimental style that even you didn't think was possible. Are you going to use #b#t5150010##k and really change your hairstyle?");
} else if (selection == 2) {
beauty = 2;
haircolor = Array();
var current = parseInt(cm.getPlayer().getHair()/10)*10;
for(var i = 0; i < 8; i++)
var current = parseInt(cm.getPlayer().getHair() / 10) * 10;
for (var i = 0; i < 8; i++) {
pushIfItemExists(haircolor, current + i);
}
cm.sendYesNo("If you use a regular coupon your hair will change RANDOMLY. Do you still want to use #b#t5151000##k and change it up?");
}
}
else if (status == 2){
} else if (status == 2) {
cm.dispose();
if (beauty == 1){
if (cm.haveItem(5150010) == true){
if (beauty == 1) {
if (cm.haveItem(5150010) == true) {
cm.gainItem(5150010, -1);
cm.setHair(hairnew[Math.floor(Math.random() * hairnew.length)]);
cm.sendOk("Enjoy your new and improved hairstyle!");
} else {
cm.sendOk("Hmmm...it looks like you don't have our designated coupon...I'm afraid I can't give you a haircut without it. I'm sorry...");
}
} else if (beauty == 2){
if (cm.haveItem(5151000) == true){
} else if (beauty == 2) {
if (cm.haveItem(5151000) == true) {
cm.gainItem(5151000, -1);
cm.setHair(haircolor[Math.floor(Math.random() * haircolor.length)]);
cm.sendOk("Enjoy your new and improved haircolor!");
} else {
cm.sendOk("Hmmm...it looks like you don't have our designated coupon...I'm afraid I can't dye your hair without it. I'm sorry...");
}
} else if (beauty == 3){
if (cm.haveItem(5150000) == true){
} else if (beauty == 3) {
if (cm.haveItem(5150000) == true) {
cm.gainItem(5150000, -1);
cm.setHair(hairnew[Math.floor(Math.random() * hairnew.length)]);
cm.sendOk("Enjoy your new and improved hairstyle!");
} else {
cm.sendOk("Hmmm...it looks like you don't have our designated coupon...I'm afraid I can't give you a haircut without it. I'm sorry...");
}
} else if (beauty == 0){
} else if (beauty == 0) {
if (selection == 0 && cm.getMeso() >= hairprice) {
cm.gainMeso(-hairprice);
cm.gainItem(5150010, 1);

View File

@@ -27,37 +27,36 @@ var skin = Array(0, 1, 2, 3, 4);
var price = 1000000;
function start() {
status = -1;
action(1, 0, 0);
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode < 1) { // disposing issue with stylishs found thanks to Vcoc
cm.dispose();
if (mode < 1) { // disposing issue with stylishs found thanks to Vcoc
cm.dispose();
} else {
if (mode == 1) {
status++;
} else {
if (mode == 1)
status++;
else
status--;
if (status == 0) {
cm.sendSimple("Well, hello! Welcome to the Henesys Skin-Care! Would you like to have a firm, tight, healthy looking skin like mine? With a #b#t5153000##k, you can let us take care of the rest and have the kind of skin you've always wanted~!\r\n#L1#Skin Care: #i5153000##t5153000##l");
}
else if (status == 1) {
if (cm.haveItem(5153000)){
cm.sendStyle("With our specialized machine, you can see yourself after the treatment in advance. What kind of skin-treatment would you like to do? Choose the style of your liking.", skin);
} else {
cm.sendOk("Um... you don't have the skin-care coupon you need to receive the treatment. Sorry, but I am afraid we can't do it for you...");
cm.dispose();
return;
}
}
else {
cm.gainItem(5153000, -1);
cm.setSkin(selection);
cm.sendOk("Enjoy your new and improved skin!");
cm.dispose();
}
status--;
}
if (status == 0) {
cm.sendSimple("Well, hello! Welcome to the Henesys Skin-Care! Would you like to have a firm, tight, healthy looking skin like mine? With a #b#t5153000##k, you can let us take care of the rest and have the kind of skin you've always wanted~!\r\n#L1#Skin Care: #i5153000##t5153000##l");
} else if (status == 1) {
if (cm.haveItem(5153000)) {
cm.sendStyle("With our specialized machine, you can see yourself after the treatment in advance. What kind of skin-treatment would you like to do? Choose the style of your liking.", skin);
} else {
cm.sendOk("Um... you don't have the skin-care coupon you need to receive the treatment. Sorry, but I am afraid we can't do it for you...");
cm.dispose();
}
} else {
cm.gainItem(5153000, -1);
cm.setSkin(selection);
cm.sendOk("Enjoy your new and improved skin!");
cm.dispose();
}
}
}

View File

@@ -41,10 +41,11 @@ function action(mode, type, selection) {
cm.dispose();
return;
}
if (mode == 1)
if (mode == 1) {
status++;
else
} else {
status--;
}
if (cm.getMapId() == 100000200) {
if (status == 0) {
@@ -73,8 +74,7 @@ function action(mode, type, selection) {
if (!em.startInstance(cm.getParty(), cm.getPlayer().getMap(), 1)) {
cm.sendOk("Someone is already attempting the PQ. Please wait for them to finish, or find another channel.");
}
}
else {
} else {
cm.sendOk("You cannot start this party quest yet, because either your party is not in the range size, some of your party members are not eligible to attempt it or they are not in this map. If you're having trouble finding party members, try Party Search.");
}
@@ -109,8 +109,7 @@ function action(mode, type, selection) {
} else if (status == 1) {
if (cm.getEventInstance().giveEventReward(cm.getPlayer())) {
cm.warp(100000200);
}
else {
} else {
cm.sendOk("It seems you are short on space in one of your inventories. Please check that first to get rewarded properly.");
}
cm.dispose();

View File

@@ -25,6 +25,7 @@
* @npc Tommy (HPQ)
*/
var status = 0;
function start() {
status = -1;
action(1, 0, 0);
@@ -41,18 +42,17 @@ function action(mode, type, selection) {
} else if (status == 1) {
if (cm.isEventLeader()) {
cm.sendYesNo("What do you think about making your way there with your party members and teach those rowdy pigs a lesson?");
}
else {
} else {
cm.sendOk("Interessed? Tell your party leader to talk to me to head there!");
cm.dispose();
return;
}
} else if (status == 2) {
cm.getEventInstance().startEventTimer(5 * 60000);
cm.getEventInstance().warpEventTeam(910010200);
cm.dispose();
return;
}
} else if (cm.getPlayer().getMap().getId() == 910010200) { //Bonus map
if (status == 0) {
@@ -60,7 +60,7 @@ function action(mode, type, selection) {
} else {
cm.warp(910010400);
cm.dispose();
return;
}
} else if (cm.getPlayer().getMap().getId() == 910010300) { //Exit map
if (status == 0) {
@@ -68,7 +68,7 @@ function action(mode, type, selection) {
} else {
cm.warp(100000200);
cm.dispose();
return;
}
}
}

View File

@@ -9,88 +9,89 @@ var status = 0;
var chosen = -1;
function clearStage(stage, eim) {
eim.setProperty(stage + "stageclear", "true");
eim.showClearEffect(true);
eim.setProperty(stage + "stageclear", "true");
eim.showClearEffect(true);
eim.giveEventPlayersStageReward(stage);
eim.giveEventPlayersStageReward(stage);
}
function start() {
status = -1;
action(1, 0, 0);
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode < 0) {
cm.dispose();
return;
} else {
if (mode == 0 && status == 0) {
cm.dispose();
return;
}
if (mode == 0)
status += ((chosen == 2) ? 1 : -1);
else
status++;
if (status == 0) {
if (cm.isEventLeader()) {
cm.sendSimple("Growl! I am Growlie, always ready to protect this place. What brought you here?\r\n#b#L0# Please tell me what this place is all about.#l\r\n#L1# I have brought #t4001101#.#l\r\n#L2# I would like to leave this place.#l");
} else {
cm.sendSimple("Growl! I am Growlie, always ready to protect this place. What brought you here?\r\n#b#L0# Please tell me what this place is all about.#l\r\n#L2# I would like to leave this place.#l");
}
} else if (status == 1) {
if (chosen == -1)
chosen = selection;
if (chosen == 0) {
cm.sendNext("This place can be best described as the prime spot where you can taste the delicious rice cakes made by Moon Bunny every full moon.");
} else if (chosen == 1) {
if (cm.haveItem(4001101, 10)) {
cm.sendNext("Oh... isn't this rice cake made by Moon Bunny? Please hand me the rice cake. Mmmm ... these seems delicious. Please come see me next time for more #b#t4001101##k. Have a safe trip home!");
} else {
cm.sendOk("I advise you to check and make sure that you have indeed gathered up #b10 #t4001101#s#k.");
cm.dispose();
}
} else if (chosen == 2) {
cm.sendYesNo("Are you sure you want to leave?");
}
else {
cm.dispose();
return;
}
} else if (status == 2) {
if (chosen == 0) {
cm.sendNextPrev("Gather up the primrose seeds from the primrose leaves all over this area, and plant the seeds at the footing near the crescent moon to see the primrose bloom. There are 6 types of primroses, and all of them require different footings. It is imperative that the footing fits the seed of the flower.");
} else if (chosen == 1) {
cm.gainItem(4001101, -10);
if (mode < 0) {
cm.dispose();
var eim = cm.getEventInstance();
clearStage(1, eim);
var map = eim.getMapInstance(cm.getPlayer().getMapId());
map.killAllMonstersNotFriendly();
eim.clearPQ();
cm.dispose();
} else {
if (mode == 1) {
cm.warp(910010300);
} else {
cm.sendOk("You better collect some delicious rice cakes for me then, because time is running out, Growl!");
}
cm.dispose();
}
} else if (status == 3) {
if (chosen == 0) {
cm.sendNextPrev("When the flowers of primrose blooms, the full moon will rise, and that's when the Moon Bunnies will appear and start pounding the mill. Your task is to fight off the monsters to make sure that Moon Bunny can concentrate on making the best rice cake possible.");
}
} else if (status == 4) {
if (chosen == 0) {
cm.sendNextPrev("I would like for you and your party members to cooperate and get me 10 rice cakes. I strongly advise you to get me the rice cakes within the allotted time.");
}
} else {
cm.dispose();
}
} else {
if (mode == 0 && status == 0) {
cm.dispose();
return;
}
if (mode == 0) {
status += ((chosen == 2) ? 1 : -1);
} else {
status++;
}
if (status == 0) {
if (cm.isEventLeader()) {
cm.sendSimple("Growl! I am Growlie, always ready to protect this place. What brought you here?\r\n#b#L0# Please tell me what this place is all about.#l\r\n#L1# I have brought #t4001101#.#l\r\n#L2# I would like to leave this place.#l");
} else {
cm.sendSimple("Growl! I am Growlie, always ready to protect this place. What brought you here?\r\n#b#L0# Please tell me what this place is all about.#l\r\n#L2# I would like to leave this place.#l");
}
} else if (status == 1) {
if (chosen == -1) {
chosen = selection;
}
if (chosen == 0) {
cm.sendNext("This place can be best described as the prime spot where you can taste the delicious rice cakes made by Moon Bunny every full moon.");
} else if (chosen == 1) {
if (cm.haveItem(4001101, 10)) {
cm.sendNext("Oh... isn't this rice cake made by Moon Bunny? Please hand me the rice cake. Mmmm ... these seems delicious. Please come see me next time for more #b#t4001101##k. Have a safe trip home!");
} else {
cm.sendOk("I advise you to check and make sure that you have indeed gathered up #b10 #t4001101#s#k.");
cm.dispose();
}
} else if (chosen == 2) {
cm.sendYesNo("Are you sure you want to leave?");
} else {
cm.dispose();
}
} else if (status == 2) {
if (chosen == 0) {
cm.sendNextPrev("Gather up the primrose seeds from the primrose leaves all over this area, and plant the seeds at the footing near the crescent moon to see the primrose bloom. There are 6 types of primroses, and all of them require different footings. It is imperative that the footing fits the seed of the flower.");
} else if (chosen == 1) {
cm.gainItem(4001101, -10);
var eim = cm.getEventInstance();
clearStage(1, eim);
var map = eim.getMapInstance(cm.getPlayer().getMapId());
map.killAllMonstersNotFriendly();
eim.clearPQ();
cm.dispose();
} else {
if (mode == 1) {
cm.warp(910010300);
} else {
cm.sendOk("You better collect some delicious rice cakes for me then, because time is running out, Growl!");
}
cm.dispose();
}
} else if (status == 3) {
if (chosen == 0) {
cm.sendNextPrev("When the flowers of primrose blooms, the full moon will rise, and that's when the Moon Bunnies will appear and start pounding the mill. Your task is to fight off the monsters to make sure that Moon Bunny can concentrate on making the best rice cake possible.");
}
} else if (status == 4) {
if (chosen == 0) {
cm.sendNextPrev("I would like for you and your party members to cooperate and get me 10 rice cakes. I strongly advise you to get me the rice cakes within the allotted time.");
}
} else {
cm.dispose();
}
}
}

View File

@@ -1,6 +1,6 @@
function start() {
var status = cm.getQuestStatus(20706);
if (status == 0) {
cm.sendNext("It looks like there's nothing suspicious in the area.");
} else if (status == 1) {

View File

@@ -42,6 +42,7 @@ function pushIfItemExists(array, itemid) {
array.push(itemid);
}
}
function start() {
status = -1;
action(1, 0, 0);
@@ -51,11 +52,12 @@ function action(mode, type, selection) {
if (mode < 1) { // disposing issue with stylishs found thanks to Vcoc
cm.dispose();
} else {
if (mode == 1)
if (mode == 1) {
status++;
else
} else {
status--;
}
if (status == 0) {
cm.sendSimple("Hi, I'm #p1012117#, the most charming and stylish stylist around. If you're looking for the best looking hairdos around, look no further!\r\n\#L0##i5150040##t5150040##l\r\n\#L1##i5150044##t5150044##l");
} else if (status == 1) {
@@ -64,32 +66,30 @@ function action(mode, type, selection) {
cm.sendYesNo("If you use this REGULAR coupon, your hair may transform into a random new look...do you still want to do it using #b#t5150040##k, I will do it anyways for you. But don't forget, it will be random!");
} else {
beauty = 2;
hairnew = Array();
if (cm.getPlayer().getGender() == 0) {
for(var i = 0; i < mhair_v.length; i++) {
for (var i = 0; i < mhair_v.length; i++) {
pushIfItemExists(hairnew, mhair_v[i] + parseInt(cm.getPlayer().getHair() % 10));
}
}
else {
for(var i = 0; i < fhair_v.length; i++) {
} else {
for (var i = 0; i < fhair_v.length; i++) {
pushIfItemExists(hairnew, fhair_v[i] + parseInt(cm.getPlayer().getHair() % 10));
}
}
cm.sendStyle("Using the SPECIAL coupon you can choose the style your hair will become. Pick the style that best provides you delight...", hairnew);
}
} else if (status == 2) {
if (beauty == 1) {
if (cm.haveItem(5150040) == true){
if (cm.haveItem(5150040) == true) {
hairnew = Array();
if (cm.getPlayer().getGender() == 0) {
for(var i = 0; i < mhair_r.length; i++) {
for (var i = 0; i < mhair_r.length; i++) {
pushIfItemExists(hairnew, mhair_r[i] + parseInt(cm.getPlayer().getHair() % 10));
}
}
else {
for(var i = 0; i < fhair_r.length; i++) {
} else {
for (var i = 0; i < fhair_r.length; i++) {
pushIfItemExists(hairnew, fhair_r[i] + parseInt(cm.getPlayer().getHair() % 10));
}
}
@@ -101,7 +101,7 @@ function action(mode, type, selection) {
cm.sendOk("Hmmm...it looks like you don't have our designated coupon...I'm afraid I can't give you a haircut without it. I'm sorry...");
}
} else if (beauty == 2) {
if (cm.haveItem(5150044) == true){
if (cm.haveItem(5150044) == true) {
cm.gainItem(5150044, -1);
cm.setHair(hairnew[selection]);
cm.sendOk("Enjoy your new and improved hairstyle!");
@@ -109,7 +109,7 @@ function action(mode, type, selection) {
cm.sendOk("Hmmm...it looks like you don't have our designated coupon...I'm afraid I can't give you a haircut without it. I'm sorry...");
}
}
cm.dispose();
}
}

View File

@@ -9,41 +9,41 @@ function start() {
function action(mode, type, selection) {
if (mode == 1) {
status++;
status++;
} else {
if (status <= 1) {
cm.dispose();
return;
}
status--;
if (status <= 1) {
cm.dispose();
return;
}
status--;
}
if (status == 0) {
if(cm.getLevel() >= 20) {
cm.sendOk("This training ground is available only for those under level 20.");
cm.dispose();
return;
if (cm.getLevel() >= 20) {
cm.sendOk("This training ground is available only for those under level 20.");
cm.dispose();
} else if (cm.isQuestActive(22515) || cm.isQuestActive(22516) || cm.isQuestActive(22517) || cm.isQuestActive(22518)) {
cm.sendYesNo("Would you like to go in the special Training Center?");
status = 1;
} else {
var selStr = "Would you like to go into the Training Center?";
for (var i = 0; i < num; i++) {
selStr += "\r\n#b#L" + i + "#Training Center " + i + " (" + cm.getPlayerCount(map + i) + "/" + maxp + ")#l#k";
}
cm.sendSimple(selStr);
cm.sendYesNo("Would you like to go in the special Training Center?");
status = 1;
} else {
var selStr = "Would you like to go into the Training Center?";
for (var i = 0; i < num; i++) {
selStr += "\r\n#b#L" + i + "#Training Center " + i + " (" + cm.getPlayerCount(map + i) + "/" + maxp + ")#l#k";
}
cm.sendSimple(selStr);
}
} else if (status == 1) {
if (selection < 0 || selection >= num) {
cm.dispose();
} else if (cm.getPlayerCount(map + selection) >= maxp) {
cm.sendNext("This training center is full.");
status = -1;
} else {
cm.warp(map + selection, 0);
cm.dispose();
}
if (selection < 0 || selection >= num) {
cm.dispose();
} else if (cm.getPlayerCount(map + selection) >= maxp) {
cm.sendNext("This training center is full.");
status = -1;
} else {
cm.warp(map + selection, 0);
cm.dispose();
}
} else if (status == 2) {
cm.warp(910060100,0);
cm.dispose();
cm.warp(910060100, 0);
cm.dispose();
}
}

View File

@@ -9,42 +9,42 @@ function start() {
function action(mode, type, selection) {
if (mode == 1) {
status++;
status++;
} else {
if (status <= 1) {
cm.dispose();
return;
}
status--;
if (status <= 1) {
cm.dispose();
return;
}
status--;
}
if (status == 0) {
if(cm.getLevel() >= 20) {
cm.sendOk("This training ground is available only for those under level 20.");
cm.dispose();
return;
if (cm.getLevel() >= 20) {
cm.sendOk("This training ground is available only for those under level 20.");
cm.dispose();
} else if (cm.isQuestActive(22515) || cm.isQuestActive(22516) || cm.isQuestActive(22517) || cm.isQuestActive(22518)) {
cm.sendYesNo("Would you like to enter the special Training Center?");
status = 1;
} else {
var selStr = "Would you like to go into the Training Center?";
for (var i = 0; i < num; i++) {
selStr += "\r\n#b#L" + i + "#Training Center " + i + " (" + cm.getPlayerCount(map + i) + "/" + maxp + ")#l#k";
}
cm.sendSimple(selStr);
cm.sendYesNo("Would you like to enter the special Training Center?");
status = 1;
} else {
var selStr = "Would you like to go into the Training Center?";
for (var i = 0; i < num; i++) {
selStr += "\r\n#b#L" + i + "#Training Center " + i + " (" + cm.getPlayerCount(map + i) + "/" + maxp + ")#l#k";
}
cm.sendSimple(selStr);
}
} else if (status == 1) {
if (selection < 0 || selection >= num) {
cm.dispose();
} else if (cm.getPlayerCount(map + selection) >= maxp) {
cm.sendNext("This training center is full.");
status = -1;
} else {
cm.warp(map + selection, 0);
cm.dispose();
}
if (selection < 0 || selection >= num) {
cm.dispose();
} else if (cm.getPlayerCount(map + selection) >= maxp) {
cm.sendNext("This training center is full.");
status = -1;
} else {
cm.warp(map + selection, 0);
cm.dispose();
}
} else if (status == 2) {
cm.warp(910060100,0);
cm.dispose();
cm.warp(910060100, 0);
cm.dispose();
}
}

View File

@@ -5,20 +5,20 @@ function start() {
}
function action(mode, type, selection) {
if (mode == 0 && type == 0) {
status--;
} else if (mode == -1) {
cm.dispose();
return;
} else {
status++;
}
if (status == 0) {
cm.sendNext("You, who are destined to be a Dragon Master... You have finally arrived.", 1);
} else if (status == 1) {
cm.sendNextPrev("Go and fulfill your duties as the Dragon Master...", 1);
} else if (status == 2) {
cm.warp(900090101, 0);
cm.dispose();
}
if (mode == 0 && type == 0) {
status--;
} else if (mode == -1) {
cm.dispose();
return;
} else {
status++;
}
if (status == 0) {
cm.sendNext("You, who are destined to be a Dragon Master... You have finally arrived.", 1);
} else if (status == 1) {
cm.sendNextPrev("Go and fulfill your duties as the Dragon Master...", 1);
} else if (status == 2) {
cm.warp(900090101, 0);
cm.dispose();
}
}

View File

@@ -1,6 +1,6 @@
function start() {
cm.forceCompleteQuest(22011);
cm.playerMessage(5, "You have acquired a Dragon Egg.");//actually getInfoMessage
cm.warp(900090103, 0);
cm.dispose();
cm.forceCompleteQuest(22011);
cm.playerMessage(5, "You have acquired a Dragon Egg.");//actually getInfoMessage
cm.warp(900090103, 0);
cm.dispose();
}

View File

@@ -1,13 +1,13 @@
function start() {
if (cm.isQuestStarted(22007)) {
if (!cm.haveItem(4032451)) {
cm.gainItem(4032451, true);
cm.sendNext("#b(You have obtained an Egg. Deliver it to Utah.)");
} else {
cm.sendNext("#b(You have already obtained an Egg. Take the Egg you have and give it to Utah.)");
}
} else {
cm.sendNext("#b(You don't need to take an egg now.)#k");
}
cm.dispose();
if (cm.isQuestStarted(22007)) {
if (!cm.haveItem(4032451)) {
cm.gainItem(4032451, true);
cm.sendNext("#b(You have obtained an Egg. Deliver it to Utah.)");
} else {
cm.sendNext("#b(You have already obtained an Egg. Take the Egg you have and give it to Utah.)");
}
} else {
cm.sendNext("#b(You don't need to take an egg now.)#k");
}
cm.dispose();
}

View File

@@ -1,10 +1,10 @@
function start() {
if (!cm.isQuestStarted(22015)) {
cm.sendOk("#b(You are too far from the Piglet. Go closer to grab it.)");
} else {
cm.gainItem(4032449, true);
cm.forceCompleteQuest(22015);
cm.playerMessage(5, "You have rescued the Piglet.");
}
cm.dispose();
if (!cm.isQuestStarted(22015)) {
cm.sendOk("#b(You are too far from the Piglet. Go closer to grab it.)");
} else {
cm.gainItem(4032449, true);
cm.forceCompleteQuest(22015);
cm.playerMessage(5, "You have rescued the Piglet.");
}
cm.dispose();
}

View File

@@ -27,17 +27,18 @@ function start() {
function action(mode, type, selection) {
status++;
if (mode != 1){
if(mode == 0)
cm.sendNext("If you wish to experience what it's like to be a Bowman, come see me again.");
if (mode != 1) {
if (mode == 0) {
cm.sendNext("If you wish to experience what it's like to be a Bowman, come see me again.");
}
cm.dispose();
return;
}
if (status == 0) {
cm.sendYesNo("Would you like to experience what it's like to be a Bowman?");
} else if (status == 1){
cm.lockUI();
} else if (status == 1) {
cm.lockUI();
cm.warp(1020300, 0);
cm.dispose();
}
}
}

View File

@@ -27,16 +27,17 @@ function start() {
function action(mode, type, selection) {
status++;
if (mode != 1){
if(mode == 0)
cm.sendNext("If you wish to experience what it's like to be a Magician, come see me again.");
if (mode != 1) {
if (mode == 0) {
cm.sendNext("If you wish to experience what it's like to be a Magician, come see me again.");
}
cm.dispose();
return;
}
if (status == 0) {
cm.sendYesNo("Would you like to experience what it's like to be a Magician?");
} else if (status == 1){
cm.lockUI();
} else if (status == 1) {
cm.lockUI();
cm.warp(1020200, 0);
cm.dispose();
}

View File

@@ -27,17 +27,18 @@ function start() {
function action(mode, type, selection) {
status++;
if (mode != 1){
if(mode == 0)
cm.sendNext("If you wish to experience what it's like to be a Warrior, come see me again.");
if (mode != 1) {
if (mode == 0) {
cm.sendNext("If you wish to experience what it's like to be a Warrior, come see me again.");
}
cm.dispose();
return;
}
if (status == 0) {
cm.sendYesNo("Would you like to experience what it's like to be a Warrior?");
} else if (status == 1){
cm.lockUI();
} else if (status == 1) {
cm.lockUI();
cm.warp(1020100, 0);
cm.dispose();
cm.dispose();
}
}

View File

@@ -27,16 +27,17 @@ function start() {
function action(mode, type, selection) {
status++;
if (mode != 1){
if(mode == 0)
cm.sendNext("If you wish to experience what it's like to be a Thief, come see me again.");
if (mode != 1) {
if (mode == 0) {
cm.sendNext("If you wish to experience what it's like to be a Thief, come see me again.");
}
cm.dispose();
return;
}
if (status == 0) {
cm.sendYesNo("Would you like to experience what it's like to be a Thief?");
} else if (status == 1){
cm.lockUI();
} else if (status == 1) {
cm.lockUI();
cm.warp(1020400, 0);
cm.dispose();
}

View File

@@ -27,16 +27,17 @@ function start() {
function action(mode, type, selection) {
status++;
if (mode != 1){
if(mode == 0)
cm.sendNext("If you wish to experience what it's like to be a Pirate, come see me again.");
if (mode != 1) {
if (mode == 0) {
cm.sendNext("If you wish to experience what it's like to be a Pirate, come see me again.");
}
cm.dispose();
return;
}
if (status == 0) {
cm.sendYesNo("Would you like to experience what it's like to be a Pirate?");
} else if (status == 1){
cm.lockUI();
} else if (status == 1) {
cm.lockUI();
cm.warp(1020500, 0);
cm.dispose();
}

View File

@@ -27,7 +27,7 @@
*/
status = -1;
actionx = {"1stJob" : false, "2ndjob" : false, "3thJobI" : false, "3thJobC" : false};
actionx = {"1stJob": false, "2ndjob": false, "3thJobI": false, "3thJobC": false};
job = 110;
spawnPnpc = false;
@@ -38,12 +38,12 @@ function start() {
const GameConstants = Java.type('constants.game.GameConstants');
if (parseInt(cm.getJobId() / 100) == jobType && cm.canSpawnPlayerNpc(GameConstants.getHallOfFameMapid(cm.getJob()))) {
spawnPnpc = true;
var sendStr = "You have walked a long way to reach the power, wisdom and courage you hold today, haven't you? What do you say about having right now #ra NPC on the Hall of Fame holding the current image of your character#k? Do you like it?";
if(spawnPnpcFee > 0) {
if (spawnPnpcFee > 0) {
sendStr += " I can do it for you, for the fee of #b " + cm.numberWithCommas(spawnPnpcFee) + " mesos.#k";
}
cm.sendYesNo(sendStr);
} else {
if (cm.getJobId() == 0) {
@@ -51,20 +51,21 @@ function start() {
cm.sendNext("Do you want to become a #rwarrior#k? You need to meet some criteria in order to do so.#b You should be at least in level 10, and at least " + cm.getFirstJobStatRequirement(jobType) + "#k. Let's see..."); // thanks Vcoc for noticing a need to state and check requirements on first job adv starting message
} else if (cm.getLevel() >= 30 && cm.getJobId() == 100) {
actionx["2ndJob"] = true;
if (cm.haveItem(4031012))
if (cm.haveItem(4031012)) {
cm.sendNext("Oh... you came back safe! I knew you'd breeze through. I'll admit, you are a strong, formidable Warrior! Alright, I'll make you an even stronger Warrior than you already are. But before that, you need to choose one of the three paths that you'll be given. It isn't going to be easy, so if you have and questions, feel free to ask.");
else if (cm.haveItem(4031008)){
} else if (cm.haveItem(4031008)) {
cm.sendOk("Go and see the #b#p1072000##k.");
cm.dispose();
} else
} else {
cm.sendNext("The progress you have made is astonishing.");
}
} else if (actionx["3thJobI"] || (cm.getPlayer().gotPartyQuestItem("JB3") && cm.getLevel() >= 70 && (cm.getJobId() % 10 == 0 && parseInt(cm.getJobId() / 100) == 1 && !cm.getPlayer().gotPartyQuestItem("JBP")))) {
actionx["3thJobI"] = true;
cm.sendNext("I was waiting for you. Few days ago, I heard about you from #b#p2020008##k in Ossyria. Well... I'd like to test your strength. There is a secret passage near the ant tunnel. Nobody but you can go into that passage. If you go into the passage, you will meat my the other self. Beat him and bring #b#t4031059##k to me.");
} else if (cm.getPlayer().gotPartyQuestItem("JBP") && !cm.haveItem(4031059)){
} else if (cm.getPlayer().gotPartyQuestItem("JBP") && !cm.haveItem(4031059)) {
cm.sendNext("Please, bring me the #b#t4031059##k.");
cm.dispose();
} else if (cm.haveItem(4031059) && cm.getPlayer().gotPartyQuestItem("JBP")){
} else if (cm.haveItem(4031059) && cm.getPlayer().gotPartyQuestItem("JBP")) {
actionx["3thJobC"] = true;
cm.sendNext("Wow... You beat my the other self and brought #b#t4031059##k to me. Good! this surely proves your strength. In terms of strength, you are ready to advance to 3th job. As I promised, I will give #b#t4031057##k to you. Give this necklace to #b#p2020008##k in Ossyria and you will be able to take second test of 3rd job advancement. Good Luck~");
} else {
@@ -82,14 +83,14 @@ function action(mode, type, selection) {
} else if (mode == 0 && type != 1) {
status -= 2;
}
if (status == -1){
if (status == -1) {
start();
return;
} else {
if(spawnPnpc) {
if(mode > 0) {
if(cm.getMeso() < spawnPnpcFee) {
if (spawnPnpc) {
if (mode > 0) {
if (cm.getMeso() < spawnPnpcFee) {
cm.sendOk("Sorry, you don't have enough mesos to purchase your place on the Hall of Fame.");
cm.dispose();
return;
@@ -97,29 +98,30 @@ function action(mode, type, selection) {
const PlayerNPC = Java.type('server.life.PlayerNPC');
const GameConstants = Java.type('constants.game.GameConstants');
if(PlayerNPC.spawnPlayerNPC(GameConstants.getHallOfFameMapid(cm.getJob()), cm.getPlayer())) {
if (PlayerNPC.spawnPlayerNPC(GameConstants.getHallOfFameMapid(cm.getJob()), cm.getPlayer())) {
cm.sendOk("There you go! Hope you will like it.");
cm.gainMeso(-spawnPnpcFee);
} else {
cm.sendOk("Sorry, the Hall of Fame is currently full...");
}
}
cm.dispose();
return;
} else {
if (mode != 1 || status == 7 && type != 1 || (actionx["1stJob"] && status == 4) || (cm.haveItem(4031008) && status == 2) || (actionx["3thJob"] && status == 1)){
if (mode == 0 && status == 2 && type == 1)
if (mode != 1 || status == 7 && type != 1 || (actionx["1stJob"] && status == 4) || (cm.haveItem(4031008) && status == 2) || (actionx["3thJob"] && status == 1)) {
if (mode == 0 && status == 2 && type == 1) {
cm.sendOk("Make up your mind and visit me again.");
if (!(mode == 0 && type != 1)){
}
if (!(mode == 0 && type != 1)) {
cm.dispose();
return;
}
}
}
}
if (actionx["1stJob"]){
if (actionx["1stJob"]) {
if (status == 0) {
if (cm.getLevel() >= 10 && cm.canGetFirstJob(jobType)) {
cm.sendNextPrev("It is an important and final choice. You will not be able to turn back.");
@@ -127,9 +129,9 @@ function action(mode, type, selection) {
cm.sendOk("Train a bit more until you reach the base requirements and I can show you the way of the #rWarrior#k.");
cm.dispose();
}
} else if (status == 1){
if (cm.canHold(1302077)){
if (cm.getJobId() == 0){
} else if (status == 1) {
if (cm.canHold(1302077)) {
if (cm.getJobId() == 0) {
cm.changeJobById(100);
cm.gainItem(1302077, 1);
cm.resetStats();
@@ -139,76 +141,88 @@ function action(mode, type, selection) {
cm.sendNext("Make some room in your inventory and talk back to me.");
cm.dispose();
}
} else if (status == 2)
} else if (status == 2) {
cm.sendNextPrev("You've gotten much stronger now. Plus every single one of your inventories have added slots. A whole row, to be exact. Go see for it yourself. I just gave you a little bit of #bSP#k. When you open up the #bSkill#k menu on the lower left corner of the screen, there are skills you can learn by using SP's. One warning, though: You can't raise it all together all at once. There are also skills you can acquire only after having learned a couple of skills first.");
else if (status == 3)
} else if (status == 3) {
cm.sendNextPrev("Now a reminder. Once you have chosen, you cannot change up your mind and try to pick another path. Go now, and live as a proud Warrior.");
else
} else {
cm.dispose();
} else if(actionx["2ndJob"]){
if (status == 0){
if (cm.haveItem(4031012))
}
} else if (actionx["2ndJob"]) {
if (status == 0) {
if (cm.haveItem(4031012)) {
cm.sendSimple("Alright, when you have made your decision, click on [I'll choose my occupation] at the bottom.#b\r\n#L0#Please explain to me what being the Fighter is all about.\r\n#L1#Please explain to me what being the Page is all about.\r\n#L2#Please explain to me what being the Spearman is all about.\r\n#L3#I'll choose my occupation!");
else {
} else {
cm.sendNext("Good decision. You look strong, but I need to see if you really are strong enough to pass the test, it's not a difficult test, so you'll do just fine. Here, take my letter first... make sure you don't lose it!");
if(!cm.isQuestStarted(100003)) cm.startQuest(100003);
}
} else if (status == 1){
if (!cm.haveItem(4031012)){
if (cm.canHold(4031008)){
if(!cm.haveItem(4031008))
if (!cm.isQuestStarted(100003)) {
cm.startQuest(100003);
}
}
} else if (status == 1) {
if (!cm.haveItem(4031012)) {
if (cm.canHold(4031008)) {
if (!cm.haveItem(4031008)) {
cm.gainItem(4031008, 1);
}
cm.sendNextPrev("Please get this letter to #b#p1072000##k who's around #b#m102020300##k near Perion. He is taking care of the job of an instructor in place of me. Give him the letter and he'll test you in place of me. Best of luck to you.");
} else {
cm.sendNext("Please, make some space in your inventory.");
cm.dispose();
}
}else{
if (selection < 3){
if(selection == 0) { //fighter
} else {
if (selection < 3) {
if (selection == 0) { //fighter
cm.sendNext("Warriors that master #rSwords or Axes#k.\r\n\r\n#rFighters#k get #bRage#k, which boosts your party's weapon attack by 10. During 2nd job this is strongly appreciated, as it is free (except for -10 wep def, which is not going to impact the damage you take much at all), takes no Use slots and increases each party member's damage (except Mages) by several hundreds. The other classes can give themselves a weapon attack boost as well, but need items to do so. #rFighters#k also get #bPower Guard#k, reducing touch damage by 40% and deals it back to the monster. This is the main reason why #rFighters#k are considered soloers is because this reduces pot costs immensely.");
} else if(selection == 1) { //page
} else if (selection == 1) { //page
cm.sendNext("Warriors that master #rSwords or Maces/Blunt weapons#k.\r\n\r\n#rPages#k get #bThreaten#k, a skill that lowers the enemies' weapon defense and weapon attack by 20; this is mostly used to lower damage dealt to you. Pages also get #bPower Guard#k, reducing touch damage by 40% and deals it back to the monster. This is one of the main reason why #bPages/WKs#k are considered soloers, that's because this reduces pot costs immensely. Of course, constant KB and #bIce Charge#k helps also to the soloing factor.");
} else { //spearman
cm.sendNext("Warriors that master #rSpears or Polearms#k.\r\n\r\n#rSpearmen#k get #bHyper Body#k, which boosts your max HP/MP and that of your party by 60% when maxed. This skill is particularly useful for helping partied Thieves, Archers, and Mages to survive more hits from enemies and/or PQ bosses. They also get #bIron Will#k which gives +20 wep def and +20 mag def for 300 sec. It is basically a nerfed Bless with 100 seconds more duration but gives no accuracy or avoidability bonus. Even with this skill maxed, it isn't even close to being in the same league as Power Guard and is why Spearmen/Dark Knights are not considered a soloing class.");
}
status -= 2;
} else
} else {
cm.sendSimple("Now... have you made up your mind? Please choose the job you'd like to select for your 2nd job advancement. #b\r\n#L0#Fighter\r\n#L1#Page\r\n#L2#Spearman");
}
}
} else if (status == 2){
if (cm.haveItem(4031008)){
} else if (status == 2) {
if (cm.haveItem(4031008)) {
cm.dispose();
return;
}
job += selection * 10;
cm.sendYesNo("So you want to make the second job advancement as the " + (job == 110 ? "#bFighter#k" : job == 120 ? "#bPage#k" : "#bSpearman#k") + "? You know you won't be able to choose a different job for the 2nd job advancement once you make your desicion here, right? Are you sure about this?");
} else if (status == 3){
if (cm.haveItem(4031012))
} else if (status == 3) {
if (cm.haveItem(4031012)) {
cm.gainItem(4031012, -1);
cm.completeQuest(100005);
if(job == 110) cm.sendNext("Alright, you have now become the #bFighter#k. A fighter strives to become the strongest of the strong, and never stops fighting. Don't ever lose that will to fight, and push forward 24/7. I'll help you become even stronger than you already are.");
else if(job == 120) cm.sendNext("Alright, you have now become a #bPage#k! Pages have high intelligence and bravery, which I hope you'll employ throughout your journey to the right path. I'll help you become much stronger than you already are.");
else cm.sendNext("Alright, you have now become the #bSpearman#k. The Spearman use the power of darkness to take out the enemies, always in shadows... Please believe in yourself and your awesome power as you go in your journey. I'll help you become much stronger than you are right now.");
if (cm.getJobId() != job)
}
cm.completeQuest(100005);
if (job == 110) {
cm.sendNext("Alright, you have now become the #bFighter#k. A fighter strives to become the strongest of the strong, and never stops fighting. Don't ever lose that will to fight, and push forward 24/7. I'll help you become even stronger than you already are.");
} else if (job == 120) {
cm.sendNext("Alright, you have now become a #bPage#k! Pages have high intelligence and bravery, which I hope you'll employ throughout your journey to the right path. I'll help you become much stronger than you already are.");
} else {
cm.sendNext("Alright, you have now become the #bSpearman#k. The Spearman use the power of darkness to take out the enemies, always in shadows... Please believe in yourself and your awesome power as you go in your journey. I'll help you become much stronger than you are right now.");
}
if (cm.getJobId() != job) {
cm.changeJobById(job);
} else if (status == 4)
}
} else if (status == 4) {
cm.sendNextPrev("I have just given you a book that gives you the list of skills you can acquire as a " + (job == 110 ? "fighter" : job == 120 ? "page" : "spearman") + ". Also your etc inventory has expanded by adding another row to it. Your max HP and MP have increased, too. Go check and see for it yourself.");
else if (status == 5)
} else if (status == 5) {
cm.sendNextPrev("I have also given you a little bit of #bSP#k. Open the #bSkill Menu#k located at the bottomleft corner. you'll be able to boost up the newer acquired 2nd level skills. A word of warning, though. You can't boost them up all at once. Some of the skills are only available after you have learned other skills. Make sure yo remember that.");
else if (status == 6)
} else if (status == 6) {
cm.sendNextPrev((job == 110 ? "Fighter" : job == 120 ? "Page" : "Spearman") + " need to be strong. But remember that you can't abuse that power and use it on a weakling. Please use your enormous power the right way, because... for you to use that the right way, that is much harden than just getting stronger. Please find me after you have advanced much further. I'll be waiting for you.");
} else if (actionx["3thJobI"]){
if (status == 0){
if (cm.getPlayer().gotPartyQuestItem("JB3")){
}
} else if (actionx["3thJobI"]) {
if (status == 0) {
if (cm.getPlayer().gotPartyQuestItem("JB3")) {
cm.getPlayer().removePartyQuestItem("JB3");
cm.getPlayer().setPartyQuestItemObtained("JBP");
}
cm.sendNextPrev("My the other self is quite strong. He uses many special skills and you should fight with him 1 on 1. However, people cannot stay long in the secret passage, so it is important to beat him ASAP. Well... Good luck I will look forward to you bringing #b#t4031059##k to me.");
}
} else if (actionx["3thJobC"]){
} else if (actionx["3thJobC"]) {
cm.getPlayer().removePartyQuestItem("JBP");
cm.gainItem(4031059, -1);
cm.gainItem(4031057, 1);

View File

@@ -20,34 +20,37 @@ function action(mode, type, selection) {
cm.dispose();
return;
}
if (mode == 1)
if (mode == 1) {
status++;
else
} else {
status--;
}
if (status == 1) {
var selStr = "";
if (cm.getJobId() == 0)
if (cm.getJobId() == 0) {
selStr += "We have a special 90% discount for beginners.";
}
selStr += "Choose your destination, for fees will change from place to place.#b";
for (var i = 0; i < maps.length; i++)
for (var i = 0; i < maps.length; i++) {
selStr += "\r\n#L" + i + "##m" + maps[i] + "# (" + (cm.getJobId() == 0 ? cost[i] / 10 : cost[i]) + " mesos)#l";
}
cm.sendSimple(selStr);
} else if (status == 2) {
cm.sendYesNo("You don't have anything else to do here, huh? Do you really want to go to #b#m" + maps[selection] + "##k? It'll cost you #b"+ (cm.getJobId() == 0 ? cost[selection] / 10 : cost[selection]) + " mesos#k.");
cm.sendYesNo("You don't have anything else to do here, huh? Do you really want to go to #b#m" + maps[selection] + "##k? It'll cost you #b" + (cm.getJobId() == 0 ? cost[selection] / 10 : cost[selection]) + " mesos#k.");
selectedMap = selection;
} else if (status == 3) {
if (cm.getJobId() == 0) {
mesos = cost[selectedMap] / 10;
mesos = cost[selectedMap] / 10;
} else {
mesos = cost[selectedMap];
mesos = cost[selectedMap];
}
if (cm.getMeso() < mesos) {
cm.sendNext("You don't have enough mesos. Sorry to say this, but without them, you won't be able to ride the cab.");
cm.dispose();
return;
}
cm.gainMeso(-mesos);
cm.warp(maps[selectedMap], 0);
cm.dispose();

View File

@@ -45,172 +45,167 @@ function start() {
}
function action(mode, type, selection) {
if (mode == 1)
if (mode == 1) {
status++;
else
} else {
cm.dispose();
}
if (status == 0 && mode == 1) {
var selStr = "Hm? Who might you be? Oh, you've heard about my forging skills? In that case, I'd be glad to process some of your ores... for a fee.#b"
var options = new Array("Refine a mineral ore","Refine a jewel ore","Upgrade a helmet","Upgrade a shield");
for (var i = 0; i < options.length; i++){
var options = ["Refine a mineral ore", "Refine a jewel ore", "Upgrade a helmet", "Upgrade a shield"];
for (var i = 0; i < options.length; i++) {
selStr += "\r\n#L" + i + "# " + options[i] + "#l";
}
cm.sendSimple(selStr);
}
else if (status == 1 && mode == 1) {
} else if (status == 1 && mode == 1) {
selectedType = selection;
if (selectedType == 0){ //mineral refine
if (selectedType == 0) { //mineral refine
var selStr = "So, what kind of mineral ore would you like to refine?#b";
var minerals = new Array ("Bronze","Steel","Mithril","Adamantium","Silver","Orihalcon","Gold");
for (var i = 0; i < minerals.length; i++){
var minerals = ["Bronze", "Steel", "Mithril", "Adamantium", "Silver", "Orihalcon", "Gold"];
for (var i = 0; i < minerals.length; i++) {
selStr += "\r\n#L" + i + "# " + minerals[i] + "#l";
}
cm.sendSimple(selStr);
equip = false;
}
else if (selectedType == 1){ //jewel refine
} else if (selectedType == 1) { //jewel refine
var selStr = "So, what kind of jewel ore would you like to refine?#b";
var jewels = new Array ("Garnet","Amethyst","Aquamarine","Emerald","Opal","Sapphire","Topaz","Diamond","Black Crystal");
for (var i = 0; i < jewels.length; i++){
var jewels = ["Garnet", "Amethyst", "Aquamarine", "Emerald", "Opal", "Sapphire", "Topaz", "Diamond", "Black Crystal"];
for (var i = 0; i < jewels.length; i++) {
selStr += "\r\n#L" + i + "# " + jewels[i] + "#l";
}
cm.sendSimple(selStr);
equip = false;
}
else if (selectedType == 2){ //helmet refine
} else if (selectedType == 2) { //helmet refine
var selStr = "Ah, you wish to upgrade a helmet? Then tell me, which one?#b";
var helmets = new Array ("Blue Metal Gear#k - Common Lv. 15#b","Yellow Metal Gear#k - Common Lv. 15#b","Metal Koif#k - Warrior Lv. 10#b","Mithril Koif#k - Warrior Lv. 10#b","Steel Helmet#k - Warrior Lv. 12#b","Mithril Helmet#k - Warrior Lv. 12#b","Steel Full Helm#k - Warrior Lv. 15#b",
"Mithril Full Helm#k - Warrior Lv. 15#b","Iron Viking Helm#k - Warrior Lv. 20#b","Mithril Viking Helm#k - Warrior Lv. 20#b","Steel Football Helmet#k - Warrior Lv. 20#b","Mithrill Football Helmet#k - Warrior Lv. 20#b","Mithril Sharp Helm#k - Warrior Lv. 22#b","Gold Sharp Helm#k - Warrior Lv. 22#b",
"Orihalcon Burgernet Helm#k - Warrior Lv. 25#b","Gold Burgernet Helm#k - Warrior Lv. 25#b","Great Red Helmet#k - Warrior Lv. 35#b","Great Blue Helmet#k - Warrior Lv. 35#b","Mithril Nordic Helm#k - Warrior Lv. 40#b","Gold Nordic Helm#k - Warrior Lv. 40#b","Mithril Crusader Helm#k - Warrior Lv. 50#b",
"Silver Crusader Helm#k - Warrior Lv. 50#b","Old Steel Nordic Helm#k - Warrior Lv. 55#b","Old Mithril Nordic Helm#k - Warrior Lv. 55#b");
for (var i = 0; i < helmets.length; i++){
var helmets = ["Blue Metal Gear#k - Common Lv. 15#b", "Yellow Metal Gear#k - Common Lv. 15#b", "Metal Koif#k - Warrior Lv. 10#b", "Mithril Koif#k - Warrior Lv. 10#b", "Steel Helmet#k - Warrior Lv. 12#b", "Mithril Helmet#k - Warrior Lv. 12#b", "Steel Full Helm#k - Warrior Lv. 15#b",
"Mithril Full Helm#k - Warrior Lv. 15#b", "Iron Viking Helm#k - Warrior Lv. 20#b", "Mithril Viking Helm#k - Warrior Lv. 20#b", "Steel Football Helmet#k - Warrior Lv. 20#b", "Mithrill Football Helmet#k - Warrior Lv. 20#b", "Mithril Sharp Helm#k - Warrior Lv. 22#b", "Gold Sharp Helm#k - Warrior Lv. 22#b",
"Orihalcon Burgernet Helm#k - Warrior Lv. 25#b", "Gold Burgernet Helm#k - Warrior Lv. 25#b", "Great Red Helmet#k - Warrior Lv. 35#b", "Great Blue Helmet#k - Warrior Lv. 35#b", "Mithril Nordic Helm#k - Warrior Lv. 40#b", "Gold Nordic Helm#k - Warrior Lv. 40#b", "Mithril Crusader Helm#k - Warrior Lv. 50#b",
"Silver Crusader Helm#k - Warrior Lv. 50#b", "Old Steel Nordic Helm#k - Warrior Lv. 55#b", "Old Mithril Nordic Helm#k - Warrior Lv. 55#b"];
for (var i = 0; i < helmets.length; i++) {
selStr += "\r\n#L" + i + "# " + helmets[i] + "#l";
}
cm.sendSimple(selStr);
equip = true;
}
else if (selectedType == 3){ //shield refine
} else if (selectedType == 3) { //shield refine
var selStr = "Ah, you wish to upgrade a shield? Then tell me, which one?#b";
var shields = new Array ("Adamantium Tower Shield#k - Warrior Lv. 40#b","Mithril Tower Shield#k - Warrior Lv. 40#b","Silver Legend Shield#k - Warrior Lv. 60#b","Adamantium Legend Shield#k - Warrior Lv. 60#b");
for (var i = 0; i < shields.length; i++){
var shields = ["Adamantium Tower Shield#k - Warrior Lv. 40#b", "Mithril Tower Shield#k - Warrior Lv. 40#b", "Silver Legend Shield#k - Warrior Lv. 60#b", "Adamantium Legend Shield#k - Warrior Lv. 60#b"];
for (var i = 0; i < shields.length; i++) {
selStr += "\r\n#L" + i + "# " + shields[i] + "#l";
}
cm.sendSimple(selStr);
equip = true;
}
if (equip)
if (equip) {
status++;
}
else if (status == 2 && mode == 1) {
}
} else if (status == 2 && mode == 1) {
selectedItem = selection;
if (selectedType == 0){ //mineral refine
var itemSet = new Array(4011000,4011001,4011002,4011003,4011004,4011005,4011006);
var matSet = new Array(4010000,4010001,4010002,4010003,4010004,4010005,4010006);
var matQtySet = new Array(10,10,10,10,10,10,10);
var costSet = new Array(300,300,300,500,500,500,800);
if (selectedType == 0) { //mineral refine
var itemSet = [4011000, 4011001, 4011002, 4011003, 4011004, 4011005, 4011006];
var matSet = [4010000, 4010001, 4010002, 4010003, 4010004, 4010005, 4010006];
var matQtySet = [10, 10, 10, 10, 10, 10, 10];
var costSet = [300, 300, 300, 500, 500, 500, 800];
item = itemSet[selectedItem];
mats = matSet[selectedItem];
matQty = matQtySet[selectedItem];
cost = costSet[selectedItem];
} else if (selectedType == 1) { //jewel refine
var itemSet = [4021000, 4021001, 4021002, 4021003, 4021004, 4021005, 4021006, 4021007, 4021008];
var matSet = [4020000, 4020001, 4020002, 4020003, 4020004, 4020005, 4020006, 4020007, 4020008];
var matQtySet = [10, 10, 10, 10, 10, 10, 10, 10, 10];
var costSet = [500, 500, 500, 500, 500, 500, 500, 1000, 3000];
item = itemSet[selectedItem];
mats = matSet[selectedItem];
matQty = matQtySet[selectedItem];
cost = costSet[selectedItem];
}
else if (selectedType == 1){ //jewel refine
var itemSet = new Array(4021000,4021001,4021002,4021003,4021004,4021005,4021006,4021007,4021008);
var matSet = new Array(4020000,4020001,4020002,4020003,4020004,4020005,4020006,4020007,4020008);
var matQtySet = new Array(10,10,10,10,10,10,10,10,10);
var costSet = new Array (500,500,500,500,500,500,500,1000,3000);
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)
}
else if (status == 3 && mode == 1) {
if (equip)
{
cm.sendGetNumber(prompt, 1, 1, 100)
} else if (status == 3 && mode == 1) {
if (equip) {
selectedItem = selection;
qty = 1;
}
else
} else {
qty = (selection > 0) ? selection : (selection < 0 ? -selection : 1);
}
if (selectedType == 2){ //helmet refine
var itemSet = new Array(1002042,1002041,1002002,1002044,1002003,1002040,1002007,1002052,1002011,1002058,1002009,1002056,1002087,1002088,1002050,1002049,1002047,1002048,1002099,1002098,1002085,1002028,1002022,1002101);
var matSet = new Array(new Array(1002001,4011002),new Array(1002001,4021006),new Array(1002043,4011001),new Array(1002043,4011002),new Array(1002039,4011001),new Array(1002039,4011002),new Array(1002051,4011001),new Array(1002051,4011002),new Array(1002059,4011001),new Array(1002059,4011002),
new Array(1002055,4011001),new Array(1002055,4011002),new Array(1002027,4011002),new Array(1002027,4011006),new Array(1002005,4011005),new Array(1002005,4011006),new Array(1002004,4021000),new Array(1002004,4021005),new Array(1002021,4011002),new Array(1002021,4011006),new Array(1002086,4011002),
new Array(1002086,4011004),new Array(1002100,4011007,4011001),new Array(1002100,4011007,4011002));
var matQtySet = new Array(new Array(1,1),new Array(1,1),new Array(1,1),new Array(1,1),new Array(1,1),new Array(1,1),new Array(1,2),new Array(1,2),new Array(1,3),new Array(1,3),new Array(1,3),new Array(1,3),new Array(1,4),new Array(1,4),new Array(1,5),new Array(1,5),new Array(1,3),new Array(1,3),
new Array(1,5),new Array(1,6),new Array(1,5),new Array(1,4),new Array(1,1,7),new Array(1,1,7));
var costSet = new Array(500,300,500,800,500,800,1000,1500,1500,2000,1500,2000,2000,4000,4000,5000,8000,10000,12000,15000,20000,25000,30000,30000);
if (selectedType == 2) { //helmet refine
var itemSet = [1002042, 1002041, 1002002, 1002044, 1002003, 1002040, 1002007, 1002052, 1002011, 1002058, 1002009, 1002056, 1002087, 1002088, 1002050, 1002049, 1002047, 1002048, 1002099, 1002098, 1002085, 1002028, 1002022, 1002101];
var matSet = [[1002001, 4011002], [1002001, 4021006], [1002043, 4011001], [1002043, 4011002], [1002039, 4011001], [1002039, 4011002], [1002051, 4011001], [1002051, 4011002], [1002059, 4011001], [1002059, 4011002],
[1002055, 4011001], [1002055, 4011002], [1002027, 4011002], [1002027, 4011006], [1002005, 4011005], [1002005, 4011006], [1002004, 4021000], [1002004, 4021005], [1002021, 4011002], [1002021, 4011006], [1002086, 4011002],
[1002086, 4011004], [1002100, 4011007, 4011001], [1002100, 4011007, 4011002]];
var matQtySet = [[1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 2], [1, 2], [1, 3], [1, 3], [1, 3], [1, 3], [1, 4], [1, 4], [1, 5], [1, 5], [1, 3], [1, 3],
[1, 5], [1, 6], [1, 5], [1, 4], [1, 1, 7], [1, 1, 7]];
var costSet = [500, 300, 500, 800, 500, 800, 1000, 1500, 1500, 2000, 1500, 2000, 2000, 4000, 4000, 5000, 8000, 10000, 12000, 15000, 20000, 25000, 30000, 30000];
item = itemSet[selectedItem];
mats = matSet[selectedItem];
matQty = matQtySet[selectedItem];
cost = costSet[selectedItem];
}
else if (selectedType == 3){ //shield refine
var itemSet = new Array (1092014,1092013,1092010,1092011);
var matSet = new Array(new Array (1092012,4011003),new Array (1092012,4011002),new Array (1092009,4011007,4011004),new Array (1092009,4011007,4011003));
var matQtySet = new Array (new Array (1,10),new Array (1,10),new Array (1,1,15),new Array (1,1,15));
var costSet = new Array (100000,100000,120000,120000);
} else if (selectedType == 3) { //shield refine
var itemSet = [1092014, 1092013, 1092010, 1092011];
var matSet = [[1092012, 4011003], [1092012, 4011002], [1092009, 4011007, 4011004], [1092009, 4011007, 4011003]];
var matQtySet = [[1, 10], [1, 10], [1, 1, 15], [1, 1, 15]];
var costSet = [100000, 100000, 120000, 120000];
item = itemSet[selectedItem];
mats = matSet[selectedItem];
matQty = matQtySet[selectedItem];
cost = costSet[selectedItem];
}
var prompt = "You want me to make ";
if (qty == 1)
if (qty == 1) {
prompt += "a #t" + item + "#?";
else
} else {
prompt += qty + " #t" + item + "#?";
prompt += " In that case, I'm going to need specific items from you in order to make it. Make sure you have room in your inventory, though!#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 += " In that case, I'm going to need specific items from you in order to make it. Make sure you have room in your inventory, though!#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 && mode == 1) {
} else if (status == 4 && mode == 1) {
var complete = true;
if(!cm.canHold(item, qty)) {
if (!cm.canHold(item, qty)) {
cm.sendOk("Check your inventory for a free slot first.");
cm.dispose();
return;
}
else if (cm.getMeso() < cost * qty)
{
} else if (cm.getMeso() < cost * qty) {
cm.sendOk("I'm afraid you cannot afford my services.");
cm.dispose();
return;
}
else
{
} else {
if (mats instanceof Array) {
for(var i = 0; complete && i < mats.length; i++)
if (!cm.haveItem(mats[i], matQty[i] * qty))
for (var i = 0; complete && i < mats.length; i++) {
if (!cm.haveItem(mats[i], matQty[i] * qty)) {
complete = false;
}
else if (!cm.haveItem(mats, matQty * qty))
}
}
} else if (!cm.haveItem(mats, matQty * qty)) {
complete = false;
}
if (!complete)
}
}
if (!complete) {
cm.sendOk("I'm afraid you're missing something for the item you want. See you another time, yes?");
else {
if (mats instanceof Array)
for (var i = 0; i < mats.length; i++)
} else {
if (mats instanceof Array) {
for (var i = 0; i < mats.length; i++) {
cm.gainItem(mats[i], -matQty[i] * qty);
else
}
} else {
cm.gainItem(mats, -matQty * qty);
}
cm.gainMeso(-cost * qty);
cm.gainItem(item,qty);
cm.gainItem(item, qty);
cm.sendOk("There, finished. What do you think, a piece of art, isn't it? Well, if you need anything else, you nkow where to find me.");
}
cm.dispose();

View File

@@ -44,170 +44,166 @@ function start() {
}
function action(mode, type, selection) {
if (mode == 1)
if (mode == 1) {
status++;
else
} else {
cm.dispose();
}
if (status == 0 && mode == 1) {
var selStr = "Um... Hi, I'm Mr. Thunder's apprentice. He's getting up there in age, so he handles most of the heavy-duty work while I handle some of the lighter jobs. What can I do for you?#b"
var options = new Array("Make a glove","Upgrade a glove","Create materials");
for (var i = 0; i < options.length; i++){
var options = ["Make a glove", "Upgrade a glove", "Create materials"];
for (var i = 0; i < options.length; i++) {
selStr += "\r\n#L" + i + "# " + options[i] + "#l";
}
cm.sendSimple(selStr);
}
else if (status == 1 && mode == 1) {
} else if (status == 1 && mode == 1) {
selectedType = selection;
if (selectedType == 0){ //glove refine
if (selectedType == 0) { //glove refine
var selStr = "Okay, so which glove do you want me to make?#b";
var items = new Array ("Juno#k - Warrior Lv. 10#b","Steel Fingerless Gloves#k - Warrior Lv. 15#b","Venon#k - Warrior Lv. 20#b","White Fingerless Gloves#k - Warrior Lv. 25#b",
"Bronze Missel#k - Warrior Lv. 30#b","Steel Briggon#k - Warrior Lv. 35#b","Iron Knuckle#k - Warrior Lv. 40#b","Steel Brist#k - Warrior Lv. 50#b","Bronze Clench#k - Warrior Lv. 60#b");
for (var i = 0; i < items.length; i++){
var items = ["Juno#k - Warrior Lv. 10#b", "Steel Fingerless Gloves#k - Warrior Lv. 15#b", "Venon#k - Warrior Lv. 20#b", "White Fingerless Gloves#k - Warrior Lv. 25#b",
"Bronze Missel#k - Warrior Lv. 30#b", "Steel Briggon#k - Warrior Lv. 35#b", "Iron Knuckle#k - Warrior Lv. 40#b", "Steel Brist#k - Warrior Lv. 50#b", "Bronze Clench#k - Warrior Lv. 60#b"];
for (var i = 0; i < items.length; i++) {
selStr += "\r\n#L" + i + "# " + items[i] + "#l";
}
cm.sendSimple(selStr);
equip = true;
}
else if (selectedType == 1){ //glove upgrade
} else if (selectedType == 1) { //glove upgrade
var selStr = "Upgrade a glove? That shouldn't be too difficult. Which did you have in mind?#b";
var crystals = new Array ("Steel Missel#k - Warrior Lv. 30#b","Orihalcon Missel#k - Warrior Lv. 30#b","Yellow Briggon#k - Warrior Lv. 35#b","Dark Briggon#k - Warrior Lv. 35#b",
"Adamantium Knuckle#k - Warrior Lv. 40#b","Dark Knuckle#k - Warrior Lv. 40#b","Mithril Brist#k - Warrior Lv. 50#b","Gold Brist#k - Warrior Lv. 50#b",
"Sapphire Clench#k - Warrior Lv. 60#b","Dark Clench#k - Warrior Lv. 60#b");
for (var i = 0; i < crystals.length; i++){
var crystals = ["Steel Missel#k - Warrior Lv. 30#b", "Orihalcon Missel#k - Warrior Lv. 30#b", "Yellow Briggon#k - Warrior Lv. 35#b", "Dark Briggon#k - Warrior Lv. 35#b",
"Adamantium Knuckle#k - Warrior Lv. 40#b", "Dark Knuckle#k - Warrior Lv. 40#b", "Mithril Brist#k - Warrior Lv. 50#b", "Gold Brist#k - Warrior Lv. 50#b",
"Sapphire Clench#k - Warrior Lv. 60#b", "Dark Clench#k - Warrior Lv. 60#b"];
for (var i = 0; i < crystals.length; i++) {
selStr += "\r\n#L" + i + "# " + crystals[i] + "#l";
}
cm.sendSimple(selStr);
equip = true;
}
else if (selectedType == 2){ //material refine
} else if (selectedType == 2) { //material refine
var selStr = "Materials? I know of a few materials that I can make for you...#b";
var materials = new Array ("Make Processed Wood with Tree Branch","Make Processed Wood with Firewood","Make Screws (packs of 15)");
for (var i = 0; i < materials.length; i++){
var materials = ["Make Processed Wood with Tree Branch", "Make Processed Wood with Firewood", "Make Screws (packs of 15)"];
for (var i = 0; i < materials.length; i++) {
selStr += "\r\n#L" + i + "# " + materials[i] + "#l";
}
cm.sendSimple(selStr);
equip = false;
}
if (equip)
if (equip) {
status++;
}
else if (status == 2 && mode == 1) {
}
} else if (status == 2 && mode == 1) {
selectedItem = selection;
if (selectedType == 2){ //material refine
var itemSet = new Array (4003001,4003001,4003000);
var matSet = new Array(4000003,4000018,new Array (4011000,4011001));
var matQtySet = new Array (10,5,new Array (1,1));
var costSet = new Array (0,0,0);
if (selectedType == 2) { //material refine
var itemSet = [4003001, 4003001, 4003000];
var matSet = [4000003, 4000018, [4011000, 4011001]];
var matQtySet = [10, 5, [1, 1]];
var costSet = [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)
}
else if (status == 3 && mode == 1) {
if (equip)
{
cm.sendGetNumber(prompt, 1, 1, 100)
} else if (status == 3 && mode == 1) {
if (equip) {
selectedItem = selection;
qty = 1;
}
else
} else {
qty = (selection > 0) ? selection : (selection < 0 ? -selection : 1);
}
if (selectedType == 0){ //glove refine
var itemSet = new Array(1082003,1082000,1082004,1082001,1082007,1082008,1082023,1082009,1082059);
var matSet = new Array(new Array(4000021,4011001),4011001,new Array(4000021,4011000),4011001,new Array(4011000,4011001,4003000),new Array(4000021,4011001,4003000),new Array(4000021,4011001,4003000),
new Array(4011001,4021007,4000030,4003000),new Array(4011007,4011000,4011006,4000030,4003000));
var matQtySet = new Array(new Array(15,1),2,new Array(40,2),2,new Array(3,2,15),new Array(30,4,15),new Array(50,5,40),new Array(3,2,30,45),new Array(1,8,2,50,50));
var costSet = new Array(1000,2000,5000,10000,20000,30000,40000,50000,70000);
if (selectedType == 0) { //glove refine
var itemSet = [1082003, 1082000, 1082004, 1082001, 1082007, 1082008, 1082023, 1082009, 1082059];
var matSet = [[4000021, 4011001], 4011001, [4000021, 4011000], 4011001, [4011000, 4011001, 4003000], [4000021, 4011001, 4003000], [4000021, 4011001, 4003000],
[4011001, 4021007, 4000030, 4003000], [4011007, 4011000, 4011006, 4000030, 4003000]];
var matQtySet = [[15, 1], 2, [40, 2], 2, [3, 2, 15], [30, 4, 15], [50, 5, 40], [3, 2, 30, 45], [1, 8, 2, 50, 50]];
var costSet = [1000, 2000, 5000, 10000, 20000, 30000, 40000, 50000, 70000];
item = itemSet[selectedItem];
mats = matSet[selectedItem];
matQty = matQtySet[selectedItem];
cost = costSet[selectedItem];
} else if (selectedType == 1) { //glove upgrade
var itemSet = [1082005, 1082006, 1082035, 1082036, 1082024, 1082025, 1082010, 1082011, 1082060, 1082061];
var matSet = [[1082007, 4011001], [1082007, 4011005], [1082008, 4021006], [1082008, 4021008], [1082023, 4011003], [1082023, 4021008],
[1082009, 4011002], [1082009, 4011006], [1082059, 4011002, 4021005], [1082059, 4021007, 4021008]];
var matQtySet = [[1, 1], [1, 2], [1, 3], [1, 1], [1, 4], [1, 2], [1, 5], [1, 4], [1, 3, 5], [1, 2, 2]];
var costSet = [20000, 25000, 30000, 40000, 45000, 50000, 55000, 60000, 70000, 80000];
item = itemSet[selectedItem];
mats = matSet[selectedItem];
matQty = matQtySet[selectedItem];
cost = costSet[selectedItem];
}
else if (selectedType == 1){ //glove upgrade
var itemSet = new Array(1082005,1082006,1082035,1082036,1082024,1082025,1082010,1082011,1082060,1082061);
var matSet = new Array(new Array(1082007,4011001),new Array(1082007,4011005),new Array(1082008,4021006),new Array(1082008,4021008),new Array(1082023,4011003),new Array(1082023,4021008),
new Array(1082009,4011002),new Array(1082009,4011006),new Array(1082059,4011002,4021005),new Array(1082059,4021007,4021008));
var matQtySet = new Array (new Array(1,1),new Array(1,2),new Array(1,3),new Array(1,1),new Array(1,4),new Array(1,2),new Array(1,5),new Array(1,4),new Array(1,3,5),new Array(1,2,2));
var costSet = new Array (20000,25000,30000,40000,45000,50000,55000,60000,70000,80000);
item = itemSet[selectedItem];
mats = matSet[selectedItem];
matQty = matQtySet[selectedItem];
cost = costSet[selectedItem];
}
var prompt = "You want me to make ";
if (qty == 1)
if (qty == 1) {
prompt += "a #t" + item + "#?";
else
} else {
prompt += qty + " #t" + item + "#?";
}
prompt += " In that case, I'm going to need specific items from you in order to make it. Make sure you have room in your inventory, though!#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] + "#";
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 + "#";
}
else {
prompt += "\r\n#i"+mats+"# " + matQty * qty + " #t" + mats + "#";
}
if (cost > 0)
if (cost > 0) {
prompt += "\r\n#i4031138# " + cost * qty + " meso";
}
cm.sendYesNo(prompt);
}
else if (status == 4 && mode == 1) {
} else if (status == 4 && mode == 1) {
var complete = true;
var recvItem = item, recvQty;
if (item == 4003000)//screws
{
recvQty = 15 * qty;
else
} else {
recvQty = qty;
if(!cm.canHold(recvItem, recvQty)) {
}
if (!cm.canHold(recvItem, recvQty)) {
cm.sendOk("Check your inventory for a free slot first.");
cm.dispose();
return;
}
else if (cm.getMeso() < cost * qty)
{
} else if (cm.getMeso() < cost * qty) {
cm.sendOk("I may still be an apprentice, but I do need to earn a living.");
cm.dispose();
return;
}
else
{
} else {
if (mats instanceof Array) {
for(var i = 0; complete && i < mats.length; i++)
if (!cm.haveItem(mats[i], matQty[i] * qty))
for (var i = 0; complete && i < mats.length; i++) {
if (!cm.haveItem(mats[i], matQty[i] * qty)) {
complete = false;
}
else if (!cm.haveItem(mats, matQty * qty))
}
}
} else if (!cm.haveItem(mats, matQty * qty)) {
complete = false;
}
}
if (!complete)
if (!complete) {
cm.sendOk("I'm still an apprentice, I don't know if I can substitute other items in yet... Can you please bring what the recipe calls for?");
else {
} else {
if (mats instanceof Array) {
for (var i = 0; i < mats.length; i++){
for (var i = 0; i < mats.length; i++) {
cm.gainItem(mats[i], -matQty[i] * qty);
}
}
else
} else {
cm.gainItem(mats, -matQty * qty);
if (cost > 0)
}
if (cost > 0) {
cm.gainMeso(-cost * qty);
}
cm.gainItem(recvItem, recvQty);
cm.sendOk("Did that come out right? Come by me again if you have anything for me to practice on.");
}

View File

@@ -17,38 +17,39 @@ Jan Christian Meyer <vimes@odinms.de>
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/>.
*/
/**
Rooney - Happyville Warp NPC
**/
*/
/**
Rooney - Happyville Warp NPC
**/
var status;
function start() {
status = -1;
action(1, 0, 0);
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();
} else {
if (mode == 0 && type > 0) {
cm.dispose();
return;
}
if (mode == 1)
status++;
else
status--;
if(status == 0) {
cm.sendYesNo("Santa told me to go to here, only he didn't told me when... I hope I'm here on the right time! Oh! By the way, I'm Rooney, I can take you to #bHappyVille#k. Are you ready to go?");
} else {
cm.getPlayer().saveLocation("HAPPYVILLE");
cm.warp(209000000, 0);
cm.dispose();
}
if (mode == -1) {
cm.dispose();
} else {
if (mode == 0 && type > 0) {
cm.dispose();
return;
}
if (mode == 1) {
status++;
} else {
status--;
}
if (status == 0) {
cm.sendYesNo("Santa told me to go to here, only he didn't told me when... I hope I'm here on the right time! Oh! By the way, I'm Rooney, I can take you to #bHappyVille#k. Are you ready to go?");
} else {
cm.getPlayer().saveLocation("HAPPYVILLE");
cm.warp(209000000, 0);
cm.dispose();
}
}
}

View File

@@ -26,9 +26,9 @@
var itemToUse = 4001126;
var chairs = new Array(3010000, 3010001, 3010002, 3010003, 3010004, 3010005, 3010006, 3010007, 3010008, 3010009, 3010010, 3010011, 3010012, 3010013, 3010015, 3010016, 3010017, 3010018, 3010019, 3010022, 3010023, 3010024, 3010025, 3010026, 3010028, 3010040, 3010041, 3010043, 3010045, 3010046, 3010047,3010057,3010058,3010060,3010061,3010062,3010063, 3010064,3010065,3010066,3010067,3010069,3010071,3010072,3010073,3010080,3010081,3010082,3010083, 3010084,3010085,3010097,3010098,3010099,3010101,3010106,3010116,3011000,3012005,3012010,3012011);
var scrolls = new Array(2040603,2044503,2041024,2041025,2044703,2044603,2043303,2040807,2040806,2040006,2040007,2043103,2043203,2043003,2040506,2044403,2040903,2040709,2040710,2040711,2044303,2043803,2040403,2044103,2044203,2044003,2043703);
var weapons = new Array(1302020, 1302030, 1302033, 1302058, 1302064, 1302080, 1312032, 1322054, 1332025, 1332055, 1332056, 1372034, 1382009, 1382012, 1382039, 1402039, 1412011, 1412027, 1422014, 1422029, 1432012, 1432040, 1432046, 1442024, 1442030, 1442051, 1452016, 1452022, 1452045, 1462014, 1462019, 1462040, 1472030, 1472032, 1472055, 1482020, 1482021, 1482022, 1492020, 1492021, 1492022, 1092030, 1092045, 1092046, 1092047);
var chairs = [3010000, 3010001, 3010002, 3010003, 3010004, 3010005, 3010006, 3010007, 3010008, 3010009, 3010010, 3010011, 3010012, 3010013, 3010015, 3010016, 3010017, 3010018, 3010019, 3010022, 3010023, 3010024, 3010025, 3010026, 3010028, 3010040, 3010041, 3010043, 3010045, 3010046, 3010047, 3010057, 3010058, 3010060, 3010061, 3010062, 3010063, 3010064, 3010065, 3010066, 3010067, 3010069, 3010071, 3010072, 3010073, 3010080, 3010081, 3010082, 3010083, 3010084, 3010085, 3010097, 3010098, 3010099, 3010101, 3010106, 3010116, 3011000, 3012005, 3012010, 3012011];
var scrolls = [2040603, 2044503, 2041024, 2041025, 2044703, 2044603, 2043303, 2040807, 2040806, 2040006, 2040007, 2043103, 2043203, 2043003, 2040506, 2044403, 2040903, 2040709, 2040710, 2040711, 2044303, 2043803, 2040403, 2044103, 2044203, 2044003, 2043703];
var weapons = [1302020, 1302030, 1302033, 1302058, 1302064, 1302080, 1312032, 1322054, 1332025, 1332055, 1332056, 1372034, 1382009, 1382012, 1382039, 1402039, 1412011, 1412027, 1422014, 1422029, 1432012, 1432040, 1432046, 1442024, 1442030, 1442051, 1452016, 1452022, 1452045, 1462014, 1462019, 1462040, 1472030, 1472032, 1472055, 1482020, 1482021, 1482022, 1492020, 1492021, 1492022, 1092030, 1092045, 1092046, 1092047];
var nxAmount = 3000;
var chairAmount = 2;
@@ -41,176 +41,182 @@ var buff2ID = 2022179;
var status;
var vp;
var choice;
function start() {
//vp = cm.getClient().getVotePoints();
//if(vp == null)
vp = 0;
//vp = cm.getClient().getVotePoints();
//if(vp == null)
vp = 0;
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode < 0)
if (mode < 0) {
cm.dispose();
else {
if (mode == 1)
} else {
if (mode == 1) {
status++;
else
} else {
status--;
}
if (status == 0 && mode == 1) {
if(cm.getPlayer().getLevel() < 20) {
cm.sendOk("Hello, I am the Vote Point exchanger for #rMapleSolaxia#k!\r\n\r\nI am sorry, but I can only exchange Vote Points for players #blevel 20 or over#k.");
cm.dispose();
return;
}
var outStr = "Hello, I am the Vote Point exchanger for #rMapleSolaxia#k!\r\n";
outStr += "You currently have #r#c" + itemToUse + "##k #t" + itemToUse + "# and #r" + vp + "#k Vote Points.#b\r\n\r\n";
outStr += "#L0#I would like to exchange my vote points for Maple Leaves#l\r\n";
outStr += "#L1#I would like to exchange 1 #t" + itemToUse + "# for "+ nxAmount + " NX Cash#l\r\n";
outStr += "#L2#I would like to exchange 1 #t" + itemToUse + "# for " + chairAmount + " Random Chair" + (chairAmount > 1 ? "s" : "") + "#l\r\n";
outStr += "#L3#I would like to exchange 1 #t" + itemToUse + "# for " + weaponAmount + " Maple Weapons#l\r\n";
outStr += "#L4#I would like to exchange 1 #t" + itemToUse + "# for " + buffAmount + " #t" + buff1ID + "#s and " + buffAmount + " #t" + buff2ID + "#s#l\r\n";
outStr += "#L5#I would like to exchange 1 #t" + itemToUse + "# for a " + hiredMerchantLength + " Day Hired Merchant#l\r\n";
cm.sendSimple(outStr);
} else if(status == 1) {
choice = selection;
if(selection > 0) {
if(!cm.haveItem(itemToUse) && vp == 0) {
cm.sendOk("I'm sorry, but you don't have any #t" +itemToUse + " or Vote Points.");
cm.dispose();
return;
}
}
if(selection == 0) {
// Exchange VP for leaves
if(vp <= 0) {
cm.sendOk("I'm sorry, but you don't have any Vote Points to exchange!");
cm.dispose();
return;
}
cm.sendYesNo("Would you like to exchange " + vp + " Vote Point" + (vp > 0 ? "s" : "") + " for " + vp + " #t" + itemToUse + "# " + (vp > 0 ? "s" : "") + "?");
} else if(selection == 1) {
// Exchange 1 Leaf for Cash
cm.sendYesNo("Would you like to exchange 1 #t" + itemToUse + "# for " + nxAmount + " NX Cash?");
} else if(selection == 2) {
// Exchange 1 Leaf for Chair
cm.sendYesNo("Would you like to exchange 1 #t" + itemToUse + "# for " + chairAmount + " Random Chair" + (chairAmount > 1 ? "s" : "") + "?");
} else if(selection == 3) {
// Exchange 1 Leaf for Maple Weapons
cm.sendYesNo("Would you like to exchange 1 #t" + itemToUse + "# for " + weaponAmount + " Random Maple Weapons?");
} else if(selection == 4) {
// Exchange 1 Leaf for Apples/Cheese
cm.sendYesNo("Would you like to exchange 1 #t" + itemToUse + "# for " + buffAmount + " #t" + buff1ID + "# and #t" + buff2ID + "#?");
} else if(selection == 5) {
// Echange 1 Leaf for Merchant
cm.sendYesNo("Would you like to exchange 1 #t" + itemToUse + "# for a " + hiredMerchantLength + " Day Hired Merchant?");
} else {
cm.dispose();
}
} else if(status == 2) {
var useVP = false;
if(!cm.hasItem(itemToUse) && vp > 0)
useVP = true;
if (cm.getPlayer().getLevel() < 20) {
cm.sendOk("Hello, I am the Vote Point exchanger for #rMapleSolaxia#k!\r\n\r\nI am sorry, but I can only exchange Vote Points for players #blevel 20 or over#k.");
cm.dispose();
return;
}
var outStr = "Hello, I am the Vote Point exchanger for #rMapleSolaxia#k!\r\n";
outStr += "You currently have #r#c" + itemToUse + "##k #t" + itemToUse + "# and #r" + vp + "#k Vote Points.#b\r\n\r\n";
outStr += "#L0#I would like to exchange my vote points for Maple Leaves#l\r\n";
outStr += "#L1#I would like to exchange 1 #t" + itemToUse + "# for " + nxAmount + " NX Cash#l\r\n";
outStr += "#L2#I would like to exchange 1 #t" + itemToUse + "# for " + chairAmount + " Random Chair" + (chairAmount > 1 ? "s" : "") + "#l\r\n";
outStr += "#L3#I would like to exchange 1 #t" + itemToUse + "# for " + weaponAmount + " Maple Weapons#l\r\n";
outStr += "#L4#I would like to exchange 1 #t" + itemToUse + "# for " + buffAmount + " #t" + buff1ID + "#s and " + buffAmount + " #t" + buff2ID + "#s#l\r\n";
outStr += "#L5#I would like to exchange 1 #t" + itemToUse + "# for a " + hiredMerchantLength + " Day Hired Merchant#l\r\n";
cm.sendSimple(outStr);
} else if (status == 1) {
choice = selection;
const InventoryType = Java.type('client.inventory.InventoryType');
if(choice == 0) {
// VP Exchange
if(!cm.canHold(itemToUse)) {
cm.sendOk("It looks like you don't have enough space in your #rETC#k inventory to hold the #t" + itemToUse + "#" + (vp > 0 ? "s" : "") + ".");
cm.dispose();
return;
}
cm.getClient().useVotePoints(vp);
cm.gainItem(itemToUse, vp);
cm.dispose();
} else if(choice == 1) {
// Leaf for Cash
if(useVP)
cm.getClient().useVotePoints(1);
else
cm.gainItem(itemToUse, -1);
cm.getPlayer().getCashShop().gainCash(1, nxAmount);
const PacketCreator = Java.type('tools.PacketCreator');
cm.getPlayer().sendPacket(PacketCreator.earnTitleMessage("You have earned " + nxAmount + " NX"));
cm.logLeaf(nxAmount + " NX");
cm.dispose();
} else if(choice == 2) {
if(!cm.getPlayer().getInventory(InventoryType.SETUP).isFull(chairAmount)) {
var chairStr = "";
for(var i = 0; i < chairAmount; i++) {
var chair = chairs[Math.floor(Math.random() * chairs.length)];
cm.gainItem(chair, 1, true);
chairStr += chair + " ";
}
if(useVP)
cm.getClient().useVotePoints(1);
else
cm.gainItem(itemToUse, -1);
cm.logLeaf("Chair ID: " + chairStr);
cm.dispose();
} else {
cm.sendOk("Please make sure you have enough space to hold the items!");
}
} else if(choice == 3) {
if(!cm.getPlayer().getInventory(InventoryType.EQUIP).isFull(weaponAmount)) {
var weaponStr = "";
for(var i = 0; i < weaponAmount; i++) {
var weapon = weapons[Math.floor(Math.random() * weapons.length)];
cm.gainItem(weapon, 1, true, true);
weaponStr += weapon + " ";
}
if(useVP)
cm.getClient().useVotePoints(1);
else
cm.gainItem(itemToUse, -1);
cm.logLeaf("Maple Weapon IDs: " + weaponStr);
cm.dispose();
} else {
cm.sendOk("Please make sure you have enough space to hold the items!");
}
} else if(choice == 4) {
if(!cm.getPlayer().getInventory(InventoryType.USE).isFull(2)) {
cm.gainItem(buff1ID, buffAmount, true);
cm.gainItem(buff2ID, buffAmount, true);
cm.gainItem(itemToUse, -1);
cm.logLeaf(buffAmount + " cheeses and apples");
cm.dispose();
} else {
cm.sendOk("Please make sure you have enough space to hold the items!");
}
} else if(choice == 5) {
if(!cm.haveItem(5030000, 1)) {
if(!cm.getPlayer().getInventory(InventoryType.CASH).isFull(1)){
cm.gainItem(5030000, 1, false, true, 1000 * 60 * 60 * 24 * hiredMerchantLength);
if(useVP)
cm.getClient().useVotePoints(1);
else
cm.gainItem(itemToUse, -1);
cm.logLeaf(hiredMerchantLength + " day hired merchant");
cm.dispose();
} else {
cm.sendOk("Please make sure you have enough space to hold these items!");
}
} else {
cm.sendOk("I can't give you a merchant if you already have one!");
}
}
} else {
cm.dispose();
}
if (selection > 0) {
if (!cm.haveItem(itemToUse) && vp == 0) {
cm.sendOk("I'm sorry, but you don't have any #t" + itemToUse + " or Vote Points.");
cm.dispose();
return;
}
}
if (selection == 0) {
// Exchange VP for leaves
if (vp <= 0) {
cm.sendOk("I'm sorry, but you don't have any Vote Points to exchange!");
cm.dispose();
return;
}
cm.sendYesNo("Would you like to exchange " + vp + " Vote Point" + (vp > 0 ? "s" : "") + " for " + vp + " #t" + itemToUse + "# " + (vp > 0 ? "s" : "") + "?");
} else if (selection == 1) {
// Exchange 1 Leaf for Cash
cm.sendYesNo("Would you like to exchange 1 #t" + itemToUse + "# for " + nxAmount + " NX Cash?");
} else if (selection == 2) {
// Exchange 1 Leaf for Chair
cm.sendYesNo("Would you like to exchange 1 #t" + itemToUse + "# for " + chairAmount + " Random Chair" + (chairAmount > 1 ? "s" : "") + "?");
} else if (selection == 3) {
// Exchange 1 Leaf for Maple Weapons
cm.sendYesNo("Would you like to exchange 1 #t" + itemToUse + "# for " + weaponAmount + " Random Maple Weapons?");
} else if (selection == 4) {
// Exchange 1 Leaf for Apples/Cheese
cm.sendYesNo("Would you like to exchange 1 #t" + itemToUse + "# for " + buffAmount + " #t" + buff1ID + "# and #t" + buff2ID + "#?");
} else if (selection == 5) {
// Echange 1 Leaf for Merchant
cm.sendYesNo("Would you like to exchange 1 #t" + itemToUse + "# for a " + hiredMerchantLength + " Day Hired Merchant?");
} else {
cm.dispose();
}
} else if (status == 2) {
var useVP = false;
if (!cm.hasItem(itemToUse) && vp > 0) {
useVP = true;
}
const InventoryType = Java.type('client.inventory.InventoryType');
if (choice == 0) {
// VP Exchange
if (!cm.canHold(itemToUse)) {
cm.sendOk("It looks like you don't have enough space in your #rETC#k inventory to hold the #t" + itemToUse + "#" + (vp > 0 ? "s" : "") + ".");
cm.dispose();
return;
}
cm.getClient().useVotePoints(vp);
cm.gainItem(itemToUse, vp);
cm.dispose();
} else if (choice == 1) {
// Leaf for Cash
if (useVP) {
cm.getClient().useVotePoints(1);
} else {
cm.gainItem(itemToUse, -1);
}
cm.getPlayer().getCashShop().gainCash(1, nxAmount);
const PacketCreator = Java.type('tools.PacketCreator');
cm.getPlayer().sendPacket(PacketCreator.earnTitleMessage("You have earned " + nxAmount + " NX"));
cm.logLeaf(nxAmount + " NX");
cm.dispose();
} else if (choice == 2) {
if (!cm.getPlayer().getInventory(InventoryType.SETUP).isFull(chairAmount)) {
var chairStr = "";
for (var i = 0; i < chairAmount; i++) {
var chair = chairs[Math.floor(Math.random() * chairs.length)];
cm.gainItem(chair, 1, true);
chairStr += chair + " ";
}
if (useVP) {
cm.getClient().useVotePoints(1);
} else {
cm.gainItem(itemToUse, -1);
}
cm.logLeaf("Chair ID: " + chairStr);
cm.dispose();
} else {
cm.sendOk("Please make sure you have enough space to hold the items!");
}
} else if (choice == 3) {
if (!cm.getPlayer().getInventory(InventoryType.EQUIP).isFull(weaponAmount)) {
var weaponStr = "";
for (var i = 0; i < weaponAmount; i++) {
var weapon = weapons[Math.floor(Math.random() * weapons.length)];
cm.gainItem(weapon, 1, true, true);
weaponStr += weapon + " ";
}
if (useVP) {
cm.getClient().useVotePoints(1);
} else {
cm.gainItem(itemToUse, -1);
}
cm.logLeaf("Maple Weapon IDs: " + weaponStr);
cm.dispose();
} else {
cm.sendOk("Please make sure you have enough space to hold the items!");
}
} else if (choice == 4) {
if (!cm.getPlayer().getInventory(InventoryType.USE).isFull(2)) {
cm.gainItem(buff1ID, buffAmount, true);
cm.gainItem(buff2ID, buffAmount, true);
cm.gainItem(itemToUse, -1);
cm.logLeaf(buffAmount + " cheeses and apples");
cm.dispose();
} else {
cm.sendOk("Please make sure you have enough space to hold the items!");
}
} else if (choice == 5) {
if (!cm.haveItem(5030000, 1)) {
if (!cm.getPlayer().getInventory(InventoryType.CASH).isFull(1)) {
cm.gainItem(5030000, 1, false, true, 1000 * 60 * 60 * 24 * hiredMerchantLength);
if (useVP) {
cm.getClient().useVotePoints(1);
} else {
cm.gainItem(itemToUse, -1);
}
cm.logLeaf(hiredMerchantLength + " day hired merchant");
cm.dispose();
} else {
cm.sendOk("Please make sure you have enough space to hold these items!");
}
} else {
cm.sendOk("I can't give you a merchant if you already have one!");
}
}
} else {
cm.dispose();
}
}
}

View File

@@ -9,35 +9,35 @@ function start() {
function action(mode, type, selection) {
if (mode == 1) {
status++;
status++;
} else {
if (status <= 1) {
cm.dispose();
return;
}
status--;
if (status <= 1) {
cm.dispose();
return;
}
status--;
}
if (status == 0) {
if(cm.getLevel() >= 20) {
if (cm.getLevel() >= 20) {
cm.sendOk("This training ground is available only for those under level 20.");
cm.dispose();
return;
}
var selStr = "Would you like to go into the Training Center?";
for (var i = 0; i < num; i++) {
selStr += "\r\n#b#L" + i + "#Training Center " + i + " (" + cm.getPlayerCount(map + i) + "/" + maxp + ")#l#k";
}
cm.sendSimple(selStr);
var selStr = "Would you like to go into the Training Center?";
for (var i = 0; i < num; i++) {
selStr += "\r\n#b#L" + i + "#Training Center " + i + " (" + cm.getPlayerCount(map + i) + "/" + maxp + ")#l#k";
}
cm.sendSimple(selStr);
} else if (status == 1) {
if (selection < 0 || selection >= num) {
cm.dispose();
} else if (cm.getPlayerCount(map + selection) >= maxp) {
cm.sendNext("This training center is full.");
status = -1;
} else {
cm.warp(map + selection, 0);
cm.dispose();
}
if (selection < 0 || selection >= num) {
cm.dispose();
} else if (cm.getPlayerCount(map + selection) >= maxp) {
cm.sendNext("This training center is full.");
status = -1;
} else {
cm.warp(map + selection, 0);
cm.dispose();
}
}
}

View File

@@ -9,35 +9,35 @@ function start() {
function action(mode, type, selection) {
if (mode == 1) {
status++;
status++;
} else {
if (status <= 1) {
cm.dispose();
return;
}
status--;
if (status <= 1) {
cm.dispose();
return;
}
status--;
}
if (status == 0) {
if(cm.getLevel() >= 20) {
if (cm.getLevel() >= 20) {
cm.sendOk("This training ground is available only for those under level 20.");
cm.dispose();
return;
}
var selStr = "Would you like to go into the Training Center?";
for (var i = 0; i < num; i++) {
selStr += "\r\n#b#L" + i + "#Training Center " + i + " (" + cm.getPlayerCount(map + i) + "/" + maxp + ")#l#k";
}
cm.sendSimple(selStr);
var selStr = "Would you like to go into the Training Center?";
for (var i = 0; i < num; i++) {
selStr += "\r\n#b#L" + i + "#Training Center " + i + " (" + cm.getPlayerCount(map + i) + "/" + maxp + ")#l#k";
}
cm.sendSimple(selStr);
} else if (status == 1) {
if (selection < 0 || selection >= num) {
cm.dispose();
} else if (cm.getPlayerCount(map + selection) >= maxp) {
cm.sendNext("This training center is full.");
status = -1;
} else {
cm.warp(map + selection, 0);
cm.dispose();
}
if (selection < 0 || selection >= num) {
cm.dispose();
} else if (cm.getPlayerCount(map + selection) >= maxp) {
cm.sendNext("This training center is full.");
status = -1;
} else {
cm.warp(map + selection, 0);
cm.dispose();
}
}
}

View File

@@ -21,26 +21,29 @@ function action(mode, type, selection) {
cm.dispose();
return;
}
if (mode == 1)
if (mode == 1) {
status++;
else
} else {
status--;
}
if (status == 1) {
var selStr = "";
if (cm.getJobId() == 0)
if (cm.getJobId() == 0) {
selStr += "We have a special 90% discount for beginners.";
}
selStr += "Choose your destination, for fees will change from place to place.#b";
for (var i = 0; i < maps.length; i++)
for (var i = 0; i < maps.length; i++) {
selStr += "\r\n#L" + i + "##m" + maps[i] + "# (" + (cm.getJobId() == 0 ? cost[i] / 10 : cost[i]) + " mesos)#l";
}
cm.sendSimple(selStr);
} else if (status == 2) {
if (maps[selection] == 100000000 && cm.getMapId() == 101000000 && cm.haveItem(4032288)) {
cm.sendYesNo("Hmm, I see you have been recommended by Neinheart to come to Victoria Island to improve your knightly skills. Well, just this time the ride will be free of charges. Will you take the ride?");
hasCoupon = true;
} else {
cm.sendYesNo("You don't have anything else to do here, huh? Do you really want to go to #b#m" + maps[selection] + "##k? It'll cost you #b"+ (cm.getJobId() == 0 ? cost[selection] / 10 : cost[selection]) + " mesos#k.");
cm.sendYesNo("You don't have anything else to do here, huh? Do you really want to go to #b#m" + maps[selection] + "##k? It'll cost you #b" + (cm.getJobId() == 0 ? cost[selection] / 10 : cost[selection]) + " mesos#k.");
}
selectedMap = selection;
} else if (status == 3) {
if (!hasCoupon) {
@@ -60,7 +63,7 @@ function action(mode, type, selection) {
} else {
cm.gainItem(4032288, -1);
}
cm.warp(maps[selectedMap], 0);
cm.dispose();
}

View File

@@ -27,7 +27,7 @@
*/
status = -1;
actionx = {"1stJob" : false, "2ndjob" : false, "3thJobI" : false, "3thJobC" : false};
actionx = {"1stJob": false, "2ndjob": false, "3thJobI": false, "3thJobC": false};
job = 210;
spawnPnpc = false;
@@ -38,12 +38,12 @@ function start() {
const GameConstants = Java.type('constants.game.GameConstants');
if (parseInt(cm.getJobId() / 100) == jobType && cm.canSpawnPlayerNpc(GameConstants.getHallOfFameMapid(cm.getJob()))) {
spawnPnpc = true;
var sendStr = "You have walked a long way to reach the power, wisdom and courage you hold today, haven't you? What do you say about having right now #ra NPC on the Hall of Fame holding the current image of your character#k? Do you like it?";
if(spawnPnpcFee > 0) {
if (spawnPnpcFee > 0) {
sendStr += " I can do it for you, for the fee of #b " + cm.numberWithCommas(spawnPnpcFee) + " mesos.#k";
}
cm.sendYesNo(sendStr);
} else {
if (cm.getJobId() == 0) {
@@ -51,20 +51,21 @@ function start() {
cm.sendNext("Want to be a #rmagician#k? There are some standards to meet. because we can't just accept EVERYONE in... #bYour level should be at least 8#k, with getting " + cm.getFirstJobStatRequirement(jobType) + " as your top priority. Let's see."); // thanks Vcoc for noticing a need to state and check requirements on first job adv starting message
} else if (cm.getLevel() >= 30 && cm.getJobId() == 200) {
actionx["2ndJob"] = true;
if (cm.haveItem(4031012))
if (cm.haveItem(4031012)) {
cm.sendNext("I see you have done well. I will allow you to take the next step on your long road.");
else if (cm.haveItem(4031009)){
} else if (cm.haveItem(4031009)) {
cm.sendOk("Go and see the #b#p1072001##k.");
cm.dispose();
} else
} else {
cm.sendNext("The progress you have made is astonishing.");
} else if (actionx["3thJobI"] || (cm.getPlayer().gotPartyQuestItem("JB3") && cm.getLevel() >= 70 && cm.getJobId() % 10 == 0 && parseInt(cm.getJobId() / 100) == 2 && !cm.getPlayer().gotPartyQuestItem("JBP"))){
}
} else if (actionx["3thJobI"] || (cm.getPlayer().gotPartyQuestItem("JB3") && cm.getLevel() >= 70 && cm.getJobId() % 10 == 0 && parseInt(cm.getJobId() / 100) == 2 && !cm.getPlayer().gotPartyQuestItem("JBP"))) {
actionx["3thJobI"] = true;
cm.sendNext("There you are. A few days ago, #b#p2020009##k of Ossyria talked to me about you. I see that you are interested in making the leap to the enlightened of the third job advancement for magicians. To archieve that goal, I will have to test your strength in order to see whether you are worthy of the advancement. There is an opening in the middle of a deep forest of evil in Victoria Island, where it'll lead you to a secret passage. Once inside, you'll face a clone of myself. Your task is to defeat him and bring #b#t4031059##k back with you.");
} else if (cm.getPlayer().gotPartyQuestItem("JBP") && !cm.haveItem(4031059)){
} else if (cm.getPlayer().gotPartyQuestItem("JBP") && !cm.haveItem(4031059)) {
cm.sendNext("Please, bring me the #b#t4031059##k from my clone. You can find him inside a hole in space which is deep in a forest of evil.");
cm.dispose();
} else if (cm.haveItem(4031059) && cm.getPlayer().gotPartyQuestItem("JBP")){
} else if (cm.haveItem(4031059) && cm.getPlayer().gotPartyQuestItem("JBP")) {
actionx["3thJobC"] = true;
cm.sendNext("Nice work. You have defeated my clone and brought #b#t4031059##k back safely. You have now proven yourself worthy of the 3rd job advancement from the physical standpoint. Now you should give this necklace to #b#p2020011##k in Ossyria to take on the second part of the test. Good luck. You'll need it.");
} else {
@@ -82,14 +83,14 @@ function action(mode, type, selection) {
} else if (mode == 0 && type == 0) {
status -= 2;
}
if (status == -1){
if (status == -1) {
start();
return;
} else {
if(spawnPnpc) {
if(mode > 0) {
if(cm.getMeso() < spawnPnpcFee) {
if (spawnPnpc) {
if (mode > 0) {
if (cm.getMeso() < spawnPnpcFee) {
cm.sendOk("Sorry, you don't have enough mesos to purchase your place on the Hall of Fame.");
cm.dispose();
return;
@@ -97,29 +98,30 @@ function action(mode, type, selection) {
const PlayerNPC = Java.type('server.life.PlayerNPC');
const GameConstants = Java.type('constants.game.GameConstants');
if(PlayerNPC.spawnPlayerNPC(GameConstants.getHallOfFameMapid(cm.getJob()), cm.getPlayer())) {
if (PlayerNPC.spawnPlayerNPC(GameConstants.getHallOfFameMapid(cm.getJob()), cm.getPlayer())) {
cm.sendOk("There you go! Hope you will like it.");
cm.gainMeso(-spawnPnpcFee);
} else {
cm.sendOk("Sorry, the Hall of Fame is currently full...");
}
}
cm.dispose();
return;
} else {
if (mode != 1 || status == 7 || (actionx["1stJob"] && status == 4) || (cm.haveItem(4031008) && status == 2) || (actionx["3thJobI"] && status == 1)){
if (mode == 0 && status == 2 && type == 1)
if (mode != 1 || status == 7 || (actionx["1stJob"] && status == 4) || (cm.haveItem(4031008) && status == 2) || (actionx["3thJobI"] && status == 1)) {
if (mode == 0 && status == 2 && type == 1) {
cm.sendOk("You know there is no other choice...");
if (!(mode == 0 && type == 0)){
}
if (!(mode == 0 && type == 0)) {
cm.dispose();
return;
}
}
}
}
if (actionx["1stJob"]){
if (actionx["1stJob"]) {
if (status == 0) {
if (cm.getLevel() >= 8 && cm.canGetFirstJob(jobType)) {
cm.sendYesNo("Oh...! You look like someone that can definitely be a part of us... all you need is a little sinister mind, and... yeah... so, what do you think? Wanna be the Magician?");
@@ -127,9 +129,9 @@ function action(mode, type, selection) {
cm.sendOk("Train a bit more until you reach the base requirements and I can show you the way of the #rMagician#k.");
cm.dispose();
}
} else if (status == 1){
if (cm.canHold(1372043)){
if (cm.getJobId() == 0){
} else if (status == 1) {
if (cm.canHold(1372043)) {
if (cm.getJobId() == 0) {
cm.changeJobById(200);
cm.gainItem(1372043, 1);
cm.resetStats();
@@ -139,78 +141,86 @@ function action(mode, type, selection) {
cm.sendNext("Make some room in your inventory and talk back to me.");
cm.dispose();
}
} else if (status == 2)
} else if (status == 2) {
cm.sendNextPrev("You've gotten much stronger now. Plus every single one of your inventories have added slots. A whole row, to be exact. Go see for it yourself. I just gave you a little bit of #bSP#k. When you open up the #bSkill#k menu on the lower left corner of the screen, there are skills you can learn by using SP's. One warning, though: You can't raise it all together all at once. There are also skills you can acquire only after having learned a couple of skills first.");
else if (status == 3)
} else if (status == 3) {
cm.sendNextPrev("But remember, skills aren't everything. Your stats should support your skills as a Magician, also. Magicians use INT as their main stat, and LUK as their secondary stat. If raising stats is difficult, just use #bAuto-Assign#k");
else if (status == 4)
} else if (status == 4) {
cm.sendNextPrev("Now, one more word of warning to you. If you fail in battle from this point on, you will lose a portion of your total EXP. Be extra mindful of this, since you have less HP than most.");
else if (status == 5)
} else if (status == 5) {
cm.sendNextPrev("This is all I can teach you. Good luck on your journey, young Magician.");
else
} else {
cm.dispose();
} else if(actionx["2ndJob"]){
if (status == 0){
if (cm.haveItem(4031012))
}
} else if (actionx["2ndJob"]) {
if (status == 0) {
if (cm.haveItem(4031012)) {
cm.sendSimple("Alright, when you have made your decision, click on [I'll choose my occupation] at the bottom.#b\r\n#L0#Please explain to me what being the Wizard (Fire / Poison) is all about.\r\n#L1#Please explain to me what being the Wizard (Ice / Lighting) is all about.\r\n#L2#Please explain to me what being the Cleric is all about.\r\n#L3#I'll choose my occupation!");
else {
} else {
cm.sendNext("Good decision. You look strong, but I need to see if you really are strong enough to pass the test, it's not a difficult test, so you'll do just fine. Here, take my letter first... make sure you don't lose it!");
if(!cm.isQuestStarted(100006)) cm.startQuest(100006);
}
} else if (status == 1){
if (!cm.haveItem(4031012)){
if (cm.canHold(4031009)){
if(!cm.haveItem(4031009))
if (!cm.isQuestStarted(100006)) {
cm.startQuest(100006);
}
}
} else if (status == 1) {
if (!cm.haveItem(4031012)) {
if (cm.canHold(4031009)) {
if (!cm.haveItem(4031009)) {
cm.gainItem(4031009, 1);
}
cm.sendNextPrev("Please get this letter to #b#p1072001##k who's around #b#m101020000##k near Ellinia. He is taking care of the job of an instructor in place of me. Give him the letter and he'll test you in place of me. Best of luck to you.");
} else {
cm.sendNext("Please, make some space in your inventory.");
cm.dispose();
}
}else{
if (selection < 3){
if(selection == 0) {
} else {
if (selection < 3) {
if (selection == 0) {
cm.sendNext("Magicians that master #rFire/Poison-based magic#k.\r\n\r\n#bWizards#k are a active class that deal magical, elemental damage. These abilities grants them a significant advantage against enemies weak to their element. With their skills #rMeditation#k and #rSlow#k, #bWizards#k can increase their magic attack and reduce the opponent's mobility. #bFire/Poison Wizards#k contains a powerful flame arrow attack and poison attack."); //f/p mage
} else if(selection == 1) {
} else if (selection == 1) {
cm.sendNext("Magicians that master #rIce/Lightning-based magic#k.\r\n\r\n#bWizards#k are a active class that deal magical, elemental damage. These abilities grants them a significant advantage against enemies weak to their element. With their skills #rMeditation#k and #rSlow#k, #bWizards#k can increase their magic attack and reduce the opponent's mobility. #bIce/Lightning Wizards#k have a freezing ice attack and a striking lightning attack."); //i/l mage
} else {
cm.sendNext("Magicians that master #rHoly magic#k.\r\n\r\n#bClerics#k are a powerful supportive class, bound to be accepted into any Party. That's because the have the power to #rHeal#k themselves and others in their party. Using #rBless#k, #bClerics#k can buff the attributes and reduce the amount of damage taken. This class is on worth going for if you find it hard to survive. #bClerics#k are especially effective against undead monsters."); //cleric
}
status -= 2;
} else
} else {
cm.sendSimple("Now... have you made up your mind? Please choose the job you'd like to select for your 2nd job advancement. #b\r\n#L0#Wizard (Fire / Poison)\r\n#L1#Wizard (Ice / Lighting)\r\n#L2#Cleric");
}
}
} else if (status == 2){
if (cm.haveItem(4031009)){
} else if (status == 2) {
if (cm.haveItem(4031009)) {
cm.dispose();
return;
}
job += selection * 10;
cm.sendYesNo("So you want to make the second job advancement as the " + (job == 210 ? "#bWizard (Fire / Poison)#k" : job == 220 ? "#bWizard (Ice / Lighting)#k" : "#bCleric#k") + "? You know you won't be able to choose a different job for the 2nd job advancement once you make your desicion here, right?");
} else if (status == 3){
if (cm.haveItem(4031012))
} else if (status == 3) {
if (cm.haveItem(4031012)) {
cm.gainItem(4031012, -1);
}
cm.completeQuest(100008);
cm.sendNext("Alright, you're the " + (job == 210 ? "#bWizard (Fire / Poison)#k" : job == 220 ? "#bWizard (Ice / Lighting)#k" : "#bCleric#k") + " from here on out. Mages and wizards are the intelligent bunch with incredible magical prowess, able to pierce the mind and the psychological structure of the monsters with ease... please train yourself each and everyday. I'll help you become even stronger than you already are.");
if (cm.getJobId() != job)
if (cm.getJobId() != job) {
cm.changeJobById(job);
} else if (status == 4)
}
} else if (status == 4) {
cm.sendNextPrev("I have just given you a book that gives you the list of skills you can acquire as a " + (job == 210 ? "#bWizard (Fire / Poison)#k" : job == 220 ? "#bWizard (Ice / Lighting)#k" : "#bCleric#k") + ". Also your etc inventory has expanded by adding another row to it. Your max HP and MP have increased, too. Go check and see for it yourself.");
else if (status == 5)
} else if (status == 5) {
cm.sendNextPrev("I have also given you a little bit of #bSP#k. Open the #bSkill Menu#k located at the bottomleft corner. you'll be able to boost up the newer acquired 2nd level skills. A word of warning, though. You can't boost them up all at once. Some of the skills are only available after you have learned other skills. Make sure you remember that.");
else if (status == 6)
} else if (status == 6) {
cm.sendNextPrev((job == 210 ? "Wizard (Fire / Poison)" : job == 220 ? "Wizard (Ice / Lighting)" : "Cleric") + " need to be strong. But remember that you can't abuse that power and use it on a weakling. Please use your enormous power the right way, because... for you to use that the right way, that is much harden than just getting stronger. Please find me after you have advanced much further. I'll be waiting for you.");
} else if (actionx["3thJobI"]){
if (status == 0){
if (cm.getPlayer().gotPartyQuestItem("JB3")){
}
} else if (actionx["3thJobI"]) {
if (status == 0) {
if (cm.getPlayer().gotPartyQuestItem("JB3")) {
cm.getPlayer().removePartyQuestItem("JB3");
cm.getPlayer().removePartyQuestItem("JB3");
cm.getPlayer().setPartyQuestItemObtained("JBP");
}
cm.sendNextPrev("Since he is a clone of myself, you can expect a tough battle ahead. He uses a number of special attacking skills unlike any you have ever seen, and it is your task to successfully take him one on one. There is a time limit in the secret passage, so it is crucial that you defeat him within the time limit. I wish you the best of luck, and I hope you bring the #b#t4031059##k with you.");
}
} else if (actionx["3thJobC"]){
} else if (actionx["3thJobC"]) {
cm.getPlayer().removePartyQuestItem("JBP");
cm.gainItem(4031059, -1);
cm.gainItem(4031057, 1);

View File

@@ -45,182 +45,171 @@ function start() {
}
function action(mode, type, selection) {
if (mode == 1)
if (mode == 1) {
status++;
else
} else {
cm.dispose();
}
if (status == 0 && mode == 1) {
var selStr = "Welcome to my eco-safe refining operation! What would you like today?#b"
var options = new Array("Make a glove","Upgrade a glove","Upgrade a hat","Make a wand","Make a staff");
for (var i = 0; i < options.length; i++){
var options = ["Make a glove", "Upgrade a glove", "Upgrade a hat", "Make a wand", "Make a staff"];
for (var i = 0; i < options.length; i++) {
selStr += "\r\n#L" + i + "# " + options[i] + "#l";
}
cm.sendSimple(selStr);
}
else if (status == 1 && mode == 1) {
} else if (status == 1 && mode == 1) {
selectedType = selection;
if (selectedType == 0){ //glove refine
if (selectedType == 0) { //glove refine
var selStr = "So, what kind of glove would you like me to make?#b";
var items = new Array ("Lemona#k - Magician Lv. 15#b","Blue Morrican#k - Magician Lv. 20#b","Ocean Mesana#k - Magician Lv. 25#b","Red Lutia#k - Magician Lv. 30#b","Red Noel#k - Magician Lv. 35#b","Red Arten#k - Magician Lv. 40#b",
"Red Pennance#k - Magician Lv. 50#b","Steel Manute#k - Magician Lv. 60#b");
for (var i = 0; i < items.length; i++){
var items = ["Lemona#k - Magician Lv. 15#b", "Blue Morrican#k - Magician Lv. 20#b", "Ocean Mesana#k - Magician Lv. 25#b", "Red Lutia#k - Magician Lv. 30#b", "Red Noel#k - Magician Lv. 35#b", "Red Arten#k - Magician Lv. 40#b",
"Red Pennance#k - Magician Lv. 50#b", "Steel Manute#k - Magician Lv. 60#b"];
for (var i = 0; i < items.length; i++) {
selStr += "\r\n#L" + i + "# " + items[i] + "#l";
}
cm.sendSimple(selStr);
}
else if (selectedType == 1){ //glove upgrade
} else if (selectedType == 1) { //glove upgrade
var selStr = "So, what kind of glove are you looking to upgrade to?#b";
var items = new Array ("Green Morrican#k - Magician Lv. 20#b","Purple Morrican#k - Magician Lv. 20#b","Blood Mesana#k - Magician Lv. 25#b","Dark Mesana#k - Magician Lv. 25#b","Blue Lutia#k - Magician Lv. 30#b","Black Lutia#k - Magician Lv. 30#b",
"Blue Noel#k - Magician Lv. 35#b","Dark Noel#k - Magician Lv. 35#b","Blue Arten#k - Magician Lv. 40#b","Dark Arten#k - Magician Lv. 40#b","Blue Pennance#k - Magician Lv. 50#b","Dark Pennance#k - Magician Lv. 50#b",
"Gold Manute#k - Magician Lv. 60#b","Dark Manute#k - Magician Lv. 60#b");
for (var i = 0; i < items.length; i++){
var items = ["Green Morrican#k - Magician Lv. 20#b", "Purple Morrican#k - Magician Lv. 20#b", "Blood Mesana#k - Magician Lv. 25#b", "Dark Mesana#k - Magician Lv. 25#b", "Blue Lutia#k - Magician Lv. 30#b", "Black Lutia#k - Magician Lv. 30#b",
"Blue Noel#k - Magician Lv. 35#b", "Dark Noel#k - Magician Lv. 35#b", "Blue Arten#k - Magician Lv. 40#b", "Dark Arten#k - Magician Lv. 40#b", "Blue Pennance#k - Magician Lv. 50#b", "Dark Pennance#k - Magician Lv. 50#b",
"Gold Manute#k - Magician Lv. 60#b", "Dark Manute#k - Magician Lv. 60#b"];
for (var i = 0; i < items.length; i++) {
selStr += "\r\n#L" + i + "# " + items[i] + "#l";
}
cm.sendSimple(selStr);
}
else if (selectedType == 2){ //hat upgrade
} else if (selectedType == 2) { //hat upgrade
var selStr = "A hat? Which one were you thinking of?#b";
var items = new Array ("Steel Pride#k - Magician Lv. 30#b","Golden Pride#k - Magician Lv. 30#b");
for (var i = 0; i < items.length; i++){
var items = ["Steel Pride#k - Magician Lv. 30#b", "Golden Pride#k - Magician Lv. 30#b"];
for (var i = 0; i < items.length; i++) {
selStr += "\r\n#L" + i + "# " + items[i] + "#l";
}
cm.sendSimple(selStr);
}
else if (selectedType == 3){ //wand refine
} else if (selectedType == 3) { //wand refine
var selStr = "A wand, huh? Prefer the smaller weapon that fits in your pocket? Which type are you seeking?#b";
var items = new Array ("Wooden Wand#k - Common Lv. 8#b","Hardwood Wand#k - Common Lv. 13#b","Metal Wand#k - Common Lv. 18#b","Ice Wand#k - Magician Lv. 23#b","Mithril Wand#k - Magician Lv. 28#b",
"Wizard Wand#k - Magician Lv. 33#b","Fairy Wand#k - Magician Lv. 38#b","Cromi#k - Magician Lv. 48#b");
for (var i = 0; i < items.length; i++){
var items = ["Wooden Wand#k - Common Lv. 8#b", "Hardwood Wand#k - Common Lv. 13#b", "Metal Wand#k - Common Lv. 18#b", "Ice Wand#k - Magician Lv. 23#b", "Mithril Wand#k - Magician Lv. 28#b",
"Wizard Wand#k - Magician Lv. 33#b", "Fairy Wand#k - Magician Lv. 38#b", "Cromi#k - Magician Lv. 48#b"];
for (var i = 0; i < items.length; i++) {
selStr += "\r\n#L" + i + "# " + items[i] + "#l";
}
cm.sendSimple(selStr);
}
else if (selectedType == 4){ //staff refine
} else if (selectedType == 4) { //staff refine
var selStr = "Ah, a staff, a great symbol of one's power! Which are you looking to make?#b";
var items = new Array ("Wooden Staff#k - Magician Lv. 10#b","Sapphire Staff#k - Magician Lv. 15#b","Emerald Staff#k - Magician Lv. 15#b","Old Wooden Staff#k - Magician Lv. 20#b","Wizard Staff#k - Magician Lv. 25#b",
"Arc Staff#k - Magician Lv. 45#b");
for (var i = 0; i < items.length; i++){
var items = ["Wooden Staff#k - Magician Lv. 10#b", "Sapphire Staff#k - Magician Lv. 15#b", "Emerald Staff#k - Magician Lv. 15#b", "Old Wooden Staff#k - Magician Lv. 20#b", "Wizard Staff#k - Magician Lv. 25#b",
"Arc Staff#k - Magician Lv. 45#b"];
for (var i = 0; i < items.length; i++) {
selStr += "\r\n#L" + i + "# " + items[i] + "#l";
}
cm.sendSimple(selStr);
}
}
else if (status == 2 && mode == 1) {
} else if (status == 2 && mode == 1) {
selectedItem = selection;
if (selectedType == 0){ //glove refine
var itemSet = new Array(1082019,1082020,1082026,1082051,1082054,1082062,1082081,1082086);
var matSet = new Array(4000021,new Array(4000021,4011001),new Array(4000021,4011006),new Array(4000021,4021006,4021000),new Array(4000021,4011006,4011001,4021000),
new Array(4000021,4021000,4021006,4003000),new Array(4021000,4011006,4000030,4003000),new Array(4011007,4011001,4021007,4000030,4003000));
var matQtySet = new Array(15,new Array(30,1),new Array(50,2),new Array(60,1,2),new Array(70,1,3,2),new Array(80,3,3,30),new Array(3,2,35,40),new Array(1,8,1,50,50));
var costSet = new Array(7000,15000,20000,25000,30000,40000,50000,70000);
if (selectedType == 0) { //glove refine
var itemSet = [1082019, 1082020, 1082026, 1082051, 1082054, 1082062, 1082081, 1082086];
var matSet = [4000021, [4000021, 4011001], [4000021, 4011006], [4000021, 4021006, 4021000], [4000021, 4011006, 4011001, 4021000],
[4000021, 4021000, 4021006, 4003000], [4021000, 4011006, 4000030, 4003000], [4011007, 4011001, 4021007, 4000030, 4003000]];
var matQtySet = [15, [30, 1], [50, 2], [60, 1, 2], [70, 1, 3, 2], [80, 3, 3, 30], [3, 2, 35, 40], [1, 8, 1, 50, 50]];
var costSet = [7000, 15000, 20000, 25000, 30000, 40000, 50000, 70000];
item = itemSet[selectedItem];
mats = matSet[selectedItem];
matQty = matQtySet[selectedItem];
cost = costSet[selectedItem];
} else if (selectedType == 1) { //glove upgrade
var itemSet = [1082021, 1082022, 1082027, 1082028, 1082052, 1082053, 1082055, 1082056, 1082063, 1082064, 1082082, 1082080, 1082087, 1082088];
var matSet = [[1082020, 4011001], [1082020, 4021001], [1082026, 4021000], [1082026, 4021008], [1082051, 4021005],
[1082051, 4021008], [1082054, 4021005], [1082054, 4021008], [1082062, 4021002], [1082062, 4021008],
[1082081, 4021002], [1082081, 4021008], [1082086, 4011004, 4011006], [1082086, 4021008, 4011006]];
var matQtySet = [[1, 1], [1, 2], [1, 3], [1, 1], [1, 3], [1, 1], [1, 3], [1, 1], [1, 4],
[1, 2], [1, 5], [1, 3], [1, 3, 5], [1, 2, 3]];
var costSet = [20000, 25000, 30000, 40000, 35000, 40000, 40000, 45000, 45000, 50000, 55000, 60000, 70000, 80000];
item = itemSet[selectedItem];
mats = matSet[selectedItem];
matQty = matQtySet[selectedItem];
cost = costSet[selectedItem];
} else if (selectedType == 2) { //hat upgrade
var itemSet = [1002065, 1002013];
var matSet = [[1002064, 4011001], [1002064, 4011006]];
var matQtySet = [[1, 3], [1, 3]];
var costSet = [40000, 50000];
item = itemSet[selectedItem];
mats = matSet[selectedItem];
matQty = matQtySet[selectedItem];
cost = costSet[selectedItem];
} else if (selectedType == 3) { //wand refine
var itemSet = [1372005, 1372006, 1372002, 1372004, 1372003, 1372001, 1372000, 1372007];
var matSet = [4003001, [4003001, 4000001], [4011001, 4000009, 4003000], [4011002, 4003002, 4003000], [4011002, 4021002, 4003000],
[4021006, 4011002, 4011001, 4003000], [4021006, 4021005, 4021007, 4003003, 4003000], [4011006, 4021003, 4021007, 4021002, 4003002, 4003000]];
var matQtySet = [5, [10, 50], [1, 30, 5], [2, 1, 10], [3, 1, 10], [5, 3, 1, 15], [5, 5, 1, 1, 20], [4, 3, 2, 1, 1, 30]];
var costSet = [1000, 3000, 5000, 12000, 30000, 60000, 120000, 200000];
item = itemSet[selectedItem];
mats = matSet[selectedItem];
matQty = matQtySet[selectedItem];
cost = costSet[selectedItem];
} else if (selectedType == 4) { //staff refine
var itemSet = [1382000, 1382003, 1382005, 1382004, 1382002, 1382001];
var matSet = [4003001, [4021005, 4011001, 4003000], [4021003, 4011001, 4003000], [4003001, 4011001, 4003000],
[4021006, 4021001, 4011001, 4003000], [4011001, 4021006, 4021001, 4021005, 4003000, 4000010, 4003003]];
var matQtySet = [5, [1, 1, 5], [1, 1, 5], [50, 1, 10], [2, 1, 1, 15], [8, 5, 5, 5, 30, 50, 1]];
var costSet = [2000, 2000, 2000, 5000, 12000, 180000];
item = itemSet[selectedItem];
mats = matSet[selectedItem];
matQty = matQtySet[selectedItem];
cost = costSet[selectedItem];
}
else if (selectedType == 1){ //glove upgrade
var itemSet = new Array(1082021,1082022,1082027,1082028,1082052,1082053,1082055,1082056,1082063,1082064,1082082,1082080,1082087,1082088);
var matSet = new Array(new Array(1082020,4011001),new Array(1082020,4021001),new Array(1082026,4021000),new Array(1082026,4021008),new Array(1082051,4021005),
new Array(1082051,4021008),new Array(1082054,4021005),new Array(1082054,4021008),new Array(1082062,4021002),new Array(1082062,4021008),
new Array(1082081,4021002),new Array(1082081,4021008),new Array(1082086,4011004,4011006),new Array(1082086,4021008,4011006));
var matQtySet = new Array(new Array(1,1),new Array(1,2),new Array(1,3),new Array(1,1),new Array(1,3),new Array(1,1),new Array(1,3),new Array(1,1),new Array(1,4),
new Array(1,2),new Array(1,5),new Array(1,3),new Array(1,3,5),new Array(1,2,3));
var costSet = new Array (20000,25000,30000,40000,35000,40000,40000,45000,45000,50000,55000,60000,70000,80000);
item = itemSet[selectedItem];
mats = matSet[selectedItem];
matQty = matQtySet[selectedItem];
cost = costSet[selectedItem];
}
else if (selectedType == 2){ //hat upgrade
var itemSet = new Array(1002065,1002013);
var matSet = new Array(new Array(1002064,4011001),new Array(1002064,4011006));
var matQtySet = new Array(new Array(1,3),new Array(1,3));
var costSet = new Array(40000,50000);
item = itemSet[selectedItem];
mats = matSet[selectedItem];
matQty = matQtySet[selectedItem];
cost = costSet[selectedItem];
}
else if (selectedType == 3){ //wand refine
var itemSet = new Array (1372005,1372006,1372002,1372004,1372003,1372001,1372000,1372007);
var matSet = new Array(4003001,new Array(4003001,4000001),new Array(4011001,4000009,4003000),new Array(4011002,4003002,4003000),new Array(4011002,4021002,4003000),
new Array(4021006,4011002,4011001,4003000),new Array(4021006,4021005,4021007,4003003,4003000),new Array(4011006,4021003,4021007,4021002,4003002,4003000));
var matQtySet = new Array (5,new Array(10,50),new Array(1,30,5),new Array(2,1,10),new Array(3,1,10),new Array(5,3,1,15),new Array(5,5,1,1,20),new Array(4,3,2,1,1,30));
var costSet = new Array (1000,3000,5000,12000,30000,60000,120000,200000);
item = itemSet[selectedItem];
mats = matSet[selectedItem];
matQty = matQtySet[selectedItem];
cost = costSet[selectedItem];
}
else if (selectedType == 4){ //staff refine
var itemSet = new Array (1382000,1382003,1382005,1382004,1382002,1382001);
var matSet = new Array(4003001,new Array(4021005,4011001,4003000),new Array(4021003,4011001,4003000),new Array(4003001,4011001,4003000),
new Array(4021006,4021001,4011001,4003000),new Array(4011001,4021006,4021001,4021005,4003000,4000010,4003003));
var matQtySet = new Array (5,new Array(1,1,5),new Array(1,1,5),new Array(50,1,10),new Array(2,1,1,15),new Array(8,5,5,5,30,50,1));
var costSet = new Array (2000,2000,2000,5000,12000,180000);
item = itemSet[selectedItem];
mats = matSet[selectedItem];
matQty = matQtySet[selectedItem];
cost = costSet[selectedItem];
}
var prompt = "You want me to make a #t" + item + "#? In that case, I'm going to need specific items from you in order to make it. Make sure you have room in your inventory, though!#b";
if (mats instanceof Array){
for(var i = 0; i < mats.length; i++){
prompt += "\r\n#i"+mats[i]+"# " + matQty[i] + " #t" + mats[i] + "#";
if (mats instanceof Array) {
for (var i = 0; i < mats.length; i++) {
prompt += "\r\n#i" + mats[i] + "# " + matQty[i] + " #t" + mats[i] + "#";
}
} else {
prompt += "\r\n#i" + mats + "# " + matQty + " #t" + mats + "#";
}
else {
prompt += "\r\n#i"+mats+"# " + matQty + " #t" + mats + "#";
}
if (cost > 0)
if (cost > 0) {
prompt += "\r\n#i4031138# " + cost + " meso";
}
cm.sendYesNo(prompt);
}
else if (status == 3 && mode == 1) {
} else if (status == 3 && mode == 1) {
var complete = true;
if(!cm.canHold(item, 1)) {
if (!cm.canHold(item, 1)) {
cm.sendOk("Check your inventory for a free slot first.");
cm.dispose();
return;
}
else if (cm.getMeso() < cost)
{
} else if (cm.getMeso() < cost) {
cm.sendOk("Sorry, but all of us need money to live. Come back when you can pay my fees, yes?")
cm.dispose();
return;
}
else
{
} else {
if (mats instanceof Array) {
for(var i = 0; complete && i < mats.length; i++)
if (!cm.haveItem(mats[i], matQty[i]))
for (var i = 0; complete && i < mats.length; i++) {
if (!cm.haveItem(mats[i], matQty[i])) {
complete = false;
}
else if (!cm.haveItem(mats, matQty))
}
}
} else if (!cm.haveItem(mats, matQty)) {
complete = false;
}
}
if (!complete)
if (!complete) {
cm.sendOk("Uhm... I don't keep extra material on me. Sorry. ");
else {
} else {
if (mats instanceof Array) {
for (var i = 0; i < mats.length; i++){
for (var i = 0; i < mats.length; i++) {
cm.gainItem(mats[i], -matQty[i]);
}
}
else
} else {
cm.gainItem(mats, -matQty);
if (cost > 0)
}
if (cost > 0) {
cm.gainMeso(-cost);
}
cm.gainItem(item, 1);
cm.sendOk("It's a success! Oh, I've never felt so alive! Please come back again!");
}

View File

@@ -21,15 +21,15 @@
*/
/**
-- Odin JavaScript --------------------------------------------------------------------------------
Shane - Ellinia (101000000)
-- By ---------------------------------------------------------------------------------------------
Unknown
-- Version Info -----------------------------------------------------------------------------------
1.1 - Statement fix [Information]
1.0 - First Version by Unknown
---------------------------------------------------------------------------------------------------
**/
-- Odin JavaScript --------------------------------------------------------------------------------
Shane - Ellinia (101000000)
-- By ---------------------------------------------------------------------------------------------
Unknown
-- Version Info -----------------------------------------------------------------------------------
1.1 - Statement fix [Information]
1.0 - First Version by Unknown
---------------------------------------------------------------------------------------------------
**/
var status = 0;
var check = 0;
@@ -39,9 +39,9 @@ function start() {
cm.sendOk("You must be a higher level to enter the Forest of Patience.");
cm.dispose();
check = 1;
}
else
} else {
cm.sendYesNo("Hi, i'm Shane. I can let you into the Forest of Patience for a small fee. Would you like to enter for #b5000#k mesos?");
}
}
function action(mode, type, selection) {
@@ -53,25 +53,26 @@ function action(mode, type, selection) {
cm.dispose();
return;
}
if (mode == 1)
if (mode == 1) {
status++;
else
} else {
status--;
}
if (status == 1) {
if (check != 1) {
if (cm.getPlayer().getMeso() < 5000) {
cm.sendOk("Sorry but it doesn't like you have enough mesos!")
cm.dispose();
}
else {
if (cm.isQuestStarted(2050))
} else {
if (cm.isQuestStarted(2050)) {
cm.warp(101000100, 0);
else if (cm.isQuestStarted(2051))
} else if (cm.isQuestStarted(2051)) {
cm.warp(101000102, 0);
else if (cm.getLevel() >= 25 && cm.getLevel() < 50)
} else if (cm.getLevel() >= 25 && cm.getLevel() < 50) {
cm.warp(101000100, 0);
else if (cm.getLevel() >= 50)
} else if (cm.getLevel() >= 50) {
cm.warp(101000102, 0);
}
cm.gainMeso(-5000);
cm.dispose();
}

View File

@@ -19,6 +19,7 @@
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/>.
*/
/* Shane 1032004
* @Author Moogra
*/
@@ -28,7 +29,8 @@ function start() {
}
function action(mode, type, selection) {
if (mode > 0)
cm.warp(101000000,0);
if (mode > 0) {
cm.warp(101000000, 0);
}
cm.dispose();
}

View File

@@ -20,14 +20,14 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
-- Odin JavaScript --------------------------------------------------------------------------------
VIP Cab - Victoria Road : Ellinia (101000000)
-- By ---------------------------------------------------------------------------------------------
Xterminator
-- Version Info -----------------------------------------------------------------------------------
1.0 - First Version by Xterminator
---------------------------------------------------------------------------------------------------
**/
-- Odin JavaScript --------------------------------------------------------------------------------
VIP Cab - Victoria Road : Ellinia (101000000)
-- By ---------------------------------------------------------------------------------------------
Xterminator
-- Version Info -----------------------------------------------------------------------------------
1.0 - First Version by Xterminator
---------------------------------------------------------------------------------------------------
**/
var status = 0;
var cost = 10000;
@@ -38,21 +38,21 @@ function start() {
function action(mode, type, selection) {
status++;
if (mode == -1){
if (mode == -1) {
cm.dispose();
return;
} else if (mode == 0) {
cm.sendOk("This town also has a lot to offer. Find us if and when you feel the need to go to the Ant Tunnel Park.");
cm.dispose();
return;
cm.dispose();
return;
}
if (status == 1) {
cm.sendYesNo(cm.getJobId() == 0 ? "We have a special 90% discount for beginners. The Ant Tunnel is located deep inside in the dungeon that's placed at the center of the Victoria Island, where the 24 Hr Mobile Store is. Would you like to go there for #b1,000 mesos#k?" : "The regular fee applies for all non-beginners. The Ant Tunnel is located deep inside in the dungeon that's placed at the center of the Victoria Island, where 24 Hr Mobile Store is. Would you like to go there for #b10,000 mesos#k?");
cost /= ((cm.getJobId() == 0) ? 10 : 1);
} else if (status == 2) {
if (cm.getMeso() < cost)
if (cm.getMeso() < cost) {
cm.sendNext("It looks like you don't have enough mesos. Sorry but you won't be able to use this without it.")
else {
} else {
cm.gainMeso(-cost);
cm.warp(105070001);
}

View File

@@ -2,26 +2,26 @@ var status = 0;
var cost = 5000;
function start() {
cm.sendYesNo("Hello, I'm in charge of selling tickets for the ship ride to Orbis Station of Ossyria. The ride to Orbis takes off every 15 minutes, beginning on the hour, and it'll cost you #b"+cost+" mesos#k. Are you sure you want to purchase #b#t4031045##k?");
cm.sendYesNo("Hello, I'm in charge of selling tickets for the ship ride to Orbis Station of Ossyria. The ride to Orbis takes off every 15 minutes, beginning on the hour, and it'll cost you #b" + cost + " mesos#k. Are you sure you want to purchase #b#t4031045##k?");
}
function action(mode, type, selection) {
if(mode == -1)
if (mode == -1) {
cm.dispose();
else {
if(mode == 0) {
} else {
if (mode == 0) {
cm.sendNext("You must have some business to take care of here, right?");
cm.dispose();
return;
}
status++;
if(status == 1) {
if (status == 1) {
if (cm.getMeso() >= cost && cm.canHold(4031045)) {
cm.gainItem(4031045,1);
cm.gainItem(4031045, 1);
cm.gainMeso(-cost);
cm.dispose();
} else {
cm.sendOk("Are you sure you have #b"+cost+" mesos#k? If so, then I urge you to check your etc. inventory, and see if it's full or not.");
cm.sendOk("Are you sure you have #b" + cost + " mesos#k? If so, then I urge you to check your etc. inventory, and see if it's full or not.");
cm.dispose();
}
}

View File

@@ -1,30 +1,30 @@
function start() {
if(cm.haveItem(4031045)){
if (cm.haveItem(4031045)) {
var em = cm.getEventManager("Boats");
if (em.getProperty("entry") == "true")
if (em.getProperty("entry") == "true") {
cm.sendYesNo("Do you want to go to Orbis?");
else{
} else {
cm.sendOk("The boat to Orbis is already travelling, please be patient for the next one.");
cm.dispose();
}
}else{
} else {
cm.sendOk("Make sure you got a Orbis ticket to travel in this boat. Check your inventory.");
cm.dispose();
}
}
function action(mode, type, selection) {
if (mode <= 0) {
cm.sendOk("Okay, talk to me if you change your mind!");
cm.dispose();
return;
cm.sendOk("Okay, talk to me if you change your mind!");
cm.dispose();
return;
}
var em = cm.getEventManager("Boats");
if (em.getProperty("entry") == "true") {
cm.warp(101000301);
cm.gainItem(4031045, -1);
cm.dispose();
}
else{
} else {
cm.sendOk("The boat to Orbis is ready to take off, please be patient for the next one.");
cm.dispose();
}

View File

@@ -20,8 +20,8 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
Purin (On Boat ) 1032009
**/
Purin (On Boat ) 1032009
**/
var status = 0;
@@ -38,7 +38,7 @@ function action(mode, type, selection) {
cm.dispose();
} else {
if (status == 1) {
cm.sendNext ("Alright, see you next time. Take care.");
cm.sendNext("Alright, see you next time. Take care.");
status++;
} else if (status == 2) {
cm.warp(101000300, 0);// back to orbis

View File

@@ -20,14 +20,14 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
-- Odin JavaScript --------------------------------------------------------------------------------
Arwen the Fairy - Victoria Road : Ellinia (101000000)
-- By ---------------------------------------------------------------------------------------------
Xterminator
-- Version Info -----------------------------------------------------------------------------------
1.0 - First Version by Xterminator
---------------------------------------------------------------------------------------------------
**/
-- Odin JavaScript --------------------------------------------------------------------------------
Arwen the Fairy - Victoria Road : Ellinia (101000000)
-- By ---------------------------------------------------------------------------------------------
Xterminator
-- Version Info -----------------------------------------------------------------------------------
1.0 - First Version by Xterminator
---------------------------------------------------------------------------------------------------
**/
var status = 0;
var item;
@@ -50,10 +50,11 @@ function action(mode, type, selection) {
cm.dispose();
return;
}
if (mode == 1)
if (mode == 1) {
status++;
else
} else {
status--;
}
if (status == 0) {
if (cm.getLevel() >= 40) {
cm.sendNext("Yeah... I am the master alchemist of the fairies. But the fairies are not supposed to be in contact with a human being for a long period of time... A strong person like you will be fine, though. If you get me the materials, I'll make you a special item.");
@@ -79,8 +80,8 @@ function action(mode, type, selection) {
if (selected == 0) {
if (cm.haveItem(4011000) && cm.haveItem(4011001) && cm.haveItem(4011002) && cm.haveItem(4011003) && cm.haveItem(4011004) && cm.haveItem(4011005) && cm.haveItem(4011006) && cm.getMeso() >= 10000) {
cm.gainMeso(-10000);
for(var i = 4011000; i<4011007; i++) {
cm.gainItem(i,-1);
for (var i = 4011000; i < 4011007; i++) {
cm.gainItem(i, -1);
}
cm.gainItem(4011007, 1);
cm.sendNext("Ok here, take " + item + ". It's well-made, probably because I'm using good materials. If you need my help down the road, feel free to come back.");
@@ -90,8 +91,8 @@ function action(mode, type, selection) {
} else if (selected == 1) {
if (cm.haveItem(4021000) && cm.haveItem(4021001) && cm.haveItem(4021002) && cm.haveItem(4021003) && cm.haveItem(4021004) && cm.haveItem(4021005) && cm.haveItem(4021006) && cm.haveItem(4021007) && cm.haveItem(4021008) && cm.getMeso() >= 15000) {
cm.gainMeso(-15000);
for(var j = 4021000; j<4021009; j++) {
cm.gainItem(j,-1);
for (var j = 4021000; j < 4021009; j++) {
cm.gainItem(j, -1);
}
cm.gainItem(4021009, 1);
cm.sendNext("Ok here, take " + item + ". It's well-made, probably because I'm using good materials. If you need my help down the road, feel free to come back.");
@@ -101,8 +102,8 @@ function action(mode, type, selection) {
} else if (selected == 2) {
if (cm.haveItem(4001006) && cm.haveItem(4011007) && cm.haveItem(4021008) && cm.getMeso() >= 30000) {
cm.gainMeso(-30000);
for(var k = 4001006; k<4021009; k+=10001) {
cm.gainItem(k,-1);
for (var k = 4001006; k < 4021009; k += 10001) {
cm.gainItem(k, -1);
}
cm.gainItem(4031042, 1);
cm.sendNext("Ok here, take " + item + ". It's well-made, probably because I'm using good materials. If you need my help down the road, feel free to come back.");

View File

@@ -12,116 +12,117 @@
var status;
function start() {
status = -1;
action(1, 0, 0);
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();
} else {
if (mode == 0 && type > 0) {
cm.sendOk("Alright, see you next time.");
cm.dispose();
return;
}
if (mode == 1)
status++;
else
status--;
if (status == 0) {
cm.sendYesNo("I am Mar the Fairy. If you have a dragon at level 15 or higher and a rock of evolution, I can evolve your dragon. If you are lucky, you may even get a black one! Would you like me to do so?");
} else if (status == 1) {
if (cm.haveItem(5000028, 1)) {
cm.gainItem(5000028, -1);
cm.gainItem(5000029, 1);
cm.sendOk("I don't know how you got that egg, but it has hatched, apparently!");
cm.dispose();
} else if (cm.getPlayer().getPet(0) == null) {
cm.sendOk("Make sure your pet is equipped on slot 1.");
cm.dispose();
} else if (cm.getPlayer().getPet(0).getItemId() < 5000029 || cm.getPlayer().getPet(0).getItemId() > 5000033 || !cm.haveItem(5380000,1)) {
cm.sendOk("You do not meet the requirements. You need #i5380000##t5380000#, as well as either one of #d#i5000029##t5000029##k, #g#i5000030##t5000030##k, #r#i5000031##t5000031##k, #b#i5000032##t5000032##k, or #e#i5000033##t5000033##n equipped on slot 1. Please come back when you do.");
cm.dispose();
} else if (cm.getPlayer().getPet(0).getLevel() < 15) {
cm.sendOk("Your pet must be level 15 or above to evolve.");
cm.dispose();
} else if (cm.haveItem(5000029,2) || cm.haveItem(5000030,2) || cm.haveItem(5000031,2) || cm.haveItem(5000032,2) || cm.haveItem(5000033,2)) {
cm.sendSimple("You have a dragon which isn't out, and as well as a dragon which is out. I can remove one for you. Remember that the data for the dragon I am removing will be lost.\r\n#r#L0#Remove my CASH first slot.#l#k\r\n#b#L1#Remove the first dragon in my inventory.#l#k\r\n#g#L2#No thanks.#l#k");
} else {
var i;
for(i = 0; i < 3; i++) {
if(cm.getPlayer().getPet(i) != null && cm.getPlayer().getPet(i).getItemId() == 5000029) {
pet = cm.getPlayer().getPet(i);
break;
}
}
if(i == 3) {
cm.sendOk("You either don't have a pet dragon ready to evolve or you lack #b#t5380000##k.");
cm.dispose();
return;
}
var id = cm.getPlayer().getPet(i).getItemId();
//var name = cm.getPlayer().getPet(i).getName();
//var level = cm.getPlayer().getPet(i).getLevel();
//var closeness = cm.getPlayer().getPet(i).getCloseness();
//var fullness = cm.getPlayer().getPet(i).getFullness();
//ItemInformationProvider ii = ItemInformationProvider.getInstance();
if (id < 5000029 || id > 5000033) {
cm.sendOk("Something wrong, try again.");
cm.dispose();
}
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 {
cm.sendOk("Something wrong. Try again.");
cm.dispose();
}
/*if (name.equals(ItemInformationProvider.getInstance().getName(id))) {
name = ItemInformationProvider.getInstance().getName(after);
}*/
cm.gainItem(5380000, -1);
cm.evolvePet(i, after);
cm.sendOk("Your dragon has now evolved!! It used to be a #i" + id + "# #t" + id + "#, and now it's a #i" + after + "# #t" + after + "#!");
cm.dispose();
}
} else if (status == 2) {
if (selection == 0) {
const InventoryManipulator = Java.type('client.inventory.manipulator.InventoryManipulator');
const InventoryType = Java.type('client.inventory.InventoryType');
InventoryManipulator.removeFromSlot(cm.getClient(), InventoryType.CASH, 1, 1, true);
cm.sendOk("Your cash first slot is removed.");
} else if (selection == 1) {
if (cm.haveItem(5000029, 2)) {
cm.gainItem(5000029, -1);
} else if (cm.haveItem(5000030, 2)) {
cm.gainItem(5000030, -1);
} else if (cm.haveItem(5000031, 2)) {
cm.gainItem(5000031, -1);
} else if (cm.haveItem(5000032, 2)) {
cm.gainItem(5000032, -1);
} else if (cm.haveItem(5000033, 2)) {
cm.gainItem(5000033, -1);
}
cm.sendOk("The first dragon in your inventory is removed.");
} else if (selection == 2) {
cm.sendOk("Okay, come back next time.");
}
cm.dispose();
}
}
if (mode == -1) {
cm.dispose();
} else {
if (mode == 0 && type > 0) {
cm.sendOk("Alright, see you next time.");
cm.dispose();
return;
}
if (mode == 1) {
status++;
} else {
status--;
}
if (status == 0) {
cm.sendYesNo("I am Mar the Fairy. If you have a dragon at level 15 or higher and a rock of evolution, I can evolve your dragon. If you are lucky, you may even get a black one! Would you like me to do so?");
} else if (status == 1) {
if (cm.haveItem(5000028, 1)) {
cm.gainItem(5000028, -1);
cm.gainItem(5000029, 1);
cm.sendOk("I don't know how you got that egg, but it has hatched, apparently!");
cm.dispose();
} else if (cm.getPlayer().getPet(0) == null) {
cm.sendOk("Make sure your pet is equipped on slot 1.");
cm.dispose();
} else if (cm.getPlayer().getPet(0).getItemId() < 5000029 || cm.getPlayer().getPet(0).getItemId() > 5000033 || !cm.haveItem(5380000, 1)) {
cm.sendOk("You do not meet the requirements. You need #i5380000##t5380000#, as well as either one of #d#i5000029##t5000029##k, #g#i5000030##t5000030##k, #r#i5000031##t5000031##k, #b#i5000032##t5000032##k, or #e#i5000033##t5000033##n equipped on slot 1. Please come back when you do.");
cm.dispose();
} else if (cm.getPlayer().getPet(0).getLevel() < 15) {
cm.sendOk("Your pet must be level 15 or above to evolve.");
cm.dispose();
} else if (cm.haveItem(5000029, 2) || cm.haveItem(5000030, 2) || cm.haveItem(5000031, 2) || cm.haveItem(5000032, 2) || cm.haveItem(5000033, 2)) {
cm.sendSimple("You have a dragon which isn't out, and as well as a dragon which is out. I can remove one for you. Remember that the data for the dragon I am removing will be lost.\r\n#r#L0#Remove my CASH first slot.#l#k\r\n#b#L1#Remove the first dragon in my inventory.#l#k\r\n#g#L2#No thanks.#l#k");
} else {
var i;
for (i = 0; i < 3; i++) {
if (cm.getPlayer().getPet(i) != null && cm.getPlayer().getPet(i).getItemId() == 5000029) {
pet = cm.getPlayer().getPet(i);
break;
}
}
if (i == 3) {
cm.sendOk("You either don't have a pet dragon ready to evolve or you lack #b#t5380000##k.");
cm.dispose();
return;
}
var id = cm.getPlayer().getPet(i).getItemId();
//var name = cm.getPlayer().getPet(i).getName();
//var level = cm.getPlayer().getPet(i).getLevel();
//var closeness = cm.getPlayer().getPet(i).getCloseness();
//var fullness = cm.getPlayer().getPet(i).getFullness();
//ItemInformationProvider ii = ItemInformationProvider.getInstance();
if (id < 5000029 || id > 5000033) {
cm.sendOk("Something wrong, try again.");
cm.dispose();
}
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 {
cm.sendOk("Something wrong. Try again.");
cm.dispose();
}
/*if (name.equals(ItemInformationProvider.getInstance().getName(id))) {
name = ItemInformationProvider.getInstance().getName(after);
}*/
cm.gainItem(5380000, -1);
cm.evolvePet(i, after);
cm.sendOk("Your dragon has now evolved!! It used to be a #i" + id + "# #t" + id + "#, and now it's a #i" + after + "# #t" + after + "#!");
cm.dispose();
}
} else if (status == 2) {
if (selection == 0) {
const InventoryManipulator = Java.type('client.inventory.manipulator.InventoryManipulator');
const InventoryType = Java.type('client.inventory.InventoryType');
InventoryManipulator.removeFromSlot(cm.getClient(), InventoryType.CASH, 1, 1, true);
cm.sendOk("Your cash first slot is removed.");
} else if (selection == 1) {
if (cm.haveItem(5000029, 2)) {
cm.gainItem(5000029, -1);
} else if (cm.haveItem(5000030, 2)) {
cm.gainItem(5000030, -1);
} else if (cm.haveItem(5000031, 2)) {
cm.gainItem(5000031, -1);
} else if (cm.haveItem(5000032, 2)) {
cm.gainItem(5000032, -1);
} else if (cm.haveItem(5000033, 2)) {
cm.gainItem(5000033, -1);
}
cm.sendOk("The first dragon in your inventory is removed.");
} else if (selection == 2) {
cm.sendOk("Okay, come back next time.");
}
cm.dispose();
}
}
}

View File

@@ -7,47 +7,49 @@
var status;
var mobId = 2220100; //Blue Mushroom
function start(){
if (!cm.isQuestStarted(20718)) { // thanks Stray, Ari
cm.dispose();
return;
}
function start() {
if (!cm.isQuestStarted(20718)) { // thanks Stray, Ari
cm.dispose();
return;
}
status = -1;
action(1, 0, 0);
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection){
if(mode == -1 || (mode == 0 && status == 0)){
cm.dispose();
return;
}
else if(mode == 0)
status--;
else
status++;
function action(mode, type, selection) {
if (mode == -1 || (mode == 0 && status == 0)) {
cm.dispose();
return;
} else if (mode == 0) {
status--;
} else {
status++;
}
if(status == 0){
cm.sendOk("A mysterious black figure appeared and summoned a lot of angry monsters!");
}
else if(status == 1){
var player = cm.getPlayer();
var map = player.getMap();
if (status == 0) {
cm.sendOk("A mysterious black figure appeared and summoned a lot of angry monsters!");
} else if (status == 1) {
var player = cm.getPlayer();
var map = player.getMap();
const LifeFactory = Java.type('server.life.LifeFactory');
const Point = Java.type('java.awt.Point');
for(var i = 0; i < 10; i++)
map.spawnMonsterOnGroundBelow(LifeFactory.getMonster(mobId), new Point(117, 183));
for(var i = 0; i < 10; i++)
map.spawnMonsterOnGroundBelow(LifeFactory.getMonster(mobId), new Point(4, 183));
for(var i = 0; i < 10; i++)
map.spawnMonsterOnGroundBelow(LifeFactory.getMonster(mobId), new Point(-109, 183));
const LifeFactory = Java.type('server.life.LifeFactory');
const Point = Java.type('java.awt.Point');
for (var i = 0; i < 10; i++) {
map.spawnMonsterOnGroundBelow(LifeFactory.getMonster(mobId), new Point(117, 183));
}
for (var i = 0; i < 10; i++) {
map.spawnMonsterOnGroundBelow(LifeFactory.getMonster(mobId), new Point(4, 183));
}
for (var i = 0; i < 10; i++) {
map.spawnMonsterOnGroundBelow(LifeFactory.getMonster(mobId), new Point(-109, 183));
}
cm.completeQuest(20718, 1103003);
cm.gainExp(4000 * cm.getPlayer().getExpRate());
cm.completeQuest(20718, 1103003);
cm.gainExp(4000 * cm.getPlayer().getExpRate());
cm.dispose();
return;
}
cm.dispose();
}
}

View File

@@ -6,27 +6,26 @@
var status;
function start(){
status = -1;
action(1, 0, 0);
function start() {
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection){
if(mode == -1 || (mode == 0 && status == 0)){
cm.dispose();
return;
}
else if(mode == 0)
status--;
else
status++;
function action(mode, type, selection) {
if (mode == -1 || (mode == 0 && status == 0)) {
cm.dispose();
return;
} else if (mode == 0) {
status--;
} else {
status++;
}
if(status == 0){
cm.sendOk("Nothing remarkable here.");
}
else if(status == 1){
cm.dispose();
return;
}
if (status == 0) {
cm.sendOk("Nothing remarkable here.");
} else if (status == 1) {
cm.dispose();
}
}

View File

@@ -6,40 +6,39 @@
var status;
function start(){
status = -1;
action(1, 0, 0);
function start() {
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection){
if(mode == -1 || (mode == 0 && status == 0)){
cm.dispose();
return;
}
else if(mode == 0)
status--;
else
status++;
function action(mode, type, selection) {
if (mode == -1 || (mode == 0 && status == 0)) {
cm.dispose();
return;
} else if (mode == 0) {
status--;
} else {
status++;
}
if(status == 0){
if(cm.isQuestStarted(20716)){
if(!cm.hasItem(4032142)){
if(cm.canHold(4032142)){
cm.gainItem(4032142, 1);
cm.sendOk("You bottled up some of the clear tree sap. #i4032142#");
}
else
cm.sendOk("Make sure you have a free spot in your ETC inventory.");
}
else
cm.sendOk("A never ending flow of sap is coming from this small tree stump.");
}
else
cm.sendOk("A never ending flow of sap is coming from this small tree stump.");
}
else if(status == 1){
cm.dispose();
return;
}
if (status == 0) {
if (cm.isQuestStarted(20716)) {
if (!cm.hasItem(4032142)) {
if (cm.canHold(4032142)) {
cm.gainItem(4032142, 1);
cm.sendOk("You bottled up some of the clear tree sap. #i4032142#");
} else {
cm.sendOk("Make sure you have a free spot in your ETC inventory.");
}
} else {
cm.sendOk("A never ending flow of sap is coming from this small tree stump.");
}
} else {
cm.sendOk("A never ending flow of sap is coming from this small tree stump.");
}
} else if (status == 1) {
cm.dispose();
}
}

View File

@@ -9,35 +9,35 @@ function start() {
function action(mode, type, selection) {
if (mode == 1) {
status++;
status++;
} else {
if (status <= 1) {
cm.dispose();
return;
}
status--;
if (status <= 1) {
cm.dispose();
return;
}
status--;
}
if (status == 0) {
if(cm.getLevel() >= 20) {
if (cm.getLevel() >= 20) {
cm.sendOk("This training ground is available only for those under level 20.");
cm.dispose();
return;
}
var selStr = "Would you like to go into the Training Center?";
for (var i = 0; i < num; i++) {
selStr += "\r\n#b#L" + i + "#Training Center " + i + " (" + cm.getPlayerCount(map + i) + "/" + maxp + ")#l#k";
}
cm.sendSimple(selStr);
var selStr = "Would you like to go into the Training Center?";
for (var i = 0; i < num; i++) {
selStr += "\r\n#b#L" + i + "#Training Center " + i + " (" + cm.getPlayerCount(map + i) + "/" + maxp + ")#l#k";
}
cm.sendSimple(selStr);
} else if (status == 1) {
if (selection < 0 || selection >= num) {
cm.dispose();
} else if (cm.getPlayerCount(map + selection) >= maxp) {
cm.sendNext("This training center is full.");
status = -1;
} else {
cm.warp(map + selection, 0);
cm.dispose();
}
if (selection < 0 || selection >= num) {
cm.dispose();
} else if (cm.getPlayerCount(map + selection) >= maxp) {
cm.sendNext("This training center is full.");
status = -1;
} else {
cm.warp(map + selection, 0);
cm.dispose();
}
}
}

View File

@@ -9,35 +9,35 @@ function start() {
function action(mode, type, selection) {
if (mode == 1) {
status++;
status++;
} else {
if (status <= 1) {
cm.dispose();
return;
}
status--;
if (status <= 1) {
cm.dispose();
return;
}
status--;
}
if (status == 0) {
if(cm.getLevel() >= 20) {
if (cm.getLevel() >= 20) {
cm.sendOk("This training ground is available only for those under level 20.");
cm.dispose();
return;
}
var selStr = "Would you like to go into the Training Center?";
for (var i = 0; i < num; i++) {
selStr += "\r\n#b#L" + i + "#Training Center " + i + " (" + cm.getPlayerCount(map + i) + "/" + maxp + ")#l#k";
}
cm.sendSimple(selStr);
var selStr = "Would you like to go into the Training Center?";
for (var i = 0; i < num; i++) {
selStr += "\r\n#b#L" + i + "#Training Center " + i + " (" + cm.getPlayerCount(map + i) + "/" + maxp + ")#l#k";
}
cm.sendSimple(selStr);
} else if (status == 1) {
if (selection < 0 || selection >= num) {
cm.dispose();
} else if (cm.getPlayerCount(map + selection) >= maxp) {
cm.sendNext("This training center is full.");
status = -1;
} else {
cm.warp(map + selection, 0);
cm.dispose();
}
if (selection < 0 || selection >= num) {
cm.dispose();
} else if (cm.getPlayerCount(map + selection) >= maxp) {
cm.sendNext("This training center is full.");
status = -1;
} else {
cm.warp(map + selection, 0);
cm.dispose();
}
}
}

View File

@@ -19,38 +19,39 @@
*/
var status;
function start() {
status = -1;
action(1, 0, 0);
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();
} else {
if (mode == 0 && type > 0) {
cm.dispose();
return;
}
if (mode == 1)
status++;
else
status--;
if(status == 0) {
if(cm.isQuestStarted(28177) && !cm.haveItem(4032479)) {
if(cm.canHold(4032479)) {
cm.gainItem(4032479, 1);
cm.sendOk("Huh, are you looking for me? Chief Stan sent you here, right? But hey, I am not the suspect you seek. If I have some proof? Here, take this and return it to #b#p1012003##k.");
} else {
cm.sendOk("Hey, make a slot available before talking to me.");
}
} else {
cm.sendOk("Zzzzzz...");
}
cm.dispose();
}
if (mode == -1) {
cm.dispose();
} else {
if (mode == 0 && type > 0) {
cm.dispose();
return;
}
if (mode == 1) {
status++;
} else {
status--;
}
if (status == 0) {
if (cm.isQuestStarted(28177) && !cm.haveItem(4032479)) {
if (cm.canHold(4032479)) {
cm.gainItem(4032479, 1);
cm.sendOk("Huh, are you looking for me? Chief Stan sent you here, right? But hey, I am not the suspect you seek. If I have some proof? Here, take this and return it to #b#p1012003##k.");
} else {
cm.sendOk("Hey, make a slot available before talking to me.");
}
} else {
cm.sendOk("Zzzzzz...");
}
cm.dispose();
}
}
}

View File

@@ -19,6 +19,7 @@
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/>.
*/
/* Sabi JQ herb pile #1
*/
function start() {
@@ -27,13 +28,15 @@ function start() {
var totalodds = 0;
var choice = 0;
for (var i = 0; i < chances.length; i++) {
var itemGender = (Math.floor(prizes[i]/1000)%10);
if ((cm.getPlayer().getGender() != itemGender) && (itemGender != 2))
var itemGender = (Math.floor(prizes[i] / 1000) % 10);
if ((cm.getPlayer().getGender() != itemGender) && (itemGender != 2)) {
chances[i] = 0;
}
}
for (var i = 0; i < chances.length; i++)
for (var i = 0; i < chances.length; i++) {
totalodds += chances[i];
var randomPick = Math.floor(Math.random()*totalodds)+1;
}
var randomPick = Math.floor(Math.random() * totalodds) + 1;
for (var i = 0; i < chances.length; i++) {
randomPick -= chances[i];
if (randomPick <= 0) {
@@ -41,9 +44,10 @@ function start() {
randomPick = totalodds + 100;
}
}
if (cm.isQuestStarted(2050))
cm.gainItem(4031020,1);
cm.gainItem(prizes[choice],1);
if (cm.isQuestStarted(2050)) {
cm.gainItem(4031020, 1);
}
cm.gainItem(prizes[choice], 1);
cm.warp(101000000, 0);
cm.dispose();
}

View File

@@ -19,6 +19,7 @@
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/>.
*/
/* Sabi JQ herb pile #1
*/
@@ -28,13 +29,15 @@ function start() {
var totalodds = 0;
var choice = 0;
for (var i = 0; i < chances.length; i++) {
var itemGender = (Math.floor(prizes[i]/1000)%10);
if ((cm.getPlayer().getGender() != itemGender) && (itemGender != 2))
var itemGender = (Math.floor(prizes[i] / 1000) % 10);
if ((cm.getPlayer().getGender() != itemGender) && (itemGender != 2)) {
chances[i] = 0;
}
}
for (var i = 0; i < chances.length; i++)
for (var i = 0; i < chances.length; i++) {
totalodds += chances[i];
var randomPick = Math.floor(Math.random()*totalodds)+1;
}
var randomPick = Math.floor(Math.random() * totalodds) + 1;
for (var i = 0; i < chances.length; i++) {
randomPick -= chances[i];
if (randomPick <= 0) {
@@ -42,9 +45,10 @@ function start() {
randomPick = totalodds + 100;
}
}
if (cm.isQuestStarted(2051))
cm.gainItem(4031032,1);
cm.gainItem(prizes[choice],1);
if (cm.isQuestStarted(2051)) {
cm.gainItem(4031032, 1);
}
cm.gainItem(prizes[choice], 1);
cm.warp(101000000, 0);
cm.dispose();
}

View File

@@ -26,7 +26,7 @@
*/
status = -1;
actionx = {"1stJob" : false, "2ndjob" : false, "3thJobI" : false, "3thJobC" : false};
actionx = {"1stJob": false, "2ndjob": false, "3thJobI": false, "3thJobC": false};
job = 410;
spawnPnpc = false;
@@ -37,12 +37,12 @@ function start() {
const GameConstants = Java.type('constants.game.GameConstants');
if (parseInt(cm.getJobId() / 100) == jobType && cm.canSpawnPlayerNpc(GameConstants.getHallOfFameMapid(cm.getJob()))) {
spawnPnpc = true;
var sendStr = "You have walked a long way to reach the power, wisdom and courage you hold today, haven't you? What do you say about having right now #ra NPC on the Hall of Fame holding the current image of your character#k? Do you like it?";
if(spawnPnpcFee > 0) {
if (spawnPnpcFee > 0) {
sendStr += " I can do it for you, for the fee of #b " + cm.numberWithCommas(spawnPnpcFee) + " mesos.#k";
}
cm.sendYesNo(sendStr);
} else {
if (cm.getJobId() == 0) {
@@ -50,20 +50,21 @@ function start() {
cm.sendNext("Want to be a #rthief#k? There are some standards to meet. because we can't just accept EVERYONE in... #bYour level should be at least 10, with at least your " + cm.getFirstJobStatRequirement(jobType) + "#k. Let's see."); // thanks Vcoc for noticing a need to state and check requirements on first job adv starting message
} else if (cm.getLevel() >= 30 && cm.getJobId() == 400) {
actionx["2ndJob"] = true;
if (cm.haveItem(4031012))
if (cm.haveItem(4031012)) {
cm.sendNext("I see you have done well. I will allow you to take the next step on your long road.");
else if (cm.haveItem(4031011)){
} else if (cm.haveItem(4031011)) {
cm.sendOk("Go and see the #b#p1072003##k.");
cm.dispose();
} else
} else {
cm.sendNext("The progress you have made is astonishing.");
} else if (actionx["3thJobI"] || (cm.getPlayer().gotPartyQuestItem("JB3") && cm.getLevel() >= 70 && cm.getJobId() % 10 == 0 && parseInt(cm.getJobId() / 100) == 4 && !cm.getPlayer().gotPartyQuestItem("JBP"))){
}
} else if (actionx["3thJobI"] || (cm.getPlayer().gotPartyQuestItem("JB3") && cm.getLevel() >= 70 && cm.getJobId() % 10 == 0 && parseInt(cm.getJobId() / 100) == 4 && !cm.getPlayer().gotPartyQuestItem("JBP"))) {
actionx["3thJobI"] = true;
cm.sendNext("There you are. A few days ago, #b#p2020011##k of Ossyria talked to me about you. I see that you are interested in making the leap to the dark world of the third job advancement for thieves. To archieve that goal, I will have to test your strength in orden to see whether you are worthy of the advancement. There is an opening in the middle of a deep swamp in Victoria Island, where it'll lead you to a secret passage. Once inside, you'll face a clone of myself. Your task is to defeat him and bring #b#t4031059##k back with you.");
} else if (cm.getPlayer().gotPartyQuestItem("JBP") && !cm.haveItem(4031059)){
} else if (cm.getPlayer().gotPartyQuestItem("JBP") && !cm.haveItem(4031059)) {
cm.sendNext("Please, bring me the #b#t4031059##k.");
cm.dispose();
} else if (cm.haveItem(4031059) && cm.getPlayer().gotPartyQuestItem("JBP")){
} else if (cm.haveItem(4031059) && cm.getPlayer().gotPartyQuestItem("JBP")) {
actionx["3thJobC"] = true;
cm.sendNext("Nice work. You have defeated my clone and brought #b#t4031059##k back safely. You have now proven yourself worthy of the 3rd job advancement from the physical standpoint. Now you should give this necklace to #b#p2020011##k in Ossyria to take on the second part of the test. Good luck. You'll need it.");
} else if (cm.isQuestStarted(6141)) {
@@ -82,15 +83,15 @@ function action(mode, type, selection) {
return;
} else if (mode == 0 && type != 1) {
status -= 2;
}
if (status == -1){
}
if (status == -1) {
start();
return;
} else {
if(spawnPnpc) {
if(mode > 0) {
if(cm.getMeso() < spawnPnpcFee) {
if (spawnPnpc) {
if (mode > 0) {
if (cm.getMeso() < spawnPnpcFee) {
cm.sendOk("Sorry, you don't have enough mesos to purchase your place on the Hall of Fame.");
cm.dispose();
return;
@@ -98,39 +99,40 @@ function action(mode, type, selection) {
const PlayerNPC = Java.type('server.life.PlayerNPC');
const GameConstants = Java.type('constants.game.GameConstants');
if(PlayerNPC.spawnPlayerNPC(GameConstants.getHallOfFameMapid(cm.getJob()), cm.getPlayer())) {
if (PlayerNPC.spawnPlayerNPC(GameConstants.getHallOfFameMapid(cm.getJob()), cm.getPlayer())) {
cm.sendOk("There you go! Hope you will like it.");
cm.gainMeso(-spawnPnpcFee);
} else {
cm.sendOk("Sorry, the Hall of Fame is currently full...");
}
}
cm.dispose();
return;
} else {
if (mode != 1 || status == 7 && type != 1 || (actionx["1stJob"] && status == 4) || (cm.haveItem(4031008) && status == 2) || (actionx["3thJobI"] && status == 1)){
if (mode == 0 && status == 2 && type == 1)
if (mode != 1 || status == 7 && type != 1 || (actionx["1stJob"] && status == 4) || (cm.haveItem(4031008) && status == 2) || (actionx["3thJobI"] && status == 1)) {
if (mode == 0 && status == 2 && type == 1) {
cm.sendOk("You know there is no other choice...");
if (!(mode == 0 && type != 1)){
}
if (!(mode == 0 && type != 1)) {
cm.dispose();
return;
}
}
}
}
if (actionx["1stJob"]){
if (actionx["1stJob"]) {
if (status == 0) {
if (cm.getLevel() >= 10 && cm.canGetFirstJob(jobType))
if (cm.getLevel() >= 10 && cm.canGetFirstJob(jobType)) {
cm.sendYesNo("Oh...! You look like someone that can definitely be a part of us... all you need is a little sinister mind, and... yeah... so, what do you think? Wanna be the Rogue?");
else {
} else {
cm.sendOk("Train a bit more until you reach the base requirements and I can show you the way of the #rThief#k.");
cm.dispose();
}
} else if (status == 1){
if (cm.canHold(2070000) && cm.canHoldAll([1472061, 1332063])){
if (cm.getJobId() == 0){
} else if (status == 1) {
if (cm.canHold(2070000) && cm.canHoldAll([1472061, 1332063])) {
if (cm.getJobId() == 0) {
cm.changeJobById(400);
cm.gainItem(2070015, 500);
cm.gainItem(1472061, 1);
@@ -142,74 +144,85 @@ function action(mode, type, selection) {
cm.sendNext("Make some room in your inventory and talk back to me.");
cm.dispose();
}
} else if (status == 2)
} else if (status == 2) {
cm.sendNextPrev("You've gotten much stronger now. Plus every single one of your inventories have added slots. A whole row, to be exact. Go see for it yourself. I just gave you a little bit of #bSP#k. When you open up the #bSkill#k menu on the lower left corner of the screen, there are skills you can learn by using SP's. One warning, though: You can't raise it all together all at once. There are also skills you can acquire only after having learned a couple of skills first.");
else if (status == 3)
} else if (status == 3) {
cm.sendNextPrev("Now a reminder. Once you have chosen, you cannot change up your mind and try to pick another path. Go now, and live as a proud Thief.");
else
} else {
cm.dispose();
} else if(actionx["2ndJob"]){
if (status == 0){
if (cm.haveItem(4031012))
}
} else if (actionx["2ndJob"]) {
if (status == 0) {
if (cm.haveItem(4031012)) {
cm.sendSimple("Alright, when you have made your decision, click on [I'll choose my occupation] at the bottom.#b\r\n#L0#Please explain to me what being the Assassin is all about.\r\n#L1#Please explain to me what being the Bandit is all about.\r\n#L3#I'll choose my occupation!");
else {
} else {
cm.sendNext("Good decision. You look strong, but I need to see if you really are strong enough to pass the test, it's not a difficult test, so you'll do just fine. Here, take my letter first... make sure you don't lose it!");
if(!cm.isQuestStarted(100009)) cm.startQuest(100009);
}
} else if (status == 1){
if (!cm.haveItem(4031012)){
if (cm.canHold(4031011)){
if(!cm.haveItem(4031011))
if (!cm.isQuestStarted(100009)) {
cm.startQuest(100009);
}
}
} else if (status == 1) {
if (!cm.haveItem(4031012)) {
if (cm.canHold(4031011)) {
if (!cm.haveItem(4031011)) {
cm.gainItem(4031011, 1);
}
cm.sendNextPrev("Please get this letter to #b#p1072003##k who's around #b#m102040000##k near Kerning City. He is taking care of the job of an instructor in place of me. Give him the letter and he'll test you in place of me. Best of luck to you.");
} else {
cm.sendNext("Please, make some space in your inventory.");
cm.dispose();
}
}else{
if (selection < 3){
if(selection == 0) { //assassin
} else {
if (selection < 3) {
if (selection == 0) { //assassin
cm.sendNext("Thieves that master #rClaws#k.\r\n\r\n#bAssassins#k are far ranged attackers. They are quite Meso efficient and have good damage potential, but cost more than Bandits.");
} else if(selection == 1) { //bandit
} else if (selection == 1) { //bandit
cm.sendNext("Thieves that master #rDaggers#k.\r\n\r\n#bBandits#k are quick melee attackers and are quite powerful among the 2nd jobs. They aren't as Meso efficient as Assassins and do not have the benefit of ranged attack but make up for it in much greater raw power.");
}
status -= 2;
} else
} else {
cm.sendSimple("Now... have you made up your mind? Please choose the job you'd like to select for your 2nd job advancement. #b\r\n#L0#Assassin\r\n#L1#Bandit");
}
}
} else if (status == 2){
if (cm.haveItem(4031011)){
} else if (status == 2) {
if (cm.haveItem(4031011)) {
cm.dispose();
return;
}
job += selection * 10;
cm.sendYesNo("So you want to make the second job advancement as the " + (job == 410 ? "#bAssassin#k" : "#bBandit#k") + "? You know you won't be able to choose a different job for the 2nd job advancement once you make your desicion here, right?");
} else if (status == 3){
if (cm.haveItem(4031012))
} else if (status == 3) {
if (cm.haveItem(4031012)) {
cm.gainItem(4031012, -1);
cm.completeQuest(100011);
if(job == 410) cm.sendNext("Alright, from here on out you are the #bAssassin#k. Assassins have quick hands and quicker feets to dominate the enemies. Please keep training. I'll make you even more powerful than you are right now!");
else cm.sendNext("Alright, you're the #bBandit from here on out. Bandits revel in shadows and darkness, waiting until the right time comes for them to stick a dagger through the enemy's hearth, suddenly and swiftly... please keep training. I'll make you even more powerful than you are right now.");
if (cm.getJobId() != job)
}
cm.completeQuest(100011);
if (job == 410) {
cm.sendNext("Alright, from here on out you are the #bAssassin#k. Assassins have quick hands and quicker feets to dominate the enemies. Please keep training. I'll make you even more powerful than you are right now!");
} else {
cm.sendNext("Alright, you're the #bBandit from here on out. Bandits revel in shadows and darkness, waiting until the right time comes for them to stick a dagger through the enemy's hearth, suddenly and swiftly... please keep training. I'll make you even more powerful than you are right now.");
}
if (cm.getJobId() != job) {
cm.changeJobById(job);
} else if (status == 4)
}
} else if (status == 4) {
cm.sendNextPrev("I have just given you a book that gives you the list of skills you can acquire as a " + (job == 410 ? "assassin" : "bandit") + ". Also your etc inventory has expanded by adding another row to it. Your max HP and MP have increased, too. Go check and see for it yourself.");
else if (status == 5)
} else if (status == 5) {
cm.sendNextPrev("I have also given you a little bit of #bSP#k. Open the #bSkill Menu#k located at the bottomleft corner. you'll be able to boost up the newer acquired 2nd level skills. A word of warning, though. You can't boost them up all at once. Some of the skills are only available after you have learned other skills. Make sure yo remember that.");
else if (status == 6)
} else if (status == 6) {
cm.sendNextPrev((job == 410 ? "Assassin" : "Bandit") + " need to be strong. But remember that you can't abuse that power and use it on a weakling. Please use your enormous power the right way, because... for you to use that the right way, that is much harden than just getting stronger. Please find me after you have advanced much further. I'll be waiting for you.");
} else if (actionx["3thJobI"]){
if (status == 0){
if (cm.getPlayer().gotPartyQuestItem("JB3")){
}
} else if (actionx["3thJobI"]) {
if (status == 0) {
if (cm.getPlayer().gotPartyQuestItem("JB3")) {
cm.getPlayer().removePartyQuestItem("JB3");
cm.getPlayer().setPartyQuestItemObtained("JBP");
}
cm.sendNextPrev("Since he is a clone of myself, you can expect a tough battle ahead. He uses a number of special attacking skills unlike any you have ever seen, and it is your task to successfully take him one on one. There is a time limit in the secret passage, so it is crucial that you defeat him within the time limit. I wish you the best of luck, and I hope you bring the #b#t4031059##k with you.");
}
} else if (actionx["3thJobC"]){
} else if (actionx["3thJobC"]) {
cm.getPlayer().removePartyQuestItem("JBP");
cm.gainItem(4031059, -1);
cm.gainItem(4031057, 1);

View File

@@ -51,202 +51,197 @@ function start() {
}
function action(mode, type, selection) {
if (mode == 1)
if (mode == 1) {
status++;
else
} else {
cm.dispose();
}
if (status == 0 && mode == 1) {
var selStr = "Pst... If you have the right goods, I can turn it into something niice...#b"
var options = new Array("Create a glove","Upgrade a glove","Create a claw","Upgrade a claw","Create materials");
for (var i = 0; i < options.length; i++)
var options = ["Create a glove", "Upgrade a glove", "Create a claw", "Upgrade a claw", "Create materials"];
for (var i = 0; i < options.length; i++) {
selStr += "\r\n#L" + i + "# " + options[i] + "#l";
}
cm.sendSimple(selStr);
}
else if (status == 1 && mode == 1) {
} else if (status == 1 && mode == 1) {
selectedType = selection;
if (selectedType == 0){ //glove refine
if (selectedType == 0) { //glove refine
var selStr = "So, what kind of glove would you like me to make?#b";
var gloves = new Array ("Work Gloves#k - Common Lv. 10#b","Brown Duo#k - Thief Lv. 15#b","Blue Duo#k - Thief Lv. 15#b","Black Duo#k - Thief Lv. 15#b","Bronze Mischief#k - Thief Lv. 20#b","Bronze Wolfskin#k - Thief Lv. 25#b","Steel Sylvia#k - Thief Lv. 30#b",
"Steel Arbion#k - Thief Lv. 35#b","Red Cleave#k - Thief Lv. 40#b","Blue Moon Glove#k - Thief Lv. 50#b","Bronze Pow#k - Thief Lv. 60#b");
for (var i = 0; i < gloves.length; i++)
var gloves = ["Work Gloves#k - Common Lv. 10#b", "Brown Duo#k - Thief Lv. 15#b", "Blue Duo#k - Thief Lv. 15#b", "Black Duo#k - Thief Lv. 15#b", "Bronze Mischief#k - Thief Lv. 20#b", "Bronze Wolfskin#k - Thief Lv. 25#b", "Steel Sylvia#k - Thief Lv. 30#b",
"Steel Arbion#k - Thief Lv. 35#b", "Red Cleave#k - Thief Lv. 40#b", "Blue Moon Glove#k - Thief Lv. 50#b", "Bronze Pow#k - Thief Lv. 60#b"];
for (var i = 0; i < gloves.length; i++) {
selStr += "\r\n#L" + i + "# " + gloves[i] + "#l";
}
equip = true;
cm.sendSimple(selStr);
}
else if (selectedType == 1){ //glove upgrade
} else if (selectedType == 1) { //glove upgrade
var selStr = "An upgraded glove? Sure thing, but note that upgrades won't carry over to the new item... #b";
var gloves = new Array ("Mithril Mischief#k - Thief Lv. 20#b","Dark Mischief#k - Thief Lv. 20#b","Mithril Wolfskin#k - Thief Lv. 25#b",
"Dark Wolfskin#k - Thief Lv. 25#b","Silver Sylvia#k - Thief Lv. 30#b","Gold Sylvia#k - Thief Lv. 30#b","Orihalcon Arbion#k - Thief Lv. 35#b","Gold Arbion#k - Thief Lv. 35#b","Gold Cleave#k - Thief Lv. 40#b",
"Dark Cleave#k - Thief Lv. 40#b","Red Moon Glove#k - Thief Lv. 50#b","Brown Moon Glove#k - Thief Lv. 50#b","Silver Pow#k - Thief Lv. 60#b","Gold Pow#k - Thief Lv. 60#b");
for (var i = 0; i < gloves.length; i++)
var gloves = ["Mithril Mischief#k - Thief Lv. 20#b", "Dark Mischief#k - Thief Lv. 20#b", "Mithril Wolfskin#k - Thief Lv. 25#b",
"Dark Wolfskin#k - Thief Lv. 25#b", "Silver Sylvia#k - Thief Lv. 30#b", "Gold Sylvia#k - Thief Lv. 30#b", "Orihalcon Arbion#k - Thief Lv. 35#b", "Gold Arbion#k - Thief Lv. 35#b", "Gold Cleave#k - Thief Lv. 40#b",
"Dark Cleave#k - Thief Lv. 40#b", "Red Moon Glove#k - Thief Lv. 50#b", "Brown Moon Glove#k - Thief Lv. 50#b", "Silver Pow#k - Thief Lv. 60#b", "Gold Pow#k - Thief Lv. 60#b"];
for (var i = 0; i < gloves.length; i++) {
selStr += "\r\n#L" + i + "# " + gloves[i] + "#l";
}
equip = true;
cm.sendSimple(selStr);
}
else if (selectedType == 2){ //claw refine
} else if (selectedType == 2) { //claw refine
var selStr = "So, what kind of claw would you like me to make?#b";
var claws = new Array ("Steel Titans#k - Thief Lv. 15#b","Bronze Igor#k - Thief Lv. 20#b","Meba#k - Thief Lv. 25#b","Steel Guards#k - Thief Lv. 30#b","Bronze Guardian#k - Thief Lv. 35#b","Steel Avarice#k - Thief Lv. 40#b","Steel Slain#k - Thief Lv. 50#b");
for (var i = 0; i < claws.length; i++){
var claws = ["Steel Titans#k - Thief Lv. 15#b", "Bronze Igor#k - Thief Lv. 20#b", "Meba#k - Thief Lv. 25#b", "Steel Guards#k - Thief Lv. 30#b", "Bronze Guardian#k - Thief Lv. 35#b", "Steel Avarice#k - Thief Lv. 40#b", "Steel Slain#k - Thief Lv. 50#b"];
for (var i = 0; i < claws.length; i++) {
selStr += "\r\n#L" + i + "# " + claws[i] + "#l";
}
equip = true;
cm.sendSimple(selStr);
}
else if (selectedType == 3){ //claw upgrade
} else if (selectedType == 3) { //claw upgrade
var selStr = "An upgraded claw? Sure thing, but note that upgrades won't carry over to the new item...#b";
var claws = new Array ("Mithril Titans#k - Thief Lv. 15#b","Gold Titans#k - Thief Lv. 15#b","Steel Igor#k - Thief Lv. 20#b","Adamantium Igor#k - Thief Lv. 20#b","Mithril Guards#k - Thief Lv. 30#b","Adamantium Guards#k - Thief Lv. 30#b",
"Silver Guardian#k - Thief Lv. 35#b","Dark Guardian#k - Thief Lv. 35#b","Blood Avarice#k - Thief Lv. 40#b","Adamantium Avarice#k - Thief Lv. 40#b","Dark Avarice#k - Thief Lv. 40#b","Blood Slain#k - Thief Lv. 50#b","Sapphire Slain#k - Thief Lv. 50#b");
for (var i = 0; i < claws.length; i++){
var claws = ["Mithril Titans#k - Thief Lv. 15#b", "Gold Titans#k - Thief Lv. 15#b", "Steel Igor#k - Thief Lv. 20#b", "Adamantium Igor#k - Thief Lv. 20#b", "Mithril Guards#k - Thief Lv. 30#b", "Adamantium Guards#k - Thief Lv. 30#b",
"Silver Guardian#k - Thief Lv. 35#b", "Dark Guardian#k - Thief Lv. 35#b", "Blood Avarice#k - Thief Lv. 40#b", "Adamantium Avarice#k - Thief Lv. 40#b", "Dark Avarice#k - Thief Lv. 40#b", "Blood Slain#k - Thief Lv. 50#b", "Sapphire Slain#k - Thief Lv. 50#b"];
for (var i = 0; i < claws.length; i++) {
selStr += "\r\n#L" + i + "# " + claws[i] + "#l";
}
equip = true;
cm.sendSimple(selStr);
}
else if (selectedType == 4){ //material refine
} else if (selectedType == 4) { //material refine
var selStr = "Materials? I know of a few materials that I can make for you...#b";
var materials = new Array ("Make Processed Wood with Tree Branch","Make Processed Wood with Firewood","Make Screws (packs of 15)");
for (var i = 0; i < materials.length; i++){
var materials = ["Make Processed Wood with Tree Branch", "Make Processed Wood with Firewood", "Make Screws (packs of 15)"];
for (var i = 0; i < materials.length; i++) {
selStr += "\r\n#L" + i + "# " + materials[i] + "#l";
}
equip = false;
cm.sendSimple(selStr);
}
if (equip)
if (equip) {
status++;
}
else if (status == 2 && mode == 1) {
}
} else if (status == 2 && mode == 1) {
selectedItem = selection;
if (selectedType == 4){ //material refine
var itemSet = new Array (4003001,4003001,4003000);
var matSet = new Array(4000003,4000018,new Array (4011000,4011001));
var matQtySet = new Array (10,5,new Array (1,1));
var costSet = new Array (0,0,0);
if (selectedType == 4) { //material refine
var itemSet = [4003001, 4003001, 4003000];
var matSet = [4000003, 4000018, [4011000, 4011001]];
var matQtySet = [10, 5, [1, 1]];
var costSet = [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)
}
else if (status == 3 && mode == 1) {
if (equip)
{
cm.sendGetNumber(prompt, 1, 1, 100)
} else if (status == 3 && mode == 1) {
if (equip) {
selectedItem = selection;
qty = 1;
}
else
} else {
qty = (selection > 0) ? selection : (selection < 0 ? -selection : 1);
}
if (selectedType == 0){ //glove refine
var itemSet = new Array(1082002,1082029,1082030,1082031,1082032,1082037,1082042,1082046,1082075,1082065,1082092);
var matSet = new Array(4000021,new Array(4000021,4000018),new Array(4000021,4000015),new Array(4000021,4000020),new Array(4011000,4000021),new Array(4011000,4011001,4000021),new Array(4011001,4000021,4003000),new Array(4011001,4011000,4000021,4003000),new Array(4021000,4000014,4000021,4003000),new Array(4021005,4021008,4000030,4003000),new Array(4011007,4011000,4021007,4000030,4003000));
var matQtySet = new Array(15,new Array(30,20),new Array(30,20),new Array(30,20),new Array(2,40),new Array(2,1,10),new Array(2,50,10),new Array(3,1,60,15),new Array(3,200,80,30),new Array(3,1,40,30),new Array(1,8,1,50,50));
var costSet = new Array(1000,7000,7000,7000,10000,15000,25000,30000,40000,50000,70000);
if (selectedType == 0) { //glove refine
var itemSet = [1082002, 1082029, 1082030, 1082031, 1082032, 1082037, 1082042, 1082046, 1082075, 1082065, 1082092];
var matSet = [4000021, [4000021, 4000018], [4000021, 4000015], [4000021, 4000020], [4011000, 4000021], [4011000, 4011001, 4000021], [4011001, 4000021, 4003000], [4011001, 4011000, 4000021, 4003000], [4021000, 4000014, 4000021, 4003000], [4021005, 4021008, 4000030, 4003000], [4011007, 4011000, 4021007, 4000030, 4003000]];
var matQtySet = [15, [30, 20], [30, 20], [30, 20], [2, 40], [2, 1, 10], [2, 50, 10], [3, 1, 60, 15], [3, 200, 80, 30], [3, 1, 40, 30], [1, 8, 1, 50, 50]];
var costSet = [1000, 7000, 7000, 7000, 10000, 15000, 25000, 30000, 40000, 50000, 70000];
item = itemSet[selectedItem];
mats = matSet[selectedItem];
matQty = matQtySet[selectedItem];
cost = costSet[selectedItem];
} else if (selectedType == 1) { //glove upgrade
var itemSet = [1082033, 1082034, 1082038, 1082039, 1082043, 1082044, 1082047, 1082045, 1082076, 1082074, 1082067, 1082066, 1082093, 1082094];
var matSet = [[1082032, 4011002], [1082032, 4021004], [1082037, 4011002], [1082037, 4021004], [1082042, 4011004], [1082042, 4011006], [1082046, 4011005], [1082046, 4011006], [1082075, 4011006], [1082075, 4021008], [1082065, 4021000], [1082065, 4011006, 4021008], [1082092, 4011001, 4000014], [1082092, 4011006, 4000027]];
var matQtySet = [[1, 1], [1, 1], [1, 2], [1, 2], [1, 2], [1, 1], [1, 3], [1, 2], [1, 4], [1, 2], [1, 5], [1, 2, 1], [1, 7, 200], [1, 7, 150]];
var costSet = [5000, 7000, 10000, 12000, 15000, 20000, 22000, 25000, 40000, 50000, 55000, 60000, 70000, 80000];
item = itemSet[selectedItem];
mats = matSet[selectedItem];
matQty = matQtySet[selectedItem];
cost = costSet[selectedItem];
} else if (selectedType == 2) { //claw refine
var itemSet = [1472001, 1472004, 1472007, 1472008, 1472011, 1472014, 1472018];
var matSet = [[4011001, 4000021, 4003000], [4011000, 4011001, 4000021, 4003000], [1472000, 4011001, 4000021, 4003001], [4011000, 4011001, 4000021, 4003000], [4011000, 4011001, 4000021, 4003000], [4011000, 4011001, 4000021, 4003000], [4011000, 4011001, 4000030, 4003000]];
var matQtySet = [[1, 20, 5], [2, 1, 30, 10], [1, 3, 20, 30], [3, 2, 50, 20], [4, 2, 80, 25], [3, 2, 100, 30], [4, 2, 40, 35]];
var costSet = [2000, 3000, 5000, 15000, 30000, 40000, 50000];
item = itemSet[selectedItem];
mats = matSet[selectedItem];
matQty = matQtySet[selectedItem];
cost = costSet[selectedItem];
} else if (selectedType == 3) { //claw upgrade
var itemSet = [1472002, 1472003, 1472005, 1472006, 1472009, 1472010, 1472012, 1472013, 1472015, 1472016, 1472017, 1472019, 1472020];
var matSet = [[1472001, 4011002], [1472001, 4011006], [1472004, 4011001], [1472004, 4011003], [1472008, 4011002], [1472008, 4011003], [1472011, 4011004], [1472011, 4021008], [1472014, 4021000], [1472014, 4011003], [1472014, 4021008], [1472018, 4021000], [1472018, 4021005]];
var matQtySet = [[1, 1], [1, 1], [1, 2], [1, 2], [1, 3], [1, 3], [1, 4], [1, 1], [1, 5], [1, 5], [1, 2], [1, 6], [1, 6]];
var costSet = [1000, 2000, 3000, 5000, 10000, 15000, 20000, 25000, 30000, 30000, 35000, 40000, 40000];
item = itemSet[selectedItem];
mats = matSet[selectedItem];
matQty = matQtySet[selectedItem];
cost = costSet[selectedItem];
}
else if (selectedType == 1){ //glove upgrade
var itemSet = new Array(1082033,1082034,1082038,1082039,1082043,1082044,1082047,1082045,1082076,1082074,1082067,1082066,1082093,1082094);
var matSet = new Array(new Array(1082032,4011002),new Array(1082032,4021004),new Array(1082037,4011002),new Array(1082037,4021004),new Array(1082042,4011004),new Array(1082042,4011006),new Array(1082046,4011005),new Array(1082046,4011006),new Array(1082075,4011006),new Array(1082075,4021008),new Array(1082065,4021000),new Array(1082065,4011006,4021008),new Array(1082092,4011001,4000014),new Array(1082092,4011006,4000027));
var matQtySet = new Array(new Array(1,1),new Array(1,1),new Array(1,2),new Array(1,2),new Array(1,2),new Array(1,1),new Array(1,3),new Array(1,2),new Array(1,4),new Array(1,2),new Array(1,5),new Array(1,2,1),new Array(1,7,200),new Array(1,7,150));
var costSet = new Array (5000,7000,10000,12000,15000,20000,22000,25000,40000,50000,55000,60000,70000,80000);
item = itemSet[selectedItem];
mats = matSet[selectedItem];
matQty = matQtySet[selectedItem];
cost = costSet[selectedItem];
}
else if (selectedType == 2){ //claw refine
var itemSet = new Array(1472001,1472004,1472007,1472008,1472011,1472014,1472018);
var matSet = new Array(new Array(4011001,4000021,4003000),new Array(4011000,4011001,4000021,4003000),new Array(1472000,4011001,4000021,4003001),new Array(4011000,4011001,4000021,4003000),new Array(4011000,4011001,4000021,4003000),new Array(4011000,4011001,4000021,4003000),new Array(4011000,4011001,4000030,4003000));
var matQtySet = new Array(new Array(1,20,5),new Array(2,1,30,10),new Array(1,3,20,30),new Array(3,2,50,20),new Array(4,2,80,25),new Array(3,2,100,30),new Array(4,2,40,35));
var costSet = new Array(2000,3000,5000,15000,30000,40000,50000);
item = itemSet[selectedItem];
mats = matSet[selectedItem];
matQty = matQtySet[selectedItem];
cost = costSet[selectedItem];
}
else if (selectedType == 3){ //claw upgrade
var itemSet = new Array (1472002,1472003,1472005,1472006,1472009,1472010,1472012,1472013,1472015,1472016,1472017,1472019,1472020);
var matSet = new Array(new Array(1472001,4011002),new Array(1472001,4011006),new Array(1472004,4011001),new Array(1472004,4011003),new Array(1472008,4011002),new Array(1472008,4011003),new Array(1472011,4011004),new Array(1472011,4021008),new Array(1472014,4021000),new Array(1472014,4011003),new Array(1472014,4021008),new Array(1472018,4021000),new Array(1472018,4021005));
var matQtySet = new Array (new Array(1,1),new Array(1,1),new Array(1,2),new Array(1,2),new Array(1,3),new Array(1,3),new Array(1,4),new Array(1,1),new Array(1,5),new Array(1,5),new Array(1,2),new Array(1,6),new Array(1,6));
var costSet = new Array (1000,2000,3000,5000,10000,15000,20000,25000,30000,30000,35000,40000,40000);
item = itemSet[selectedItem];
mats = matSet[selectedItem];
matQty = matQtySet[selectedItem];
cost = costSet[selectedItem];
}
var prompt = "You want me to make ";
if (qty == 1)
if (qty == 1) {
prompt += "a #t" + item + "#?";
else
} else {
prompt += qty + " #t" + item + "#?";
}
prompt += " In that case, I'm going to need specific items from you in order to make it. Make sure you have room in your inventory, though!#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] + "#";
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 + "#";
}
else {
prompt += "\r\n#i"+mats+"# " + matQty * qty + " #t" + mats + "#";
}
if (cost > 0)
if (cost > 0) {
prompt += "\r\n#i4031138# " + cost * qty + " meso";
}
cm.sendYesNo(prompt);
}
else if (status == 4 && mode == 1) {
} else if (status == 4 && mode == 1) {
var complete = true;
var recvItem = item, recvQty;
if (item == 4003000)//screws
{
recvQty = 15 * qty;
else
} else {
recvQty = qty;
if(!cm.canHold(recvItem, recvQty)) {
}
if (!cm.canHold(recvItem, recvQty)) {
cm.sendOk("Check your inventory for a free slot first.");
cm.dispose();
return;
}
else if (cm.getMeso() < cost * qty)
{
} else if (cm.getMeso() < cost * qty) {
cm.sendOk("I'm afraid you cannot afford my services.");
cm.dispose();
return;
}
else
{
} else {
if (mats instanceof Array) {
for(var i = 0; complete && i < mats.length; i++)
if (!cm.haveItem(mats[i], matQty[i] * qty))
for (var i = 0; complete && i < mats.length; i++) {
if (!cm.haveItem(mats[i], matQty[i] * qty)) {
complete = false;
}
else if (!cm.haveItem(mats, matQty * qty))
}
}
} else if (!cm.haveItem(mats, matQty * qty)) {
complete = false;
}
}
if (!complete)
if (!complete) {
cm.sendOk("What are you trying to pull? I can't make anything unless you bring me what I ask for.");
else {
} else {
if (mats instanceof Array) {
for (var i = 0; i < mats.length; i++){
for (var i = 0; i < mats.length; i++) {
cm.gainItem(mats[i], -matQty[i] * qty);
}
}
else
} else {
cm.gainItem(mats, -matQty * qty);
if (cost > 0)
}
if (cost > 0) {
cm.gainMeso(-cost * qty);
}
cm.gainItem(recvItem, recvQty);
cm.sendOk("All done. If you need anything else... Well, I'm not going anywhere.");
}

View File

@@ -33,84 +33,79 @@ function action(mode, type, selection) {
cm.dispose();
return;
}
if (mode == 1)
if (mode == 1) {
status++;
else
} else {
status--;
}
if (status == 0) {
var selStr = "Yes, I do own this forge. If you're willing to pay, I can offer you some of my services.#b"
var options = new Array("Refine a mineral ore","Refine a jewel ore","I have Iron Hog's Metal Hoof...","Upgrade a claw");
for (var i = 0; i < options.length; i++){
var options = ["Refine a mineral ore", "Refine a jewel ore", "I have Iron Hog's Metal Hoof...", "Upgrade a claw"];
for (var i = 0; i < options.length; i++) {
selStr += "\r\n#L" + i + "# " + options[i] + "#l";
}
cm.sendSimple(selStr);
}
else if (status == 1) {
} else if (status == 1) {
selectedType = selection;
if (selectedType == 0){ //mineral refine
if (selectedType == 0) { //mineral refine
var selStr = "So, what kind of mineral ore would you like to refine?#b";
var minerals = new Array ("Bronze","Steel","Mithril","Adamantium","Silver","Orihalcon","Gold");
for (var i = 0; i < minerals.length; i++){
var minerals = ["Bronze", "Steel", "Mithril", "Adamantium", "Silver", "Orihalcon", "Gold"];
for (var i = 0; i < minerals.length; i++) {
selStr += "\r\n#L" + i + "# " + minerals[i] + "#l";
}
equip = false;
cm.sendSimple(selStr);
}
else if (selectedType == 1){ //jewel refine
} else if (selectedType == 1) { //jewel refine
var selStr = "So, what kind of jewel ore would you like to refine?#b";
var jewels = new Array ("Garnet","Amethyst","Aquamarine","Emerald","Opal","Sapphire","Topaz","Diamond","Black Crystal");
for (var i = 0; i < jewels.length; i++){
var jewels = ["Garnet", "Amethyst", "Aquamarine", "Emerald", "Opal", "Sapphire", "Topaz", "Diamond", "Black Crystal"];
for (var i = 0; i < jewels.length; i++) {
selStr += "\r\n#L" + i + "# " + jewels[i] + "#l";
}
equip = false;
cm.sendSimple(selStr);
}
else if (selectedType == 2){ //foot refine
} else if (selectedType == 2) { //foot refine
var selStr = "You know about that? Not many people realize the potential in the Iron Hog's Metal Hoof... I can make this into something special, if you want me to.";
equip = false;
cm.sendYesNo(selStr);
}
else if (selectedType == 3){ //claw refine
} else if (selectedType == 3) { //claw refine
var selStr = "Ah, you wish to upgrade a claw? Then tell me, which one?#b";
var claws = new Array ("Blood Gigantic#k - Thief Lv. 60#b","Sapphire Gigantic#k - Thief Lv. 60#b","Dark Gigantic#k - Thief Lv. 60#b");
for (var i = 0; i < claws.length; i++){
var claws = ["Blood Gigantic#k - Thief Lv. 60#b", "Sapphire Gigantic#k - Thief Lv. 60#b", "Dark Gigantic#k - Thief Lv. 60#b"];
for (var i = 0; i < claws.length; i++) {
selStr += "\r\n#L" + i + "# " + claws[i] + "#l";
}
equip = true;
cm.sendSimple(selStr);
}
if (equip)
if (equip) {
status++;
}
else if (status == 2 && mode == 1) {
}
} else if (status == 2 && mode == 1) {
selectedItem = selection;
if (selectedType == 0){ //mineral refine
var itemSet = new Array(4011000,4011001,4011002,4011003,4011004,4011005,4011006);
var matSet = new Array(4010000,4010001,4010002,4010003,4010004,4010005,4010006);
var matQtySet = new Array(10,10,10,10,10,10,10);
var costSet = new Array(300,300,300,500,500,500,800);
if (selectedType == 0) { //mineral refine
var itemSet = [4011000, 4011001, 4011002, 4011003, 4011004, 4011005, 4011006];
var matSet = [4010000, 4010001, 4010002, 4010003, 4010004, 4010005, 4010006];
var matQtySet = [10, 10, 10, 10, 10, 10, 10];
var costSet = [300, 300, 300, 500, 500, 500, 800];
item = itemSet[selectedItem];
mats = matSet[selectedItem];
matQty = matQtySet[selectedItem];
cost = costSet[selectedItem];
}
else if (selectedType == 1){ //jewel refine
var itemSet = new Array(4021000,4021001,4021002,4021003,4021004,4021005,4021006,4021007,4021008);
var matSet = new Array(4020000,4020001,4020002,4020003,4020004,4020005,4020006,4020007,4020008);
var matQtySet = new Array(10,10,10,10,10,10,10,10,10);
var costSet = new Array (500,500,500,500,500,500,500,1000,3000);
} else if (selectedType == 1) { //jewel refine
var itemSet = [4021000, 4021001, 4021002, 4021003, 4021004, 4021005, 4021006, 4021007, 4021008];
var matSet = [4020000, 4020001, 4020002, 4020003, 4020004, 4020005, 4020006, 4020007, 4020008];
var matQtySet = [10, 10, 10, 10, 10, 10, 10, 10, 10];
var costSet = [500, 500, 500, 500, 500, 500, 500, 1000, 3000];
item = itemSet[selectedItem];
mats = matSet[selectedItem];
matQty = matQtySet[selectedItem];
cost = costSet[selectedItem];
}
else if (selectedType == 2){ //special refine
var itemSet = new Array(4011001,1);
var matSet = new Array(4000039,1);
var matQtySet = new Array (100,1);
var costSet = new Array (1000,1)
} else if (selectedType == 2) { //special refine
var itemSet = [4011001, 1];
var matSet = [4000039, 1];
var matQtySet = [100, 1];
var costSet = [1000, 1]
item = itemSet[0];
mats = matSet[0];
matQty = matQtySet[0];
@@ -119,47 +114,46 @@ function action(mode, type, selection) {
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)
}
else if (status == 3) {
if (equip)
{
cm.sendGetNumber(prompt, 1, 1, 100)
} else if (status == 3) {
if (equip) {
selectedItem = selection;
qty = 1;
}
else
} else {
qty = (selection > 0) ? selection : (selection < 0 ? -selection : 1);
}
last_use = false;
if (selectedType == 3){ //claw refine
var itemSet = new Array (1472023,1472024,1472025);
var matSet = new Array(new Array (1472022,4011007,4021000,2012000),new Array (1472022,4011007,4021005,2012002),new Array (1472022,4011007,4021008,4000046));
var matQtySet = new Array (new Array (1,1,8,10),new Array (1,1,8,10),new Array (1,1,3,5));
var costSet = new Array (80000,80000,100000)
if (selectedType == 3) { //claw refine
var itemSet = [1472023, 1472024, 1472025];
var matSet = [[1472022, 4011007, 4021000, 2012000], [1472022, 4011007, 4021005, 2012002], [1472022, 4011007, 4021008, 4000046]];
var matQtySet = [[1, 1, 8, 10], [1, 1, 8, 10], [1, 1, 3, 5]];
var costSet = [80000, 80000, 100000]
item = itemSet[selectedItem];
mats = matSet[selectedItem];
matQty = matQtySet[selectedItem];
cost = costSet[selectedItem];
if (selectedItem != 2)
if (selectedItem != 2) {
last_use = true;
}
}
var prompt = "You want me to make ";
if (qty == 1)
if (qty == 1) {
prompt += "a #t" + item + "#?";
else
} else {
prompt += qty + " #t" + item + "#?";
}
prompt += " In that case, I'm going to need specific items from you in order to make it. Make sure you have room in your inventory, though!#b";
if (mats instanceof Array){
if (mats instanceof Array) {
for (var i = 0; i < mats.length; i++) {
prompt += "\r\n#i"+mats[i]+"# " + matQty[i] * qty + " #t" + mats[i] + "#";
prompt += "\r\n#i" + mats[i] + "# " + matQty[i] * qty + " #t" + mats[i] + "#";
}
} else {
prompt += "\r\n#i"+mats+"# " + matQty * qty + " #t" + mats + "#";
prompt += "\r\n#i" + mats + "# " + matQty * qty + " #t" + mats + "#";
}
if (cost > 0) {
@@ -169,30 +163,31 @@ function action(mode, type, selection) {
} else if (status == 4) {
var complete = true;
if(!cm.canHold(item, qty)) {
if (!cm.canHold(item, qty)) {
cm.sendOk("Check your inventory for a free slot first.");
cm.dispose();
return;
}
else if (cm.getMeso() < cost * qty) {
} else if (cm.getMeso() < cost * qty) {
cm.sendOk("Cash only, no credit.");
cm.dispose();
return;
} else {
if (mats instanceof Array) {
for(var i = 0; complete && i < mats.length; i++)
if (!cm.haveItem(mats[i], matQty[i] * qty))
for (var i = 0; complete && i < mats.length; i++) {
if (!cm.haveItem(mats[i], matQty[i] * qty)) {
complete = false;
}
else if (!cm.haveItem(mats, matQty * qty))
}
}
} else if (!cm.haveItem(mats, matQty * qty)) {
complete = false;
}
}
if (!complete)
if (!complete) {
cm.sendOk("I cannot accept substitutes. If you don't have what I need, then I won't be able to help you.");
else {
} else {
if (mats instanceof Array) {
for (var i = 0; i < mats.length; i++){
for (var i = 0; i < mats.length; i++) {
cm.gainItem(mats[i], -matQty[i] * qty);
}
} else {

View File

@@ -36,6 +36,7 @@ function pushIfItemExists(array, itemid) {
array.push(itemid);
}
}
function start() {
status = -1;
action(1, 0, 0);
@@ -43,36 +44,40 @@ function start() {
function action(mode, type, selection) {
if (mode < 1) // disposing issue with stylishs found thanks to Vcoc
{
cm.dispose();
else {
if (mode == 1)
} else {
if (mode == 1) {
status++;
else
} else {
status--;
}
if (status == 0) {
cm.sendSimple("Well, hello! Welcome to the Henesys Plastic Surgery! Would you like to transform your face into something new? With a #b#t5152001##k, you can let us take care of the rest and have the face you've always wanted~!\r\n#L2#Plastic Surgery: #i5152001##t5152001##l");
} else if (status == 1) {
if (selection == 2) {
facenew = Array();
if (cm.getPlayer().getGender() == 0) {
for(var i = 0; i < mface_v.length; i++)
pushIfItemExists(facenew, mface_v[i] + cm.getPlayer().getFace()% 1000 - (cm.getPlayer().getFace()% 100));
for (var i = 0; i < mface_v.length; i++) {
pushIfItemExists(facenew, mface_v[i] + cm.getPlayer().getFace() % 1000 - (cm.getPlayer().getFace() % 100));
}
}
if (cm.getPlayer().getGender() == 1) {
for(var i = 0; i < fface_v.length; i++)
pushIfItemExists(facenew, fface_v[i] + cm.getPlayer().getFace()% 1000 - (cm.getPlayer().getFace()% 100));
for (var i = 0; i < fface_v.length; i++) {
pushIfItemExists(facenew, fface_v[i] + cm.getPlayer().getFace() % 1000 - (cm.getPlayer().getFace() % 100));
}
}
cm.sendStyle("Let's see... I can totally transform your face into something new. Don't you want to try it? For #b#t5152001##k, you can get the face of your liking. Take your time in choosing the face of your preference.", facenew);
}
}
else if (status == 2){
} else if (status == 2) {
cm.dispose();
if (cm.haveItem(5152001) == true){
if (cm.haveItem(5152001) == true) {
cm.gainItem(5152001, -1);
cm.setFace(facenew[selection]);
cm.sendOk("Enjoy your new and improved face!");
} else
} else {
cm.sendOk("Hmm ... it looks like you don't have the coupon specifically for this place. Sorry to say this, but without the coupon, there's no plastic surgery for you...");
}
}
}
}

View File

@@ -36,6 +36,7 @@ function pushIfItemExists(array, itemid) {
array.push(itemid);
}
}
function start() {
status = -1;
action(1, 0, 0);
@@ -45,24 +46,25 @@ function action(mode, type, selection) {
if (mode < 1) { // disposing issue with stylishs found thanks to Vcoc
cm.dispose();
} else {
if (mode == 1)
if (mode == 1) {
status++;
else
} else {
status--;
}
if (status == 0) {
cm.sendSimple("Hi, I pretty much shouldn't be doing this, but with a #b#t5152000##k, I will do it anyways for you. But don't forget, it will be random!\r\n#L2#Plastic Surgery: #i5152000##t5152000##l");
} else if (status == 1) {
if (selection == 2) {
facenew = Array();
if (cm.getPlayer().getGender() == 0) {
for(var i = 0; i < mface_r.length; i++) {
for (var i = 0; i < mface_r.length; i++) {
pushIfItemExists(facenew, mface_r[i] + cm.getPlayer().getFace()
% 1000 - (cm.getPlayer().getFace()
% 100));
}
}
if (cm.getPlayer().getGender() == 1) {
for(var i = 0; i < fface_r.length; i++) {
for (var i = 0; i < fface_r.length; i++) {
pushIfItemExists(facenew, fface_r[i] + cm.getPlayer().getFace()
% 1000 - (cm.getPlayer().getFace()
% 100));
@@ -70,10 +72,9 @@ function action(mode, type, selection) {
}
cm.sendYesNo("If you use the regular coupon, your face may transform into a random new look...do you still want to do it using #b#t5152000##k?");
}
}
else if (status == 2){
} else if (status == 2) {
cm.dispose();
if (cm.haveItem(5152000) == true){
if (cm.haveItem(5152000) == true) {
cm.gainItem(5152000, -1);
cm.setFace(facenew[Math.floor(Math.random() * facenew.length)]);
cm.sendOk("Enjoy your new and improved face!");

View File

@@ -4,39 +4,43 @@ var cost = 1000;
function start() {
cm.sendNext("Hi, I'm the ticket salesman.");
if (cm.isQuestStarted(2055) || cm.isQuestCompleted(2055))
if (cm.isQuestStarted(2055) || cm.isQuestCompleted(2055)) {
zones++;
if (cm.isQuestStarted(2056) || cm.isQuestCompleted(2056))
}
if (cm.isQuestStarted(2056) || cm.isQuestCompleted(2056)) {
zones++;
if (cm.isQuestStarted(2057) || cm.isQuestCompleted(2057))
}
if (cm.isQuestStarted(2057) || cm.isQuestCompleted(2057)) {
zones++;
}
}
function action(mode, type, selection) {
status++;
if (mode != 1){
if (mode != 1) {
cm.dispose();
return;
}
if (status == 0) {
if (zones == 0)
if (zones == 0) {
cm.dispose();
else {
} else {
var selStr = "Which ticket would you like?#b";
for (var i = 0; i < zones; i++)
selStr += "\r\n#L" + i + "#Construction site B" + (i+1) + " (" + cost + " mesos)#l";
for (var i = 0; i < zones; i++) {
selStr += "\r\n#L" + i + "#Construction site B" + (i + 1) + " (" + cost + " mesos)#l";
}
cm.sendSimple(selStr);
}
} else if (status == 1) {
if (cm.getMeso() < cost)
if (cm.getMeso() < cost) {
cm.sendOk("You do not have enough mesos.");
else {
} else {
cm.gainMeso(-cost);
if(selection < 0 || selection > zones) {
cm.getClient().disconnect(false, false);
return;
}
cm.gainItem(4031036 + selection,1);
if (selection < 0 || selection > zones) {
cm.getClient().disconnect(false, false);
return;
}
cm.gainItem(4031036 + selection, 1);
}
cm.dispose();
}

View File

@@ -1,5 +1,3 @@
var status = 0;
var ticketSelection = -1;
var text = "Here's the ticket reader.";
@@ -8,62 +6,62 @@ var NLC = false;
var em;
function start() {
cm.sendSimple("Pick your destination.\n\r\n#L0##bKerning Square Shopping Center#l\n\n\r\n#L1#Enter Contruction Site#l\r\n#L2#New Leaf City#l");
cm.sendSimple("Pick your destination.\n\r\n#L0##bKerning Square Shopping Center#l\n\n\r\n#L1#Enter Contruction Site#l\r\n#L2#New Leaf City#l");
}
function action(mode, type, selection) {
em = cm.getEventManager("Subway");
if (mode == -1) {
cm.dispose();
return;
cm.dispose();
return;
} else if (mode == 0) {
cm.dispose();
return;
cm.dispose();
return;
} else {
status++;
status++;
}
if (status == 1) {
if (selection == 0) {
var em = cm.getEventManager("KerningTrain");
if (!em.startInstance(cm.getPlayer())) {
cm.sendOk("The passenger wagon is already full. Try again a bit later.");
}
cm.dispose();
return;
var em = cm.getEventManager("KerningTrain");
if (!em.startInstance(cm.getPlayer())) {
cm.sendOk("The passenger wagon is already full. Try again a bit later.");
}
cm.dispose();
} else if (selection == 1) {
if (cm.haveItem(4031036) || cm.haveItem(4031037) || cm.haveItem(4031038)) {
text += " You will be brought in immediately. Which ticket you would like to use?#b";
for (var i = 0; i < 3; i++) {
if (cm.haveItem(4031036 + i)) {
text += "\r\n#b#L" + (i + 1) + "##t" + (4031036 + i) +"#";
}
}
cm.sendSimple(text);
if (cm.haveItem(4031036 + i)) {
text += "\r\n#b#L" + (i + 1) + "##t" + (4031036 + i) + "#";
}
}
cm.sendSimple(text);
hasTicket = true;
} else {
cm.sendOk("It seems as though you don't have a ticket!");
cm.dispose();
return;
} else {
cm.sendOk("It seems as though you don't have a ticket!");
cm.dispose();
}
} else if (selection == 2) {
if (!cm.haveItem(4031711) && cm.getPlayer().getMapId() == 103000100) {
cm.sendOk("It seems you don't have a ticket! You can buy one from Bell.");
cm.dispose();
return;
}
if (!cm.haveItem(4031711) && cm.getPlayer().getMapId() == 103000100) {
cm.sendOk("It seems you don't have a ticket! You can buy one from Bell.");
cm.dispose();
return;
}
if (em.getProperty("entry") == "true") {
cm.sendYesNo("It looks like there's plenty of room for this ride. Please have your ticket ready so I can let you in. The ride will be long, but you'll get to your destination just fine. What do you think? Do you want to get on this ride?");
} else {
cm.sendNext("We will begin boarding 1 minute before the takeoff. Please be patient and wait for a few minutes. Be aware that the subway will take off right on time, and we stop receiving tickets 1 minute before that, so please make sure to be here on time.");
cm.dispose();
return;
}
}
} else if (status == 2) {
if (hasTicket) {
ticketSelection = selection;
if (hasTicket) {
ticketSelection = selection;
if (ticketSelection > -1) {
cm.gainItem(4031035 + ticketSelection, -1);
cm.warp(103000897 + (ticketSelection * 3), "st00"); // thanks IxianMace for noticing a few scripts having misplaced warp SP's
@@ -71,19 +69,18 @@ function action(mode, type, selection) {
cm.dispose();
return;
}
}
if (cm.haveItem(4031711)) {
if(em.getProperty("entry") == "false") {
}
if (cm.haveItem(4031711)) {
if (em.getProperty("entry") == "false") {
cm.sendNext("We will begin boarding 1 minute before the takeoff. Please be patient and wait for a few minutes. Be aware that the subway will take off right on time, and we stop receiving tickets 1 minute before that, so please make sure to be here on time.");
}
else {
} else {
cm.gainItem(4031711, -1);
cm.warp(600010004);
}
cm.dispose();
return;
}
}
}

View File

@@ -19,15 +19,17 @@
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/>.
*/
/* Shumi JQ Chest #1
*/
function start() {
prizes = [4020000,4020001,4020002,4020003,4020004];
if (cm.isQuestStarted(2055))
cm.gainItem(4031039,1);
else
cm.gainItem(4020000 + ((Math.random()*5)|0), 1);
prizes = [4020000, 4020001, 4020002, 4020003, 4020004];
if (cm.isQuestStarted(2055)) {
cm.gainItem(4031039, 1);
} else {
cm.gainItem(4020000 + ((Math.random() * 5) | 0), 1);
}
cm.warp(103000100, 0);
cm.dispose();
}

View File

@@ -19,15 +19,17 @@
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/>.
*/
/* Shumi JQ Chest #2
*/
function start() {
prizes = [4020005,4020006,4020007,4020008,4010000];
if (cm.isQuestStarted(2056))
cm.gainItem(4031040,1);
else
cm.gainItem(prizes[parseInt(Math.random() * prizes.length)],1);
prizes = [4020005, 4020006, 4020007, 4020008, 4010000];
if (cm.isQuestStarted(2056)) {
cm.gainItem(4031040, 1);
} else {
cm.gainItem(prizes[parseInt(Math.random() * prizes.length)], 1);
}
cm.warp(103000100, 0);
cm.dispose();
}

View File

@@ -19,15 +19,17 @@
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/>.
*/
/* Shumi JQ Chest #3
*/
function start() {
prizes = [4010001,4010002,4010003,4010004,4010005,4010006,4010007];
if (cm.isQuestStarted(2057))
cm.gainItem(4031041,1);
else
cm.gainItem(prizes[parseInt(Math.random() * prizes.length)],1);
prizes = [4010001, 4010002, 4010003, 4010004, 4010005, 4010006, 4010007];
if (cm.isQuestStarted(2057)) {
cm.gainItem(4031041, 1);
} else {
cm.gainItem(prizes[parseInt(Math.random() * prizes.length)], 1);
}
cm.warp(103000100, 0);
cm.dispose();
}

View File

@@ -42,14 +42,13 @@ function action(mode, type, selection) {
} else if (mode == 0) {
cm.sendOk("Alright, see you next time.");
cm.dispose();
}
else {
} else {
status++;
if (status == 1)
if (status == 1) {
cm.sendNextPrev("Are you going to give up and leave this place?")
else if (status == 2)
} else if (status == 2) {
cm.sendYesNo("You'll have to start from scratch the next time you come in...");
else if (status == 3){
} else if (status == 3) {
cm.warp(103000100, 0);
cm.dispose();
}

View File

@@ -27,36 +27,37 @@
*/
var status;
function start() {
status = -1;
action(1, 0, 0);
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();
} else {
if (mode == 0 && type > 0) {
cm.dispose();
return;
}
if (mode == 1)
status++;
else
status--;
if(status == 0) {
cm.sendYesNo("So, are you going to use the Internet Cafe? There is a fee to use the spaces there, that is #b5,000 mesos#k. Are you going to enter the Cafe?");
} else if(status == 1) {
if(cm.getMeso() < 5000) {
cm.sendOk("Oh, you don't have the money, right? Sorry, I can't let you in.");
} else {
cm.gainMeso(-5000);
cm.warp(193000000, "out00");
}
cm.dispose();
}
if (mode == -1) {
cm.dispose();
} else {
if (mode == 0 && type > 0) {
cm.dispose();
return;
}
if (mode == 1) {
status++;
} else {
status--;
}
if (status == 0) {
cm.sendYesNo("So, are you going to use the Internet Cafe? There is a fee to use the spaces there, that is #b5,000 mesos#k. Are you going to enter the Cafe?");
} else if (status == 1) {
if (cm.getMeso() < 5000) {
cm.sendOk("Oh, you don't have the money, right? Sorry, I can't let you in.");
} else {
cm.gainMeso(-5000);
cm.warp(193000000, "out00");
}
cm.dispose();
}
}
}

View File

@@ -26,113 +26,113 @@
var status;
var pqArea;
function start() {
status = -1;
action(1, 0, 0);
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();
} else {
if (mode == 0 && type > 0) {
cm.dispose();
return;
}
if (mode == 1)
status++;
else
status--;
if(cm.getMapId() != 193000000) {
var eim = cm.getEventInstance();
if(status == 0) {
if(!eim.isEventCleared()) {
var couponsNeeded = eim.getIntProperty("couponsNeeded");
if(cm.isEventLeader()) {
if(cm.haveItem(4001007, couponsNeeded)) {
cm.sendNext("Your team collected all the needed coupons, good work!");
cm.gainItem(4001007, couponsNeeded);
eim.clearPQ();
cm.dispose();
return;
} else {
cm.sendYesNo("Your team must collect #r" + couponsNeeded + "#k coupons to complete this instance. Talk to me when you have the right amount in hands... Or you want to #bquit now#k? Note that if you quit now #ryour team will be forced to quit#k as well.");
}
} else {
cm.sendYesNo("Your team must collect #r" + couponsNeeded + "#k coupons to complete this instance. Let your leader talk to me with the right amount in hands... Or you want to #bquit now#k? Note that if you quit now your team #rmay become undermanned#k to further continue this instance.");
}
} else {
if(!eim.giveEventReward(cm.getPlayer())) {
cm.sendOk("Please make a room on your ETC inventory to receive the prize.");
cm.dispose();
} else {
cm.warp(193000000);
cm.dispose();
}
}
} else if(status == 1) {
cm.warp(193000000);
cm.dispose();
}
} else {
var levels = ["#m190000000#", "#m191000000#", "#m192000000#", "#m195000000#", "#m196000000#", "#m197000000#"];
if (status == 0) {
var sendStr = "Premium Road is a place of multiple areas with monsters of most various types gathered together, an ideal place for grinding EXP and erasers for the #p1052014#. Select the area you are willing to face:\r\n\r\n#b";
for(var i = 0; i < 6; i++) {
sendStr += "#L" + i + "#" + levels[i] + "#l\r\n";
}
cm.sendSimple(sendStr);
} else if (status == 1) {
pqArea = selection + 1;
em = cm.getEventManager("CafePQ_" + pqArea);
if(em == null) {
cm.sendOk("The CafePQ_" + pqArea + "has encountered an error.");
cm.dispose();
return;
} else if(cm.isUsingOldPqNpcStyle()) {
status = 1;
action(1, 0, 0);
return;
}
cm.sendSimple("#e#b<Party Quest: Premium Road - " + levels[selection] + ">\r\n#k#n" + em.getProperty("party") + "\r\n\r\nThe #p1052014# operates differently than the common ones. They do not use mesos or gachapon tickets, rather #rERASERS#k, that can be obtained by completing the missions held on the Premium Road. To go there, you must find partners and attend to a Party Quest. When teamed up and ready, have your #bparty leader#k talk to me.#b\r\n#L0#I want to participate in the party quest.\r\n#L1#I would like to " + (cm.getPlayer().isRecvPartySearchInviteEnabled() ? "disable" : "enable") + " Party Search.\r\n#L2#I would like to hear more details.");
} else if (status == 2) {
if (selection == 0) {
if (cm.getParty() == null) {
cm.sendOk("You can participate in the party quest only if you are in a party.");
cm.dispose();
} else if(!cm.isLeader()) {
cm.sendOk("Your party leader must talk to me to start this party quest.");
cm.dispose();
} else {
var eli = em.getEligibleParty(cm.getParty());
if(eli.size() > 0) {
if(!em.startInstance(cm.getParty(), cm.getPlayer().getMap(), 1)) {
cm.sendOk("Another party has already entered the #rParty Quest#k in this channel. Please try another channel, or wait for the current party to finish.");
}
}
else {
cm.sendOk("You cannot start this party quest yet, because either your party is not in the range size, some of your party members are not eligible to attempt it or they are not in this map. If you're having trouble finding party members, try Party Search.");
}
cm.dispose();
}
} else if (selection == 1) {
var psState = cm.getPlayer().toggleRecvPartySearchInvite();
cm.sendOk("Your Party Search status is now: #b" + (psState ? "enabled" : "disabled") + "#k. Talk to me whenever you want to change it back.");
cm.dispose();
} else {
cm.sendOk("#e#b<Party Quest: Premium Road>#k#n\r\nOn the maps ahead, you will face many common-leveled mobs to face on. Grind all the required coupons from them and give it to me. All members will then receive a eraser, corresponding with the level faced. Insert on the machine #bmany of the same eraser or multiple different ones#k to have a better chance on greater prizes.");
cm.dispose();
}
}
}
if (mode == -1) {
cm.dispose();
} else {
if (mode == 0 && type > 0) {
cm.dispose();
return;
}
if (mode == 1) {
status++;
} else {
status--;
}
if (cm.getMapId() != 193000000) {
var eim = cm.getEventInstance();
if (status == 0) {
if (!eim.isEventCleared()) {
var couponsNeeded = eim.getIntProperty("couponsNeeded");
if (cm.isEventLeader()) {
if (cm.haveItem(4001007, couponsNeeded)) {
cm.sendNext("Your team collected all the needed coupons, good work!");
cm.gainItem(4001007, couponsNeeded);
eim.clearPQ();
cm.dispose();
} else {
cm.sendYesNo("Your team must collect #r" + couponsNeeded + "#k coupons to complete this instance. Talk to me when you have the right amount in hands... Or you want to #bquit now#k? Note that if you quit now #ryour team will be forced to quit#k as well.");
}
} else {
cm.sendYesNo("Your team must collect #r" + couponsNeeded + "#k coupons to complete this instance. Let your leader talk to me with the right amount in hands... Or you want to #bquit now#k? Note that if you quit now your team #rmay become undermanned#k to further continue this instance.");
}
} else {
if (!eim.giveEventReward(cm.getPlayer())) {
cm.sendOk("Please make a room on your ETC inventory to receive the prize.");
cm.dispose();
} else {
cm.warp(193000000);
cm.dispose();
}
}
} else if (status == 1) {
cm.warp(193000000);
cm.dispose();
}
} else {
var levels = ["#m190000000#", "#m191000000#", "#m192000000#", "#m195000000#", "#m196000000#", "#m197000000#"];
if (status == 0) {
var sendStr = "Premium Road is a place of multiple areas with monsters of most various types gathered together, an ideal place for grinding EXP and erasers for the #p1052014#. Select the area you are willing to face:\r\n\r\n#b";
for (var i = 0; i < 6; i++) {
sendStr += "#L" + i + "#" + levels[i] + "#l\r\n";
}
cm.sendSimple(sendStr);
} else if (status == 1) {
pqArea = selection + 1;
em = cm.getEventManager("CafePQ_" + pqArea);
if (em == null) {
cm.sendOk("The CafePQ_" + pqArea + "has encountered an error.");
cm.dispose();
return;
} else if (cm.isUsingOldPqNpcStyle()) {
status = 1;
action(1, 0, 0);
return;
}
cm.sendSimple("#e#b<Party Quest: Premium Road - " + levels[selection] + ">\r\n#k#n" + em.getProperty("party") + "\r\n\r\nThe #p1052014# operates differently than the common ones. They do not use mesos or gachapon tickets, rather #rERASERS#k, that can be obtained by completing the missions held on the Premium Road. To go there, you must find partners and attend to a Party Quest. When teamed up and ready, have your #bparty leader#k talk to me.#b\r\n#L0#I want to participate in the party quest.\r\n#L1#I would like to " + (cm.getPlayer().isRecvPartySearchInviteEnabled() ? "disable" : "enable") + " Party Search.\r\n#L2#I would like to hear more details.");
} else if (status == 2) {
if (selection == 0) {
if (cm.getParty() == null) {
cm.sendOk("You can participate in the party quest only if you are in a party.");
cm.dispose();
} else if (!cm.isLeader()) {
cm.sendOk("Your party leader must talk to me to start this party quest.");
cm.dispose();
} else {
var eli = em.getEligibleParty(cm.getParty());
if (eli.size() > 0) {
if (!em.startInstance(cm.getParty(), cm.getPlayer().getMap(), 1)) {
cm.sendOk("Another party has already entered the #rParty Quest#k in this channel. Please try another channel, or wait for the current party to finish.");
}
} else {
cm.sendOk("You cannot start this party quest yet, because either your party is not in the range size, some of your party members are not eligible to attempt it or they are not in this map. If you're having trouble finding party members, try Party Search.");
}
cm.dispose();
}
} else if (selection == 1) {
var psState = cm.getPlayer().toggleRecvPartySearchInvite();
cm.sendOk("Your Party Search status is now: #b" + (psState ? "enabled" : "disabled") + "#k. Talk to me whenever you want to change it back.");
cm.dispose();
} else {
cm.sendOk("#e#b<Party Quest: Premium Road>#k#n\r\nOn the maps ahead, you will face many common-leveled mobs to face on. Grind all the required coupons from them and give it to me. All members will then receive a eraser, corresponding with the level faced. Insert on the machine #bmany of the same eraser or multiple different ones#k to have a better chance on greater prizes.");
cm.dispose();
}
}
}
}
}

View File

@@ -23,7 +23,7 @@
* @npc: Vending Machine
* @map: 193000000 - Premium Road - Kerning City Internet Cafe
* @func: Cafe PQ Rewarder
*/
*/
var status;
@@ -58,100 +58,116 @@ var curItemSel;
var advance = true;
function start() {
status = -1;
action(1, 0, 0);
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();
} else {
if (mode == 0 && type > 0) {
cm.dispose();
return;
}
if (mode == 1 && advance)
status++;
else
status--;
advance = true;
if(status == 0) {
hasCoin = cm.haveItem(coinId);
cm.sendNext("This is the vending machine of the Internet Cafe. Place your erasers or #t" + coinId + "# earned throughout the quests to redeem a prize. You can place #bany amount of erasers#k, however take note that placing #rdifferent erasers#k and #rbigger shots of any of them#k will improve the reward possibilities!");
} else if(status == 1) {
var sendStr;
currentTier = getRewardTier();
if(currentTier >= 0) sendStr = "With the items you have currently placed, you can retrieve a #r" + levels[currentTier] + "#k prize. Place erasers:";
else sendStr = "You have placed no erasers yet. Place erasers:";
var listStr = "";
for(var i = 0; i < tickets.length; i++) {
listStr += "#b#L" + i + "##t" + (4001009 + i) + "##k";
if(tickets[i] > 0) listStr += " - " + tickets[i] + " erasers";
listStr += "#l\r\n";
}
if(hasCoin) {
listStr += "#b#L" + tickets.length + "##t" + coinId + "##k";
if(coins > 0) listStr += " - " + coins + " feathers";
listStr += "#l\r\n";
}
cm.sendSimple(sendStr + "\r\n\r\n" + listStr + "#r#L" + getRewardIndex(hasCoin) + "#Retrieve a prize!#l#k\r\n");
} else if(status == 2) {
if(selection == getRewardIndex(hasCoin)) {
if(currentTier < 0) {
cm.sendPrev("You have set no erasers. Insert at least one to claim a prize.");
advance = false;
} else {
givePrize();
cm.dispose();
}
} else {
var tickSel;
if(selection < tickets.length) tickSel = 4001009 + selection;
else tickSel = coinId;
curItemQty = cm.getItemQuantity(tickSel);
curItemSel = selection;
if(curItemQty > 0) {
cm.sendGetText("How many of #b#t" + tickSel + "##k do you want to insert on the machine? (#r" + curItemQty + "#k available)#k");
} else {
cm.sendPrev("You have got #rnone#k of #b#t" + tickSel + "##k to insert on the machine. Click '#rBack#k' to return to the main interface.");
advance = false;
}
}
} else if(status == 3) {
var text = cm.getText();
try {
var placedQty = parseInt(text);
if(isNaN(placedQty) || placedQty < 0) throw true;
if(placedQty > curItemQty) {
cm.sendPrev("You cannot insert the given amount of erasers (#r" + curItemQty + "#k available). Click '#rBack#k' to return to the main interface.");
advance = false;
} else {
if(curItemSel < tickets.length) tickets[curItemSel] = placedQty;
else coins = placedQty;
cm.sendPrev("Operation succeeded. Click '#rBack#k' to return to the main interface.");
advance = false;
}
} catch(err) {
cm.sendPrev("You must enter a positive number of erasers to insert. Click '#rBack#k' to return to the main interface.");
advance = false;
}
status = 2;
} else {
cm.dispose();
}
if (mode == -1) {
cm.dispose();
} else {
if (mode == 0 && type > 0) {
cm.dispose();
return;
}
if (mode == 1 && advance) {
status++;
} else {
status--;
}
advance = true;
if (status == 0) {
hasCoin = cm.haveItem(coinId);
cm.sendNext("This is the vending machine of the Internet Cafe. Place your erasers or #t" + coinId + "# earned throughout the quests to redeem a prize. You can place #bany amount of erasers#k, however take note that placing #rdifferent erasers#k and #rbigger shots of any of them#k will improve the reward possibilities!");
} else if (status == 1) {
var sendStr;
currentTier = getRewardTier();
if (currentTier >= 0) {
sendStr = "With the items you have currently placed, you can retrieve a #r" + levels[currentTier] + "#k prize. Place erasers:";
} else {
sendStr = "You have placed no erasers yet. Place erasers:";
}
var listStr = "";
for (var i = 0; i < tickets.length; i++) {
listStr += "#b#L" + i + "##t" + (4001009 + i) + "##k";
if (tickets[i] > 0) {
listStr += " - " + tickets[i] + " erasers";
}
listStr += "#l\r\n";
}
if (hasCoin) {
listStr += "#b#L" + tickets.length + "##t" + coinId + "##k";
if (coins > 0) {
listStr += " - " + coins + " feathers";
}
listStr += "#l\r\n";
}
cm.sendSimple(sendStr + "\r\n\r\n" + listStr + "#r#L" + getRewardIndex(hasCoin) + "#Retrieve a prize!#l#k\r\n");
} else if (status == 2) {
if (selection == getRewardIndex(hasCoin)) {
if (currentTier < 0) {
cm.sendPrev("You have set no erasers. Insert at least one to claim a prize.");
advance = false;
} else {
givePrize();
cm.dispose();
}
} else {
var tickSel;
if (selection < tickets.length) {
tickSel = 4001009 + selection;
} else {
tickSel = coinId;
}
curItemQty = cm.getItemQuantity(tickSel);
curItemSel = selection;
if (curItemQty > 0) {
cm.sendGetText("How many of #b#t" + tickSel + "##k do you want to insert on the machine? (#r" + curItemQty + "#k available)#k");
} else {
cm.sendPrev("You have got #rnone#k of #b#t" + tickSel + "##k to insert on the machine. Click '#rBack#k' to return to the main interface.");
advance = false;
}
}
} else if (status == 3) {
var text = cm.getText();
try {
var placedQty = parseInt(text);
if (isNaN(placedQty) || placedQty < 0) {
throw true;
}
if (placedQty > curItemQty) {
cm.sendPrev("You cannot insert the given amount of erasers (#r" + curItemQty + "#k available). Click '#rBack#k' to return to the main interface.");
advance = false;
} else {
if (curItemSel < tickets.length) {
tickets[curItemSel] = placedQty;
} else {
coins = placedQty;
}
cm.sendPrev("Operation succeeded. Click '#rBack#k' to return to the main interface.");
advance = false;
}
} catch (err) {
cm.sendPrev("You must enter a positive number of erasers to insert. Click '#rBack#k' to return to the main interface.");
advance = false;
}
status = 2;
} else {
cm.dispose();
}
}
}
function getRewardIndex(hasCoin) {
@@ -160,77 +176,87 @@ function getRewardIndex(hasCoin) {
function getRewardTier() {
var points = getPoints();
if(points <= 6) {
if(points <= 0) return -1;
else return 0;
if (points <= 6) {
if (points <= 0) {
return -1;
} else {
return 0;
}
}
if(points >= 46) return 5;
if (points >= 46) {
return 5;
}
return Math.floor((points - 6) / 8);
}
function getPoints() {
var points = 0;
for(var i = 0; i < tickets.length; i++) {
if(tickets[i] <= 0) continue;
for (var i = 0; i < tickets.length; i++) {
if (tickets[i] <= 0) {
continue;
}
points += (6 + ((tickets[i] - 1) * getTicketMultiplier(i))); //6 from uniques + rest from each ticket difficulty
}
points += Math.ceil(0.46 * coins); // 100 coins for a LV6 tier item.
return points;
}
function getTicketMultiplier(ticket) {
if(ticket == 1 || ticket == 3) return 3;
else return 1;
if (ticket == 1 || ticket == 3) {
return 3;
} else {
return 1;
}
}
function givePrize() {
var lvTarget, lvQty;
if(currentTier == 0) {
lvTarget = itemSet_lv1;
lvQty = itemQty_lv1;
} else if(currentTier == 1) {
lvTarget = itemSet_lv2;
lvQty = itemQty_lv2;
} else if(currentTier == 2) {
lvTarget = itemSet_lv3;
lvQty = itemQty_lv3;
} else if(currentTier == 3) {
lvTarget = itemSet_lv4;
lvQty = itemQty_lv4;
} else if(currentTier == 4) {
lvTarget = itemSet_lv5;
lvQty = itemQty_lv5;
} else {
lvTarget = itemSet_lv6;
lvQty = itemQty_lv6;
}
if(!hasRewardSlot(lvTarget, lvQty)) {
cm.sendOk("Check for an available space on your inventory before retrieving a prize.");
} else {
var rnd = Math.floor(Math.random() * lvTarget.length);
for(var i = 0; i < tickets.length; i++) {
cm.gainItem(4001009 + i, -1 * tickets[i]);
}
cm.gainItem(coinId, -1 * coins);
cm.gainItem(lvTarget[rnd], lvQty[rnd]);
var lvTarget, lvQty;
if (currentTier == 0) {
lvTarget = itemSet_lv1;
lvQty = itemQty_lv1;
} else if (currentTier == 1) {
lvTarget = itemSet_lv2;
lvQty = itemQty_lv2;
} else if (currentTier == 2) {
lvTarget = itemSet_lv3;
lvQty = itemQty_lv3;
} else if (currentTier == 3) {
lvTarget = itemSet_lv4;
lvQty = itemQty_lv4;
} else if (currentTier == 4) {
lvTarget = itemSet_lv5;
lvQty = itemQty_lv5;
} else {
lvTarget = itemSet_lv6;
lvQty = itemQty_lv6;
}
if (!hasRewardSlot(lvTarget, lvQty)) {
cm.sendOk("Check for an available space on your inventory before retrieving a prize.");
} else {
var rnd = Math.floor(Math.random() * lvTarget.length);
for (var i = 0; i < tickets.length; i++) {
cm.gainItem(4001009 + i, -1 * tickets[i]);
}
cm.gainItem(coinId, -1 * coins);
cm.gainItem(lvTarget[rnd], lvQty[rnd]);
}
}
function hasRewardSlot(lvTarget, lvQty) {
for(var i = 0; i < lvTarget.length; i++) {
if(!cm.canHold(lvTarget[i], lvQty[i])) {
return false;
}
for (var i = 0; i < lvTarget.length; i++) {
if (!cm.canHold(lvTarget[i], lvQty[i])) {
return false;
}
}
return true;
return true;
}

View File

@@ -23,7 +23,7 @@
* @npc: Billy
* @map: 193000000 - Premium Road - Kerning City Internet Cafe
* @func: Cafe PQ Reward Announcer
*/
*/
var status;
@@ -48,63 +48,66 @@ var itemQty_lv1 = [1, 1, 1, 1, 1, 20, 20, 20, 20, 20, 25, 25, 25, 50, 50, 12, 1,
var levels = ["Tier 1", "Tier 2", "Tier 3", "Tier 4", "Tier 5", "Tier 6"];
function start() {
status = -1;
action(1, 0, 0);
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();
} else {
if (mode == 0 && status == 0) {
cm.dispose();
return;
}
if (mode == 1)
status++;
else
status--;
if (status == 0) {
var sendStr = "The #bInternet Cafe Party Quest#k rewards players with ticket-like #bfigure erasers#k, that can be used on the vending machine to retrieve prizes. By further increasing the stakes, one can get better prizes, separated by #rtiers#k.\r\n\r\nThe possible rewards for each tier are depicted here:\r\n\r\n#b";
for(var i = 0; i < 6; i++) {
sendStr += "#L" + i + "#" + levels[i] + "#l\r\n";
}
cm.sendSimple(sendStr);
} else if(status == 1) {
var lvTarget, lvQty;
if(selection == 0) {
lvTarget = itemSet_lv1;
lvQty = itemQty_lv1;
} else if(selection == 1) {
lvTarget = itemSet_lv2;
lvQty = itemQty_lv2;
} else if(selection == 2) {
lvTarget = itemSet_lv3;
lvQty = itemQty_lv3;
} else if(selection == 3) {
lvTarget = itemSet_lv4;
lvQty = itemQty_lv4;
} else if(selection == 4) {
lvTarget = itemSet_lv5;
lvQty = itemQty_lv5;
} else {
lvTarget = itemSet_lv6;
lvQty = itemQty_lv6;
}
var sendStr = "The following items are being awarded at #b" + levels[selection] + "#k:\r\n\r\n";
for(var i = 0; i < lvTarget.length; i++) {
sendStr += " #L" + i + "# #i" + lvTarget[i] + "# #t" + lvTarget[i] + "#";
if(lvQty[i] > 1) sendStr += " (" + lvQty[i] + ")";
sendStr += "#l\r\n";
}
cm.sendPrev(sendStr);
} else if(status == 2) {
cm.dispose();
}
if (mode == -1) {
cm.dispose();
} else {
if (mode == 0 && status == 0) {
cm.dispose();
return;
}
if (mode == 1) {
status++;
} else {
status--;
}
if (status == 0) {
var sendStr = "The #bInternet Cafe Party Quest#k rewards players with ticket-like #bfigure erasers#k, that can be used on the vending machine to retrieve prizes. By further increasing the stakes, one can get better prizes, separated by #rtiers#k.\r\n\r\nThe possible rewards for each tier are depicted here:\r\n\r\n#b";
for (var i = 0; i < 6; i++) {
sendStr += "#L" + i + "#" + levels[i] + "#l\r\n";
}
cm.sendSimple(sendStr);
} else if (status == 1) {
var lvTarget, lvQty;
if (selection == 0) {
lvTarget = itemSet_lv1;
lvQty = itemQty_lv1;
} else if (selection == 1) {
lvTarget = itemSet_lv2;
lvQty = itemQty_lv2;
} else if (selection == 2) {
lvTarget = itemSet_lv3;
lvQty = itemQty_lv3;
} else if (selection == 3) {
lvTarget = itemSet_lv4;
lvQty = itemQty_lv4;
} else if (selection == 4) {
lvTarget = itemSet_lv5;
lvQty = itemQty_lv5;
} else {
lvTarget = itemSet_lv6;
lvQty = itemQty_lv6;
}
var sendStr = "The following items are being awarded at #b" + levels[selection] + "#k:\r\n\r\n";
for (var i = 0; i < lvTarget.length; i++) {
sendStr += " #L" + i + "# #i" + lvTarget[i] + "# #t" + lvTarget[i] + "#";
if (lvQty[i] > 1) {
sendStr += " (" + lvQty[i] + ")";
}
sendStr += "#l\r\n";
}
cm.sendPrev(sendStr);
} else if (status == 2) {
cm.dispose();
}
}
}

View File

@@ -20,34 +20,37 @@ function action(mode, type, selection) {
cm.dispose();
return;
}
if (mode == 1)
if (mode == 1) {
status++;
else
} else {
status--;
}
if (status == 1) {
var selStr = "";
if (cm.getJobId() == 0)
if (cm.getJobId() == 0) {
selStr += "We have a special 90% discount for beginners.";
}
selStr += "Choose your destination, for fees will change from place to place.#b";
for (var i = 0; i < maps.length; i++)
for (var i = 0; i < maps.length; i++) {
selStr += "\r\n#L" + i + "##m" + maps[i] + "# (" + (cm.getJobId() == 0 ? cost[i] / 10 : cost[i]) + " mesos)#l";
}
cm.sendSimple(selStr);
} else if (status == 2) {
cm.sendYesNo("You don't have anything else to do here, huh? Do you really want to go to #b#m" + maps[selection] + "##k? It'll cost you #b"+ (cm.getJobId() == 0 ? cost[selection] / 10 : cost[selection]) + " mesos#k.");
cm.sendYesNo("You don't have anything else to do here, huh? Do you really want to go to #b#m" + maps[selection] + "##k? It'll cost you #b" + (cm.getJobId() == 0 ? cost[selection] / 10 : cost[selection]) + " mesos#k.");
selectedMap = selection;
} else if (status == 3) {
if (cm.getJobId() == 0) {
mesos = cost[selectedMap] / 10;
mesos = cost[selectedMap] / 10;
} else {
mesos = cost[selectedMap];
mesos = cost[selectedMap];
}
if (cm.getMeso() < mesos) {
cm.sendNext("You don't have enough mesos. Sorry to say this, but without them, you won't be able to ride the cab.");
cm.dispose();
return;
}
cm.gainMeso(-mesos);
cm.warp(maps[selectedMap], 0);
cm.dispose();

View File

@@ -37,6 +37,7 @@ function pushIfItemExists(array, itemid) {
array.push(itemid);
}
}
function start() {
status = -1;
action(1, 0, 0);
@@ -44,12 +45,14 @@ function start() {
function action(mode, type, selection) {
if (mode < 1) // disposing issue with stylishs found thanks to Vcoc
{
cm.dispose();
else {
if (mode == 1)
} else {
if (mode == 1) {
status++;
else
} else {
status--;
}
if (status == 0) {
cm.sendSimple("Hello! I'm Don Giovanni, head of the beauty salon! If you have either #b#t5150003##k or #b#t5151003##k, why don't you let me take care of the rest? Decide what you want to do with your hair...\r\n#L1#Haircut: #i5150003##t5150003##l\r\n#L2#Dye your hair: #i5151003##t5151003##l");
} else if (status == 1) {
@@ -57,46 +60,49 @@ function action(mode, type, selection) {
beauty = 1;
hairnew = Array();
if (cm.getPlayer().getGender() == 0) {
for(var i = 0; i < mhair_v.length; i++)
for (var i = 0; i < mhair_v.length; i++) {
pushIfItemExists(hairnew, mhair_v[i] + parseInt(cm.getPlayer().getHair() % 10));
}
}
if (cm.getPlayer().getGender() == 1) {
for(var i = 0; i < fhair_v.length; i++)
for (var i = 0; i < fhair_v.length; i++) {
pushIfItemExists(hairnew, fhair_v[i] + parseInt(cm.getPlayer().getHair() % 10));
}
}
cm.sendStyle("I can totally change up your hairstyle and make it look so good. Why don't you change it up a bit? If you have #b#t5150003##k I'll change it for you. Choose the one to your liking~.", hairnew);
} else if (selection == 2) {
beauty = 2;
haircolor = Array();
var current = parseInt(cm.getPlayer().getHair()/10)*10;
for(var i = 0; i < 8; i++) {
var current = parseInt(cm.getPlayer().getHair() / 10) * 10;
for (var i = 0; i < 8; i++) {
pushIfItemExists(haircolor, current + i);
}
cm.sendStyle("I can totally change your haircolor and make it look so good. Why don't you change it up a bit? With #b#t5151003##k I'll change it for you. Choose the one to your liking.", haircolor);
}
}
else if (status == 2){
} else if (status == 2) {
cm.dispose();
if (beauty == 1){
if (cm.haveItem(5420003)){
if (beauty == 1) {
if (cm.haveItem(5420003)) {
cm.setHair(hairnew[selection]);
cm.sendOk("Enjoy your new and improved hairstyle!");
} else if (cm.haveItem(5150003)){
} else if (cm.haveItem(5150003)) {
cm.gainItem(5150003, -1);
cm.setHair(hairnew[selection]);
cm.sendOk("Enjoy your new and improved hairstyle!");
} else
} else {
cm.sendOk("Hmmm...it looks like you don't have our designated coupon...I'm afraid I can't give you a haircut without it. I'm sorry...");
}
}
if (beauty == 2){
if (cm.haveItem(5151003)){
if (beauty == 2) {
if (cm.haveItem(5151003)) {
cm.gainItem(5151003, -1);
cm.setHair(haircolor[selection]);
cm.sendOk("Enjoy your new and improved haircolor!");
} else
} else {
cm.sendOk("Hmmm...it looks like you don't have our designated coupon...I'm afraid I can't dye your hair without it. I'm sorry...");
}
}
if (beauty == 0){
if (beauty == 0) {
if (selection == 0 && cm.getMeso() >= hairprice) {
cm.gainMeso(-hairprice);
cm.gainItem(5150003, 1);
@@ -105,8 +111,9 @@ function action(mode, type, selection) {
cm.gainMeso(-haircolorprice);
cm.gainItem(5151003, 1);
cm.sendOk("Enjoy!");
} else
} else {
cm.sendOk("You don't have enough mesos to buy a coupon!");
}
}
}
}

View File

@@ -39,6 +39,7 @@ function pushIfItemExists(array, itemid) {
array.push(itemid);
}
}
function start() {
status = -1;
action(1, 0, 0);
@@ -48,10 +49,11 @@ function action(mode, type, selection) {
if (mode < 1) { // disposing issue with stylishs found thanks to Vcoc
cm.dispose();
} else {
if (mode == 1)
if (mode == 1) {
status++;
else
} else {
status--;
}
if (status == 0) {
cm.sendSimple("I'm Andre, Don's assistant. Everyone calls me Andre, though. If you have a #b#t5150002##k, #b#t5150011##k or a #b#t5151002##k, please let me change your hairdo!\r\n#L0#Haircut: #i5150002##t5150002##l\r\n#L1#Haircut: #i5150011##t5150011##l\r\n#L2#Dye your hair: #i5151002##t5151002##l");
} else if (status == 1) {
@@ -59,13 +61,13 @@ function action(mode, type, selection) {
beauty = 3;
hairnew = Array();
if (cm.getPlayer().getGender() == 0) {
for(var i = 0; i < mhair_r.length; i++) {
for (var i = 0; i < mhair_r.length; i++) {
pushIfItemExists(hairnew, mhair_r[i] + parseInt(cm.getPlayer().getHair()
% 10));
}
}
if (cm.getPlayer().getGender() == 1) {
for(var i = 0; i < fhair_r.length; i++) {
for (var i = 0; i < fhair_r.length; i++) {
pushIfItemExists(hairnew, fhair_r[i] + parseInt(cm.getPlayer().getHair()
% 10));
}
@@ -75,13 +77,13 @@ function action(mode, type, selection) {
beauty = 1;
hairnew = Array();
if (cm.getPlayer().getGender() == 0) {
for(var i = 0; i < mhair_e.length; i++) {
for (var i = 0; i < mhair_e.length; i++) {
pushIfItemExists(hairnew, mhair_e[i] + parseInt(cm.getPlayer().getHair()
% 10));
}
}
if (cm.getPlayer().getGender() == 1) {
for(var i = 0; i < fhair_e.length; i++) {
for (var i = 0; i < fhair_e.length; i++) {
pushIfItemExists(hairnew, fhair_e[i] + parseInt(cm.getPlayer().getHair()
% 10));
}
@@ -91,17 +93,16 @@ function action(mode, type, selection) {
beauty = 2;
haircolor = Array();
var current = parseInt(cm.getPlayer().getHair()
/10)*10;
for(var i = 0; i < 8; i++) {
/ 10) * 10;
for (var i = 0; i < 8; i++) {
pushIfItemExists(haircolor, current + i);
}
cm.sendYesNo("If you use a regular coupon your hair will change RANDOMLY. Do you still want to use #b#t5151002##k and change it up?");
}
}
else if (status == 2){
} else if (status == 2) {
cm.dispose();
if (beauty == 1){
if (cm.haveItem(5150011) == true){
if (beauty == 1) {
if (cm.haveItem(5150011) == true) {
cm.gainItem(5150011, -1);
cm.setHair(hairnew[Math.floor(Math.random() * hairnew.length)]);
cm.sendOk("Enjoy your new and improved hairstyle!");
@@ -109,8 +110,8 @@ function action(mode, type, selection) {
cm.sendOk("Hmmm...it looks like you don't have our designated coupon...I'm afraid I can't give you a haircut without it. I'm sorry...");
}
}
if (beauty == 2){
if (cm.haveItem(5151002) == true){
if (beauty == 2) {
if (cm.haveItem(5151002) == true) {
cm.gainItem(5151002, -1);
cm.setHair(haircolor[Math.floor(Math.random() * haircolor.length)]);
cm.sendOk("Enjoy your new and improved haircolor!");
@@ -118,8 +119,8 @@ function action(mode, type, selection) {
cm.sendOk("Hmmm...it looks like you don't have our designated coupon...I'm afraid I can't dye your hair without it. I'm sorry...");
}
}
if (beauty == 3){
if (cm.haveItem(5150002) == true){
if (beauty == 3) {
if (cm.haveItem(5150002) == true) {
cm.gainItem(5150002, -1);
cm.setHair(hairnew[Math.floor(Math.random() * hairnew.length)]);
cm.sendOk("Enjoy your new and improved hairstyle!");
@@ -127,7 +128,7 @@ function action(mode, type, selection) {
cm.sendOk("Hmmm...it looks like you don't have our designated coupon...I'm afraid I can't give you a haircut without it. I'm sorry...");
}
}
if (beauty == 0){
if (beauty == 0) {
if (selection == 0 && cm.getMeso() >= hairprice) {
cm.gainMeso(-hairprice);
cm.gainItem(5150011, 1);

View File

@@ -25,28 +25,29 @@
*/
var status;
function start() {
status = -1;
action(1, 0, 0);
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();
} else {
if (mode == 0 && status == 0) {
cm.dispose();
return;
}
if (mode == 1)
status++;
else
status--;
if(status == 0) {
cm.sendOk("A small focus of light lighting in the immersive darkness.");
cm.dispose();
}
if (mode == -1) {
cm.dispose();
} else {
if (mode == 0 && status == 0) {
cm.dispose();
return;
}
if (mode == 1) {
status++;
} else {
status--;
}
if (status == 0) {
cm.sendOk("A small focus of light lighting in the immersive darkness.");
cm.dispose();
}
}
}

View File

@@ -24,28 +24,29 @@
*/
var status;
function start() {
status = -1;
action(1, 0, 0);
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();
} else {
if (mode == 0 && type > 0) {
cm.dispose();
return;
}
if (mode == 1)
status++;
else
status--;
if(status == 0) {
cm.sendOk("Just a trash can sitting there.");
cm.dispose();
}
if (mode == -1) {
cm.dispose();
} else {
if (mode == 0 && type > 0) {
cm.dispose();
return;
}
if (mode == 1) {
status++;
} else {
status--;
}
if (status == 0) {
cm.sendOk("Just a trash can sitting there.");
cm.dispose();
}
}
}

View File

@@ -4,7 +4,7 @@
*/
var status;
function start() {
status = -1;
action(1, 0, 0);
@@ -18,12 +18,13 @@ function action(mode, type, selection) {
cm.dispose();
return;
}
if (mode == 1)
if (mode == 1) {
status++;
else
status--;
if(status == 0) {
} else {
status--;
}
if (status == 0) {
cm.sendOk("Just a trash can sitting there.");
cm.dispose();
}

View File

@@ -5,43 +5,42 @@
var status;
function start(){
status = -1;
action(1, 0, 0);
function start() {
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection){
if(mode == -1){
cm.dispose();
return;
}
else{
if(mode == 0 && status == 0){
cm.dispose();
return;
}
else if(mode == 0)
status--;
else
status++;
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();
if(status == 0) {
if(cm.isQuestStarted(20710)) {
if(!cm.hasItem(4032136)) {
if(cm.canHold(4032136)) {
cm.gainItem(4032136, 1);
cm.sendNext("You have found a #b#t4032136##k in the trash can! #i4032136#");
} else {
cm.sendOk("#i4032136# Not enough space in your ETC inventory.");
}
} else {
cm.sendOk("Just a trash can sitting there.");
}
} else {
cm.sendOk("Just a trash can sitting there.");
}
} else if(status == 1){
cm.dispose();
}
}
} else {
if (mode == 0 && status == 0) {
cm.dispose();
return;
} else if (mode == 0) {
status--;
} else {
status++;
}
if (status == 0) {
if (cm.isQuestStarted(20710)) {
if (!cm.hasItem(4032136)) {
if (cm.canHold(4032136)) {
cm.gainItem(4032136, 1);
cm.sendNext("You have found a #b#t4032136##k in the trash can! #i4032136#");
} else {
cm.sendOk("#i4032136# Not enough space in your ETC inventory.");
}
} else {
cm.sendOk("Just a trash can sitting there.");
}
} else {
cm.sendOk("Just a trash can sitting there.");
}
} else if (status == 1) {
cm.dispose();
}
}
}

View File

@@ -4,7 +4,7 @@
*/
var status;
function start() {
status = -1;
action(1, 0, 0);
@@ -18,12 +18,13 @@ function action(mode, type, selection) {
cm.dispose();
return;
}
if (mode == 1)
if (mode == 1) {
status++;
else
status--;
if(status == 0) {
} else {
status--;
}
if (status == 0) {
cm.sendOk("Just a trash can sitting there.");
cm.dispose();
}

View File

@@ -9,35 +9,35 @@ function start() {
function action(mode, type, selection) {
if (mode == 1) {
status++;
status++;
} else {
if (status <= 1) {
cm.dispose();
return;
}
status--;
if (status <= 1) {
cm.dispose();
return;
}
status--;
}
if (status == 0) {
if(cm.getLevel() >= 20) {
cm.sendOk("This training ground is available only for those under level 20.");
cm.dispose();
return;
if (cm.getLevel() >= 20) {
cm.sendOk("This training ground is available only for those under level 20.");
cm.dispose();
return;
}
var selStr = "Would you like to go into the Training Center?";
for (var i = 0; i < num; i++) {
selStr += "\r\n#b#L" + i + "#Training Center " + i + " (" + cm.getPlayerCount(map + i) + "/" + maxp + ")#l#k";
}
cm.sendSimple(selStr);
var selStr = "Would you like to go into the Training Center?";
for (var i = 0; i < num; i++) {
selStr += "\r\n#b#L" + i + "#Training Center " + i + " (" + cm.getPlayerCount(map + i) + "/" + maxp + ")#l#k";
}
cm.sendSimple(selStr);
} else if (status == 1) {
if (selection < 0 || selection >= num) {
cm.dispose();
} else if (cm.getPlayerCount(map + selection) >= maxp) {
cm.sendNext("This training center is full.");
status = -1;
} else {
cm.warp(map + selection, 0);
cm.dispose();
}
if (selection < 0 || selection >= num) {
cm.dispose();
} else if (cm.getPlayerCount(map + selection) >= maxp) {
cm.sendNext("This training center is full.");
status = -1;
} else {
cm.warp(map + selection, 0);
cm.dispose();
}
}
}

View File

@@ -9,35 +9,35 @@ function start() {
function action(mode, type, selection) {
if (mode == 1) {
status++;
status++;
} else {
if (status <= 1) {
cm.dispose();
return;
}
status--;
if (status <= 1) {
cm.dispose();
return;
}
status--;
}
if (status == 0) {
if(cm.getLevel() >= 20) {
if (cm.getLevel() >= 20) {
cm.sendOk("This training ground is available only for those under level 20.");
cm.dispose();
return;
}
var selStr = "Would you like to go into the Training Center?";
for (var i = 0; i < num; i++) {
selStr += "\r\n#b#L" + i + "#Training Center " + i + " (" + cm.getPlayerCount(map + i) + "/" + maxp + ")#l#k";
}
cm.sendSimple(selStr);
var selStr = "Would you like to go into the Training Center?";
for (var i = 0; i < num; i++) {
selStr += "\r\n#b#L" + i + "#Training Center " + i + " (" + cm.getPlayerCount(map + i) + "/" + maxp + ")#l#k";
}
cm.sendSimple(selStr);
} else if (status == 1) {
if (selection < 0 || selection >= num) {
cm.dispose();
} else if (cm.getPlayerCount(map + selection) >= maxp) {
cm.sendNext("This training center is full.");
status = -1;
} else {
cm.warp(map + selection, 0);
cm.dispose();
}
if (selection < 0 || selection >= num) {
cm.dispose();
} else if (cm.getPlayerCount(map + selection) >= maxp) {
cm.sendNext("This training center is full.");
status = -1;
} else {
cm.warp(map + selection, 0);
cm.dispose();
}
}
}

View File

@@ -1,5 +1,6 @@
var status = 0;
var section = 0;
//questid 29931, infoquest 7662
function start() {
@@ -8,71 +9,71 @@ function start() {
function action(mode, type, selection) {
if (mode == 1) {
status++;
status++;
} else {
status--;
status--;
}
if (status == 1) {
if (cm.getMapId() == 910320001) {
cm.warp(910320000, 0);
cm.dispose();
} else if (cm.getMapId() == 910330001) {
var itemid = 4001321;
if (!cm.canHold(itemid)) {
cm.sendOk("Please make room for 1 ETC slot.");
} else {
cm.gainItem(itemid,1);
cm.warp(910320000, 0);
}
cm.dispose();
} else if (cm.getMapId() >= 910320100 && cm.getMapId() <= 910320304) {
cm.sendYesNo("Would you like to exit this place?");
status = 99;
} else {
cm.sendSimple("My name is Mr.Lim.\r\n#b#e#L1#Enter the Dusty Platform.#l#n\r\n#L2#Head towards Train 999.#l\r\n#L3#Receive a medal of <Honorary Employee>.#l#k");
}
if (cm.getMapId() == 910320001) {
cm.warp(910320000, 0);
cm.dispose();
} else if (cm.getMapId() == 910330001) {
var itemid = 4001321;
if (!cm.canHold(itemid)) {
cm.sendOk("Please make room for 1 ETC slot.");
} else {
cm.gainItem(itemid, 1);
cm.warp(910320000, 0);
}
cm.dispose();
} else if (cm.getMapId() >= 910320100 && cm.getMapId() <= 910320304) {
cm.sendYesNo("Would you like to exit this place?");
status = 99;
} else {
cm.sendSimple("My name is Mr.Lim.\r\n#b#e#L1#Enter the Dusty Platform.#l#n\r\n#L2#Head towards Train 999.#l\r\n#L3#Receive a medal of <Honorary Employee>.#l#k");
}
} else if (status == 2) {
section = selection;
if (selection == 1) {
if (cm.getPlayer().getLevel() < 25 || cm.getPlayer().getLevel() > 30 || !cm.isLeader()) {
cm.sendOk("You must be in the Level Range 25-30 and be the party leader.");
} else {
if (!cm.start_PyramidSubway(-1)) {
cm.sendOk("The Dusty Platform is currently full at the moment.");
}
}
//todo
} else if (selection == 2) {
if (cm.haveItem(4001321)) {
if (cm.bonus_PyramidSubway(-1)) {
cm.gainItem(4001321, -1);
} else {
cm.sendOk("The Train 999 is currently full at the moment");
}
} else {
cm.sendOk("You do not have the Boarding Pass.");
}
} else if (selection == 3) {
var record = cm.getQuestRecord(7662);
var data = record.getCustomData();
if (data == null) {
record.setCustomData("0");
data = record.getCustomData();
}
var mons = parseInt(data);
if (mons < 10000) {
cm.sendOk("Please defeat at least 10,000 monsters in the Station and look for me again. Kills : " + mons);
} else if (cm.canHold(1142141) && !cm.haveItem(1142141)){
cm.gainItem(1142141,1);
cm.startQuest(29931);
cm.completeQuest(29931);
} else {
cm.sendOk("Please make room.");
}
}
cm.dispose();
} else if (status == 100) {
cm.warp(910320000,0);
cm.dispose();
}
section = selection;
if (selection == 1) {
if (cm.getPlayer().getLevel() < 25 || cm.getPlayer().getLevel() > 30 || !cm.isLeader()) {
cm.sendOk("You must be in the Level Range 25-30 and be the party leader.");
} else {
if (!cm.start_PyramidSubway(-1)) {
cm.sendOk("The Dusty Platform is currently full at the moment.");
}
}
//todo
} else if (selection == 2) {
if (cm.haveItem(4001321)) {
if (cm.bonus_PyramidSubway(-1)) {
cm.gainItem(4001321, -1);
} else {
cm.sendOk("The Train 999 is currently full at the moment");
}
} else {
cm.sendOk("You do not have the Boarding Pass.");
}
} else if (selection == 3) {
var record = cm.getQuestRecord(7662);
var data = record.getCustomData();
if (data == null) {
record.setCustomData("0");
data = record.getCustomData();
}
var mons = parseInt(data);
if (mons < 10000) {
cm.sendOk("Please defeat at least 10,000 monsters in the Station and look for me again. Kills : " + mons);
} else if (cm.canHold(1142141) && !cm.haveItem(1142141)) {
cm.gainItem(1142141, 1);
cm.startQuest(29931);
cm.completeQuest(29931);
} else {
cm.sendOk("Please make room.");
}
}
cm.dispose();
} else if (status == 100) {
cm.warp(910320000, 0);
cm.dispose();
}
}

View File

@@ -45,28 +45,28 @@ function action(mode, type, selection) {
}
}
if (status == 0) {
if (selection == 0) {
if (cm.isQuestStarted(2286) || cm.isQuestStarted(2287) || cm.isQuestStarted(2288)) {
var em = cm.getEventManager("RockSpirit");
if (!em.startInstance(cm.getPlayer())) {
cm.sendOk("Uh... It looks like the rooms ahead are a bit crowded right now. Please wait around here for a bit, ok?");
}
cm.dispose();
return;
} else {
cm.sendOk("I did not hear anything from Blake that you are assisting him.");
}
} else {
if (cm.isQuestCompleted(2290)) {
if(cm.getPlayer().getLevel() > 50) {
cm.sendOk("The VIP area is available only for players #rlevel 50 or below#k.");
} else {
cm.sendOk("The VIP area only gets available after handing over #r#t4032521#s#k from the #b'Admission to the VIP Zone'#k quest.");
}
} else {
cm.sendOk("#rVIP#k? Yeah that is funny #rMr. VIP#k, now get lost before I call security.");
if (selection == 0) {
if (cm.isQuestStarted(2286) || cm.isQuestStarted(2287) || cm.isQuestStarted(2288)) {
var em = cm.getEventManager("RockSpirit");
if (!em.startInstance(cm.getPlayer())) {
cm.sendOk("Uh... It looks like the rooms ahead are a bit crowded right now. Please wait around here for a bit, ok?");
}
}
cm.dispose();
cm.dispose();
return;
} else {
cm.sendOk("I did not hear anything from Blake that you are assisting him.");
}
} else {
if (cm.isQuestCompleted(2290)) {
if (cm.getPlayer().getLevel() > 50) {
cm.sendOk("The VIP area is available only for players #rlevel 50 or below#k.");
} else {
cm.sendOk("The VIP area only gets available after handing over #r#t4032521#s#k from the #b'Admission to the VIP Zone'#k quest.");
}
} else {
cm.sendOk("#rVIP#k? Yeah that is funny #rMr. VIP#k, now get lost before I call security.");
}
}
cm.dispose();
}
}

View File

@@ -41,159 +41,163 @@ function start() {
}
function action(mode, type, selection) {
if (mode == 1)
if (mode == 1) {
status++;
else
} else {
cm.dispose();
}
if (status == 0 && mode == 1) {
var selStr = "Hello, I live here, but don't underestimate me. How about I help you by making you a new pair of shoes?#b"
var options = new Array("Create a Warrior shoe","Create a Bowman shoe","Create a Magician shoe","Create a Thief shoe");
for (var i = 0; i < options.length; i++){
var options = ["Create a Warrior shoe", "Create a Bowman shoe", "Create a Magician shoe", "Create a Thief shoe"];
for (var i = 0; i < options.length; i++) {
selStr += "\r\n#L" + i + "# " + options[i] + "#l";
}
cm.sendSimple(selStr);
}
else if (status == 1 && mode == 1) {
} else if (status == 1 && mode == 1) {
selectedType = selection;
var selStr;
var shoes;
if (selectedType == 0){ //warrior shoe
if (selectedType == 0) { //warrior shoe
selStr = "Warrior shoes? Sure thing, which kind?#b";
shoes = new Array ("Silver War Boots#k - Warrior Lv. 25#b","Gold War Boots#k - Warrior Lv. 25#b","Dark War Boots#k - Warrior Lv. 25#b",
"Emerald Battle Grieve#k - Warrior Lv. 30#b","Mithril Battle Grieve#k - Warrior Lv. 30#b","Silver Battle Grieve#k - Warrior Lv. 30#b","Blood Battle Grieve#k - Warrior Lv. 30#b",
"Steel Trigger#k - Warrior Lv. 35#b","Mithril Trigger#k - Warrior Lv. 35#b","Dark Trigger#k - Warrior Lv. 35#b",
"Brown Jangoon Boots#k - Warrior Lv. 40#b","Maroon Jangoon Boots#k - Warrior Lv. 40#b","Blue Jangoon Boots#k - Warrior Lv. 40#b",
"Emerald Hildon Boots#k - Warrior Lv. 50#b","Mithril Hildon Boots#k - Warrior Lv. 50#b","Orihalcon Hildon Boots#k - Warrior Lv. 50#b","Gold Hildon Boots#k - Warrior Lv. 50#b",
"Sapphire Camel Boots#k - Warrior Lv. 60#b","Orihalcon Camel Boots#k - Warrior Lv. 60#b","Blood Camel Boots#k - Warrior Lv. 60#b");;
}
else if (selectedType == 1){ //bowman shoe
shoes = ["Silver War Boots#k - Warrior Lv. 25#b", "Gold War Boots#k - Warrior Lv. 25#b", "Dark War Boots#k - Warrior Lv. 25#b",
"Emerald Battle Grieve#k - Warrior Lv. 30#b", "Mithril Battle Grieve#k - Warrior Lv. 30#b", "Silver Battle Grieve#k - Warrior Lv. 30#b", "Blood Battle Grieve#k - Warrior Lv. 30#b",
"Steel Trigger#k - Warrior Lv. 35#b", "Mithril Trigger#k - Warrior Lv. 35#b", "Dark Trigger#k - Warrior Lv. 35#b",
"Brown Jangoon Boots#k - Warrior Lv. 40#b", "Maroon Jangoon Boots#k - Warrior Lv. 40#b", "Blue Jangoon Boots#k - Warrior Lv. 40#b",
"Emerald Hildon Boots#k - Warrior Lv. 50#b", "Mithril Hildon Boots#k - Warrior Lv. 50#b", "Orihalcon Hildon Boots#k - Warrior Lv. 50#b", "Gold Hildon Boots#k - Warrior Lv. 50#b",
"Sapphire Camel Boots#k - Warrior Lv. 60#b", "Orihalcon Camel Boots#k - Warrior Lv. 60#b", "Blood Camel Boots#k - Warrior Lv. 60#b"];
} else if (selectedType == 1) { //bowman shoe
selStr = "Bowman shoes? Sure thing, which kind?#b";
shoes = new Array ("Brown Jack Boots#k - Bowman Lv. 25#b","Green Jack Boots#k - Bowman Lv. 25#b","Red Jack Boots#k - Bowman Lv. 25#b",
"Red Hunter Boots#k - Bowman Lv. 30#b","Blue Hunter Boots#k - Bowman Lv. 30#b","Green Hunter Boots#k - Bowman Lv. 30#b","Black Hunter Boots#k - Bowman Lv. 30#b","Brown Hunter Boots#k - Bowman Lv. 30#b",
"Blue Silky Boots#k - Bowman Lv. 35#b","Green Silky Boots#k - Bowman Lv. 35#b","Red Silky Boots#k - Bowman Lv. 35#b",
"Red Pierre Shoes#k - Bowman Lv. 40#b","Yellow Pierre Shoes#k - Bowman Lv. 40#b","Brown Pierre Shoes#k - Bowman Lv. 40#b","Blue Pierre Shoes#k - Bowman Lv. 40#b",
"Brown Steel-Tipped Boots#k - Bowman Lv. 50#b","Green Steel-Tipped Boots#k - Bowman Lv. 50#b","Blue Steel-Tipped Boots#k - Bowman Lv. 50#b","Purple Steel-Tipped Boots#k - Bowman Lv. 50#b",
"Red Gore Boots#k - Bowman Lv. 60#b","Blue Gore Boots#k - Bowman Lv. 60#b","Green Gore Boots#k - Bowman Lv. 60#b");
}else if (selectedType == 2){ //magician shoe
shoes = ["Brown Jack Boots#k - Bowman Lv. 25#b", "Green Jack Boots#k - Bowman Lv. 25#b", "Red Jack Boots#k - Bowman Lv. 25#b",
"Red Hunter Boots#k - Bowman Lv. 30#b", "Blue Hunter Boots#k - Bowman Lv. 30#b", "Green Hunter Boots#k - Bowman Lv. 30#b", "Black Hunter Boots#k - Bowman Lv. 30#b", "Brown Hunter Boots#k - Bowman Lv. 30#b",
"Blue Silky Boots#k - Bowman Lv. 35#b", "Green Silky Boots#k - Bowman Lv. 35#b", "Red Silky Boots#k - Bowman Lv. 35#b",
"Red Pierre Shoes#k - Bowman Lv. 40#b", "Yellow Pierre Shoes#k - Bowman Lv. 40#b", "Brown Pierre Shoes#k - Bowman Lv. 40#b", "Blue Pierre Shoes#k - Bowman Lv. 40#b",
"Brown Steel-Tipped Boots#k - Bowman Lv. 50#b", "Green Steel-Tipped Boots#k - Bowman Lv. 50#b", "Blue Steel-Tipped Boots#k - Bowman Lv. 50#b", "Purple Steel-Tipped Boots#k - Bowman Lv. 50#b",
"Red Gore Boots#k - Bowman Lv. 60#b", "Blue Gore Boots#k - Bowman Lv. 60#b", "Green Gore Boots#k - Bowman Lv. 60#b"];
} else if (selectedType == 2) { //magician shoe
selStr = "Magician shoes? Sure thing, which kind?#b";
shoes = new Array ("Blue Jewelery Shoes#k - Magician Lv. 20#b","Purple Jewelery Shoes#k - Magician Lv. 20#b","Red Jewelery Shoes#k - Magician Lv. 20#b",
"Silver Windshoes#k - Magician Lv. 25#b","Yellow Windshoes#k - Magician Lv. 25#b","Black Windshoes#k - Magician Lv. 25#b",
"Red Magicshoes#k - Magician Lv. 30#b","Blue Magicshoes#k - Magician Lv. 30#b","White Magicshoes#k - Magician Lv. 30#b","Black Magicshoes#k - Magician Lv. 30#b",
"Purple Salt Shoes#k - Magician Lv. 35#b","Red Salt Shoes#k - Magician Lv. 35#b","Black Salt Shoes#k - Magician Lv. 35#b",
"Red Moon Shoes#k - Magician Lv. 40#b","Blue Moon Shoes#k - Magician Lv. 40#b","Gold Moon Shoes#k - Magician Lv. 40#b","Dark Moon Shoes#k - Magician Lv. 40#b",
"Pink Goldwind Shoes#k - Magician Lv. 50#b","Blue Goldwind Shoes#k - Magician Lv. 50#b","Purple Goldwind Shoes#k - Magician Lv. 50#b","Green Goldwind Shoes#k - Magician Lv. 50#b",
"Pink Goldrunners#k - Magician Lv. 60#b","Green Goldrunners#k - Magician Lv. 60#b","Orange Goldrunners#k - Magician Lv. 60#b","Blue Goldrunners#k - Magician Lv. 60#b");
}else if (selectedType == 3){ //thief shoe
shoes = ["Blue Jewelery Shoes#k - Magician Lv. 20#b", "Purple Jewelery Shoes#k - Magician Lv. 20#b", "Red Jewelery Shoes#k - Magician Lv. 20#b",
"Silver Windshoes#k - Magician Lv. 25#b", "Yellow Windshoes#k - Magician Lv. 25#b", "Black Windshoes#k - Magician Lv. 25#b",
"Red Magicshoes#k - Magician Lv. 30#b", "Blue Magicshoes#k - Magician Lv. 30#b", "White Magicshoes#k - Magician Lv. 30#b", "Black Magicshoes#k - Magician Lv. 30#b",
"Purple Salt Shoes#k - Magician Lv. 35#b", "Red Salt Shoes#k - Magician Lv. 35#b", "Black Salt Shoes#k - Magician Lv. 35#b",
"Red Moon Shoes#k - Magician Lv. 40#b", "Blue Moon Shoes#k - Magician Lv. 40#b", "Gold Moon Shoes#k - Magician Lv. 40#b", "Dark Moon Shoes#k - Magician Lv. 40#b",
"Pink Goldwind Shoes#k - Magician Lv. 50#b", "Blue Goldwind Shoes#k - Magician Lv. 50#b", "Purple Goldwind Shoes#k - Magician Lv. 50#b", "Green Goldwind Shoes#k - Magician Lv. 50#b",
"Pink Goldrunners#k - Magician Lv. 60#b", "Green Goldrunners#k - Magician Lv. 60#b", "Orange Goldrunners#k - Magician Lv. 60#b", "Blue Goldrunners#k - Magician Lv. 60#b"];
} else if (selectedType == 3) { //thief shoe
selStr = "Thief shoes? Sure thing, which kind?#b";
shoes = new Array ("Blue Lappy Shoes#k - Thief Lv. 25#b","Red Lappy Shoes#k - Thief Lv. 25#b","Green Lappy Shoes#k - Thief Lv. 25#b","Black Lappy Shoes#k - Thief Lv. 25#b",
"Bronze Chain Boots#k - Thief Lv. 30#b","Iron Chain Boots#k - Thief Lv. 30#b","Silver Chain Boots#k - Thief Lv. 30#b","Gold Chain Boots#k - Thief Lv. 30#b",
"Red White-Line Boots#k - Thief Lv. 35#b","Green White-Line Boots#k - Thief Lv. 35#b","Blue White-Line Boots#k - Thief Lv. 35#b",
"Black Red-Lined Shoes#k - Thief Lv. 40#b","Black Green-Lined Shoes#k - Thief Lv. 40#b","Black Yellow-Lined Shoes#k - Thief Lv. 40#b","Black Blue-Lined Shoes#k - Thief Lv. 40#b",
"Blue Goni Shoes#k - Thief Lv. 50#b","Red Goni Shoes#k - Thief Lv. 50#b","Green Goni Shoes#k - Thief Lv. 50#b","Purple Goni Shoes#k - Thief Lv. 50#b",
"Blood Moss Boots#k - Thief Lv. 60#b","Gold Moss Boots#k - Thief Lv. 60#b","Dark Moss Boots#k - Thief Lv. 60#b");
}for (var i = 0; i < shoes.length; i++)
selStr += "\r\n#L" + i + "# " + shoes[i] + "#l";
cm.sendSimple(selStr);
}else if (status == 2 && mode == 1) {
selectedItem = selection;
if (selectedType == 0){ //warrior shoe
var itemSet = new Array(1072051,1072053,1072052,1072003,1072039,1072040,1072041,1072002,1072112,1072113,1072000,1072126,1072127,1072132,1072133,1072134,1072135,1072147,1072148,1072149);
var matSet = new Array(new Array(4011004,4011001,4000021,4003000),new Array(4011006,4011001,4000021,4003000),new Array(4021008,4011001,4000021,4003000),new Array(4021003,4011001,4000021,4003000),new Array(4011002,4011001,4000021,4003000),
new Array(4011004,4011001,4000021,4003000),new Array(4021000,4011001,4000021,4003000),new Array(4011001,4021004,4000021,4000030,4003000),new Array(4011002,4021004,4000021,4000030,4003000),new Array(4021008,4021004,4000021,4000030,4003000),
new Array(4011003,4000021,4000030,4003000,4000033),new Array(4011005,4021007,4000030,4003000,4000042),new Array(4011002,4021007,4000030,4003000,4000041),new Array(4021008,4011001,4021003,4000030,4003000),
new Array(4021008,4011001,4011002,4000030,4003000),new Array(4021008,4011001,4011005,4000030,4003000),new Array(4021008,4011001,4011006,4000030,4003000),new Array(4021008,4011007,4021005,4000030,4003000),
new Array(4021008,4011007,4011005,4000030,4003000),new Array(4021008,4011007,4021000,4000030,4003000));
var matQtySet = new Array(new Array(2,1,15,10),new Array(2,1,15,10),new Array(1,2,20,10),new Array(4,2,45,15),new Array(4,2,45,15),new Array(4,2,45,15),new Array(4,2,45,15),new Array(3,1,30,20,25),new Array(3,1,30,20,25),new Array(2,1,30,20,25),
new Array(4,100,40,30,100),new Array(4,1,40,30,250),new Array(4,1,40,30,120),new Array(1,3,6,65,45),new Array(1,3,6,65,45),new Array(1,3,6,65,45),new Array(1,3,6,65,45),new Array(1,1,8,80,55),new Array(1,1,8,80,55),new Array(1,1,8,80,55));
var costSet = new Array(10000,10000,12000,20000,20000,20000,20000,22000,22000,25000,38000,38000,38000,50000,50000,50000,50000,60000,60000,60000);
item = itemSet[selectedItem];
mats = matSet[selectedItem];
matQty = matQtySet[selectedItem];
cost = costSet[selectedItem];
}else if (selectedType == 1){ //bowman shoe
var itemSet = new Array(1072027,1072034,1072069,1072079,1072080,1072081,1072082,1072083,1072101,1072102,1072103,1072118,1072119,1072120,1072121,1072122,1072123,1072124,1072125,1072144,1072145,1072146);
var matSet = new Array(new Array(4000021,4011000,4003000),new Array(4000021,4021003,4003000),new Array(4000021,4021000,4003000),new Array(4000021,4021000,4003000),new Array(4000021,4021005,4003000),new Array(4000021,4021003,4003000),
new Array(4000021,4021004,4003000),new Array(4000021,4021006,4003000),new Array(4021002,4021006,4000030,4000021,4003000),new Array(4021003,4021006,4000030,4000021,4003000),new Array(4021000,4021006,4000030,4000021,4003000),
new Array(4021000,4003000,4000030,4000024),new Array(4021006,4003000,4000030,4000027),new Array(4011003,4003000,4000030,4000044),new Array(4021002,4003000,4000030,4000009),new Array(4011001,4021006,4021008,4000030,4003000,4000033),
new Array(4011001,4021006,4021008,4000030,4003000,4000032),new Array(4011001,4021006,4021008,4000030,4003000,4000041),new Array(4011001,4021006,4021008,4000030,4003000,4000042),new Array(4011006,4021000,4021007,4000030,4003000),
new Array(4011006,4021005,4021007,4000030,4003000),new Array(4011006,4021003,4021007,4000030,4003000));
var matQtySet = new Array(new Array(35,3,10),new Array(35,1,10),new Array(35,1,10),new Array(50,2,15),new Array(50,2,15),new Array(50,2,15),new Array(50,2,15),new Array(50,2,15),
new Array(3,1,15,30,20),new Array(3,1,15,30,20),new Array(3,1,15,30,20),new Array(4,30,45,20),new Array(4,30,45,20),new Array(5,30,45,40),new Array(5,30,45,120),
new Array(3,3,1,60,35,80),new Array(3,3,1,60,35,150),new Array(3,3,1,60,35,100),new Array(3,3,1,60,35,250),new Array(5,8,1,75,50),new Array(5,8,1,75,50),new Array(5,8,1,75,50));
var costSet = new Array(9000,9000,9000,19000,19000,19000,19000,19000,19000,20000,20000,20000,32000,32000,40000,40000,50000,50000,50000,50000,60000,60000,60000);
item = itemSet[selectedItem];
mats = matSet[selectedItem];
matQty = matQtySet[selectedItem];
cost = costSet[selectedItem];
}else if (selectedType == 2){ //magician shoe
var itemSet = new Array(1072019,1072020,1072021,1072072,1072073,1072074,1072075,1072076,1072077,1072078,1072089,1072090,1072091,1072114,1072115,1072116,1072117,1072140,1072141,1072142,1072143,1072136,1072137,1072138,1072139);
var matSet = new Array(new Array(4021005,4000021,4003000),new Array(4021001,4000021,4003000),new Array(4021000,4000021,4003000),new Array(4011004,4000021,4003000),new Array(4021006,4000021,4003000),new Array(4021004,4000021,4003000),
new Array(4021000,4000021,4003000),new Array(4021002,4000021,4003000),new Array(4011004,4000021,4003000),new Array(4021008,4000021,4003000),new Array(4021001,4021006,4000021,4000030,4003000),new Array(4021000,4021006,4000021,4000030,4003000),
new Array(4021008,4021006,4000021,4000030,4003000),new Array(4021000,4000030,4000043,4003000),new Array(4021005,4000030,4000037,4003000),new Array(4011006,4021007,4000030,4000027,4003000),new Array(4021008,4021007,4000030,4000014,4003000),
new Array(4021009,4011006,4021000,4000030,4003000),new Array(4021009,4011006,4021005,4000030,4003000),new Array(4021009,4011006,4021001,4000030,4003000),new Array(4021009,4011006,4021003,4000030,4003000),
new Array(4021009,4011006,4011005,4000030,4003000),new Array(4021009,4011006,4021003,4000030,4003000),new Array(4021009,4011006,4011003,4000030,4003000),new Array(4021009,4011006,4021002,4000030,4003000));
var matQtySet = new Array(new Array(1,30,5),new Array(1,30,5),new Array(1,30,5),new Array(1,35,10),new Array(1,35,10),new Array(1,35,10),new Array(2,50,15),new Array(2,50,15),new Array(2,50,15),
new Array(1,50,15),new Array(3,1,30,15,20),new Array(3,1,30,15,20),new Array(2,1,40,25,20),new Array(4,40,35,25),new Array(4,40,70,25),new Array(2,1,40,20,25),new Array(2,1,40,30,30),
new Array(1,3,3,60,40),new Array(1,3,3,60,40),new Array(1,3,3,60,40),new Array(1,3,3,60,40),new Array(1,4,5,70,50),new Array(1,4,5,70,50),new Array(1,4,5,70,50),new Array(1,4,5,70,50));
var costSet = new Array(3000,3000,3000,8000,8000,8000,18000,18000,18000,18000,20000,20000,22000,30000,30000,35000,40000,50000,50000,50000,50000,60000,60000,60000,60000);
item = itemSet[selectedItem];
mats = matSet[selectedItem];
matQty = matQtySet[selectedItem];
cost = costSet[selectedItem];
}else if (selectedType == 3){ //thief shoe
var itemSet = new Array(1072084,1072085,1072086,1072087,1072032,1072033,1072035,1072036,1072104,1072105,1072106,1072107,1072108,1072109,1072110,1072128,1072130,1072129,1072131,1072150,1072151,1072152);
var matSet = new Array(new Array(4021005,4000021,4003000),new Array(4021000,4000021,4003000),new Array(4021003,4000021,4003000),new Array(4021004,4000021,4003000),new Array(4011000,4000021,4003000),new Array(4011001,4000021,4003000),new Array(4011004,4000021,4003000),new Array(4011006,4000021,4003000),new Array(4021000,4021004,4000021,4000030,4003000),new Array(4021003,4021004,4000021,4000030,4003000),new Array(4021002,4021004,4000021,4000030,4003000),new Array(4021000,4000030,4000033,4003000),new Array(4021003,4000030,4000032,4003000),new Array(4021006,4000030,4000040,4003000),new Array(4021005,4000030,4000037,4003000),new Array(4011007,4021005,4000030,4000037,4003000),new Array(4011007,4021000,4000030,4000043,4003000),new Array(4011007,4021003,4000030,4000045,4003000),new Array(4011007,4021001,4000030,4000036,4003000),new Array(4021008,4011007,4021005,4000030,4003000),new Array(4021008,4011007,4011005,4000030,4003000),new Array(4021008,4011007,4021000,4000030,4003000));
var matQtySet = new Array(new Array(1,35,10),new Array(1,35,10),new Array(1,35,10),new Array(1,35,10),new Array(3,50,15),new Array(3,50,15),new Array(2,50,15),new Array(2,50,15),new Array(3,1,30,15,20),new Array(3,1,30,15,20),new Array(3,1,30,15,20),
new Array(5,45,50,30),new Array(4,45,30,30),new Array(4,45,3,30),new Array(4,45,70,30),new Array(2,3,50,200,35),new Array(2,3,50,150,35),new Array(2,3,50,80,35),new Array(2,3,50,80,35),new Array(1,1,8,75,50),new Array(1,1,5,75,50),new Array(1,1,1,75,50));
var costSet = new Array(9000,9000,9000,9000,19000,19000,19000,21000,20000,20000,20000,40000,32000,35000,35000,50000,50000,50000,50000,60000,60000,60000);
item = itemSet[selectedItem];
mats = matSet[selectedItem];
matQty = matQtySet[selectedItem];
cost = costSet[selectedItem];
}var prompt = "You want me to make a #t" + item + "#? In that case, I'm going to need specific items from you in order to make it. Make sure you have room in your inventory, though!#b";
if (mats instanceof Array){
for(var i = 0; i < mats.length; i++)
prompt += "\r\n#i"+mats[i]+"# " + matQty[i] + " #t" + mats[i] + "#";
shoes = ["Blue Lappy Shoes#k - Thief Lv. 25#b", "Red Lappy Shoes#k - Thief Lv. 25#b", "Green Lappy Shoes#k - Thief Lv. 25#b", "Black Lappy Shoes#k - Thief Lv. 25#b",
"Bronze Chain Boots#k - Thief Lv. 30#b", "Iron Chain Boots#k - Thief Lv. 30#b", "Silver Chain Boots#k - Thief Lv. 30#b", "Gold Chain Boots#k - Thief Lv. 30#b",
"Red White-Line Boots#k - Thief Lv. 35#b", "Green White-Line Boots#k - Thief Lv. 35#b", "Blue White-Line Boots#k - Thief Lv. 35#b",
"Black Red-Lined Shoes#k - Thief Lv. 40#b", "Black Green-Lined Shoes#k - Thief Lv. 40#b", "Black Yellow-Lined Shoes#k - Thief Lv. 40#b", "Black Blue-Lined Shoes#k - Thief Lv. 40#b",
"Blue Goni Shoes#k - Thief Lv. 50#b", "Red Goni Shoes#k - Thief Lv. 50#b", "Green Goni Shoes#k - Thief Lv. 50#b", "Purple Goni Shoes#k - Thief Lv. 50#b",
"Blood Moss Boots#k - Thief Lv. 60#b", "Gold Moss Boots#k - Thief Lv. 60#b", "Dark Moss Boots#k - Thief Lv. 60#b"];
}
else
prompt += "\r\n#i"+mats+"# " + matQty + " #t" + mats + "#";
if (cost > 0)
for (var i = 0; i < shoes.length; i++) {
selStr += "\r\n#L" + i + "# " + shoes[i] + "#l";
}
cm.sendSimple(selStr);
} else if (status == 2 && mode == 1) {
selectedItem = selection;
if (selectedType == 0) { //warrior shoe
var itemSet = [1072051, 1072053, 1072052, 1072003, 1072039, 1072040, 1072041, 1072002, 1072112, 1072113, 1072000, 1072126, 1072127, 1072132, 1072133, 1072134, 1072135, 1072147, 1072148, 1072149];
var matSet = [[4011004, 4011001, 4000021, 4003000], [4011006, 4011001, 4000021, 4003000], [4021008, 4011001, 4000021, 4003000], [4021003, 4011001, 4000021, 4003000], [4011002, 4011001, 4000021, 4003000],
[4011004, 4011001, 4000021, 4003000], [4021000, 4011001, 4000021, 4003000], [4011001, 4021004, 4000021, 4000030, 4003000], [4011002, 4021004, 4000021, 4000030, 4003000], [4021008, 4021004, 4000021, 4000030, 4003000],
[4011003, 4000021, 4000030, 4003000, 4000033], [4011005, 4021007, 4000030, 4003000, 4000042], [4011002, 4021007, 4000030, 4003000, 4000041], [4021008, 4011001, 4021003, 4000030, 4003000],
[4021008, 4011001, 4011002, 4000030, 4003000], [4021008, 4011001, 4011005, 4000030, 4003000], [4021008, 4011001, 4011006, 4000030, 4003000], [4021008, 4011007, 4021005, 4000030, 4003000],
[4021008, 4011007, 4011005, 4000030, 4003000], [4021008, 4011007, 4021000, 4000030, 4003000]];
var matQtySet = [[2, 1, 15, 10], [2, 1, 15, 10], [1, 2, 20, 10], [4, 2, 45, 15], [4, 2, 45, 15], [4, 2, 45, 15], [4, 2, 45, 15], [3, 1, 30, 20, 25], [3, 1, 30, 20, 25], [2, 1, 30, 20, 25],
[4, 100, 40, 30, 100], [4, 1, 40, 30, 250], [4, 1, 40, 30, 120], [1, 3, 6, 65, 45], [1, 3, 6, 65, 45], [1, 3, 6, 65, 45], [1, 3, 6, 65, 45], [1, 1, 8, 80, 55], [1, 1, 8, 80, 55], [1, 1, 8, 80, 55]];
var costSet = [10000, 10000, 12000, 20000, 20000, 20000, 20000, 22000, 22000, 25000, 38000, 38000, 38000, 50000, 50000, 50000, 50000, 60000, 60000, 60000];
item = itemSet[selectedItem];
mats = matSet[selectedItem];
matQty = matQtySet[selectedItem];
cost = costSet[selectedItem];
} else if (selectedType == 1) { //bowman shoe
var itemSet = [1072027, 1072034, 1072069, 1072079, 1072080, 1072081, 1072082, 1072083, 1072101, 1072102, 1072103, 1072118, 1072119, 1072120, 1072121, 1072122, 1072123, 1072124, 1072125, 1072144, 1072145, 1072146];
var matSet = [[4000021, 4011000, 4003000], [4000021, 4021003, 4003000], [4000021, 4021000, 4003000], [4000021, 4021000, 4003000], [4000021, 4021005, 4003000], [4000021, 4021003, 4003000],
[4000021, 4021004, 4003000], [4000021, 4021006, 4003000], [4021002, 4021006, 4000030, 4000021, 4003000], [4021003, 4021006, 4000030, 4000021, 4003000], [4021000, 4021006, 4000030, 4000021, 4003000],
[4021000, 4003000, 4000030, 4000024], [4021006, 4003000, 4000030, 4000027], [4011003, 4003000, 4000030, 4000044], [4021002, 4003000, 4000030, 4000009], [4011001, 4021006, 4021008, 4000030, 4003000, 4000033],
[4011001, 4021006, 4021008, 4000030, 4003000, 4000032], [4011001, 4021006, 4021008, 4000030, 4003000, 4000041], [4011001, 4021006, 4021008, 4000030, 4003000, 4000042], [4011006, 4021000, 4021007, 4000030, 4003000],
[4011006, 4021005, 4021007, 4000030, 4003000], [4011006, 4021003, 4021007, 4000030, 4003000]];
var matQtySet = [[35, 3, 10], [35, 1, 10], [35, 1, 10], [50, 2, 15], [50, 2, 15], [50, 2, 15], [50, 2, 15], [50, 2, 15],
[3, 1, 15, 30, 20], [3, 1, 15, 30, 20], [3, 1, 15, 30, 20], [4, 30, 45, 20], [4, 30, 45, 20], [5, 30, 45, 40], [5, 30, 45, 120],
[3, 3, 1, 60, 35, 80], [3, 3, 1, 60, 35, 150], [3, 3, 1, 60, 35, 100], [3, 3, 1, 60, 35, 250], [5, 8, 1, 75, 50], [5, 8, 1, 75, 50], [5, 8, 1, 75, 50]];
var costSet = [9000, 9000, 9000, 19000, 19000, 19000, 19000, 19000, 19000, 20000, 20000, 20000, 32000, 32000, 40000, 40000, 50000, 50000, 50000, 50000, 60000, 60000, 60000];
item = itemSet[selectedItem];
mats = matSet[selectedItem];
matQty = matQtySet[selectedItem];
cost = costSet[selectedItem];
} else if (selectedType == 2) { //magician shoe
var itemSet = [1072019, 1072020, 1072021, 1072072, 1072073, 1072074, 1072075, 1072076, 1072077, 1072078, 1072089, 1072090, 1072091, 1072114, 1072115, 1072116, 1072117, 1072140, 1072141, 1072142, 1072143, 1072136, 1072137, 1072138, 1072139];
var matSet = [[4021005, 4000021, 4003000], [4021001, 4000021, 4003000], [4021000, 4000021, 4003000], [4011004, 4000021, 4003000], [4021006, 4000021, 4003000], [4021004, 4000021, 4003000],
[4021000, 4000021, 4003000], [4021002, 4000021, 4003000], [4011004, 4000021, 4003000], [4021008, 4000021, 4003000], [4021001, 4021006, 4000021, 4000030, 4003000], [4021000, 4021006, 4000021, 4000030, 4003000],
[4021008, 4021006, 4000021, 4000030, 4003000], [4021000, 4000030, 4000043, 4003000], [4021005, 4000030, 4000037, 4003000], [4011006, 4021007, 4000030, 4000027, 4003000], [4021008, 4021007, 4000030, 4000014, 4003000],
[4021009, 4011006, 4021000, 4000030, 4003000], [4021009, 4011006, 4021005, 4000030, 4003000], [4021009, 4011006, 4021001, 4000030, 4003000], [4021009, 4011006, 4021003, 4000030, 4003000],
[4021009, 4011006, 4011005, 4000030, 4003000], [4021009, 4011006, 4021003, 4000030, 4003000], [4021009, 4011006, 4011003, 4000030, 4003000], [4021009, 4011006, 4021002, 4000030, 4003000]];
var matQtySet = [[1, 30, 5], [1, 30, 5], [1, 30, 5], [1, 35, 10], [1, 35, 10], [1, 35, 10], [2, 50, 15], [2, 50, 15], [2, 50, 15],
[1, 50, 15], [3, 1, 30, 15, 20], [3, 1, 30, 15, 20], [2, 1, 40, 25, 20], [4, 40, 35, 25], [4, 40, 70, 25], [2, 1, 40, 20, 25], [2, 1, 40, 30, 30],
[1, 3, 3, 60, 40], [1, 3, 3, 60, 40], [1, 3, 3, 60, 40], [1, 3, 3, 60, 40], [1, 4, 5, 70, 50], [1, 4, 5, 70, 50], [1, 4, 5, 70, 50], [1, 4, 5, 70, 50]];
var costSet = [3000, 3000, 3000, 8000, 8000, 8000, 18000, 18000, 18000, 18000, 20000, 20000, 22000, 30000, 30000, 35000, 40000, 50000, 50000, 50000, 50000, 60000, 60000, 60000, 60000];
item = itemSet[selectedItem];
mats = matSet[selectedItem];
matQty = matQtySet[selectedItem];
cost = costSet[selectedItem];
} else if (selectedType == 3) { //thief shoe
var itemSet = [1072084, 1072085, 1072086, 1072087, 1072032, 1072033, 1072035, 1072036, 1072104, 1072105, 1072106, 1072107, 1072108, 1072109, 1072110, 1072128, 1072130, 1072129, 1072131, 1072150, 1072151, 1072152];
var matSet = [[4021005, 4000021, 4003000], [4021000, 4000021, 4003000], [4021003, 4000021, 4003000], [4021004, 4000021, 4003000], [4011000, 4000021, 4003000], [4011001, 4000021, 4003000], [4011004, 4000021, 4003000], [4011006, 4000021, 4003000], [4021000, 4021004, 4000021, 4000030, 4003000], [4021003, 4021004, 4000021, 4000030, 4003000], [4021002, 4021004, 4000021, 4000030, 4003000], [4021000, 4000030, 4000033, 4003000], [4021003, 4000030, 4000032, 4003000], [4021006, 4000030, 4000040, 4003000], [4021005, 4000030, 4000037, 4003000], [4011007, 4021005, 4000030, 4000037, 4003000], [4011007, 4021000, 4000030, 4000043, 4003000], [4011007, 4021003, 4000030, 4000045, 4003000], [4011007, 4021001, 4000030, 4000036, 4003000], [4021008, 4011007, 4021005, 4000030, 4003000], [4021008, 4011007, 4011005, 4000030, 4003000], [4021008, 4011007, 4021000, 4000030, 4003000]];
var matQtySet = [[1, 35, 10], [1, 35, 10], [1, 35, 10], [1, 35, 10], [3, 50, 15], [3, 50, 15], [2, 50, 15], [2, 50, 15], [3, 1, 30, 15, 20], [3, 1, 30, 15, 20], [3, 1, 30, 15, 20],
[5, 45, 50, 30], [4, 45, 30, 30], [4, 45, 3, 30], [4, 45, 70, 30], [2, 3, 50, 200, 35], [2, 3, 50, 150, 35], [2, 3, 50, 80, 35], [2, 3, 50, 80, 35], [1, 1, 8, 75, 50], [1, 1, 5, 75, 50], [1, 1, 1, 75, 50]];
var costSet = [9000, 9000, 9000, 9000, 19000, 19000, 19000, 21000, 20000, 20000, 20000, 40000, 32000, 35000, 35000, 50000, 50000, 50000, 50000, 60000, 60000, 60000];
item = itemSet[selectedItem];
mats = matSet[selectedItem];
matQty = matQtySet[selectedItem];
cost = costSet[selectedItem];
}
var prompt = "You want me to make a #t" + item + "#? In that case, I'm going to need specific items from you in order to make it. Make sure you have room in your inventory, though!#b";
if (mats instanceof Array) {
for (var i = 0; i < mats.length; i++) {
prompt += "\r\n#i" + mats[i] + "# " + matQty[i] + " #t" + mats[i] + "#";
}
} else {
prompt += "\r\n#i" + mats + "# " + matQty + " #t" + mats + "#";
}
if (cost > 0) {
prompt += "\r\n#i4031138# " + cost + " meso";
}
cm.sendYesNo(prompt);
}
else if (status == 3 && mode == 1) {
} else if (status == 3 && mode == 1) {
var complete = true;
if(!cm.canHold(item, 1)) {
if (!cm.canHold(item, 1)) {
cm.sendOk("Check your inventory for a free slot first.");
cm.dispose();
return;
}
else if (cm.getMeso() < cost) {
} else if (cm.getMeso() < cost) {
cm.sendOk("Sorry, I can only accept meso.");
cm.dispose();
return;
}
else {
} else {
if (mats instanceof Array) {
for(var i = 0; complete && i < mats.length; i++)
if (!cm.haveItem(mats[i], matQty[i]))
for (var i = 0; complete && i < mats.length; i++) {
if (!cm.haveItem(mats[i], matQty[i])) {
complete = false;
}
else if (!cm.haveItem(mats, matQty))
}
}
} else if (!cm.haveItem(mats, matQty)) {
complete = false;
}
if (!complete)
cm.sendOk("Sorry, but I have to have those items to get this exactly right. Perhaps next time.");
else {
if (mats instanceof Array) {
for (var i = 0; i < mats.length; i++)
cm.gainItem(mats[i], -matQty[i]);
}
else
}
if (!complete) {
cm.sendOk("Sorry, but I have to have those items to get this exactly right. Perhaps next time.");
} else {
if (mats instanceof Array) {
for (var i = 0; i < mats.length; i++) {
cm.gainItem(mats[i], -matQty[i]);
}
} else {
cm.gainItem(mats, -matQty);
}
cm.gainMeso(-cost);
cm.gainItem(item, 1);
cm.sendOk("There, the shoes are ready. Be careful not to trip!");

View File

@@ -27,40 +27,43 @@ var selectedMap = -1;
function start() {
cm.sendNext("You feel a mysterious force surrounding this statue.");
if (cm.isQuestStarted(2054) || cm.isQuestCompleted(2054))
if (cm.isQuestStarted(2054) || cm.isQuestCompleted(2054)) {
zones = 3;
else if (cm.isQuestStarted(2053) || cm.isQuestCompleted(2053))
} else if (cm.isQuestStarted(2053) || cm.isQuestCompleted(2053)) {
zones = 2;
else if (cm.isQuestStarted(2052) || cm.isQuestCompleted(2052))
} else if (cm.isQuestStarted(2052) || cm.isQuestCompleted(2052)) {
zones = 1;
else
} else {
zones = 0;
}
}
function action(mode, type, selection) {
if (mode == -1)
if (mode == -1) {
cm.dispose();
else {
} else {
if (status >= 2 && mode == 0) {
cm.sendOk("Alright, see you next time.");
cm.dispose();
return;
}
if (mode == 1)
if (mode == 1) {
status++;
else
} else {
status--;
}
if (status == 1) {
if (zones == 0)
if (zones == 0) {
cm.dispose();
else {
} else {
var selStr = "Its power allows you to will yourself deep inside the forest.#b";
for (var i = 0; i < zones; i++)
for (var i = 0; i < zones; i++) {
selStr += "\r\n#L" + i + "#" + names[i] + "#l";
}
cm.sendSimple(selStr);
}
} else if (status == 2) {
cm.warp(maps[selection],0);
cm.warp(maps[selection], 0);
cm.dispose();
}
}

View File

@@ -24,7 +24,8 @@ function start() {
}
function action(mode, type, selection) {
if(mode == 1)
cm.warp(105040300,0);
if (mode == 1) {
cm.warp(105040300, 0);
}
cm.dispose();
}

View File

@@ -19,6 +19,7 @@
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 Ronan
@@ -27,46 +28,53 @@
*/
function jobString(niche) {
if(niche == 1) return "warrior";
else if(niche == 2) return "magician";
else if(niche == 3) return "bowman";
else if(niche == 4) return "thief";
else if(niche == 5) return "pirate";
if (niche == 1) {
return "warrior";
} else if (niche == 2) {
return "magician";
} else if (niche == 3) {
return "bowman";
} else if (niche == 4) {
return "thief";
} else if (niche == 5) {
return "pirate";
}
return "beginner";
}
function canEnterDimensionMap(mapid, jobid) {
if (mapid == 105070001 && (jobid >= 110 && jobid <= 130))
if (mapid == 105070001 && (jobid >= 110 && jobid <= 130)) {
return true;
else if (mapid == 105040305 && (jobid >= 310 && jobid <= 320))
} else if (mapid == 105040305 && (jobid >= 310 && jobid <= 320)) {
return true;
else if (mapid == 100040106 && (jobid >= 210 && jobid <= 230))
} else if (mapid == 100040106 && (jobid >= 210 && jobid <= 230)) {
return true;
else if (mapid == 107000402 && (jobid >= 410 && jobid <= 420))
} else if (mapid == 107000402 && (jobid >= 410 && jobid <= 420)) {
return true;
else if (mapid == 105070200 && (jobid >= 510 && jobid <= 520))
} else if (mapid == 105070200 && (jobid >= 510 && jobid <= 520)) {
return true;
}
return false;
}
function start() {
if (canEnterDimensionMap(cm.getMapId(), cm.getJob().getId()) && cm.getPlayer().gotPartyQuestItem("JBP") && !cm.haveItem(4031059)) {
var js = jobString(cm.getPlayer().getJob().getJobNiche());
var em = cm.getEventManager("3rdJob_" + js);
if (em == null)
if (em == null) {
cm.sendOk("Sorry, but 3rd job advancement (" + js + ") is closed.");
else {
} else {
if (!em.startInstance(cm.getPlayer())) {
cm.sendOk("Someone else is already challenging the clone. Please wait until the area is cleared.");
}
cm.dispose();
return;
}
}
cm.dispose();
}

View File

@@ -8,28 +8,39 @@ function start() {
}
function action(mode, type, selection) {
if (mode == -1)
cm.dispose();//ExitChat
else if (mode == 0)
cm.dispose();//No
else{ //Regular Talk
if (mode == 1)
if (mode == -1) {
cm.dispose();
}//ExitChat
else if (mode == 0) {
cm.dispose();
}//No
else { //Regular Talk
if (mode == 1) {
status++;
else
} else {
status--;
if(status == 0){
cm.sendYesNo("Would you like to leave?");
}else if(status == 1){
var mapid = cm.getMapId(), exitid = mapid;
if(mapid == 108010101) exitid = 105040305;
else if(mapid == 108010201) exitid = 100040106;
else if(mapid == 108010301) exitid = 105070001;
else if(mapid == 108010401) exitid = 107000402;
else if(mapid == 108010501) exitid = 105070200;
}
if (mapid != exitid) cm.getPlayer().changeMap(exitid);
cm.dispose();
if (status == 0) {
cm.sendYesNo("Would you like to leave?");
} else if (status == 1) {
var mapid = cm.getMapId(), exitid = mapid;
if (mapid == 108010101) {
exitid = 105040305;
} else if (mapid == 108010201) {
exitid = 100040106;
} else if (mapid == 108010301) {
exitid = 105070001;
} else if (mapid == 108010401) {
exitid = 107000402;
} else if (mapid == 108010501) {
exitid = 105070200;
}
if (mapid != exitid) {
cm.getPlayer().changeMap(exitid);
}
cm.dispose();
}
}
}

View File

@@ -6,36 +6,36 @@
function start() {
if (cm.getQuestStatus(6107) == 1 || cm.getQuestStatus(6108) == 1) {
var ret = checkJob();
if (ret == -1) {
cm.sendOk("Please form a party and talk to me again.");
} else if (ret == 0) {
cm.sendOk("Please make sure that your party is a size of 2.");
} else if (ret == 1) {
cm.sendOk("One of your party member's job is not eligible for entering the other world.");
} else if (ret == 2) {
cm.sendOk("One of your party member's level is not eligible for entering the other world.");
} else {
var em = cm.getEventManager("s4aWorld");
if (em == null) {
cm.sendOk("You're not allowed to enter with unknown reason. Try again." );
} else if (em.getProperty("started").equals("true")) {
cm.sendOk("Someone else is already attempting to defeat the Jr.Balrog in another world." );
} else {
var ret = checkJob();
if (ret == -1) {
cm.sendOk("Please form a party and talk to me again.");
} else if (ret == 0) {
cm.sendOk("Please make sure that your party is a size of 2.");
} else if (ret == 1) {
cm.sendOk("One of your party member's job is not eligible for entering the other world.");
} else if (ret == 2) {
cm.sendOk("One of your party member's level is not eligible for entering the other world.");
} else {
var em = cm.getEventManager("s4aWorld");
if (em == null) {
cm.sendOk("You're not allowed to enter with unknown reason. Try again.");
} else if (em.getProperty("started").equals("true")) {
cm.sendOk("Someone else is already attempting to defeat the Jr.Balrog in another world.");
} else {
var eli = em.getEligibleParty(cm.getParty());
if(eli.size() > 0) {
if(!em.startInstance(cm.getParty(), cm.getPlayer().getMap(), 1)) {
if (eli.size() > 0) {
if (!em.startInstance(cm.getParty(), cm.getPlayer().getMap(), 1)) {
cm.sendOk("A party in your name is already registered in this instance.");
}
} else {
cm.sendOk("You cannot start this party quest yet, because either your party is not in the range size, some of your party members are not eligible to attempt it or they are not in this map. If you're having trouble finding party members, try Party Search.");
}
}
}
}
}
} else {
cm.sendOk("You're not allowed to enter the other world with unknown reason.");
}
cm.dispose();
}
@@ -46,7 +46,7 @@ function checkJob() {
var party = cm.getParty();
if (party == null) {
return -1;
return -1;
}
// if (party.getMembers().size() != 2) {
// return 0;
@@ -54,15 +54,15 @@ function checkJob() {
var it = party.getMembers().iterator();
while (it.hasNext()) {
var cPlayer = it.next();
var cPlayer = it.next();
if (cPlayer.getJobId() == 312 || cPlayer.getJobId() == 322 || cPlayer.getJobId() == 900) {
if (cPlayer.getLevel() < 120) {
return 2;
}
} else {
return 1;
}
if (cPlayer.getJobId() == 312 || cPlayer.getJobId() == 322 || cPlayer.getJobId() == 900) {
if (cPlayer.getLevel() < 120) {
return 2;
}
} else {
return 1;
}
}
return 3;
}

View File

@@ -80,12 +80,12 @@ function action(mode, type, selection) {
} else if (expedition.isInProgress()) { //Only if the expedition is in progress
if (expedition.contains(player)) { //If you're registered, warp you in
var eim = em.getInstance(expedName + player.getClient().getChannel());
if(eim.getIntProperty("canJoin") == 1) {
if (eim.getIntProperty("canJoin") == 1) {
eim.registerPlayer(player);
} else {
cm.sendOk("Your expedition already started the battle against " + expedBoss + ". Lets pray for those brave souls.");
}
cm.dispose();
} else { //If you're not in by now, tough luck
cm.sendOk("Another expedition has taken the initiative to challenge " + expedBoss + ", lets pray for those brave souls.");
@@ -95,12 +95,12 @@ function action(mode, type, selection) {
} else if (status == 1) {
if (selection == 1) {
expedition = cm.getExpedition(exped);
if(expedition != null) {
if (expedition != null) {
cm.sendOk("Someone already taken the initiative to be the leader of the expedition. Try joining them!");
cm.dispose();
return;
}
var res = cm.createExpedition(exped);
if (res == 0) {
cm.sendOk("The #r" + expedBoss + " Expedition#k has been created.\r\n\r\nTalk to me again to view the current team, or start the fight!");
@@ -109,18 +109,18 @@ function action(mode, type, selection) {
} else {
cm.sendOk("An unexpected error has occurred when starting the expedition, please try again later.");
}
cm.dispose();
return;
} else if (selection == 2) {
cm.sendOk("Sure, not everyone's up to challenging " + expedBoss + ".");
cm.dispose();
return;
} else {
cm.sendSimple("Hi there. I am #b#nMu Young#n#k, the temple Keeper. This temple is currently under siege by the Balrog troops. We currently do not know who gave the orders. " +
"For a few weeks now, the #e#b Order of the Altair#n#k has been sending mercenaries, but they were eliminated every time." +
" So, traveler, would you like to try your luck at defeating this unspeakable horror?\r\n #L1#What is the #eOrder of the Altair?");
"For a few weeks now, the #e#b Order of the Altair#n#k has been sending mercenaries, but they were eliminated every time." +
" So, traveler, would you like to try your luck at defeating this unspeakable horror?\r\n #L1#What is the #eOrder of the Altair?");
status = 10;
}
} else if (status == 2) {
@@ -152,7 +152,7 @@ function action(mode, type, selection) {
cm.dispose();
return;
}
cm.sendOk("The expedition will begin and you will now be escorted to the #b" + expedMap + "#k.");
status = 4;
} else if (selection == 3) {
@@ -161,7 +161,7 @@ function action(mode, type, selection) {
cm.endExpedition(expedition);
cm.sendOk("The expedition has now ended. Sometimes the best strategy is to run away.");
cm.dispose();
return;
}
} else if (status == 4) {
if (em == null) {
@@ -172,14 +172,14 @@ function action(mode, type, selection) {
em.setProperty("leader", player.getName());
em.setProperty("channel", player.getClient().getChannel());
if(!em.startInstance(expedition)) {
if (!em.startInstance(expedition)) {
cm.sendOk("Another expedition has taken the initiative to challenge " + expedBoss + ", lets pray for those brave souls.");
cm.dispose();
return;
}
cm.dispose();
return;
} else if (status == 6) {
if (selection > 0) {
var banned = expedMembers.get(selection - 1);

View File

@@ -2,33 +2,33 @@ var status = -1;
var itemids = Array(2040728, 2040729, 2040730, 2040731, 2040732, 2040733, 2040734, 2040735, 2040736, 2040737, 2040738, 2040739);
function start() {
action(1, 0, 0);
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode != 1) {
cm.dispose();
return;
}
status++;
if (status == 0) {
cm.sendSimple("Hello, #h0#. I can exchange your Balrog Leathers.\r\n\r\n#r#L1#Redeem items#l#k");
} else if (status == 1) {
var selStr = "Well, okay. These are what you can redeem...\r\n\r\n#b";
for (var i = 0; i < itemids.length; i++) {
selStr += "#L" + i + "##i" + itemids[i] + "##z" + itemids[i] + "##l\r\n";
}
cm.sendSimple(selStr);
} else if (status == 2) {
if (!cm.canHold(itemids[selection], 1)) {
cm.sendOk("Please make room");
} else if (!cm.haveItemWithId(4001261)) {
cm.sendOk("You don't have enough leathers.");
} else {
cm.gainItem(4001261, -1);
cm.gainItem(itemids[selection], 1);
cm.sendOk("Thank you for your redemption");
}
cm.dispose();
}
if (mode != 1) {
cm.dispose();
return;
}
status++;
if (status == 0) {
cm.sendSimple("Hello, #h0#. I can exchange your Balrog Leathers.\r\n\r\n#r#L1#Redeem items#l#k");
} else if (status == 1) {
var selStr = "Well, okay. These are what you can redeem...\r\n\r\n#b";
for (var i = 0; i < itemids.length; i++) {
selStr += "#L" + i + "##i" + itemids[i] + "##z" + itemids[i] + "##l\r\n";
}
cm.sendSimple(selStr);
} else if (status == 2) {
if (!cm.canHold(itemids[selection], 1)) {
cm.sendOk("Please make room");
} else if (!cm.haveItemWithId(4001261)) {
cm.sendOk("You don't have enough leathers.");
} else {
cm.gainItem(4001261, -1);
cm.gainItem(itemids[selection], 1);
cm.sendOk("Thank you for your redemption");
}
cm.dispose();
}
}

View File

@@ -1,39 +1,40 @@
var status;
function start() {
status = -1;
action(1, 0, 0);
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();
} else {
if (mode == 0 && type > 0) {
cm.dispose();
return;
}
if (mode == 1)
status++;
else
status--;
if(status == 0){
if(cm.getEventInstance().isEventCleared()) {
cm.sendOk("Wow! You defeated the balrog.");
} else if(cm.getPlayer().getMap().getCharacters().size() > 1) {
cm.sendYesNo("Are you really going to leave this battle and leave your fellow travelers to die?");
} else {
cm.sendYesNo("If you're a coward, you will leave.");
}
} else if(status == 1){
if(cm.getEventInstance().isEventCleared()) {
cm.warp(cm.getMapId() == 105100300 ? 105100301 : 105100401, 0);
} else {
cm.warp(105100100);
}
cm.dispose();
}
if (mode == -1) {
cm.dispose();
} else {
if (mode == 0 && type > 0) {
cm.dispose();
return;
}
if (mode == 1) {
status++;
} else {
status--;
}
if (status == 0) {
if (cm.getEventInstance().isEventCleared()) {
cm.sendOk("Wow! You defeated the balrog.");
} else if (cm.getPlayer().getMap().getCharacters().size() > 1) {
cm.sendYesNo("Are you really going to leave this battle and leave your fellow travelers to die?");
} else {
cm.sendYesNo("If you're a coward, you will leave.");
}
} else if (status == 1) {
if (cm.getEventInstance().isEventCleared()) {
cm.warp(cm.getMapId() == 105100300 ? 105100301 : 105100401, 0);
} else {
cm.warp(105100100);
}
cm.dispose();
}
}
}

View File

@@ -20,17 +20,17 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
-- Odin JavaScript --------------------------------------------------------------------------------
Hotel Receptionist - Sleepywood Hotel(105040400)
-- By ---------------------------------------------------------------------------------------------
Unknown
-- Version Info -----------------------------------------------------------------------------------
1.3 - More Cleanup by Moogra - 12/17/09
1.2 - Cleanup and Statement fix by Moogra
1.1 - Statement fix [Information]
1.0 - First Version by Unknown
---------------------------------------------------------------------------------------------------
**/
-- Odin JavaScript --------------------------------------------------------------------------------
Hotel Receptionist - Sleepywood Hotel(105040400)
-- By ---------------------------------------------------------------------------------------------
Unknown
-- Version Info -----------------------------------------------------------------------------------
1.3 - More Cleanup by Moogra - 12/17/09
1.2 - Cleanup and Statement fix by Moogra
1.1 - Statement fix [Information]
1.0 - First Version by Unknown
---------------------------------------------------------------------------------------------------
**/
var status = 0;
var regcost = 499;
@@ -42,9 +42,9 @@ function start() {
}
function action(mode, type, selection) {
if (mode == -1 || (mode == 0 && status == 1))
if (mode == -1 || (mode == 0 && status == 1)) {
cm.dispose();
else {
} else {
if (mode == 0 && status == 2) {
cm.sendNext("We offer other kinds of services, too, so please think carefully and then make your decision.");
cm.dispose();
@@ -55,25 +55,27 @@ function action(mode, type, selection) {
cm.sendSimple("We offer two kinds of rooms for our service. Please choose the one of your liking.\r\n#b#L0#Regular sauna (" + regcost + " mesos per use)#l\r\n#L1#VIP sauna (" + vipcost + " mesos per use)#l");
iwantreg = 1;
} else if (status == 2) {
if (selection == 0)
if (selection == 0) {
cm.sendYesNo("You have chosen the regular sauna. Your HP and MP will recover fast and you can even purchase some items there. Are you sure you want to go in?");
else if (selection == 1) {
} else if (selection == 1) {
cm.sendYesNo("You've chosen the VIP sauna. Your HP and MP will recover even faster than that of the regular sauna and you can even find a special item in there. Are you sure you want to go in?");
iwantreg = 0;
iwantreg = 0;
}
} else if (status == 3) {
if (iwantreg == 1) {
if (cm.getMeso() >= regcost) {
cm.warp(105040401);
cm.gainMeso(-regcost);
} else
} else {
cm.sendNext("I'm sorry. It looks like you don't have enough mesos. It will cost you at least " + regcost + "mesos to stay at our hotel.");
}
} else {
if (cm.getMeso() >= vipcost) {
cm.warp(105040402);
cm.gainMeso(-vipcost);
} else
} else {
cm.sendNext("I'm sorry. It looks like you don't have enough mesos. It will cost you at least " + vipcost + "mesos to stay at our hotel.");
}
}
cm.dispose();
}

View File

@@ -25,26 +25,26 @@
var repeatablePrizes = [[4010000, 3], [4010001, 3], [4010002, 3], [4010003, 3], [4010004, 3], [4010005, 3]];
function start() {
if (cm.isQuestStarted(2052) && !cm.haveItem(4031025,10)) {
if(!cm.canHold(4031025,10)) {
if (cm.isQuestStarted(2052) && !cm.haveItem(4031025, 10)) {
if (!cm.canHold(4031025, 10)) {
cm.sendNext("Check for a available slot on your ETC inventory.");
cm.dispose();
return;
}
cm.gainItem(4031025,10);
cm.gainItem(4031025, 10);
} else {
const InventoryType = Java.type('client.inventory.InventoryType');
if(cm.getPlayer().getInventory(InventoryType.ETC).getNumFreeSlot() < 1) {
if (cm.getPlayer().getInventory(InventoryType.ETC).getNumFreeSlot() < 1) {
cm.sendNext("Check for a available slot on your ETC inventory.");
cm.dispose();
return;
}
var itemPrize = repeatablePrizes[Math.floor((Math.random() * repeatablePrizes.length))];
cm.gainItem(itemPrize[0], itemPrize[1]);
}
cm.warp(105040300, 0);
cm.dispose();
}

View File

@@ -25,26 +25,26 @@
var repeatablePrizes = [[4020000, 4], [4020002, 4], [4020006, 4]];
function start() {
if (cm.isQuestStarted(2053) && !cm.haveItem(4031026,20)) {
if(!cm.canHold(4031026,20)) {
if (cm.isQuestStarted(2053) && !cm.haveItem(4031026, 20)) {
if (!cm.canHold(4031026, 20)) {
cm.sendNext("Check for a available slot on your ETC inventory.")
cm.dispose();
return;
}
cm.gainItem(4031026,20);
cm.gainItem(4031026, 20);
} else {
const InventoryType = Java.type('client.inventory.InventoryType');
if(cm.getPlayer().getInventory(InventoryType.ETC).getNumFreeSlot() < 1) {
if (cm.getPlayer().getInventory(InventoryType.ETC).getNumFreeSlot() < 1) {
cm.sendNext("Check for a available slot on your ETC inventory.");
cm.dispose();
return;
}
var itemPrize = repeatablePrizes[Math.floor((Math.random() * repeatablePrizes.length))];
cm.gainItem(itemPrize[0], itemPrize[1]);
}
cm.warp(105040300, 0);
cm.dispose();
}

View File

@@ -25,26 +25,26 @@
var repeatablePrizes = [[4010006, 4], [4010007, 4], [4020007, 4]];
function start() {
if (cm.isQuestStarted(2054) && !cm.haveItem(4031028,30)) {
if(!cm.canHold(4031028,30)) {
if (cm.isQuestStarted(2054) && !cm.haveItem(4031028, 30)) {
if (!cm.canHold(4031028, 30)) {
cm.sendNext("Check for a available slot on your ETC inventory.")
cm.dispose();
return;
}
cm.gainItem(4031028,30);
cm.gainItem(4031028, 30);
} else {
const InventoryType = Java.type('client.inventory.InventoryType');
if(cm.getPlayer().getInventory(InventoryType.ETC).getNumFreeSlot() < 1) {
if (cm.getPlayer().getInventory(InventoryType.ETC).getNumFreeSlot() < 1) {
cm.sendNext("Check for a available slot on your ETC inventory.");
cm.dispose();
return;
}
var itemPrize = repeatablePrizes[Math.floor((Math.random() * repeatablePrizes.length))];
cm.gainItem(itemPrize[0], itemPrize[1]);
}
cm.warp(105040300, 0);
cm.dispose();
}

View File

@@ -24,41 +24,43 @@ var status = -1;
/*
Custom Quest 100300
*/
function activateShamanRock(slot,progress) {
function activateShamanRock(slot, progress) {
var ch = progress[slot];
if(ch == '0') {
if (ch == '0') {
var nextProgress = progress.substr(0, slot) + '1' + progress.substr(slot + 1);
cm.setQuestProgress(2236, nextProgress);
cm.gainItem(4032263, -1);
cm.sendOk("The seal took it's place, repelling the evil in the area.");
return 1;
}
return 0;
}
function start() {
if(cm.isQuestStarted(2236) && cm.haveItem(4032263, 1)) {
if (cm.isQuestStarted(2236) && cm.haveItem(4032263, 1)) {
var progress = cm.getQuestProgress(2236);
var map = cm.getMapId();
if(map == 105050200) activateShamanRock(0,progress);
else if(map == 105060000) activateShamanRock(1,progress);
else if(map == 105070000) activateShamanRock(2,progress);
else if(map == 105090000) { // workaround... TWO SAME NPC ID ON SAME MAP
if (map == 105050200) {
activateShamanRock(0, progress);
} else if (map == 105060000) {
activateShamanRock(1, progress);
} else if (map == 105070000) {
activateShamanRock(2, progress);
} else if (map == 105090000) { // workaround... TWO SAME NPC ID ON SAME MAP
var npcOid = cm.getQuestProgressInt(100300, 1);
if (npcOid == 0) {
activateShamanRock(3,progress);
activateShamanRock(3, progress);
cm.setQuestProgress(100300, 1, cm.getNpcObjectId());
} else if (cm.getNpcObjectId() != npcOid) {
activateShamanRock(4,progress);
activateShamanRock(4, progress);
}
} else if (map == 105090100) {
activateShamanRock(5, progress);
}
else if(map == 105090100) activateShamanRock(5,progress);
}
cm.dispose();
}

Some files were not shown because too many files have changed in this diff Show More