Merge branch 'master' of https://github.com/ronancpl/HeavenMS into credits_update

This commit is contained in:
ronancpl
2019-11-14 22:35:43 -03:00
864 changed files with 20650 additions and 11188 deletions

View File

@@ -34,7 +34,7 @@ spawnPnpcFee = 7000000;
jobType = 3;
function start() {
if (parseInt(cm.getJobId() / 100) == jobType && cm.canSpawnPlayerNpc(Packages.constants.GameConstants.getHallOfFameMapid(cm.getJob()))) {
if (parseInt(cm.getJobId() / 100) == jobType && cm.canSpawnPlayerNpc(Packages.constants.game.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?";
@@ -93,7 +93,7 @@ function action(mode, type, selection) {
return;
}
if(Packages.server.life.MaplePlayerNPC.spawnPlayerNPC(Packages.constants.GameConstants.getHallOfFameMapid(cm.getJob()), cm.getPlayer())) {
if(Packages.server.life.MaplePlayerNPC.spawnPlayerNPC(Packages.constants.game.GameConstants.getHallOfFameMapid(cm.getJob()), cm.getPlayer())) {
cm.sendOk("There you go! Hope you will like it.");
cm.gainMeso(-spawnPnpcFee);
} else {

View File

@@ -72,7 +72,10 @@ function action(mode, type, selection) {
} else if (status == 2){
cm.dispose();
if (beauty == 1){
if (cm.haveItem(5150001)){
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)){
cm.gainItem(5150001, -1);
cm.setHair(hairnew[selection]);
cm.sendOk("Enjoy your new and improved hairstyle!");

View File

@@ -35,7 +35,7 @@ spawnPnpcFee = 7000000;
jobType = 1;
function start() {
if (parseInt(cm.getJobId() / 100) == jobType && cm.canSpawnPlayerNpc(Packages.constants.GameConstants.getHallOfFameMapid(cm.getJob()))) {
if (parseInt(cm.getJobId() / 100) == jobType && cm.canSpawnPlayerNpc(Packages.constants.game.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?";
@@ -94,7 +94,7 @@ function action(mode, type, selection) {
return;
}
if(Packages.server.life.MaplePlayerNPC.spawnPlayerNPC(Packages.constants.GameConstants.getHallOfFameMapid(cm.getJob()), cm.getPlayer())) {
if(Packages.server.life.MaplePlayerNPC.spawnPlayerNPC(Packages.constants.game.GameConstants.getHallOfFameMapid(cm.getJob()), cm.getPlayer())) {
cm.sendOk("There you go! Hope you will like it.");
cm.gainMeso(-spawnPnpcFee);
} else {

View File

@@ -35,7 +35,7 @@ spawnPnpcFee = 7000000;
jobType = 2;
function start() {
if (parseInt(cm.getJobId() / 100) == jobType && cm.canSpawnPlayerNpc(Packages.constants.GameConstants.getHallOfFameMapid(cm.getJob()))) {
if (parseInt(cm.getJobId() / 100) == jobType && cm.canSpawnPlayerNpc(Packages.constants.game.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?";
@@ -94,7 +94,7 @@ function action(mode, type, selection) {
return;
}
if(Packages.server.life.MaplePlayerNPC.spawnPlayerNPC(Packages.constants.GameConstants.getHallOfFameMapid(cm.getJob()), cm.getPlayer())) {
if(Packages.server.life.MaplePlayerNPC.spawnPlayerNPC(Packages.constants.game.GameConstants.getHallOfFameMapid(cm.getJob()), cm.getPlayer())) {
cm.sendOk("There you go! Hope you will like it.");
cm.gainMeso(-spawnPnpcFee);
} else {

View File

@@ -9,6 +9,11 @@ var status;
var mobId = 2220100; //Blue Mushroom
function start(){
if (!cm.isQuestStarted(20718)) { // thanks Stray, Ari
cm.dispose();
return;
}
status = -1;
action(1, 0, 0);
}

View File

@@ -34,7 +34,7 @@ spawnPnpcFee = 7000000;
jobType = 4;
function start() {
if (parseInt(cm.getJobId() / 100) == jobType && cm.canSpawnPlayerNpc(Packages.constants.GameConstants.getHallOfFameMapid(cm.getJob()))) {
if (parseInt(cm.getJobId() / 100) == jobType && cm.canSpawnPlayerNpc(Packages.constants.game.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?";
@@ -95,7 +95,7 @@ function action(mode, type, selection) {
return;
}
if(Packages.server.life.MaplePlayerNPC.spawnPlayerNPC(Packages.constants.GameConstants.getHallOfFameMapid(cm.getJob()), cm.getPlayer())) {
if(Packages.server.life.MaplePlayerNPC.spawnPlayerNPC(Packages.constants.game.GameConstants.getHallOfFameMapid(cm.getJob()), cm.getPlayer())) {
cm.sendOk("There you go! Hope you will like it.");
cm.gainMeso(-spawnPnpcFee);
} else {

View File

@@ -66,7 +66,7 @@ function action(mode, type, selection) {
ticketSelection = selection;
if (ticketSelection > -1) {
cm.gainItem(4031035 + ticketSelection, -1);
cm.warp(103000897 + (ticketSelection * 3));
cm.warp(103000897 + (ticketSelection * 3), "st00"); // thanks IxianMace for noticing a few scripts having misplaced warp SP's
hasTicket = false;
cm.dispose();
return;

View File

@@ -28,6 +28,6 @@ function start() {
cm.gainItem(4031039,1);
else
cm.gainItem(4020000 + ((Math.random()*5)|0), 1);
cm.warp(103000100);
cm.warp(103000100, 0);
cm.dispose();
}

View File

@@ -28,6 +28,6 @@ function start() {
cm.gainItem(4031040,1);
else
cm.gainItem(prizes[parseInt(Math.random() * prizes.length)],1);
cm.warp(103000100);
cm.warp(103000100, 0);
cm.dispose();
}

View File

@@ -28,6 +28,6 @@ function start() {
cm.gainItem(4031041,1);
else
cm.gainItem(prizes[parseInt(Math.random() * prizes.length)],1);
cm.warp(103000100);
cm.warp(103000100, 0);
cm.dispose();
}

View File

@@ -53,7 +53,7 @@ function action(mode, type, selection) {
cm.sendOk("Oh, you don't have the money, right? Sorry, I can't let you in.");
} else {
cm.gainMeso(-5000);
cm.warp(193000000);
cm.warp(193000000, "out00");
}
cm.dispose();

View File

@@ -78,7 +78,10 @@ function action(mode, type, selection) {
else if (status == 2){
cm.dispose();
if (beauty == 1){
if (cm.haveItem(5150003)){
if (cm.haveItem(5420003)){
cm.setHair(hairnew[selection]);
cm.sendOk("Enjoy your new and improved hairstyle!");
} else if (cm.haveItem(5150003)){
cm.gainItem(5150003, -1);
cm.setHair(hairnew[selection]);
cm.sendOk("Enjoy your new and improved hairstyle!");

View File

@@ -65,8 +65,13 @@ function action(mode, type, selection) {
cm.sendSimple("#e#b<Expedition: " + expedName + ">\r\n#k#n" + em.getProperty("party") + "\r\n\r\nWould you like to assemble a team to take on #r" + expedBoss + "#k?\r\n#b#L1#Lets get this going!#l\r\n\#L2#No, I think I'll wait a bit...#l\r\n\#L3#I would like to see info about this expedition...#l");
status = 1;
} else if (expedition.isLeader(player)) { //If you're the leader, manage the exped
cm.sendSimple(list);
status = 2;
if (expedition.isInProgress()) {
cm.sendOk("Your expedition is already in progress, for those who remain battling lets pray for those brave souls.");
cm.dispose();
} else {
cm.sendSimple(list);
status = 2;
}
} else if (expedition.isRegistering()) { //If the expedition is registering
if (expedition.contains(player)) { //If you're in it but it hasn't started, be patient
cm.sendOk("You have already registered for the expedition. Please wait for #r" + expedition.getLeader().getName() + "#k to begin it.");
@@ -99,8 +104,11 @@ function action(mode, type, selection) {
return;
}
if (cm.createExpedition(exped)) {
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!");
} else if (res > 0) {
cm.sendOk("Sorry, you've already reached the quota of attempts for this expedition! Try again another day...");
} else {
cm.sendOk("An unexpected error has occurred when starting the expedition, please try again later.");
}

View File

@@ -28,7 +28,7 @@ function action(mode, type, selection) {
}
} else if(status == 1){
if(cm.getEventInstance().isEventCleared()) {
cm.warp(cm.getMapId() == 105100300 ? 105100301 : 105100401);
cm.warp(cm.getMapId() == 105100300 ? 105100301 : 105100401, 0);
} else {
cm.warp(105100100);
}

View File

@@ -21,12 +21,15 @@
*/
var status = -1;
/*
Custom Quest 100300
*/
function activateShamanRock(slot,progress) {
var active = (progress >> slot) % 2;
if(!active) {
progress |= (1 << slot);
var ch = progress[slot];
if(ch == '0') {
var nextProgress = progress.substr(0, slot) + '1' + progress.substr(slot + 1);
cm.updateQuest(2236, progress);
cm.setQuestProgress(2236, nextProgress);
cm.gainItem(4032263, -1);
cm.sendOk("The seal took it's place, repelling the evil in the area.");
return 1;
@@ -45,7 +48,11 @@ function start() {
else if(map == 105070000) activateShamanRock(2,progress);
else if(map == 105090000) { // workaround... TWO SAME NPC ID ON SAME MAP
if(!activateShamanRock(3,progress)) {
var npcOid = cm.getQuestProgressInt(100300, 1);
if (npcOid == 0) {
activateShamanRock(3,progress);
cm.setQuestProgress(100300, 1, cm.getNpcObjectId());
} else if (cm.getNpcObjectId() != npcOid) {
activateShamanRock(4,progress);
}
}

View File

@@ -21,12 +21,15 @@
*/
var status = -1;
/*
Custom Quest 100300
*/
function activateShamanRock(slot,progress) {
var active = (progress >> slot) % 2;
if(!active) {
progress |= (1 << slot);
var ch = progress[slot];
if(ch == '0') {
var nextProgress = progress.substr(0, slot) + '1' + progress.substr(slot + 1);
cm.updateQuest(2236, progress);
cm.setQuestProgress(2236, nextProgress);
cm.gainItem(4032263, -1);
cm.sendOk("The seal took it's place, repelling the evil in the area.");
return 1;
@@ -45,7 +48,11 @@ function start() {
else if(map == 105070000) activateShamanRock(2,progress);
else if(map == 105090000) { // workaround... TWO SAME NPC ID ON SAME MAP
if(!activateShamanRock(3,progress)) {
var npcOid = cm.getQuestProgressInt(100300, 1);
if (npcOid == 0) {
activateShamanRock(3,progress);
cm.setQuestProgress(100300, 1, cm.getNpcObjectId());
} else if (cm.getNpcObjectId() != npcOid) {
activateShamanRock(4,progress);
}
}

View File

@@ -69,7 +69,7 @@ function action(mode, type, selection) {
cm.gainItem(4031010, -1);
cm.sendOk("You will have to collect me #b30 #t4031013##k. Good luck.")
} else if (status == 4) {
cm.warp(108000100);
cm.warp(108000100, 0);
cm.dispose();
}
else {

View File

@@ -5,36 +5,52 @@
**/
var status;
function start() {
status = -1;
action(1,0,0);
action(1, 0, 0);
}
function action(mode,type,selection) {
if (status == -1) {
if (cm.getMapId() == 108000502) {
if (!(cm.haveItem(4031856,15))) {
cm.sendNext("Go, and get me 15 #b#t4031856##k.");
cm.dispose();
} else {
status = 2;
cm.sendNext("Wow, you have brought me 15 #b#t4031856##k! Congratulations. Let me warp you out now.");
}
} else if (cm.getMapId() == 108000501) {
if (!(cm.haveItem(4031857,15))) {
cm.sendNext("Go, and get me 15 #b#t4031857##k.");
cm.dispose();
} else {
status = 2;
cm.sendNext("Wow, you have brought me 15 #b#t4031857##k! Congratulations. Let me warp you out now.");
}
} else {
cm.sendNext("Error. Please report this.");
cm.dispose();
}
} else if (status == 2) {
cm.warp(120000101,0);
cm.dispose();
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.getMapId() == 108000502) {
if (!(cm.haveItem(4031856,15))) {
cm.sendSimple("You haven't brought me all the crystals yet. I'm looking forward for your progress, mate! \r\n#b#L1#I would like to leave#l");
} else {
status++;
cm.sendNext("Wow, you have brought me 15 #b#t4031856##k! Congratulations. Let me warp you out now.");
}
} else if (cm.getMapId() == 108000501) {
if (!(cm.haveItem(4031857,15))) {
cm.sendSimple("You haven't brought me all the crystals yet. I'm looking forward for your progress, mate! \r\n#b#L1#I would like to leave#l");
} else {
status++;
cm.sendNext("Wow, you have brought me 15 #b#t4031857##k! Congratulations. Let me warp you out now.");
}
} else {
cm.sendNext("Error. Please report this.");
cm.dispose();
}
} else if (status == 1) { // thanks Lame for noticing players getting stuck in area in certain scenarios
cm.removeAll(4031856);
cm.removeAll(4031857);
cm.warp(120000101,0);
cm.dispose();
} else if (status == 2) {
cm.warp(120000101,0);
cm.dispose();
}
}
}
}

View File

@@ -39,8 +39,7 @@ function start() {
if (cm.getEventInstance() != null) { // missing script for skill test found thanks to Jade™
advQuest = 5; // string visibility thanks to iPunchEm & Glvelturall
cm.sendNext("Not bad at all. Let's discuss this outside!");
cm.setQuestProgress(6330, 0, 1);
} else if (cm.getQuestProgress(6330, 0) == 0) {
} else if (cm.getQuestProgressInt(6330, 6331) == 0) {
advQuest = 1;
cm.sendNext("You're ready, right? Now try to withstand my attacks for 2 minutes. I won't go easy on you. Good luck, because you will need it.");
} else {
@@ -54,8 +53,7 @@ function start() {
if (cm.getEventInstance() != null) {
advQuest = 6;
cm.sendNext("Not bad at all. Let's discuss this outside!");
cm.setQuestProgress(6370, 0, 1);
} else if (cm.getQuestProgress(6370, 0) == 0) {
} else if (cm.getQuestProgressInt(6370, 6371) == 0) {
advQuest = 2;
cm.sendNext("You're ready, right? Now try to withstand my attacks for 2 minutes. I won't go easy on you. Good luck, because you will need it.");
} else {
@@ -65,7 +63,7 @@ function start() {
cm.sendNext("Congratulations. You have managed to pass my test. I'll teach you a new skill called \"Battleship\".\r\n\r\n #s5221006# #b#q5221006##k");
}
} else if (parseInt(cm.getJobId() / 100) == jobType && cm.canSpawnPlayerNpc(Packages.constants.GameConstants.getHallOfFameMapid(cm.getJob()))) {
} else if (parseInt(cm.getJobId() / 100) == jobType && cm.canSpawnPlayerNpc(Packages.constants.game.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?";
@@ -126,6 +124,12 @@ function action(mode, type, selection) {
cm.sendOk("Unlike most of the other skills you used as a Pirate, this one definitely is different. You can actually ride the 'Battleship' and attack enemies with it. Your DEF level will increase for the time you're on board, so that'll help you tremendously in combat situations. May you become the best Gunslinger out there...");
}
} else {
if (advQuest < 6) {
cm.setQuestProgress(6330, 6331, 2);
} else {
cm.setQuestProgress(6370, 6371, 2);
}
cm.warp(120000101);
}
@@ -138,7 +142,7 @@ function action(mode, type, selection) {
return;
}
if(Packages.server.life.MaplePlayerNPC.spawnPlayerNPC(Packages.constants.GameConstants.getHallOfFameMapid(cm.getJob()), cm.getPlayer())) {
if(Packages.server.life.MaplePlayerNPC.spawnPlayerNPC(Packages.constants.game.GameConstants.getHallOfFameMapid(cm.getJob()), cm.getPlayer())) {
cm.sendOk("There you go! Hope you will like it.");
cm.gainMeso(-spawnPnpcFee);
} else {
@@ -222,7 +226,7 @@ function action(mode, type, selection) {
cm.sendOk("All the training maps are currently in use. Please try again later.");
cm.dispose();
} else {
cm.warp(map);
cm.warp(map, 0);
cm.dispose();
return;
}

View File

@@ -64,7 +64,7 @@ function action(mode, type, selection) {
cm.sendOk("Who are you talking to me? If you're just bored, go bother somebody else.");
cm.dispose();
} else {
seagullProgress = cm.getQuestProgress(6400, 0);
seagullProgress = cm.getQuestProgressInt(6400, 1);
if (seagullProgress == 0) {
seagullIdx = Math.floor(Math.random() * seagullQuestion.length);
@@ -90,7 +90,7 @@ function action(mode, type, selection) {
var answer = cm.getText();
if (answer == seagullAnswer[seagullIdx]) {
cm.sendNext("What! I can't believe how incredibly smart you are! Incredible! In the seagull world, that kind of intellingence would give you a Ph.D. and then some. You're really amazing... I can't believe it... I simply can't believe it!");
cm.setQuestProgress(6400, 0, 1);
cm.setQuestProgress(6400, 1, 1);
cm.dispose();
} else {
cm.sendOk("Hmm, that's not quite how I recall it. Try again!");
@@ -99,9 +99,11 @@ function action(mode, type, selection) {
} else if (seagullProgress != 2) {
cm.sendNextPrev("Anyway, only one of 9 Barts is the real Bart. You know that Pirates are known for the strength of their friendships and camaraderie with their fellow pirates. If you're a true pirate, you should be able to find your own mate with ease. Alright then, I'll send you to the room where Bart is.");
} else {
cm.gainExp(1000000);
cm.teachSkill(5221003, 0, 10, -1);
cm.forceCompleteQuest(6400);
//cm.gainExp(1000000);
//cm.teachSkill(5221003, 0, 10, -1);
//cm.forceCompleteQuest(6400);
cm.sendNextPrev("You have met all my challenges, and passed! Good job!");
cm.dispose();
}
} else if (status == 3) {

View File

@@ -21,7 +21,7 @@
*/
function start() {
if(cm.getQuestProgress(2180, 0) == 1) {
if(cm.getQuestProgressInt(2180, 1) == 1) {
cm.sendNext("You have taken milk from this cow recently, check another cow.");
cm.dispose();
return;
@@ -32,19 +32,19 @@ function start() {
cm.gainItem(4031847, -1);
cm.gainItem(4031848, 1);
cm.setQuestProgress(2180, 0, 1);
cm.setQuestProgress(2180, 1, 1);
} else if (cm.canHold(4031849, 1) && cm.haveItem(4031848)) {
cm.sendNext("Now filling up the bottle with milk. The bottle is now 2/3 full of milk.");
cm.gainItem(4031848, -1);
cm.gainItem(4031849, 1);
cm.setQuestProgress(2180, 0, 1);
cm.setQuestProgress(2180, 1, 1);
} else if (cm.canHold(4031850) && cm.haveItem(4031849)) {
cm.sendNext("Now filling up the bottle with milk. The bottle is now completely full of milk.");
cm.gainItem(4031849, -1);
cm.gainItem(4031850, 1);
cm.setQuestProgress(2180, 0, 1);
cm.setQuestProgress(2180, 1, 1);
} else {
cm.sendNext("Your inventory is full, and there's no room for a milk bottle.");
}

View File

@@ -21,7 +21,7 @@
*/
function start() {
if(cm.getQuestProgress(2180, 0) == 2) {
if(cm.getQuestProgressInt(2180, 1) == 2) {
cm.sendNext("You have taken milk from this cow recently, check another cow.");
cm.dispose();
return;
@@ -32,19 +32,19 @@ function start() {
cm.gainItem(4031847, -1);
cm.gainItem(4031848, 1);
cm.setQuestProgress(2180, 0, 2);
cm.setQuestProgress(2180, 1, 2);
} else if(cm.canHold(4031849) && cm.haveItem(4031848)){
cm.sendNext("Now filling up the bottle with milk. The bottle is now 2/3 full of milk.");
cm.gainItem(4031848, -1);
cm.gainItem(4031849, 1);
cm.setQuestProgress(2180, 0, 2);
cm.setQuestProgress(2180, 1, 2);
} else if(cm.canHold(4031850) && cm.haveItem(4031849)){
cm.sendNext("Now filling up the bottle with milk. The bottle is now completely full of milk.");
cm.gainItem(4031849, -1);
cm.gainItem(4031850, 1);
cm.setQuestProgress(2180, 0, 2);
cm.setQuestProgress(2180, 1, 2);
} else {
cm.sendNext("Your inventory is full, and there's no room for a milk bottle.");
}

View File

@@ -18,7 +18,6 @@ function action(mode, type, selection) {
cm.sendNext("All right! Let's go!");
} else if (status == 1) {
cm.removeNPC(579711);
cm.removeNPC2(579711);
cm.updateInfo("fire", "0");
cm.playSound("cannonshooter/fire");
cm.sendDirectionInfo("Effect/Direction4.img/effect/cannonshooter/flying/0", 7000, 0, 0, -1, -1);

View File

@@ -3,7 +3,7 @@
Map(s): Erev
Description: 3rd job KoC Buff
*/
importPackage(Packages.constants);
importPackage(Packages.constants.game);
function start() {
if (cm.getPlayer().isCygnus() && GameConstants.getJobBranch(cm.getJob()) > 2) {

View File

@@ -33,7 +33,7 @@ var maxJobType = 15;
function start() {
var jobType = parseInt(cm.getJobId() / 100);
if (jobType >= minJobType && jobType <= maxJobType && cm.canSpawnPlayerNpc(Packages.constants.GameConstants.getHallOfFameMapid(cm.getJob()))) {
if (jobType >= minJobType && jobType <= maxJobType && cm.canSpawnPlayerNpc(Packages.constants.game.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?";
@@ -64,7 +64,7 @@ function action(mode, type, selection) {
return;
}
if(Packages.server.life.MaplePlayerNPC.spawnPlayerNPC(Packages.constants.GameConstants.getHallOfFameMapid(cm.getJob()), cm.getPlayer())) {
if(Packages.server.life.MaplePlayerNPC.spawnPlayerNPC(Packages.constants.game.GameConstants.getHallOfFameMapid(cm.getJob()), cm.getPlayer())) {
cm.sendOk("There you go! Hope you will like it.");
cm.gainMeso(-spawnPnpcFee);
} else {

View File

@@ -39,7 +39,7 @@ function action(mode, type, selection) {
status--;
if(status == 0) {
if (!(cm.isQuestCompleted(20407) || cm.isQuestStarted(20407) && cm.getQuestProgress(20407, 9001010) != 0) && cm.getMap().countMonster(9001010) == 0 && cm.getMap().getNPCById(1104002) == null) {
if (!(cm.isQuestCompleted(20407) || cm.isQuestStarted(20407) && cm.getQuestProgressInt(20407, 9001010) != 0) && cm.getMap().countMonster(9001010) == 0 && cm.getMap().getNPCById(1104002) == null) {
cm.sendOk("... Hnngh... #b#h0##k, is that you...? #r#p1104002##k... She's already here... #b#h0##k, I'm truly sorry I can't help you right now in this state, just when a bigger threat appeared I could do nothing for my people.... Please I beg you, please defeat her, #b#h0##k!! ....");
cm.spawnNpc(1104002, new java.awt.Point(850, 0), cm.getMap());
} else {

View File

@@ -5,7 +5,7 @@ var spawnPnpcFee = 7000000;
var jobType = 21;
function start() {
if (parseInt(cm.getJobId() / 100) == jobType && cm.canSpawnPlayerNpc(Packages.constants.GameConstants.getHallOfFameMapid(cm.getJob()))) {
if (parseInt(cm.getJobId() / 100) == jobType && cm.canSpawnPlayerNpc(Packages.constants.game.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?";
@@ -36,7 +36,7 @@ function action(mode, type, selection) {
return;
}
if(Packages.server.life.MaplePlayerNPC.spawnPlayerNPC(Packages.constants.GameConstants.getHallOfFameMapid(cm.getJob()), cm.getPlayer())) {
if(Packages.server.life.MaplePlayerNPC.spawnPlayerNPC(Packages.constants.game.GameConstants.getHallOfFameMapid(cm.getJob()), cm.getPlayer())) {
cm.sendOk("There you go! Hope you will like it.");
cm.gainMeso(-spawnPnpcFee);
} else {

View File

@@ -46,7 +46,7 @@ function action(mode, type, selection) {
} else if (status == 2) {
cm.sendNext("The other heroes? They've left to fight the Black Mage. They're buying us time to escape. What? You want to fight with them? No! You can't! You're hurt. You must leave with us!");
} else if (status == 3) {
cm.updateQuest(21002, "1");
//cm.setQuestProgress(21002, 1);
cm.showIntro("Effect/Direction1.img/aranTutorial/Trio");
cm.dispose();
}

View File

@@ -62,7 +62,7 @@ function action(mode, type, selection){
}
}
} else {
var questProgress = cm.getQuestProgress(2330, 3300005) + cm.getQuestProgress(2330, 3300006) + cm.getQuestProgress(2330, 3300007); //3 Yetis
var questProgress = cm.getQuestProgressInt(2330, 3300005) + cm.getQuestProgressInt(2330, 3300006) + cm.getQuestProgressInt(2330, 3300007); //3 Yetis
if (!(cm.isQuestStarted(2330) && questProgress < 3)) { // thanks Vcoc for finding an exploit with boss entry through NPC
cm.dispose();
return;

View File

@@ -83,7 +83,10 @@ function action(mode, type, selection) {
else if (status == 2){
cm.dispose();
if (beauty == 1){
if (cm.haveItem(5150005) == true){
if (cm.haveItem(5420004)){
cm.setHair(hairnew[selection]);
cm.sendOk("Enjoy your new and improved hairstyle!");
} else if (cm.haveItem(5150005) == true){
cm.gainItem(5150005, -1);
cm.setHair(hairnew[selection]);
cm.sendOk("Enjoy your new and improved hairstyle!");

View File

@@ -57,8 +57,10 @@ function action(mode, type, selection) {
if (cm.getPlayer().getGuildId() < 1 || cm.getPlayer().getGuildRank() != 1) {
cm.sendOk("You can only increase your Guild's capacity if you are the leader.");
cm.dispose();
} else
cm.sendYesNo("Increasing your Guild capacity by #b5#k costs #b " + cm.getPlayer().getGuild().getIncreaseGuildCost(cm.getPlayer().getGuild().getCapacity()) +" mesos#k, are you sure you want to continue?");
} else {
var MapleGuild = Java.type("net.server.guild.MapleGuild"); // thanks Conrad for noticing an issue due to call on a static method here
cm.sendYesNo("Increasing your Guild capacity by #b5#k costs #b " + MapleGuild.getIncreaseGuildCost(cm.getPlayer().getGuild().getCapacity()) +" mesos#k, are you sure you want to continue?");
}
}
} else if (status == 2) {
if (sel == 0 && cm.getPlayer().getGuildId() <= 0) {

View File

@@ -22,14 +22,12 @@
var status;
var choice;
var guildName;
var partymembers;
var allianceCost = 2000000;
var increaseCost = 1000000;
var allianceLimit = 5;
function start() {
partymembers = cm.getPartyMembers();
status = -1;
action(1,0,0);
}

View File

@@ -50,13 +50,13 @@ function action(mode, type, selection) {
cm.getMap().broadcastMessage(MaplePacketCreator.playSound("orbis/" + harpSounds[cm.getNpc() - 2012027]));
if(cm.isQuestStarted(3114)) {
var idx = cm.getQuestProgress(3114, 7777);
var idx = -1 * cm.getQuestProgressInt(3114); // infoEx without infoNumber, must use one progress only, critical hit!
if(idx != -1) {
if(idx > -1) {
var nextNote = harpSong[idx];
if(harpNote != nextNote) {
cm.setQuestProgress(3114, 7777, 0);
cm.setQuestProgress(3114, 0);
cm.getPlayer().announce(MaplePacketCreator.showEffect("quest/party/wrong_kor"));
cm.getPlayer().announce(MaplePacketCreator.playSound("Party1/Failed"));
@@ -70,7 +70,7 @@ function action(mode, type, selection) {
if(idx == 45) { // finished lullaby
cm.message("Twinkle, twinkle, little star, how I wonder what you are.");
cm.setQuestProgress(3114, 7777, -1);
cm.setQuestProgress(3114, 42);
cm.getPlayer().announce(MaplePacketCreator.showEffect("quest/party/clear"));
cm.getPlayer().announce(MaplePacketCreator.playSound("Party1/Clear"));
@@ -88,7 +88,7 @@ function action(mode, type, selection) {
}
}
cm.setQuestProgress(3114, 7777, idx + 1);
cm.setQuestProgress(3114, -1 * (idx + 1));
}
}
}

View File

@@ -50,13 +50,13 @@ function action(mode, type, selection) {
cm.getMap().broadcastMessage(MaplePacketCreator.playSound("orbis/" + harpSounds[cm.getNpc() - 2012027]));
if(cm.isQuestStarted(3114)) {
var idx = cm.getQuestProgress(3114, 7777);
var idx = -1 * cm.getQuestProgressInt(3114);
if(idx != -1) {
if(idx > -1) {
var nextNote = harpSong[idx];
if(harpNote != nextNote) {
cm.setQuestProgress(3114, 7777, 0);
cm.setQuestProgress(3114, 0);
cm.getPlayer().announce(MaplePacketCreator.showEffect("quest/party/wrong_kor"));
cm.getPlayer().announce(MaplePacketCreator.playSound("Party1/Failed"));
@@ -70,7 +70,7 @@ function action(mode, type, selection) {
if(idx == 45) { // finished lullaby
cm.message("Twinkle, twinkle, little star, how I wonder what you are.");
cm.setQuestProgress(3114, 7777, -1);
cm.setQuestProgress(3114, 42);
cm.getPlayer().announce(MaplePacketCreator.showEffect("quest/party/clear"));
cm.getPlayer().announce(MaplePacketCreator.playSound("Party1/Clear"));
@@ -88,7 +88,7 @@ function action(mode, type, selection) {
}
}
cm.setQuestProgress(3114, 7777, idx + 1);
cm.setQuestProgress(3114, -1 * (idx + 1));
}
}
}

View File

@@ -50,13 +50,13 @@ function action(mode, type, selection) {
cm.getMap().broadcastMessage(MaplePacketCreator.playSound("orbis/" + harpSounds[cm.getNpc() - 2012027]));
if(cm.isQuestStarted(3114)) {
var idx = cm.getQuestProgress(3114, 7777);
var idx = -1 * cm.getQuestProgressInt(3114);
if(idx != -1) {
if(idx > -1) {
var nextNote = harpSong[idx];
if(harpNote != nextNote) {
cm.setQuestProgress(3114, 7777, 0);
cm.setQuestProgress(3114, 0);
cm.getPlayer().announce(MaplePacketCreator.showEffect("quest/party/wrong_kor"));
cm.getPlayer().announce(MaplePacketCreator.playSound("Party1/Failed"));
@@ -70,7 +70,7 @@ function action(mode, type, selection) {
if(idx == 45) { // finished lullaby
cm.message("Twinkle, twinkle, little star, how I wonder what you are.");
cm.setQuestProgress(3114, 7777, -1);
cm.setQuestProgress(3114, 42);
cm.getPlayer().announce(MaplePacketCreator.showEffect("quest/party/clear"));
cm.getPlayer().announce(MaplePacketCreator.playSound("Party1/Clear"));
@@ -88,7 +88,7 @@ function action(mode, type, selection) {
}
}
cm.setQuestProgress(3114, 7777, idx + 1);
cm.setQuestProgress(3114, -1 * (idx + 1));
}
}
}

View File

@@ -50,13 +50,13 @@ function action(mode, type, selection) {
cm.getMap().broadcastMessage(MaplePacketCreator.playSound("orbis/" + harpSounds[cm.getNpc() - 2012027]));
if(cm.isQuestStarted(3114)) {
var idx = cm.getQuestProgress(3114, 7777);
var idx = -1 * cm.getQuestProgressInt(3114);
if(idx != -1) {
if(idx > -1) {
var nextNote = harpSong[idx];
if(harpNote != nextNote) {
cm.setQuestProgress(3114, 7777, 0);
cm.setQuestProgress(3114, 0);
cm.getPlayer().announce(MaplePacketCreator.showEffect("quest/party/wrong_kor"));
cm.getPlayer().announce(MaplePacketCreator.playSound("Party1/Failed"));
@@ -70,7 +70,7 @@ function action(mode, type, selection) {
if(idx == 45) { // finished lullaby
cm.message("Twinkle, twinkle, little star, how I wonder what you are.");
cm.setQuestProgress(3114, 7777, -1);
cm.setQuestProgress(3114, 42);
cm.getPlayer().announce(MaplePacketCreator.showEffect("quest/party/clear"));
cm.getPlayer().announce(MaplePacketCreator.playSound("Party1/Clear"));
@@ -88,7 +88,7 @@ function action(mode, type, selection) {
}
}
cm.setQuestProgress(3114, 7777, idx + 1);
cm.setQuestProgress(3114, -1 * (idx + 1));
}
}
}

View File

@@ -50,13 +50,13 @@ function action(mode, type, selection) {
cm.getMap().broadcastMessage(MaplePacketCreator.playSound("orbis/" + harpSounds[cm.getNpc() - 2012027]));
if(cm.isQuestStarted(3114)) {
var idx = cm.getQuestProgress(3114, 7777);
var idx = -1 * cm.getQuestProgressInt(3114);
if(idx != -1) {
if(idx > -1) {
var nextNote = harpSong[idx];
if(harpNote != nextNote) {
cm.setQuestProgress(3114, 7777, 0);
cm.setQuestProgress(3114, 0);
cm.getPlayer().announce(MaplePacketCreator.showEffect("quest/party/wrong_kor"));
cm.getPlayer().announce(MaplePacketCreator.playSound("Party1/Failed"));
@@ -70,7 +70,7 @@ function action(mode, type, selection) {
if(idx == 45) { // finished lullaby
cm.message("Twinkle, twinkle, little star, how I wonder what you are.");
cm.setQuestProgress(3114, 7777, -1);
cm.setQuestProgress(3114, 42);
cm.getPlayer().announce(MaplePacketCreator.showEffect("quest/party/clear"));
cm.getPlayer().announce(MaplePacketCreator.playSound("Party1/Clear"));
@@ -88,7 +88,7 @@ function action(mode, type, selection) {
}
}
cm.setQuestProgress(3114, 7777, idx + 1);
cm.setQuestProgress(3114, -1 * (idx + 1));
}
}
}

View File

@@ -50,13 +50,13 @@ function action(mode, type, selection) {
cm.getMap().broadcastMessage(MaplePacketCreator.playSound("orbis/" + harpSounds[cm.getNpc() - 2012027]));
if(cm.isQuestStarted(3114)) {
var idx = cm.getQuestProgress(3114, 7777);
var idx = -1 * cm.getQuestProgressInt(3114);
if(idx != -1) {
if(idx > -1) {
var nextNote = harpSong[idx];
if(harpNote != nextNote) {
cm.setQuestProgress(3114, 7777, 0);
cm.setQuestProgress(3114, 0);
cm.getPlayer().announce(MaplePacketCreator.showEffect("quest/party/wrong_kor"));
cm.getPlayer().announce(MaplePacketCreator.playSound("Party1/Failed"));
@@ -70,7 +70,7 @@ function action(mode, type, selection) {
if(idx == 45) { // finished lullaby
cm.message("Twinkle, twinkle, little star, how I wonder what you are.");
cm.setQuestProgress(3114, 7777, -1);
cm.setQuestProgress(3114, 42);
cm.getPlayer().announce(MaplePacketCreator.showEffect("quest/party/clear"));
cm.getPlayer().announce(MaplePacketCreator.playSound("Party1/Clear"));
@@ -88,7 +88,7 @@ function action(mode, type, selection) {
}
}
cm.setQuestProgress(3114, 7777, idx + 1);
cm.setQuestProgress(3114, -1 * (idx + 1));
}
}
}

View File

@@ -50,13 +50,13 @@ function action(mode, type, selection) {
cm.getMap().broadcastMessage(MaplePacketCreator.playSound("orbis/" + harpSounds[cm.getNpc() - 2012027]));
if(cm.isQuestStarted(3114)) {
var idx = cm.getQuestProgress(3114, 7777);
var idx = -1 * cm.getQuestProgressInt(3114);
if(idx != -1) {
if(idx > -1) {
var nextNote = harpSong[idx];
if(harpNote != nextNote) {
cm.setQuestProgress(3114, 7777, 0);
cm.setQuestProgress(3114, 0);
cm.getPlayer().announce(MaplePacketCreator.showEffect("quest/party/wrong_kor"));
cm.getPlayer().announce(MaplePacketCreator.playSound("Party1/Failed"));
@@ -70,7 +70,7 @@ function action(mode, type, selection) {
if(idx == 45) { // finished lullaby
cm.message("Twinkle, twinkle, little star, how I wonder what you are.");
cm.setQuestProgress(3114, 7777, -1);
cm.setQuestProgress(3114, 42);
cm.getPlayer().announce(MaplePacketCreator.showEffect("quest/party/clear"));
cm.getPlayer().announce(MaplePacketCreator.playSound("Party1/Clear"));
@@ -88,7 +88,7 @@ function action(mode, type, selection) {
}
}
cm.setQuestProgress(3114, 7777, idx + 1);
cm.setQuestProgress(3114, -1 * (idx + 1));
}
}
}

View File

@@ -278,7 +278,7 @@ function action(mode, type, selection) {
if(cm.getMap().countMonsters() > 0) {
cm.sendNext("This is the hidden room of the tower. After eliminating all monsters on this room, talk to me to gain access to the treasure room, leaving the center tower access behind.");
} else {
cm.warp(920011100);
cm.warp(920011100, "st00");
}
break;
}

View File

@@ -142,7 +142,7 @@ function action(mode, type, selection){
if (cm.getPlayer().getLevel() >= 50){
cm.sendOk("The Chief's Residence Council grants you #bconcession#k to make part of the #rcounteroffensive team against Zakum#k. Good luck on your journey ahead.");
if(!(cm.isQuestStarted(100200) || cm.isQuestCompleted(100200))) cm.startQuest(100200);
if(Packages.constants.ServerConstants.USE_ENABLE_SOLO_EXPEDITIONS && !cm.isQuestCompleted(100201)) cm.completeQuest(100201);
if(Packages.config.YamlConfig.config.server.USE_ENABLE_SOLO_EXPEDITIONS && !cm.isQuestCompleted(100201)) cm.completeQuest(100201);
}else
cm.sendOk("You're way too weak to make part of the #rcounteroffensive team against Zakum#k. Reach at least #blevel 50#k, then talk to me.");
cm.dispose();

View File

@@ -114,7 +114,7 @@ function action(mode, type, selection){
if (cm.getPlayer().getLevel() >= 50){
cm.sendOk("The Chief's Residence Council grants you #bconcession#k to make part of the #rcounteroffensive team against Zakum#k. Good luck on your journey ahead.");
if(!(cm.isQuestStarted(100200) || cm.isQuestCompleted(100200))) cm.startQuest(100200);
if(Packages.constants.ServerConstants.USE_ENABLE_SOLO_EXPEDITIONS && !cm.isQuestCompleted(100201)) cm.completeQuest(100201);
if(Packages.config.YamlConfig.config.server.USE_ENABLE_SOLO_EXPEDITIONS && !cm.isQuestCompleted(100201)) cm.completeQuest(100201);
}else
cm.sendOk("You're way too weak to make part of the #rcounteroffensive team against Zakum#k. Reach at least #blevel 50#k, then talk to me.");
cm.dispose();

View File

@@ -115,7 +115,7 @@ function action(mode, type, selection){
if (cm.getPlayer().getLevel() >= 50){
cm.sendOk("The Chief's Residence Council grants you #bconcession#k to make part of the #rcounteroffensive team against Zakum#k. Good luck on your journey ahead.");
if(!(cm.isQuestStarted(100200) || cm.isQuestCompleted(100200))) cm.startQuest(100200);
if(Packages.constants.ServerConstants.USE_ENABLE_SOLO_EXPEDITIONS && !cm.isQuestCompleted(100201)) cm.completeQuest(100201);
if(Packages.config.YamlConfig.config.server.USE_ENABLE_SOLO_EXPEDITIONS && !cm.isQuestCompleted(100201)) cm.completeQuest(100201);
}else
cm.sendOk("You're way too weak to make part of the #rcounteroffensive team against Zakum#k. Reach at least #blevel 50#k, then talk to me.");
cm.dispose();

View File

@@ -114,7 +114,7 @@ function action(mode, type, selection){
if (cm.getPlayer().getLevel() >= 50){
cm.sendOk("The Chief's Residence Council grants you #bconcession#k to make part of the #rcounteroffensive team against Zakum#k. Good luck on your journey ahead.");
if(!(cm.isQuestStarted(100200) || cm.isQuestCompleted(100200))) cm.startQuest(100200);
if(Packages.constants.ServerConstants.USE_ENABLE_SOLO_EXPEDITIONS && !cm.isQuestCompleted(100201)) cm.completeQuest(100201);
if(Packages.config.YamlConfig.config.server.USE_ENABLE_SOLO_EXPEDITIONS && !cm.isQuestCompleted(100201)) cm.completeQuest(100201);
}else
cm.sendOk("You're way too weak to make part of the #rcounteroffensive team against Zakum#k. Reach at least #blevel 50#k, then talk to me.");
cm.dispose();

View File

@@ -113,7 +113,7 @@ function action(mode, type, selection){
if (cm.getPlayer().getLevel() >= 50){
cm.sendOk("The Chief's Residence Council grants you #bconcession#k to make part of the #rcounteroffensive team against Zakum#k. Good luck on your journey ahead.");
if(!(cm.isQuestStarted(100200) || cm.isQuestCompleted(100200))) cm.startQuest(100200);
if(Packages.constants.ServerConstants.USE_ENABLE_SOLO_EXPEDITIONS && !cm.isQuestCompleted(100201)) cm.completeQuest(100201);
if(Packages.config.YamlConfig.config.server.USE_ENABLE_SOLO_EXPEDITIONS && !cm.isQuestCompleted(100201)) cm.completeQuest(100201);
}else
cm.sendOk("You're way too weak to make part of the #rcounteroffensive team against Zakum#k. Reach at least #blevel 50#k, then talk to me.");
cm.dispose();

View File

@@ -33,7 +33,7 @@ var status = 0;
function start() {
if(cm.haveItem(4031450, 1)) {
cm.warp(921100100);
cm.warp(921100100, 1);
cm.dispose();
return;
}

View File

@@ -66,8 +66,13 @@ function action(mode, type, selection) {
cm.sendSimple("#e#b<Expedition: " + expedName + ">\r\n#k#n" + em.getProperty("party") + "\r\n\r\nWould you like to assemble a team to take on #r" + expedBoss + "#k?\r\n#b#L1#Lets get this going!#l\r\n\#L2#No, I think I'll wait a bit...#l");
status = 1;
} else if (expedition.isLeader(player)) { //If you're the leader, manage the exped
cm.sendSimple(list);
status = 2;
if (expedition.isInProgress()) { // thanks Conrad for noticing exped leaders being able to still manage in-progress expeds
cm.sendOk("Your expedition is already in progress, for those who remain battling lets pray for those brave souls.");
cm.dispose();
} else {
cm.sendSimple(list);
status = 2;
}
} else if (expedition.isRegistering()) { //If the expedition is registering
if (expedition.contains(player)) { //If you're in it but it hasn't started, be patient
cm.sendOk("You have already registered for the expedition. Please wait for #r" + expedition.getLeader().getName() + "#k to begin it.");
@@ -106,8 +111,11 @@ function action(mode, type, selection) {
return;
}
if (cm.createExpedition(exped)) {
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!");
} else if (res > 0) {
cm.sendOk("Sorry, you've already reached the quota of attempts for this expedition! Try again another day...");
} else {
cm.sendOk("An unexpected error has occurred when starting the expedition, please try again later.");
}

View File

@@ -172,19 +172,7 @@ function action(mode, type, selection) {
matQty = matQtySet[selectedItem];
cost = costSet[selectedItem];
}
if (selectedType == 5){ //arrow refine
var itemSet = new Array(2060000,2061000,2060001,2061001,2060002,2061002);
var matSet = new Array(new Array (4003001,4003004),new Array (4003001,4003004),new Array (4011000,4003001,4003004),new Array (4011000,4003001,4003004),
new Array (4011001,4003001,4003005),new Array (4011001,4003001,4003005));
var matQtySet = new Array (new Array (1,1),new Array (1,1),new Array (1,3,10),new Array (1,3,10),new Array (1,5,15),new Array (1,5,15));
var costSet = new Array (0,0,0,0,0,0);
item = itemSet[selectedItem];
mats = matSet[selectedItem];
matQty = matQtySet[selectedItem];
cost = costSet[selectedItem];
}
var prompt = "So, you want me to make some #t" + item + "#s? In that case, how many do you want me to make?";
cm.sendGetNumber(prompt,1,1,100)
@@ -197,6 +185,19 @@ function action(mode, type, selection) {
}
else
qty = (selection > 0) ? selection : (selection < 0 ? -selection : 1);
// thanks kvmba for noticing arrow selection crashing players
if (selectedType == 5){ //arrow refine
var itemSet = new Array(2060000,2061000,2060001,2061001,2060002,2061002);
var matSet = new Array(new Array (4003001,4003004),new Array (4003001,4003004),new Array (4011000,4003001,4003004),new Array (4011000,4003001,4003004),
new Array (4011001,4003001,4003005),new Array (4011001,4003001,4003005));
var matQtySet = new Array (new Array (1,1),new Array (1,1),new Array (1,3,10),new Array (1,3,10),new Array (1,5,15),new Array (1,5,15));
var costSet = new Array (0,0,0,0,0,0);
item = itemSet[selectedItem];
mats = matSet[selectedItem];
matQty = matQtySet[selectedItem];
cost = costSet[selectedItem];
}
var prompt = "You want me to make ";
if (qty == 1)

View File

@@ -54,7 +54,7 @@ function action(mode, type, selection) {
cm.sendYesNo("Would you like to leave the bonus stage?");
}
else {
cm.warp(922011100);
cm.warp(922011100, "st00");
cm.dispose();
}
}

View File

@@ -81,7 +81,10 @@ function action(mode, type, selection) {
else if (status == 2){
cm.dispose();
if (beauty == 1){
if (cm.haveItem(5150007) == true){
if (cm.haveItem(5420005)){
cm.setHair(hairnew[selection]);
cm.sendOk("Enjoy your new and improved hairstyle!");
} else if (cm.haveItem(5150007) == true){
cm.gainItem(5150007, -1);
cm.setHair(hairnew[selection]);
cm.sendOk("Enjoy your new and improved hairstyle!");

View File

@@ -30,8 +30,8 @@ var feeMultiplier = 7.0;
function start() {
status = -1;
if (!Packages.constants.ServerConstants.USE_CPQ) {
if (Packages.constants.ServerConstants.USE_ENABLE_CUSTOM_NPC_SCRIPT) {
if (!Packages.config.YamlConfig.config.server.USE_CPQ) {
if (Packages.config.YamlConfig.config.server.USE_ENABLE_CUSTOM_NPC_SCRIPT) {
status = 0;
action(1, 0, 4);
} else {
@@ -221,9 +221,9 @@ function action(mode, type, selection) {
}
} else {
var party = cm.getParty().getMembers();
if ((selection >= 0 && selection <= 3) && party.size() < (Packages.constants.ServerConstants.USE_ENABLE_SOLO_EXPEDITIONS ? 1 : 2)) {
if ((selection >= 0 && selection <= 3) && party.size() < (Packages.config.YamlConfig.config.server.USE_ENABLE_SOLO_EXPEDITIONS ? 1 : 2)) {
cm.sendOk("You need at least 2 players to participate in the battle!");
} else if ((selection >= 4 && selection <= 5) && party.size() < (Packages.constants.ServerConstants.USE_ENABLE_SOLO_EXPEDITIONS ? 1 : 3)) {
} else if ((selection >= 4 && selection <= 5) && party.size() < (Packages.config.YamlConfig.config.server.USE_ENABLE_SOLO_EXPEDITIONS ? 1 : 3)) {
cm.sendOk("You need at least 3 players to participate in the battle!");
} else {
cm.cpqLobby(selection);
@@ -236,7 +236,7 @@ function action(mode, type, selection) {
} else {
if (status == 0) {
var talk = "What would you like to do? If you have never participate in the Monster Carnival, you will need to know a few things before participating! \r\n#b#L0# Go to the Monster Carnival 1.#l \r\n#L3# Go to the Monster Carnival 2.#l \r\n#L1# Learn about the Monster Carnival.#l\r\n#L2# Trade #t4001129#.#l";
if (Packages.constants.ServerConstants.USE_ENABLE_CUSTOM_NPC_SCRIPT) {
if (Packages.config.YamlConfig.config.server.USE_ENABLE_CUSTOM_NPC_SCRIPT) {
talk += "\r\n#L4# ... Can I just refine my ores?#l";
}
cm.sendSimple(talk);
@@ -437,7 +437,7 @@ function action(mode, type, selection) {
cm.sendNext("Oh, and do not worry about turning into a ghost. In the Monster Carnival, #byou will not lose EXP after death#k. So it's really an experience like no other!");
cm.dispose();
} else if (select == 2) {
cm.sendNext("#bProtetor#k basically an invoked item that drastically increases the abilities of the monsters invoked by your group. Protector works until it is demolished by the opposing group, so I'm hoping you'll summon several monsters first, and then bring the Protector.");
cm.sendNext("#bProtector#k is basically an invoked item that drastically increases the abilities of the monsters invoked by your group. Protector works until it is demolished by the opposing group, so I'm hoping you'll summon several monsters first, and then bring the Protector.");
}
} else if (status == 66) {
cm.sendNext("Lastly, while in the Monster Carnival, #byou can not use items / recovery potions that you carry around with you. #kMeanwhile, the monsters let these items fall for good. when, and when you #bget them, the item will immediately activate#k. That's why it's important to know when to get these items.");

View File

@@ -29,8 +29,8 @@ var feeMultiplier = 7.0;
function start() {
status = -1;
if (!Packages.constants.ServerConstants.USE_CPQ) {
if (Packages.constants.ServerConstants.USE_ENABLE_CUSTOM_NPC_SCRIPT) {
if (!Packages.config.YamlConfig.config.server.USE_CPQ) {
if (Packages.config.YamlConfig.config.server.USE_ENABLE_CUSTOM_NPC_SCRIPT) {
status = 0;
action(1, 0, 4);
} else {
@@ -220,9 +220,9 @@ function action(mode, type, selection) {
}
} else {
var party = cm.getParty().getMembers();
if ((selection >= 0 && selection <= 3) && party.size() < (Packages.constants.ServerConstants.USE_ENABLE_SOLO_EXPEDITIONS ? 1 : 2)) {
if ((selection >= 0 && selection <= 3) && party.size() < (Packages.config.YamlConfig.config.server.USE_ENABLE_SOLO_EXPEDITIONS ? 1 : 2)) {
cm.sendOk("You need at least 2 players to participate in the battle!");
} else if ((selection >= 4 && selection <= 5) && party.size() < (Packages.constants.ServerConstants.USE_ENABLE_SOLO_EXPEDITIONS ? 1 : 3)) {
} else if ((selection >= 4 && selection <= 5) && party.size() < (Packages.config.YamlConfig.config.server.USE_ENABLE_SOLO_EXPEDITIONS ? 1 : 3)) {
cm.sendOk("You need at least 3 players to participate in the battle!");
} else {
cm.cpqLobby(selection);
@@ -235,7 +235,7 @@ function action(mode, type, selection) {
} else {
if (status == 0) {
var talk = "What would you like to do? If you have never participate in the Monster Carnival, you will need to know a few things before participating! \r\n#b#L0# Go to the Monster Carnival 1.#l \r\n#L3# Go to the Monster Carnival 2.#l \r\n#L1# Learn about the Monster Carnival.#l\r\n#L2# Trade #t4001129#.#l";
if (Packages.constants.ServerConstants.USE_ENABLE_CUSTOM_NPC_SCRIPT) {
if (Packages.config.YamlConfig.config.server.USE_ENABLE_CUSTOM_NPC_SCRIPT) {
talk += "\r\n#L4# ... Can I just refine my ores?#l";
}
cm.sendSimple(talk);

View File

@@ -29,8 +29,8 @@ var feeMultiplier = 7.0;
function start() {
status = -1;
if (!Packages.constants.ServerConstants.USE_CPQ) {
if (Packages.constants.ServerConstants.USE_ENABLE_CUSTOM_NPC_SCRIPT) {
if (!Packages.config.YamlConfig.config.server.USE_CPQ) {
if (Packages.config.YamlConfig.config.server.USE_ENABLE_CUSTOM_NPC_SCRIPT) {
status = 0;
action(1, 0, 4);
} else {
@@ -235,7 +235,7 @@ function action(mode, type, selection) {
} else {
if (status == 0) {
var talk = "What would you like to do? If you have never participate in the Monster Carnival, you will need to know a few things before participating! \r\n#b#L0# Go to the Monster Carnival 1.#l \r\n#L3# Go to the Monster Carnival 2.#l \r\n#L1# Learn about the Monster Carnival.#l\r\n#L2# Trade #t4001129#.#l";
if (Packages.constants.ServerConstants.USE_ENABLE_CUSTOM_NPC_SCRIPT) {
if (Packages.config.YamlConfig.config.server.USE_ENABLE_CUSTOM_NPC_SCRIPT) {
talk += "\r\n#L4# ... Can I just refine my ores?#l";
}
cm.sendSimple(talk);

View File

@@ -77,9 +77,9 @@ function action(mode, type, selection) {
}
} else {
var party = cm.getParty().getMembers();
if ((selection === 0 || selection === 1 ) && party.size() < (Packages.constants.ServerConstants.USE_ENABLE_SOLO_EXPEDITIONS ? 1 : 2)) {
if ((selection === 0 || selection === 1 ) && party.size() < (Packages.config.YamlConfig.config.server.USE_ENABLE_SOLO_EXPEDITIONS ? 1 : 2)) {
cm.sendOk("You need at least 2 players to participate in the battle!");
} else if ((selection === 2 ) && party.size() < (Packages.constants.ServerConstants.USE_ENABLE_SOLO_EXPEDITIONS ? 1 : 3)) {
} else if ((selection === 2 ) && party.size() < (Packages.config.YamlConfig.config.server.USE_ENABLE_SOLO_EXPEDITIONS ? 1 : 3)) {
cm.sendOk("You need at least 3 players to participate in the battle!");
} else {
cm.cpqLobby2(selection);

View File

@@ -45,13 +45,13 @@ function action(mode, type, selection) {
if(cm.isQuestStarted(3421)) {
var meteoriteId = cm.getNpc() - 2050014;
var progress = cm.getQuestProgress(3421, 0);
var progress = cm.getQuestProgressInt(3421, 1);
if((progress >> meteoriteId) % 2 == 0 || (progress == 63 && !cm.haveItem(4031117, 6))) {
if (cm.canHold(4031117, 1)) {
progress |= (1 << meteoriteId);
cm.gainItem(4031117, 1);
cm.setQuestProgress(3421, 0, progress);
cm.setQuestProgress(3421, 1, progress);
} else {
cm.getPlayer().dropMessage(1, "Have a ETC slot available for this item.");
}

View File

@@ -45,13 +45,13 @@ function action(mode, type, selection) {
if(cm.isQuestStarted(3421)) {
var meteoriteId = cm.getNpc() - 2050014;
var progress = cm.getQuestProgress(3421, 0);
var progress = cm.getQuestProgressInt(3421, 1);
if((progress >> meteoriteId) % 2 == 0 || (progress == 63 && !cm.haveItem(4031117, 6))) {
if (cm.canHold(4031117, 1)) {
progress |= (1 << meteoriteId);
cm.gainItem(4031117, 1);
cm.setQuestProgress(3421, 0, progress);
cm.setQuestProgress(3421, 1, progress);
} else {
cm.getPlayer().dropMessage(1, "Have a ETC slot available for this item.");
}

View File

@@ -45,13 +45,13 @@ function action(mode, type, selection) {
if(cm.isQuestStarted(3421)) {
var meteoriteId = cm.getNpc() - 2050014;
var progress = cm.getQuestProgress(3421, 0);
var progress = cm.getQuestProgressInt(3421, 1);
if((progress >> meteoriteId) % 2 == 0 || (progress == 63 && !cm.haveItem(4031117, 6))) {
if (cm.canHold(4031117, 1)) {
progress |= (1 << meteoriteId);
cm.gainItem(4031117, 1);
cm.setQuestProgress(3421, 0, progress);
cm.setQuestProgress(3421, 1, progress);
} else {
cm.getPlayer().dropMessage(1, "Have a ETC slot available for this item.");
}

View File

@@ -45,13 +45,13 @@ function action(mode, type, selection) {
if(cm.isQuestStarted(3421)) {
var meteoriteId = cm.getNpc() - 2050014;
var progress = cm.getQuestProgress(3421, 0);
var progress = cm.getQuestProgressInt(3421, 1);
if((progress >> meteoriteId) % 2 == 0 || (progress == 63 && !cm.haveItem(4031117, 6))) {
if (cm.canHold(4031117, 1)) {
progress |= (1 << meteoriteId);
cm.gainItem(4031117, 1);
cm.setQuestProgress(3421, 0, progress);
cm.setQuestProgress(3421, 1, progress);
} else {
cm.getPlayer().dropMessage(1, "Have a ETC slot available for this item.");
}

View File

@@ -45,13 +45,13 @@ function action(mode, type, selection) {
if(cm.isQuestStarted(3421)) {
var meteoriteId = cm.getNpc() - 2050014;
var progress = cm.getQuestProgress(3421, 0);
var progress = cm.getQuestProgressInt(3421, 1);
if((progress >> meteoriteId) % 2 == 0 || (progress == 63 && !cm.haveItem(4031117, 6))) {
if (cm.canHold(4031117, 1)) {
progress |= (1 << meteoriteId);
cm.gainItem(4031117, 1);
cm.setQuestProgress(3421, 0, progress);
cm.setQuestProgress(3421, 1, progress);
} else {
cm.getPlayer().dropMessage(1, "Have a ETC slot available for this item.");
}

View File

@@ -45,13 +45,13 @@ function action(mode, type, selection) {
if(cm.isQuestStarted(3421)) {
var meteoriteId = cm.getNpc() - 2050014;
var progress = cm.getQuestProgress(3421, 0);
var progress = cm.getQuestProgressInt(3421, 1);
if((progress >> meteoriteId) % 2 == 0 || (progress == 63 && !cm.haveItem(4031117, 6))) {
if (cm.canHold(4031117, 1)) {
progress |= (1 << meteoriteId);
cm.gainItem(4031117, 1);
cm.setQuestProgress(3421, 0, progress);
cm.setQuestProgress(3421, 1, progress);
} else {
cm.getPlayer().dropMessage(1, "Have a ETC slot available for this item.");
}

View File

@@ -32,12 +32,19 @@ function start() {
cm.sendOk("Thanks for saving the pork.");
}
else if(cm.isQuestStarted(6002)) {
var em = cm.getEventManager("3rdJob_mount");
if (em == null)
cm.sendOk("Sorry, but 3rd job advancement (mount) is closed.");
else {
if (!em.startInstance(cm.getPlayer())) {
cm.sendOk("There is currently someone in this map, come back later.");
if (cm.haveItem(4031507, 5) && cm.haveItem(4031508,5)) {
cm.sendOk("Thanks for saving the pork.");
} else {
var em = cm.getEventManager("3rdJob_mount");
if (em == null)
cm.sendOk("Sorry, but 3rd job advancement (mount) is closed.");
else {
if (em.startInstance(cm.getPlayer())) {
cm.removeAll(4031507);
cm.removeAll(4031508);
} else {
cm.sendOk("There is currently someone in this map, come back later.");
}
}
}
}

View File

@@ -23,7 +23,7 @@ function action(mode, type, selection) {
status--;
if(status == 0) {
if(cm.getQuestProgress(23647, 0) != 0) {
if(cm.getQuestProgressInt(23647, 1) != 0) {
cm.dispose();
return;
}
@@ -39,7 +39,7 @@ function action(mode, type, selection) {
cm.sendNext("Teehehee~ That's your reward for taking it from me, serves you well.");
cm.gainItem(4031793, -1);
cm.gainFame(-5);
cm.setQuestProgress(23647, 0, 1);
cm.setQuestProgress(23647, 1, 1);
cm.dispose();
}

View File

@@ -36,7 +36,7 @@ function action(mode, type, selection) {
status++;
if(status == 0) {
if(cm.isQuestStarted(6180)) {
if(cm.isQuestStarted(6180) && cm.getQuestProgressInt(6180, 9300096) < 200) {
cm.sendYesNo("Pay attention: during the time you stay inside the training ground make sure you #bhave equipped your #t1092041##k, it is of the utmost importance. Are you ready to proceed to the training area?");
}
@@ -47,10 +47,15 @@ function action(mode, type, selection) {
}
else if(status == 1) {
cm.warp(924000001, 0);
cm.sendOk("Have your shield equipped until the end of the quest, or else you will need to start all over again!");
cm.resetQuestProgress(6180,9300096);
if (cm.getPlayer().haveItemEquipped(1092041)) {
cm.sendNext("Have your shield equipped until the end of the quest, or else you will need to start all over again!");
} else {
cm.sendOk("Please equip the #r#t1092041##k before entering the training ground.");
cm.dispose();
}
}
else {
cm.warp(924000001, 0);
cm.dispose();
}
}

View File

@@ -44,7 +44,7 @@ function action(mode, type, selection){
}
else if(status == 1) {
cm.warp(exitMap);
cm.warp(exitMap, "st00");
cm.dispose();
}
}

View File

@@ -39,7 +39,7 @@ function action(mode, type, selection) {
status--;
if(status == 0) {
if (Packages.constants.ServerConstants.USE_ENABLE_CUSTOM_NPC_SCRIPT) {
if (Packages.config.YamlConfig.config.server.USE_ENABLE_CUSTOM_NPC_SCRIPT) {
cm.openShopNPC(2082014);
} else if (cm.isQuestStarted(3749)) {
cm.sendOk("We've already located the enemy's ultimate weapon! Follow along the ship's bow area ahead and you will find my sister #b#p2082013##k. Report to her for futher instructions on the mission.");

View File

@@ -45,7 +45,7 @@ function action(mode, type, selection) {
if (status == 0) {
if(cm.haveItem(4001086)) {
cm.sendYesNo("Do you want to access #b#m240050400##k right now?");
} else if(Packages.constants.ServerConstants.USE_ENABLE_SOLO_EXPEDITIONS) {
} else if(Packages.config.YamlConfig.config.server.USE_ENABLE_SOLO_EXPEDITIONS) {
if(canBypassHTPQ()) {
cm.sendYesNo("Do you want to access #b#m240050400##k right now?");
} else {

View File

@@ -34,7 +34,7 @@ function action(mode, type, selection) {
cm.dispose();
else {
if(cm.getMapId() > 240050400) cm.warp(240050600);
else cm.warp(240040700);
else cm.warp(240040700, "out00");
cm.dispose();
}

View File

@@ -64,8 +64,13 @@ function action(mode, type, selection) {
cm.sendSimple("#e#b<Expedition: " + expedName + ">\r\n#k#n" + em.getProperty("party") + "\r\n\r\nWould you like to assemble a team to take on #r" + expedBoss + "#k?\r\n#b#L1#Lets get this going!#l\r\n\#L2#No, I think I'll wait a bit...#l");
status = 1;
} else if (expedition.isLeader(player)) { //If you're the leader, manage the exped
cm.sendSimple(list);
status = 2;
if (expedition.isInProgress()) {
cm.sendOk("Your expedition is already in progress, for those who remain battling lets pray for those brave souls.");
cm.dispose();
} else {
cm.sendSimple(list);
status = 2;
}
} else if (expedition.isRegistering()) { //If the expedition is registering
if (expedition.contains(player)) { //If you're in it but it hasn't started, be patient
cm.sendOk("You have already registered for the expedition. Please wait for #r" + expedition.getLeader().getName() + "#k to begin it.");
@@ -98,8 +103,11 @@ function action(mode, type, selection) {
return;
}
if (cm.createExpedition(exped)) {
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!");
} else if (res > 0) {
cm.sendOk("Sorry, you've already reached the quota of attempts for this expedition! Try again another day...");
} else {
cm.sendOk("An unexpected error has occurred when starting the expedition, please try again later.");
}

View File

@@ -217,7 +217,7 @@ function action(mode, type, selection) {
complete = false;
}
if(java.lang.Math.random() >= 0.9) //A lucky find! Scroll 60%
if(Math.random() >= 0.9) //A lucky find! Scroll 60%
item += 1;
if (!complete || !cm.canHold(item, 1))
@@ -251,7 +251,7 @@ function action(mode, type, selection) {
var reward;
if (rewdSet[selectedItem] instanceof Array) {
var length = rewdSet[selectedItem][1] - rewdSet[selectedItem][0];
reward = rewdSet[selectedItem][0] + java.lang.Math.round(java.lang.Math.random() * length);
reward = rewdSet[selectedItem][0] + Math.round(Math.random() * length);
}
else reward = rewdSet[selectedItem];

View File

@@ -81,7 +81,10 @@ function action(mode, type, selection) {
else if (status == 2){
cm.dispose();
if (beauty == 1){
if (cm.haveItem(5150025)){
if (cm.haveItem(5420006)){
cm.setHair(hairnew[selection]);
cm.sendOk("Enjoy your new and improved hairstyle!");
} else if (cm.haveItem(5150025)){
cm.gainItem(5150025, -1);
cm.setHair(hairnew[selection]);
cm.sendOk("Enjoy your new and improved hairstyle!");

View File

@@ -25,7 +25,7 @@
* @Map(s): Dojo Hall
*/
importPackage(Packages.constants);
importPackage(Packages.config);
var disabled = false;
var belts = Array(1132000, 1132001, 1132002, 1132003, 1132004);
@@ -44,7 +44,7 @@ function start() {
return;
}
belt_points = ServerConstants.USE_FAST_DOJO_UPGRADE ? Array(10, 90, 200, 460, 850) : Array(200, 1800, 4000, 9200, 17000);
belt_points = YamlConfig.config.server.USE_FAST_DOJO_UPGRADE ? Array(10, 90, 200, 460, 850) : Array(200, 1800, 4000, 9200, 17000);
belt_on_inventory = new Array();
for (var i = 0; i < belts.length; i++) {
@@ -330,7 +330,7 @@ function action(mode, type, selection) {
cm.sendYesNo("So, you're giving up? You're really going to leave?");
} else {
if (mode == 1) {
cm.warp(925020002);
cm.warp(925020002, "st00");
}
cm.dispose();
return;

View File

@@ -225,7 +225,7 @@ function action(mode, type, selection) {
cm.sendAcceptDecline("So, you're giving up? You're really going to leave?");
} else {
if (mode == 1) {
cm.warp(925020002);
cm.warp(925020002, "st00");
}
cm.dispose();
}

View File

@@ -27,10 +27,10 @@ function action(mode, type, selection){
return;
}
if(cm.getText() == "Actions speak louder than words"){
if(cm.isQuestStarted(21747) && cm.getQuestProgress(21747, 9300351) == 0)
if(cm.isQuestStarted(21747) && cm.getQuestProgressInt(21747, 9300351) == 0)
cm.warp(925040100, 0);
else
cm.playerMessage(5, "Although you said the right answer, some mysterious forces is blocking the way in.");
cm.playerMessage(5, "Although you said the right answer, some mysterious forces are blocking the way in.");
cm.dispose();
}

View File

@@ -134,9 +134,12 @@ function enterArena(arenaPlayers) {
return;
} else if (expedicao == null) {
if (arenaPlayers != -1) {
if (cm.createExpedition(exped, true, 0, arenaPlayers)) {
var res = cm.createExpedition(exped, true, 0, arenaPlayers);
if (res == 0) {
cm.warp(map, 0);
cm.getPlayer().dropMessage("Your arena was created successfully. Wait for people to join the battle.");
} else if (res > 0) {
cm.sendOk("Sorry, you've already reached the quota of attempts for this expedition! Try again another day...");
} else {
cm.sendOk("An unexpected error has occurred when starting the expedition, please try again later.");
}

View File

@@ -115,7 +115,7 @@ function action(mode, type, selection) {
status = 2;
}
}
} else if (Packages.constants.GameConstants.isAriantColiseumArena(cm.getPlayer().getMapId())) {
} else if (Packages.constants.game.GameConstants.isAriantColiseumArena(cm.getPlayer().getMapId())) {
if (cm.getPlayer().getMapId() == 980010101) {
exped = MapleExpeditionType.ARIANT;
expedicao = cm.getExpedition(exped);

View File

@@ -40,9 +40,9 @@ function action(mode, type, selection) {
else
status--;
if (status == 0 && mode == 1) {
if(cm.isQuestStarted(3900) && cm.getPlayer().getQuestInfo(3900) != 5) {
if(cm.isQuestStarted(3900) && cm.getQuestProgressInt(3900) != 5) {
cm.sendOk("#b(You drink the water from the oasis and feel refreshed.)", 2);
cm.getPlayer().updateQuestInfo(3900, "5");
cm.setQuestProgress(3900, 5);
} else if(cm.isQuestCompleted(3938)) {
if(cm.canHold(2210005)) {
if(!cm.haveItem(2210005) && !isTigunMorphed(cm.getPlayer())) {

View File

@@ -43,11 +43,15 @@ function action(mode, type, selection) {
if(status == 0) {
if(cm.isQuestStarted(3929)) {
if(cm.getQuestProgress(3929, 0) != 1) {
if(cm.haveItem(4031580)) {
cm.gainItem(4031580, -1);
cm.setQuestProgress(3929, 0, 1);
}
var progress = cm.getQuestProgress(3929);
var slot = 0;
var ch = progress[slot];
if(ch == '2') {
var nextProgress = progress.substr(0, slot) + '3' + progress.substr(slot + 1);
cm.gainItem(4031580, -1);
cm.setQuestProgress(3929, nextProgress);
}
}

View File

@@ -43,11 +43,15 @@ function action(mode, type, selection) {
if(status == 0) {
if(cm.isQuestStarted(3929)) {
if(cm.getQuestProgress(3929, 2) != 1) {
if(cm.haveItem(4031580)) {
cm.gainItem(4031580, -1);
cm.setQuestProgress(3929, 2, 1);
}
var progress = cm.getQuestProgress(3929);
var slot = 2;
var ch = progress[slot];
if(ch == '2') {
var nextProgress = progress.substr(0, slot) + '3' + progress.substr(slot + 1);
cm.gainItem(4031580, -1);
cm.setQuestProgress(3929, nextProgress);
}
}

View File

@@ -43,11 +43,15 @@ function action(mode, type, selection) {
if(status == 0) {
if(cm.isQuestStarted(3929)) {
if(cm.getQuestProgress(3929, 1) != 1) {
if(cm.haveItem(4031580)) {
cm.gainItem(4031580, -1);
cm.setQuestProgress(3929, 1, 1);
}
var progress = cm.getQuestProgress(3929);
var slot = 1;
var ch = progress[slot];
if(ch == '2') {
var nextProgress = progress.substr(0, slot) + '3' + progress.substr(slot + 1);
cm.gainItem(4031580, -1);
cm.setQuestProgress(3929, nextProgress);
}
}

View File

@@ -43,11 +43,15 @@ function action(mode, type, selection) {
if(status == 0) {
if(cm.isQuestStarted(3929)) {
if(cm.getQuestProgress(3929, 3) != 1) {
if(cm.haveItem(4031580)) {
cm.gainItem(4031580, -1);
cm.setQuestProgress(3929, 3, 1);
}
var progress = cm.getQuestProgress(3929);
var slot = 3;
var ch = progress[slot];
if(ch == '2') {
var nextProgress = progress.substr(0, slot) + '3' + progress.substr(slot + 1);
cm.gainItem(4031580, -1);
cm.setQuestProgress(3929, nextProgress);
}
}

View File

@@ -43,11 +43,15 @@ function action(mode, type, selection) {
if(status == 0) {
if(cm.isQuestStarted(3926)) {
if(cm.getQuestProgress(3926, 0) != 1) {
if(cm.haveItem(4031579)) {
cm.gainItem(4031579, -1);
cm.setQuestProgress(3926, 0, 1);
}
var progress = cm.getQuestProgress(3926);
var slot = 0;
var ch = progress[slot];
if(ch == '2') {
var nextProgress = progress.substr(0, slot) + '3' + progress.substr(slot + 1);
cm.gainItem(4031579, -1);
cm.setQuestProgress(3926, nextProgress);
}
}

View File

@@ -43,11 +43,15 @@ function action(mode, type, selection) {
if(status == 0) {
if(cm.isQuestStarted(3926)) {
if(cm.getQuestProgress(3926, 2) != 1) {
if(cm.haveItem(4031579)) {
cm.gainItem(4031579, -1);
cm.setQuestProgress(3926, 2, 1);
}
var progress = cm.getQuestProgress(3926);
var slot = 2;
var ch = progress[slot];
if(ch == '2') {
var nextProgress = progress.substr(0, slot) + '3' + progress.substr(slot + 1);
cm.gainItem(4031579, -1);
cm.setQuestProgress(3926, nextProgress);
}
}

View File

@@ -43,11 +43,15 @@ function action(mode, type, selection) {
if(status == 0) {
if(cm.isQuestStarted(3926)) {
if(cm.getQuestProgress(3926, 1) != 1) {
if(cm.haveItem(4031579)) {
cm.gainItem(4031579, -1);
cm.setQuestProgress(3926, 1, 1);
}
var progress = cm.getQuestProgress(3926);
var slot = 1;
var ch = progress[slot];
if(ch == '2') {
var nextProgress = progress.substr(0, slot) + '3' + progress.substr(slot + 1);
cm.gainItem(4031579, -1);
cm.setQuestProgress(3926, nextProgress);
}
}

View File

@@ -43,11 +43,15 @@ function action(mode, type, selection) {
if(status == 0) {
if(cm.isQuestStarted(3926)) {
if(cm.getQuestProgress(3926, 3) != 1) {
if(cm.haveItem(4031579)) {
cm.gainItem(4031579, -1);
cm.setQuestProgress(3926, 3, 1);
}
var progress = cm.getQuestProgress(3926);
var slot = 3;
var ch = progress[slot];
if(ch == '2') {
var nextProgress = progress.substr(0, slot) + '3' + progress.substr(slot + 1);
cm.gainItem(4031579, -1);
cm.setQuestProgress(3926, nextProgress);
}
}

View File

@@ -66,7 +66,7 @@ function action(mode, type, selection) {
} else if (selection == 4) {
cm.sendNext("Inside Pharaoh Yeti's Tomb, you can acquire a #e#b#t2022613##k#n by proving yourself capable of defeating the #bPharaoh Jr. Yeti#k, the Pharaoh's clone. Inside that box lies a very special treasure. It is the #e#b#t1132012##k#n.\r\n#i1132012:# #t1132012#\r\n\r\n And if you are somehow able to survive Hell Mode, you will receive the #e#b#t1132013##k#n.\r\n\r\n#i1132013:# #t1132013#\r\n\r\n Though, of course, Nett won't allow that to happen.");
} else if (selection == 5) {
var progress = cm.getQuestProgress(29932);
var progress = cm.getQuestProgressInt(29932);
if (progress >= 50000)
cm.dispose();
else

View File

@@ -30,7 +30,7 @@
*/
function start() {
if(cm.isQuestStarted(3310) && !cm.haveItem(4031709, 1)) {
cm.warp(926120100);
cm.warp(926120100, "out00");
} else {
cm.sendNext("Alchemy....and Alchemist.....both of them are important. But more importantly, it is the Magatia that tolerate everything. The honor of Magatia should be protected by me.");
}

View File

@@ -33,7 +33,7 @@
function start() {
if(cm.isQuestStarted(3335) && !cm.haveItem(4031695, 1)) {
cm.warp(926120300);
cm.warp(926120300, "out00");
cm.dispose();
} else {
cm.sendOk("Emotion that I feel is real? Or just illusion coming from mechanical error?");

25
scripts/npc/2111011.js Normal file
View File

@@ -0,0 +1,25 @@
var status;
function start() {
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.dispose();
}
}
}

25
scripts/npc/2111012.js Normal file
View File

@@ -0,0 +1,25 @@
var status;
function start() {
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.dispose();
}
}
}

View File

@@ -40,7 +40,16 @@ function action(mode, type, selection) {
if(status == 0) {
if(cm.isQuestStarted(3311)) {
cm.setQuestProgress(3311, 0, 1);
var progress = cm.getQuestProgressInt(3311);
if (progress == 4) {
progress = 7;
} else {
progress = 5;
}
cm.setQuestProgress(3311, progress);
cm.sendOk("This is a mug picture of Dr. De Lang. It seems he is adorning a locket with the emblem of the Alcadno academy, he is a retainer of the Alcadno society.", 2);
}

View File

@@ -40,7 +40,16 @@ function action(mode, type, selection) {
if(status == 0) {
if(cm.isQuestStarted(3311)) {
cm.setQuestProgress(3311, 1, 1);
var progress = cm.getQuestProgressInt(3311);
if (progress == 4) {
progress = 7;
} else {
progress = 5;
}
cm.setQuestProgress(3311, progress);
cm.sendOk("The diary of Dr. De Lang. A lot of formulas and pompous scientific texts can be found all way through the pages, but it is worth noting that in the last entry (3 weeks ago), it is written that he concluded the researches on an improvement on the blueprints for the Neo Huroids, thus making the last preparations to show it to the 'society'... No words after this...", 2);
} else if(cm.isQuestStarted(3322) && !cm.haveItem(4031697, 1)) {
if(cm.canHold(4031697, 1))

25
scripts/npc/2111016.js Normal file
View File

@@ -0,0 +1,25 @@
var status;
function start() {
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.dispose();
}
}
}

View File

@@ -40,15 +40,15 @@ function action(mode, type, selection) {
if(status == 0) {
if(cm.isQuestStarted(3339)) {
var progress = cm.getQuestProgress(3339, 0);
var progress = cm.getQuestProgressInt(23339, 1);
if(progress == 3) {
cm.sendGetText("The pipe reacts as the water starts flowing. A secret compartment with a keypad shows up. #bPassword#k!");
} else if(progress == 0) {
cm.setQuestProgress(3339, 0, 1);
cm.setQuestProgress(23339, 1, 1);
cm.dispose();
} else if(progress < 3) {
cm.setQuestProgress(3339, 0, 0);
cm.setQuestProgress(23339, 1, 0);
cm.dispose();
} else {
cm.warp(261000001, 1);
@@ -63,7 +63,7 @@ function action(mode, type, selection) {
}
} else if(status == 1) {
if(cm.getText() == "my love Phyllia") {
cm.setQuestProgress(3339, 0, 4);
cm.setQuestProgress(23339, 1, 4);
cm.warp(261000001, 1);
cm.dispose();
}

View File

@@ -40,15 +40,15 @@ function action(mode, type, selection) {
if(status == 0) {
if(cm.isQuestStarted(3339)) {
var progress = cm.getQuestProgress(3339, 0);
var progress = cm.getQuestProgressInt(23339, 1);
if(progress == 3) {
cm.sendGetText("The pipe reacts as the water starts flowing. A secret compartment with a keypad shows up. #bPassword#k!");
} else if(progress == 2) {
cm.setQuestProgress(3339, 0, 3);
cm.setQuestProgress(23339, 1, 3);
cm.sendGetText("The pipe reacts as the water starts flowing. A secret compartment with a keypad shows up. #bPassword#k!");
} else if(progress < 3) {
cm.setQuestProgress(3339, 0, 0);
cm.setQuestProgress(23339, 1, 0);
cm.dispose();
} else {
cm.warp(261000001, 1);
@@ -63,7 +63,7 @@ function action(mode, type, selection) {
}
} else if(status == 1) {
if(cm.getText() == "my love Phyllia") {
cm.setQuestProgress(3339, 0, 4);
cm.setQuestProgress(23339, 1, 4);
cm.warp(261000001, 1);
cm.dispose();
}

View File

@@ -40,15 +40,15 @@ function action(mode, type, selection) {
if(status == 0) {
if(cm.isQuestStarted(3339)) {
var progress = cm.getQuestProgress(3339, 0);
var progress = cm.getQuestProgressInt(23339, 1);
if(progress == 3) {
cm.sendGetText("The pipe reacts as the water starts flowing. A secret compartment with a keypad shows up. #bPassword#k!");
} else if(progress == 1) {
cm.setQuestProgress(3339, 0, 2);
cm.setQuestProgress(23339, 1, 2);
cm.dispose();
} else if(progress < 3) {
cm.setQuestProgress(3339, 0, 0);
cm.setQuestProgress(23339, 1, 0);
cm.dispose();
} else {
cm.warp(261000001, 1);
@@ -63,7 +63,7 @@ function action(mode, type, selection) {
}
} else if(status == 1) {
if(cm.getText() == "my love Phyllia") {
cm.setQuestProgress(3339, 0, 4);
cm.setQuestProgress(23339, 1, 4);
cm.warp(261000001, 1);
cm.dispose();
}

View File

@@ -40,13 +40,13 @@ function action(mode, type, selection) {
if(status == 0) {
if(cm.isQuestStarted(3345)) {
var progress = cm.getQuestProgress(3345, 0);
var progress = cm.getQuestProgressInt(3345);
if(progress == 0) {
cm.setQuestProgress(3345, 0, 1);
cm.setQuestProgress(3345, 1);
cm.dispose();
} else if(progress < 4) {
cm.setQuestProgress(3345, 0, 0);
cm.setQuestProgress(3345, 0);
cm.dispose();
} else {
cm.dispose();

View File

@@ -40,13 +40,13 @@ function action(mode, type, selection) {
if(status == 0) {
if(cm.isQuestStarted(3345)) {
var progress = cm.getQuestProgress(3345, 0);
var progress = cm.getQuestProgressInt(3345);
if(progress == 1) {
cm.setQuestProgress(3345, 0, 2);
cm.setQuestProgress(3345, 2);
cm.dispose();
} else if(progress < 4) {
cm.setQuestProgress(3345, 0, 0);
cm.setQuestProgress(3345, 0);
cm.dispose();
} else {
cm.dispose();

View File

@@ -40,13 +40,13 @@ function action(mode, type, selection) {
if(status == 0) {
if(cm.isQuestStarted(3345)) {
var progress = cm.getQuestProgress(3345, 0);
var progress = cm.getQuestProgressInt(3345);
if(progress == 2) {
cm.setQuestProgress(3345, 0, 3);
cm.setQuestProgress(3345, 3);
cm.dispose();
} else if(progress < 4) {
cm.setQuestProgress(3345, 0, 0);
cm.setQuestProgress(3345, 0);
cm.dispose();
} else {
cm.dispose();

View File

@@ -40,10 +40,10 @@ function action(mode, type, selection) {
if(status == 0) {
if(cm.isQuestStarted(3345)) {
var progress = cm.getQuestProgress(3345, 0);
var progress = cm.getQuestProgressInt(3345);
if(progress == 3 && cm.haveItem(4031739, 1) && cm.haveItem(4031740, 1) && cm.haveItem(4031741, 1)) {
cm.setQuestProgress(3345, 0, 4);
cm.setQuestProgress(3345, 4);
cm.gainItem(4031739, -1);
cm.gainItem(4031740, -1);
cm.gainItem(4031741, -1);
@@ -51,7 +51,7 @@ function action(mode, type, selection) {
cm.sendOk("(As you place the shards a light shines over the circle, repelling whatever omens were brewing inside the artifact.)", 2);
cm.dispose();
} else if(progress < 4) {
cm.setQuestProgress(3345, 0, 0);
cm.setQuestProgress(3345, 0);
cm.dispose();
} else {
cm.dispose();

View File

@@ -50,7 +50,7 @@ function action(mode, type, selection) {
if(status == 0) {
cm.sendYesNo("We must keep fighting to save Romeo, please keep your pace. If you are not feeling so well to continue, your companions and I will understand... So, are you going to retreat?");
} else if(status == 1) {
cm.warp(926110700);
cm.warp(926110700, 0);
cm.dispose();
}
} else {

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