MagatiaPQ + several minor fixes
Added MagatiaPQ. Fixed a bug on Dojo where parties quitting the boss fight without completing until rest point couldn't not start Dojo again w/o reforming the party. Fixed issues with 2nd job NPC scripts. Reverted command layout to use "!" and "@" again.
This commit is contained in:
@@ -24,47 +24,57 @@
|
||||
Victoria Road : West Rocky Mountain IV (102020300)
|
||||
*/
|
||||
|
||||
var status = 0;
|
||||
|
||||
var status;
|
||||
|
||||
function start() {
|
||||
if (cm.isQuestCompleted(100004)) {
|
||||
cm.sendOk("You're truly a hero!");
|
||||
cm.dispose();
|
||||
} else if (cm.isQuestStarted(100003)) {
|
||||
cm.completeQuest(100003);
|
||||
cm.sendNext("Hmmm...it is definitely the letter from #bDances with Balrog#k...so you came all the way here to take the test and make the 2nd job advancement as the warrior. Alright, I'll explain the test to you. Don't sweat it too much, it's not that complicated.");
|
||||
} else {
|
||||
cm.sendOk("I can show you the way once your ready for it.");
|
||||
cm.dispose();
|
||||
}
|
||||
status = -1;
|
||||
action(1, 0, 0);
|
||||
}
|
||||
|
||||
function action(mode, type, selection) {
|
||||
if (mode == -1)
|
||||
cm.dispose();
|
||||
else {
|
||||
if (mode == 1)
|
||||
status++;
|
||||
else
|
||||
status--;
|
||||
if (status == 0 && cm.isQuestStarted(100003))
|
||||
status = 5;
|
||||
else if (status == 1)
|
||||
cm.sendNextPrev("I'll send you to a hidden map. You'll see monsters you don't normally see. They look the same like the regular ones, but with a totally different attitude. They neither boost your experience level nor provide you with item.");
|
||||
else if (status == 2)
|
||||
cm.sendNextPrev("You'll be able to acquire a marble called #b#t4031013##k while knocking down those monsters. It is a special marble made out of their sinister, evil minds. Collect 30 of those, and then go talk to a colleague of mine in there. That's how you pass the test.");
|
||||
else if (status == 3)
|
||||
cm.sendYesNo("Once you go inside, you can't leave until you take care of your mission. If you die, your experience level will decrease..so you better really buckle up and get ready...well, do you want to go for it now?");
|
||||
else if (status == 4) {
|
||||
cm.sendNext("Alright I'll let you in! Defeat the monsters inside, collect 30 Dark Marbles, then strike up a conversation with a colleague of mine inside. He'll give you #bThe Proof of a Hero#k, the proof that you've passed the test. Best of luck to you.");
|
||||
cm.startQuest(100004);
|
||||
cm.gainItem(4031008, -1);
|
||||
}
|
||||
else if (status == 5) {
|
||||
cm.warp(108000300, 0);
|
||||
cm.dispose();
|
||||
} else {
|
||||
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.isQuestCompleted(100004)) {
|
||||
cm.sendOk("You're truly a hero!");
|
||||
cm.dispose();
|
||||
} else if(cm.isQuestCompleted(100003)) {
|
||||
cm.sendNext("Alright I'll let you in! Defeat the monsters inside, collect 30 Dark Marbles, then strike up a conversation with a colleague of mine inside. He'll give you #bThe Proof of a Hero#k, the proof that you've passed the test. Best of luck to you.");
|
||||
status = 4;
|
||||
} else if (cm.isQuestStarted(100003)) {
|
||||
cm.sendNext("Hmmm...it is definitely the letter from #bDances with Balrog#k...so you came all the way here to take the test and make the 2nd job advancement as the warrior. Alright, I'll explain the test to you. Don't sweat it too much, it's not that complicated.");
|
||||
} else {
|
||||
cm.sendOk("I can show you the way once your ready for it.");
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
else if (status == 1)
|
||||
cm.sendNextPrev("I'll send you to a hidden map. You'll see monsters you don't normally see. They look the same like the regular ones, but with a totally different attitude. They neither boost your experience level nor provide you with item.");
|
||||
else if (status == 2)
|
||||
cm.sendNextPrev("You'll be able to acquire a marble called #b#t4031013##k while knocking down those monsters. It is a special marble made out of their sinister, evil minds. Collect 30 of those, and then go talk to a colleague of mine in there. That's how you pass the test.");
|
||||
else if (status == 3)
|
||||
cm.sendYesNo("Once you go inside, you can't leave until you take care of your mission. If you die, your experience level will decrease..so you better really buckle up and get ready...well, do you want to go for it now?");
|
||||
else if (status == 4) {
|
||||
cm.sendNext("Alright I'll let you in! Defeat the monsters inside, collect 30 Dark Marbles, then strike up a conversation with a colleague of mine inside. He'll give you #bThe Proof of a Hero#k, the proof that you've passed the test. Best of luck to you.");
|
||||
cm.completeQuest(100003);
|
||||
cm.startQuest(100004);
|
||||
cm.gainItem(4031008, -1);
|
||||
}
|
||||
else if (status == 5) {
|
||||
cm.warp(108000300, 0);
|
||||
cm.dispose();
|
||||
} else {
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,46 +24,56 @@
|
||||
Victoria Road : The Forest North of Ellinia (101020000)
|
||||
*/
|
||||
|
||||
var status = 0;
|
||||
|
||||
var status;
|
||||
|
||||
function start() {
|
||||
if (cm.isQuestCompleted(100007)) {
|
||||
cm.sendOk("You're truly a hero!");
|
||||
cm.dispose();
|
||||
} else if (cm.isQuestStarted(100006)) {
|
||||
cm.completeQuest(100006);
|
||||
cm.sendNext("Hmmm...it is definitely the letter from #bGrendell the Really Old#k...so you came all the way here to take the test and make the 2nd job advancement as a magician. Alright, I'll explain the test to you. Don't sweat it too much, it's not that complicated.")
|
||||
} else {
|
||||
cm.sendOk("I can show you the way once your ready for it.");
|
||||
cm.dispose();
|
||||
}
|
||||
status = -1;
|
||||
action(1, 0, 0);
|
||||
}
|
||||
|
||||
function action(mode, type, selection) {
|
||||
if (mode == -1)
|
||||
cm.dispose();
|
||||
else {
|
||||
if (mode == 1)
|
||||
status++;
|
||||
else
|
||||
status--;
|
||||
if (status == 0 && cm.isQuestStarted(100007))
|
||||
status = 5;
|
||||
else if (status == 1)
|
||||
cm.sendNextPrev("I'll send you to a hidden map. You'll see monsters you don't normally see. They look the same like the regular ones, but with a totally different attitude. They neither boost your experience level nor provide you with item.");
|
||||
else if (status == 2)
|
||||
cm.sendNextPrev("You'll be able to acquire a marble called #b#t4031013##k while knocking down those monsters. It is a special marble made out of their sinister, evil minds. Collect 30 of those, and then go talk to a colleague of mine in there. That's how you pass the test.");
|
||||
else if (status == 3)
|
||||
cm.sendYesNo("Once you go inside, you can't leave until you take care of your mission. If you die, your experience level will decrease.. So you better really buckle up and get ready...well, do you want to go for it now?");
|
||||
else if (status == 4) {
|
||||
cm.sendNext("Alright I'll let you in! Defeat the monsters inside, collect 30 Dark Marbles, then strike up a conversation with a colleague of mine inside. He'll give you #bThe Proof of a Hero#k, the proof that you've passed the test. Best of luck to you.");
|
||||
cm.startQuest(100007);
|
||||
cm.gainItem(4031009, -1);
|
||||
}
|
||||
else if (status == 5) {
|
||||
cm.warp(108000200, 0);
|
||||
cm.dispose();
|
||||
}
|
||||
else 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.isQuestCompleted(100007)) {
|
||||
cm.sendOk("You're truly a hero!");
|
||||
cm.dispose();
|
||||
} else if(cm.isQuestCompleted(100006)) {
|
||||
cm.sendNext("Alright I'll let you in! Defeat the monsters inside, collect 30 Dark Marbles, then strike up a conversation with a colleague of mine inside. He'll give you #bThe Proof of a Hero#k, the proof that you've passed the test. Best of luck to you.");
|
||||
status = 4;
|
||||
} else if (cm.isQuestStarted(100006)) {
|
||||
cm.sendNext("Hmmm...it is definitely the letter from #bGrendell the Really Old#k...so you came all the way here to take the test and make the 2nd job advancement as a magician. Alright, I'll explain the test to you. Don't sweat it too much, it's not that complicated.");
|
||||
} else {
|
||||
cm.sendOk("I can show you the way once your ready for it.");
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
else if(status == 1)
|
||||
cm.sendNextPrev("I'll send you to a hidden map. You'll see monsters you don't normally see. They look the same like the regular ones, but with a totally different attitude. They neither boost your experience level nor provide you with item.");
|
||||
else if (status == 2)
|
||||
cm.sendNextPrev("You'll be able to acquire a marble called #b#t4031013##k while knocking down those monsters. It is a special marble made out of their sinister, evil minds. Collect 30 of those, and then go talk to a colleague of mine in there. That's how you pass the test.");
|
||||
else if (status == 3)
|
||||
cm.sendYesNo("Once you go inside, you can't leave until you take care of your mission. If you die, your experience level will decrease.. So you better really buckle up and get ready...well, do you want to go for it now?");
|
||||
else if (status == 4) {
|
||||
cm.sendNext("Alright I'll let you in! Defeat the monsters inside, collect 30 Dark Marbles, then strike up a conversation with a colleague of mine inside. He'll give you #bThe Proof of a Hero#k, the proof that you've passed the test. Best of luck to you.");
|
||||
cm.completeQuest(100006);
|
||||
cm.startQuest(100007);
|
||||
cm.gainItem(4031009, -1);
|
||||
}
|
||||
else if (status == 5) {
|
||||
cm.warp(108000200, 0);
|
||||
cm.dispose();
|
||||
}
|
||||
else cm.dispose();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,45 +24,56 @@ Hunter Job Advancement
|
||||
Warning Street : The Road to the Dungeon (106010000)
|
||||
*/
|
||||
|
||||
var status = 0;
|
||||
|
||||
var status;
|
||||
|
||||
function start() {
|
||||
if (cm.isQuestCompleted(100001)) {
|
||||
cm.sendOk("You're truly a hero!");
|
||||
cm.dispose();
|
||||
} else if (cm.isQuestStarted(100000)) {
|
||||
cm.completeQuest(100000);
|
||||
cm.sendNext("Oh, isn't this a letter from #bAthena#k?");
|
||||
} else {
|
||||
cm.sendOk("I can show you the way once your ready for it.");
|
||||
cm.dispose();
|
||||
}
|
||||
status = -1;
|
||||
action(1, 0, 0);
|
||||
}
|
||||
|
||||
function action(mode, type, selection) {
|
||||
if (mode == -1)
|
||||
cm.dispose();
|
||||
else {
|
||||
if (mode == 1)
|
||||
status++;
|
||||
else
|
||||
status--;
|
||||
if (status == 0 && cm.isQuestStarted(100001))
|
||||
status = 4;
|
||||
if (status == 1)
|
||||
cm.sendNextPrev("So you want to prove your skills? Very well...")
|
||||
else if (status == 2)
|
||||
cm.sendAcceptDecline("I will give you a chance if you're ready.");
|
||||
else if (status == 3) {
|
||||
cm.startQuest(100001);
|
||||
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.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.isQuestCompleted(100001)) {
|
||||
cm.sendOk("You're truly a hero!");
|
||||
cm.dispose();
|
||||
} else if(cm.isQuestCompleted(100000)) {
|
||||
cm.sendNext("Alright I'll let you in! Defeat the monsters inside, collect 30 Dark Marbles, then strike up a conversation with a colleague of mine inside. He'll give you #bThe Proof of a Hero#k, the proof that you've passed the test. Best of luck to you.");
|
||||
status = 3;
|
||||
} else if (cm.isQuestStarted(100000)) {
|
||||
cm.sendNext("Oh, isn't this a letter from #bAthena#k?");
|
||||
} else {
|
||||
cm.sendOk("I can show you the way once your ready for it.");
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
|
||||
else if (status == 1)
|
||||
cm.sendNextPrev("So you want to prove your skills? Very well...");
|
||||
else if (status == 2)
|
||||
cm.sendAcceptDecline("I will give you a chance if you're ready.");
|
||||
else if (status == 3) {
|
||||
cm.completeQuest(100000);
|
||||
cm.startQuest(100001);
|
||||
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.dispose();
|
||||
}
|
||||
else {
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
else {
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -24,45 +24,56 @@
|
||||
Victoria Road : Construction Site North of Kerning City (102040000)
|
||||
*/
|
||||
|
||||
var status = 0;
|
||||
|
||||
var status;
|
||||
|
||||
function start() {
|
||||
if (cm.isQuestCompleted(100010)) {
|
||||
cm.sendOk("You're truly a hero!");
|
||||
cm.dispose();
|
||||
} else if (cm.isQuestStarted(100009)) {
|
||||
cm.completeQuest(100009);
|
||||
cm.sendNext("Oh, isn't this a letter from the #bDark Lord#k?");
|
||||
} else {
|
||||
cm.sendOk("I can show you the way once your ready for it.");
|
||||
cm.dispose();
|
||||
}
|
||||
status = -1;
|
||||
action(1, 0, 0);
|
||||
}
|
||||
|
||||
function action(mode, type, selection) {
|
||||
if (mode == -1)
|
||||
cm.dispose();
|
||||
else {
|
||||
if (mode == 1)
|
||||
status++;
|
||||
else
|
||||
status--;
|
||||
if (status == 0 && cm.isQuestStarted(100010))
|
||||
status = 4;
|
||||
if (status == 1)
|
||||
cm.sendNextPrev("So you want to prove your skills? Very well...")
|
||||
else if (status == 2)
|
||||
cm.sendAcceptDecline("I will give you a chance if you're ready.");
|
||||
else if (status == 3) {
|
||||
cm.sendOk("You will have to collect me #b30 #t4031013##k. Good luck.")
|
||||
cm.startQuest(100010);
|
||||
cm.gainItem(4031011, -1);
|
||||
} else if (status == 4) {
|
||||
cm.warp(108000400, 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) {
|
||||
if (cm.isQuestCompleted(100010)) {
|
||||
cm.sendOk("You're truly a hero!");
|
||||
cm.dispose();
|
||||
} else if(cm.isQuestCompleted(100009)) {
|
||||
cm.sendNext("Alright I'll let you in! Defeat the monsters inside, collect 30 Dark Marbles, then strike up a conversation with a colleague of mine inside. He'll give you #bThe Proof of a Hero#k, the proof that you've passed the test. Best of luck to you.");
|
||||
status = 3;
|
||||
} else if (cm.isQuestStarted(100009)) {
|
||||
cm.sendNext("Oh, isn't this a letter from the #bDark Lord#k?");
|
||||
} else {
|
||||
cm.sendOk("I can show you the way once your ready for it.");
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
|
||||
else if(status == 1)
|
||||
cm.sendNextPrev("So you want to prove your skills? Very well...");
|
||||
else if (status == 2)
|
||||
cm.sendAcceptDecline("I will give you a chance if you're ready.");
|
||||
else if (status == 3) {
|
||||
cm.sendOk("You will have to collect me #b30 #t4031013##k. Good luck.");
|
||||
cm.completeQuest(100009);
|
||||
cm.startQuest(100010);
|
||||
cm.gainItem(4031011, -1);
|
||||
} else if (status == 4) {
|
||||
cm.warp(108000400, 0);
|
||||
cm.dispose();
|
||||
}
|
||||
else {
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
else {
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,21 +19,45 @@
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
var status;
|
||||
var completed;
|
||||
|
||||
function start() {
|
||||
if (cm.haveItem(4031013,30)) {
|
||||
cm.removeAll(4031013);
|
||||
cm.completeQuest(100004);
|
||||
cm.startQuest(100005);
|
||||
cm.gainItem(4031012);
|
||||
cm.sendNext("Ohhhhh.. you collected all 30 Dark Marbles!! It should have been difficult... just incredible! Alright. You've passed the test and for that, I'll reward you #bThe Proof of a Hero#k. Take that and go back to Perion.");
|
||||
} else {
|
||||
cm.sendSimple("You will have to collect me #b30 #t4031013##k. Good luck. \r\n#b#L1#I would like to leave#l");
|
||||
cm.dispose();
|
||||
}
|
||||
status = -1;
|
||||
action(1, 0, 0);
|
||||
}
|
||||
|
||||
function action(mode, type, selection) {
|
||||
if (mode > 0)
|
||||
cm.warp(102020300, 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) {
|
||||
if (cm.haveItem(4031013,30)) {
|
||||
completed = true;
|
||||
cm.sendNext("Ohhhhh.. you collected all 30 Dark Marbles!! It should have been difficult... just incredible! Alright. You've passed the test and for that, I'll reward you #bThe Proof of a Hero#k. Take that and go back to Perion.");
|
||||
} else {
|
||||
completed = false;
|
||||
cm.sendSimple("You will have to collect me #b30 #t4031013##k. Good luck. \r\n#b#L1#I would like to leave#l");
|
||||
}
|
||||
} else if(status == 1) {
|
||||
if(completed) {
|
||||
cm.removeAll(4031013);
|
||||
cm.completeQuest(100004);
|
||||
cm.startQuest(100005);
|
||||
cm.gainItem(4031012);
|
||||
}
|
||||
|
||||
cm.warp(102020300, 2);
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,21 +19,45 @@
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
var status;
|
||||
var completed;
|
||||
|
||||
function start() {
|
||||
if (cm.haveItem(4031013,30)) {
|
||||
cm.removeAll(4031013);
|
||||
cm.completeQuest(100007);
|
||||
cm.startQuest(100008);
|
||||
cm.gainItem(4031012);
|
||||
cm.sendNext("Ohhhhh.. you collected all 30 Dark Marbles!! It should have been difficult.. just incredible! Alright. You've passed the test and for that, I'll reward you #bThe Proof of a Hero#k. Take that and go back to Ellinia.");
|
||||
} else {
|
||||
cm.sendSimple("You will have to collect me #b30 #t4031013##k. Good luck. \r\n#b#L1#I would like to leave#l");
|
||||
cm.dispose();
|
||||
}
|
||||
status = -1;
|
||||
action(1, 0, 0);
|
||||
}
|
||||
|
||||
function action(mode, type, selection) {
|
||||
if (mode > 0)
|
||||
cm.warp(101020000, 1);
|
||||
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.haveItem(4031013,30)) {
|
||||
completed = true;
|
||||
cm.sendNext("Ohhhhh.. you collected all 30 Dark Marbles!! It should have been difficult.. just incredible! Alright. You've passed the test and for that, I'll reward you #bThe Proof of a Hero#k. Take that and go back to Ellinia.");
|
||||
} else {
|
||||
completed = false;
|
||||
cm.sendSimple("You will have to collect me #b30 #t4031013##k. Good luck. \r\n#b#L1#I would like to leave#l");
|
||||
}
|
||||
} else if(status == 1) {
|
||||
if(completed) {
|
||||
cm.removeAll(4031013);
|
||||
cm.completeQuest(100007);
|
||||
cm.startQuest(100008);
|
||||
cm.gainItem(4031012);
|
||||
}
|
||||
|
||||
cm.warp(101020000, 1);
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,21 +31,45 @@
|
||||
---------------------------------------------------------------------------------------------------
|
||||
**/
|
||||
|
||||
var status;
|
||||
var completed;
|
||||
|
||||
function start() {
|
||||
if (cm.haveItem(4031013,30)) {
|
||||
cm.removeAll(4031013);
|
||||
cm.completeQuest(100001);
|
||||
cm.startQuest(100002);
|
||||
cm.gainItem(4031012);
|
||||
cm.sendOk("You're a true hero! Take this and Athena will acknowledge you.");
|
||||
} else {
|
||||
cm.sendSimple("You will have to collect me #b30 #t4031013##k. Good luck. \r\n#b#L1#I would like to leave#l")
|
||||
cm.dispose();
|
||||
}
|
||||
status = -1;
|
||||
action(1, 0, 0);
|
||||
}
|
||||
|
||||
function action(mode, type, selection) {
|
||||
if (mode > 0)
|
||||
cm.warp(106010000, 1);
|
||||
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.haveItem(4031013,30)) {
|
||||
completed = true;
|
||||
cm.sendOk("You're a true hero! Take this and Athena will acknowledge you.");
|
||||
} else {
|
||||
completed = false;
|
||||
cm.sendSimple("You will have to collect me #b30 #t4031013##k. Good luck. \r\n#b#L1#I would like to leave#l");
|
||||
}
|
||||
} else if(status == 1) {
|
||||
if(completed) {
|
||||
cm.removeAll(4031013);
|
||||
cm.completeQuest(100001);
|
||||
cm.startQuest(100002);
|
||||
cm.gainItem(4031012);
|
||||
}
|
||||
|
||||
cm.warp(106010000, 9);
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,21 +29,46 @@
|
||||
1.0 - First Version by Unknown
|
||||
---------------------------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
var status;
|
||||
var completed;
|
||||
|
||||
function start() {
|
||||
if (cm.haveItem(4031013,30)) {
|
||||
cm.removeAll(4031013);
|
||||
cm.completeQuest(100010);
|
||||
cm.startQuest(100011);
|
||||
cm.gainItem(4031012);
|
||||
cm.sendOk("You're a true hero! Take this and the Dark Lord will acknowledge you.");
|
||||
} else {
|
||||
cm.sendSimple("You will have to collect me #b30 #t4031013##k. Good luck. \r\n#b#L1#I would like to leave#l")
|
||||
cm.dispose();
|
||||
}
|
||||
status = -1;
|
||||
action(1, 0, 0);
|
||||
}
|
||||
|
||||
function action(mode, type, selection) {
|
||||
if (mode == 1)
|
||||
cm.warp(102040000, 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) {
|
||||
if (cm.haveItem(4031013,30)) {
|
||||
completed = true;
|
||||
cm.sendOk("You're a true hero! Take this and the Dark Lord will acknowledge you.");
|
||||
} else {
|
||||
completed = false;
|
||||
cm.sendSimple("You will have to collect me #b30 #t4031013##k. Good luck. \r\n#b#L1#I would like to leave#l");
|
||||
}
|
||||
} else if(status == 1) {
|
||||
if(completed) {
|
||||
cm.removeAll(4031013);
|
||||
cm.completeQuest(100010);
|
||||
cm.startQuest(100011);
|
||||
cm.gainItem(4031012);
|
||||
}
|
||||
|
||||
cm.warp(102040000, 9);
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -97,7 +97,7 @@ function action(mode, type, selection) {
|
||||
|
||||
if(avDojo < 0) {
|
||||
if(avDojo == -1) cm.sendOk("All Dojo's are being used already. Wait for awhile before trying again.");
|
||||
else cm.sendOk("Your party already is using the dojo. Wait for them to finish to enter.");
|
||||
else cm.sendOk("Your party is already using the dojo. Wait for them to finish to enter.");
|
||||
}
|
||||
else {
|
||||
cm.getClient().getChannelServer().getMapFactory().getMap(925020010 + avDojo).resetMapObjects();
|
||||
@@ -119,7 +119,7 @@ function action(mode, type, selection) {
|
||||
|
||||
if(avDojo < 0) {
|
||||
if(avDojo == -1) cm.sendOk("All Dojo's are being used already. Wait for awhile before trying again.");
|
||||
else cm.sendOk("Your party already is using the dojo. Wait for them to finish to enter.");
|
||||
else cm.sendOk("Your party is already using the dojo. Wait for them to finish to enter.");
|
||||
cm.getPlayer().setDojoStage(dojoWarp);
|
||||
}
|
||||
else {
|
||||
@@ -136,7 +136,7 @@ function action(mode, type, selection) {
|
||||
|
||||
if(avDojo < 0) {
|
||||
if(avDojo == -1) cm.sendOk("All Dojo's are being used already. Wait for awhile before trying again.");
|
||||
else cm.sendOk("Your party already is using the dojo. Wait for them to finish to enter.");
|
||||
else cm.sendOk("Your party is already using the dojo. Wait for them to finish to enter.");
|
||||
}
|
||||
else {
|
||||
cm.getClient().getChannelServer().resetDojoMap(925020100 + avDojo);
|
||||
@@ -174,7 +174,7 @@ function action(mode, type, selection) {
|
||||
|
||||
if(avDojo < 0) {
|
||||
if(avDojo == -1) cm.sendOk("All Dojo's are being used already. Wait for awhile before trying again.");
|
||||
else cm.sendOk("Your party already is using the dojo. Wait for them to finish to enter.");
|
||||
else cm.sendOk("Your party is already using the dojo. Wait for them to finish to enter.");
|
||||
}
|
||||
else {
|
||||
cm.getClient().getChannelServer().resetDojoMap(925030100 + avDojo);
|
||||
@@ -302,7 +302,7 @@ function action(mode, type, selection) {
|
||||
|
||||
if(avDojo < 0) {
|
||||
if(avDojo == -1) cm.sendOk("All Dojo's are being used already. Wait for awhile before trying again.");
|
||||
else cm.sendOk("Your party already is using the dojo. Wait for them to finish to enter.");
|
||||
else cm.sendOk("Your party already registered for the dojo. Wait for the end of the registration time to enter again.");
|
||||
}
|
||||
else {
|
||||
var baseStg = hasParty ? 925030000 : 925020000;
|
||||
|
||||
120
scripts/npc/2112000.js
Normal file
120
scripts/npc/2112000.js
Normal file
@@ -0,0 +1,120 @@
|
||||
/*
|
||||
This file is part of the OdinMS Maple Story Server
|
||||
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
|
||||
Matthias Butz <matze@odinms.de>
|
||||
Jan Christian Meyer <vimes@odinms.de>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as
|
||||
published by the Free Software Foundation version 3 as published by
|
||||
the Free Software Foundation. You may not use, modify or distribute
|
||||
this program under any other version of the GNU Affero General Public
|
||||
License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/* Yulete
|
||||
Yulete's Office (926100203)
|
||||
Magatia NPC
|
||||
*/
|
||||
|
||||
var status;
|
||||
|
||||
importPackage(Packages.server.life);
|
||||
|
||||
function start() {
|
||||
status = -1;
|
||||
action(1, 0, 0);
|
||||
}
|
||||
|
||||
function playersTooClose() {
|
||||
var npcpos = cm.getMap().getMapObject(cm.getNpcObjectId()).getPosition();
|
||||
var listchr = cm.getMap().getPlayers();
|
||||
|
||||
for (var iterator = listchr.iterator(); iterator.hasNext();) {
|
||||
var chr = iterator.next();
|
||||
|
||||
var chrpos = chr.getPosition();
|
||||
if(Math.sqrt( Math.pow((npcpos.getX() - chrpos.getX()), 2) + Math.pow((npcpos.getY() - chrpos.getY()), 2) ) < 310) return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
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--;
|
||||
|
||||
var eim = cm.getEventInstance();
|
||||
|
||||
if(cm.getMapId() == 926100203) {
|
||||
if(status == 0) {
|
||||
var state = eim.getIntProperty("yuleteTalked");
|
||||
|
||||
if(state == -1) {
|
||||
cm.sendOk("Heh, it seems you guys have company. Have fun with them, as I politely request my leave.");
|
||||
|
||||
} else if (playersTooClose() || eim.getIntProperty("npcShocked") == 0) {
|
||||
cm.sendOk("Oh, hello there. I have been #bmonitoring your moves#k since you guys entered this perimeter. Quite the feat reaching here, I commend all of you. Now, now, look at the time, I've got an appointment right now, I'm afraid I will need to request my leave. But worry not, my #raccessors#k will deal with all of you. Now, if you permit me, I'm leaving now.");
|
||||
|
||||
eim.setIntProperty("yuleteTalked", -1);
|
||||
} else {
|
||||
cm.sendOk("... Hah! What, wh-- How did you get here?! I though I had sealed all paths here! No matter, this situation will be resolved soon. Guys: DEPLOY the #rmaster weapon#k!! You! Yes, you. Don't you think this ends here, look back at your companions, they need some help! I'll be retreating for now.");
|
||||
|
||||
eim.setIntProperty("yuleteTalked", 1);
|
||||
}
|
||||
}
|
||||
|
||||
cm.dispose();
|
||||
} else {
|
||||
if(status == 0) {
|
||||
if(eim.isEventCleared()) {
|
||||
cm.sendOk("Nooooo... I have been beated? But how? Everything I did was for the sake of the development of a greater alchemy! You can't jail me, I did what everybody standing in a place like mine would do! But no, they simply decided to damp up the progress of the science JUST BECAUSE it was deemed dangerous??? Oh, come on!");
|
||||
} else {
|
||||
var state = eim.getIntProperty("yuletePassed");
|
||||
|
||||
if(state == -1) {
|
||||
cm.sendOk("Behold! The pinnacle of Magatia's alchemy studies! Hahahahahahaha...");
|
||||
} else if(state == 0) {
|
||||
cm.sendOk("You guys are such a pain, geez. Very well, I present you my newest weapon, brought by the finest alchemy, #rFrankenroid#k.");
|
||||
eim.dropMessage(5, "Yulete: I present you my newest weapon, brought by the finest alchemy, Frankenroid!");
|
||||
|
||||
var mapobj = eim.getMapInstance(926100401);
|
||||
var bossobj = MapleLifeFactory.getMonster(9300139);
|
||||
mapobj.spawnMonsterOnGroundBelow(bossobj, new Packages.java.awt.Point(250, 100));
|
||||
|
||||
eim.setIntProperty("statusStg7", 1);
|
||||
eim.setIntProperty("yuletePassed", -1);
|
||||
} else {
|
||||
cm.sendOk("You guys are such a pain, geez. Very well, I present you my newest weapon, brought by the finest combined alchemy of Alcadno's and Zenumist's, those that the boring people of Magatia societies have banned to bring along, the #rmighty Frankenroid#k!");
|
||||
eim.dropMessage(5, "Yulete: I present you my newest weapon, brought by the finest combined alchemy of Alcadno's and Zenumist's, those that the boring people of Magatia societies have banned to bring along, the mighty Frankenroid!!");
|
||||
|
||||
var mapobj = eim.getMapInstance(926100401);
|
||||
var bossobj = MapleLifeFactory.getMonster(9300140);
|
||||
mapobj.spawnMonsterOnGroundBelow(bossobj, new Packages.java.awt.Point(250, 100));
|
||||
|
||||
eim.setIntProperty("statusStg7", 2);
|
||||
eim.setIntProperty("yuletePassed", -1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
58
scripts/npc/2112001.js
Normal file
58
scripts/npc/2112001.js
Normal file
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
This file is part of the OdinMS Maple Story Server
|
||||
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
|
||||
Matthias Butz <matze@odinms.de>
|
||||
Jan Christian Meyer <vimes@odinms.de>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as
|
||||
published by the Free Software Foundation version 3 as published by
|
||||
the Free Software Foundation. You may not use, modify or distribute
|
||||
this program under any other version of the GNU Affero General Public
|
||||
License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/* Yulete
|
||||
Traces of Yulete (926100500)
|
||||
Talking
|
||||
*/
|
||||
|
||||
var status;
|
||||
|
||||
function start() {
|
||||
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.sendSimple("Defeated... So, that's how Yulete's legacy will reach it's end, oh how woe is this... Hope you guys are happy now, as I will pass my days rotting in a dark cellar. Everything I've done was for the sake of Magatia!! (sob)\r\n #Ll# Hey man, come now, cheer up! There were not many damages that couldn't be resolved here. Magatia created these forbidding laws to protect it's people from the undoings a greater power like this would do if it reaches wrong hands. That's not the end for you, accept rehabilitation from the Societies and everything will work out!#l");
|
||||
} else if (status == 1){
|
||||
cm.sendNext("... Are you guys forgiving me after all that I've done? Well, I guess I was blinded by the great source of power that could be discovered that way, maybe they're right saying a human can't simply fathom on the usage of those powers without corrupting theirselves along the way... I am profoundly sorry, and to make myself up with everyone I'm willing to help the Societies again wherever I can on the progress of alchemy. Thank you.");
|
||||
} else {
|
||||
if(!cm.isQuestCompleted(7770)) cm.completeQuest(7770);
|
||||
|
||||
cm.warp(926100600);
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
77
scripts/npc/2112003.js
Normal file
77
scripts/npc/2112003.js
Normal file
@@ -0,0 +1,77 @@
|
||||
/**
|
||||
* @author: Ronan
|
||||
* @npc: Juliet
|
||||
* @map: Magatia - Alcadno - Hidden Room (261000021)
|
||||
* @func: Magatia PQ (Alcadno)
|
||||
*/
|
||||
|
||||
var status = 0;
|
||||
var em = null;
|
||||
|
||||
function start() {
|
||||
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(cm.getMapId() != 261000021) {
|
||||
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.dispose();
|
||||
}
|
||||
} else {
|
||||
if (status == 0) {
|
||||
em = cm.getEventManager("MagatiaPQ_A");
|
||||
if(em == null) {
|
||||
cm.sendOk("The Magatia PQ (Alcadno) has encountered an error.");
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
|
||||
cm.sendSimple("#e#b<Party Quest: Romeo and Juliet>\r\n#k#n" + em.getProperty("party") + "\r\n\r\nMy beloved Romeo has been kidnapped! Although he is Zenumist's, I can't stand by and just see him suffer just because of this foolish clash. I need you and your colleagues help to save him! Please, help us!! Please have your #bparty leader#k talk to me.#b\r\n#L0#I want to participate in the party quest.\r\n#L1#I want to find party members.\r\n#L2#I would like to hear more details.");
|
||||
} else if (status == 1) {
|
||||
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) {
|
||||
cm.sendOk("Try using a Super Megaphone or asking your buddies or guild to join!");
|
||||
cm.dispose();
|
||||
} else {
|
||||
cm.sendOk("#e#b<Party Quest: Romeo and Juliet>#k#n\r\nNot long ago, a scientist named Yulete has been banished from this town because of his researches of combined alchemies of Alcadno's and Zenumist's. Because of the immensurable amount of power coming from this combination, it is forbidden by law to study both. Yet, he ignored this law and got hands in both researches. As a result, he has been exiled.\r\nHe is now retaliating, already took my beloved one and his next target is me, as we are big pictures of Magatia, successors of both societies. But I'm not afraid. We must recover him at all costs!\r\n");
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
77
scripts/npc/2112004.js
Normal file
77
scripts/npc/2112004.js
Normal file
@@ -0,0 +1,77 @@
|
||||
/**
|
||||
* @author: Ronan
|
||||
* @npc: Romeo
|
||||
* @map: Magatia - Zenumist - Hidden Room (261000011)
|
||||
* @func: Magatia PQ (Zenumist)
|
||||
*/
|
||||
|
||||
var status = 0;
|
||||
var em = null;
|
||||
|
||||
function start() {
|
||||
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(cm.getMapId() != 261000011) {
|
||||
if(status == 0) {
|
||||
cm.sendYesNo("We must keep fighting to save Juliet, 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(926100700);
|
||||
cm.dispose();
|
||||
}
|
||||
} else {
|
||||
if (status == 0) {
|
||||
em = cm.getEventManager("MagatiaPQ_Z");
|
||||
if(em == null) {
|
||||
cm.sendOk("The Magatia PQ (Zenumist) has encountered an error.");
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
|
||||
cm.sendSimple("#e#b<Party Quest: Romeo and Juliet>\r\n#k#n" + em.getProperty("party") + "\r\n\r\nMy beloved Juliet has been kidnapped! Although she is Alcadno's, I can't stand by and just see her suffer just because of this foolish clash. I need you and your colleagues help to save her! Please, help us!! Please have your #bparty leader#k talk to me.#b\r\n#L0#I want to participate in the party quest.\r\n#L1#I want to find party members.\r\n#L2#I would like to hear more details.");
|
||||
} else if (status == 1) {
|
||||
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) {
|
||||
cm.sendOk("Try using a Super Megaphone or asking your buddies or guild to join!");
|
||||
cm.dispose();
|
||||
} else {
|
||||
cm.sendOk("#e#b<Party Quest: Romeo and Juliet>#k#n\r\nNot long ago, a scientist named Yulete has been banished from this town because of his researches of combined alchemies of Alcadno's and Zenumist's. Because of the immensurable amount of power coming from this combination, it is forbidden by law to study both. Yet, he ignored this law and got hands in both researches. As a result, he has been exiled.\r\nHe is now retaliating, already took my beloved one and his next target is me, as we are big pictures of Magatia, successors of both societies. But I'm not afraid. We must recover her at all costs!\r\n");
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
127
scripts/npc/2112005.js
Normal file
127
scripts/npc/2112005.js
Normal file
@@ -0,0 +1,127 @@
|
||||
/*
|
||||
This file is part of the OdinMS Maple Story Server
|
||||
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
|
||||
Matthias Butz <matze@odinms.de>
|
||||
Jan Christian Meyer <vimes@odinms.de>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as
|
||||
published by the Free Software Foundation version 3 as published by
|
||||
the Free Software Foundation. You may not use, modify or distribute
|
||||
this program under any other version of the GNU Affero General Public
|
||||
License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @author: Ronan
|
||||
* @npc: Juliet
|
||||
* @func: MagatiaPQ area NPC
|
||||
*/
|
||||
|
||||
var status;
|
||||
|
||||
function start() {
|
||||
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--;
|
||||
|
||||
var eim = cm.getEventInstance();
|
||||
|
||||
if(!eim.isEventCleared()) {
|
||||
if(status == 0) {
|
||||
if(eim.getIntProperty("npcShocked") == 0 && cm.haveItem(4001130, 1)) {
|
||||
cm.gainItem(4001130, -1);
|
||||
eim.setIntProperty("npcShocked", 1);
|
||||
|
||||
cm.sendNext("Oh? You got a letter for me? On times like this, what should it be... Gasp! Something big is going on, guys. Rally yourselves, from now on things will be harder than ever!");
|
||||
eim.dropMessage(6, "Juliet seemed very much in shock after reading Romeo's Letter.");
|
||||
|
||||
cm.dispose();
|
||||
return;
|
||||
} else if (eim.getIntProperty("statusStg4") == 1) {
|
||||
var door = cm.getMap().getReactorByName("jnr3_out3");
|
||||
|
||||
if(door.getState() == 0) {
|
||||
cm.sendNext("Let me open the door for you.");
|
||||
door.hitReactor(cm.getClient());
|
||||
} else {
|
||||
cm.sendNext("Please hurry, Romeo is in trouble.");
|
||||
}
|
||||
|
||||
cm.dispose();
|
||||
return;
|
||||
} else if (cm.haveItem(4001134, 1) && cm.haveItem(4001135, 1)) {
|
||||
if (cm.isEventLeader()) {
|
||||
cm.gainItem(4001134, -1);
|
||||
cm.gainItem(4001135, -1);
|
||||
cm.sendNext("Great! You got both Alcadno and Zenumist files at hand. Now we can proceed.");
|
||||
|
||||
eim.showClearEffect();
|
||||
eim.giveEventPlayersStageReward(4);
|
||||
eim.setIntProperty("statusStg4", 1);
|
||||
|
||||
cm.getMap().killAllMonsters();
|
||||
cm.getMap().getReactorByName("jnr3_out3").hitReactor(cm.getClient());
|
||||
} else {
|
||||
cm.sendOk("Please let your leader pass the files to me.");
|
||||
}
|
||||
|
||||
cm.dispose();
|
||||
return;
|
||||
} else {
|
||||
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 {
|
||||
cm.warp(926110700);
|
||||
cm.dispose();
|
||||
}
|
||||
} else {
|
||||
if(status == 0) {
|
||||
if(eim.getIntProperty("escortFail") == 0) {
|
||||
cm.sendNext("Finally, Romeo is safe! Thanks to your efforts, we could save him from the clutches of Yulete, who will now be judged for his rebellion against Magatia. From now on, as he will start rehabilitation, we will keep an eye on his endeavours, making sure he will cause no more troubles on the future.");
|
||||
}
|
||||
else {
|
||||
cm.sendNext("Romeo is safe now, although the battle took it's toll on him... Thanks to your efforts, we could save him from the clutches of Yulete, who will now be judged for his rebellion against Magatia. Thank you.");
|
||||
status = 2;
|
||||
}
|
||||
} else if(status == 1) {
|
||||
cm.sendNext("Now, please receive this gift as an act of acceptation for our gratitude.");
|
||||
} else if(status == 2) {
|
||||
if(cm.canHold(4001160)) {
|
||||
cm.gainItem(4001160, 1);
|
||||
|
||||
if(eim.getIntProperty("normalClear") == 1) cm.warp(926110600);
|
||||
else cm.warp(926110500);
|
||||
} else {
|
||||
cm.sendOk("Make sure you have a space on your ETC inventory.");
|
||||
}
|
||||
|
||||
cm.dispose();
|
||||
} else {
|
||||
cm.warp(926110600);
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
127
scripts/npc/2112006.js
Normal file
127
scripts/npc/2112006.js
Normal file
@@ -0,0 +1,127 @@
|
||||
/*
|
||||
This file is part of the OdinMS Maple Story Server
|
||||
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
|
||||
Matthias Butz <matze@odinms.de>
|
||||
Jan Christian Meyer <vimes@odinms.de>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as
|
||||
published by the Free Software Foundation version 3 as published by
|
||||
the Free Software Foundation. You may not use, modify or distribute
|
||||
this program under any other version of the GNU Affero General Public
|
||||
License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @author: Ronan
|
||||
* @npc: Romeo
|
||||
* @func: MagatiaPQ area NPC
|
||||
*/
|
||||
|
||||
var status;
|
||||
|
||||
function start() {
|
||||
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--;
|
||||
|
||||
var eim = cm.getEventInstance();
|
||||
|
||||
if(!eim.isEventCleared()) {
|
||||
if(status == 0) {
|
||||
if(eim.getIntProperty("npcShocked") == 0 && cm.haveItem(4001131, 1)) {
|
||||
cm.gainItem(4001131, -1);
|
||||
eim.setIntProperty("npcShocked", 1);
|
||||
|
||||
cm.sendNext("Oh? You got a letter for me? On times like this, what should it be... Gasp! Something big is going on, guys. Rally yourselves, from now on things will be harder than ever!");
|
||||
eim.dropMessage(6, "Romeo seemed very much in shock after reading Juliet's Letter.");
|
||||
|
||||
cm.dispose();
|
||||
return;
|
||||
} else if (eim.getIntProperty("statusStg4") == 1) {
|
||||
var door = cm.getMap().getReactorByName("rnj3_out3");
|
||||
|
||||
if(door.getState() == 0) {
|
||||
cm.sendNext("Let me open the door for you.");
|
||||
door.hitReactor(cm.getClient());
|
||||
} else {
|
||||
cm.sendNext("Please hurry, Juliet is in trouble.");
|
||||
}
|
||||
|
||||
cm.dispose();
|
||||
return;
|
||||
} else if (cm.haveItem(4001134, 1) && cm.haveItem(4001135, 1)) {
|
||||
if (cm.isEventLeader()) {
|
||||
cm.gainItem(4001134, -1);
|
||||
cm.gainItem(4001135, -1);
|
||||
cm.sendNext("Great! You got both Alcadno and Zenumist files at hand. Now we can proceed.");
|
||||
|
||||
eim.showClearEffect();
|
||||
eim.giveEventPlayersStageReward(4);
|
||||
eim.setIntProperty("statusStg4", 1);
|
||||
|
||||
cm.getMap().killAllMonsters();
|
||||
cm.getMap().getReactorByName("rnj3_out3").hitReactor(cm.getClient());
|
||||
} else {
|
||||
cm.sendOk("Please let your leader pass the files to me.");
|
||||
}
|
||||
|
||||
cm.dispose();
|
||||
return;
|
||||
} else {
|
||||
cm.sendYesNo("We must keep fighting to save Juliet, 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 {
|
||||
cm.warp(926100700);
|
||||
cm.dispose();
|
||||
}
|
||||
} else {
|
||||
if(status == 0) {
|
||||
if(eim.getIntProperty("escortFail") == 0) {
|
||||
cm.sendNext("Finally, Juliet is safe! Thanks to your efforts, we could save her from the clutches of Yulete, who will now be judged for his rebellion against Magatia. From now on, as he will start rehabilitation, we will keep an eye on his endeavours, making sure he will cause no more troubles on the future.");
|
||||
}
|
||||
else {
|
||||
cm.sendNext("Juliet is safe now, although the battle took it's toll on her... Thanks to your efforts, we could save her from the clutches of Yulete, who will now be judged for his rebellion against Magatia. Thank you.");
|
||||
status = 2;
|
||||
}
|
||||
} else if(status == 1) {
|
||||
cm.sendNext("Now, please receive this gift as an act of acceptation for our gratitude.");
|
||||
} else if(status == 2) {
|
||||
if(cm.canHold(4001159)) {
|
||||
cm.gainItem(4001159, 1);
|
||||
|
||||
if(eim.getIntProperty("normalClear") == 1) cm.warp(926100600);
|
||||
else cm.warp(926100500);
|
||||
} else {
|
||||
cm.sendOk("Make sure you have a space on your ETC inventory.");
|
||||
}
|
||||
|
||||
cm.dispose();
|
||||
} else {
|
||||
cm.warp(926100600);
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
70
scripts/npc/2112007.js
Normal file
70
scripts/npc/2112007.js
Normal file
@@ -0,0 +1,70 @@
|
||||
/*
|
||||
This file is part of the OdinMS Maple Story Server
|
||||
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
|
||||
Matthias Butz <matze@odinms.de>
|
||||
Jan Christian Meyer <vimes@odinms.de>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as
|
||||
published by the Free Software Foundation version 3 as published by
|
||||
the Free Software Foundation. You may not use, modify or distribute
|
||||
this program under any other version of the GNU Affero General Public
|
||||
License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @author: Ronan
|
||||
* @npc: Investigation Result
|
||||
* @func: Gives MagatiaPQ stg1 item
|
||||
*/
|
||||
|
||||
function start() {
|
||||
var eim = cm.getEventInstance();
|
||||
var book = "stg1_b" + (cm.getNpcObjectId() % 26);
|
||||
|
||||
var res = eim.getIntProperty(book);
|
||||
if(res > -1) {
|
||||
eim.setIntProperty(book, -1);
|
||||
|
||||
if(res == 0) { // mesos
|
||||
var mgain = 500 * cm.getPlayer().getMesoRate();
|
||||
cm.sendNext("Earned " + mgain + " mesos!");
|
||||
cm.gainMeso(mgain);
|
||||
} else if(res == 1) { // exp
|
||||
var egain = 500 * cm.getPlayer().getExpRate();
|
||||
cm.sendNext("Earned " + egain + " exp!");
|
||||
cm.gainExp(egain);
|
||||
} else if(res == 2) { // letter
|
||||
var letter = 4001131;
|
||||
if(!cm.canHold(letter)) {
|
||||
cm.sendOk("You got a letter, however it didn't fit on your inventory, so you put it back.");
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
|
||||
cm.gainItem(letter, 1);
|
||||
cm.sendNext("You found a letter, strategically placed here as it seems.");
|
||||
} else if(res == 3) { // pass
|
||||
cm.sendNext("You found the trigger to the next stage.");
|
||||
|
||||
var eim = cm.getEventInstance();
|
||||
eim.showClearEffect();
|
||||
eim.giveEventPlayersStageReward(1);
|
||||
eim.setIntProperty("statusStg1", 1);
|
||||
|
||||
cm.getMap().getReactorByName("d00").hitReactor(cm.getClient());
|
||||
}
|
||||
} else {
|
||||
cm.sendNext("There is nothing here.");
|
||||
}
|
||||
|
||||
cm.dispose();
|
||||
}
|
||||
120
scripts/npc/2112010.js
Normal file
120
scripts/npc/2112010.js
Normal file
@@ -0,0 +1,120 @@
|
||||
/*
|
||||
This file is part of the OdinMS Maple Story Server
|
||||
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
|
||||
Matthias Butz <matze@odinms.de>
|
||||
Jan Christian Meyer <vimes@odinms.de>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as
|
||||
published by the Free Software Foundation version 3 as published by
|
||||
the Free Software Foundation. You may not use, modify or distribute
|
||||
this program under any other version of the GNU Affero General Public
|
||||
License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/* Yulete
|
||||
Yulete's Office (926110203)
|
||||
Magatia NPC
|
||||
*/
|
||||
|
||||
var status;
|
||||
|
||||
importPackage(Packages.server.life);
|
||||
|
||||
function start() {
|
||||
status = -1;
|
||||
action(1, 0, 0);
|
||||
}
|
||||
|
||||
function playersTooClose() {
|
||||
var npcpos = cm.getMap().getMapObject(cm.getNpcObjectId()).getPosition();
|
||||
var listchr = cm.getMap().getPlayers();
|
||||
|
||||
for (var iterator = listchr.iterator(); iterator.hasNext();) {
|
||||
var chr = iterator.next();
|
||||
|
||||
var chrpos = chr.getPosition();
|
||||
if(Math.sqrt( Math.pow((npcpos.getX() - chrpos.getX()), 2) + Math.pow((npcpos.getY() - chrpos.getY()), 2) ) < 310) return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
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--;
|
||||
|
||||
var eim = cm.getEventInstance();
|
||||
|
||||
if(cm.getMapId() == 926110203) {
|
||||
if(status == 0) {
|
||||
var state = eim.getIntProperty("yuleteTalked");
|
||||
|
||||
if(state == -1) {
|
||||
cm.sendOk("Heh, it seems you guys have company. Have fun with them, as I politely request my leave.");
|
||||
|
||||
} else if (playersTooClose() || eim.getIntProperty("npcShocked") == 0) {
|
||||
cm.sendOk("Oh, hello there. I have been #bmonitoring your moves#k since you guys entered this perimeter. Quite the feat reaching here, I commend all of you. Now, now, look at the time, I've got an appointment right now, I'm afraid I will need to request my leave. But worry not, my #raccessors#k will deal with all of you. Now, if you permit me, I'm leaving now.");
|
||||
|
||||
eim.setIntProperty("yuleteTalked", -1);
|
||||
} else {
|
||||
cm.sendOk("... Hah! What, wh-- How did you get here?! I though I had sealed all paths here! No matter, this situation will be resolved soon. Guys: DEPLOY the #rmaster weapon#k!! You! Yes, you. Don't you think this ends here, look back at your companions, they need some help! I'll be retreating for now.");
|
||||
|
||||
eim.setIntProperty("yuleteTalked", 1);
|
||||
}
|
||||
}
|
||||
|
||||
cm.dispose();
|
||||
} else {
|
||||
if(status == 0) {
|
||||
if(eim.isEventCleared()) {
|
||||
cm.sendOk("Nooooo... I have been beated? But how? Everything I did was for the sake of the development of a greater alchemy! You can't jail me, I did what everybody standing in a place like mine would do! But no, they simply decided to damp up the progress of the science JUST BECAUSE it was deemed dangerous??? Oh, come on!");
|
||||
} else {
|
||||
var state = eim.getIntProperty("yuletePassed");
|
||||
|
||||
if(state == -1) {
|
||||
cm.sendOk("Behold! The pinnacle of Magatia's alchemy studies! Hahahahahahaha...");
|
||||
} else if(state == 0) {
|
||||
cm.sendOk("You guys are such a pain, geez. Very well, I present you my newest weapon, brought by the finest alchemy, #rFrankenroid#k.");
|
||||
eim.dropMessage(5, "Yulete: I present you my newest weapon, brought by the finest alchemy, Frankenroid!");
|
||||
|
||||
var mapobj = eim.getMapInstance(926110401);
|
||||
var bossobj = MapleLifeFactory.getMonster(9300151);
|
||||
mapobj.spawnMonsterOnGroundBelow(bossobj, new Packages.java.awt.Point(250, 100));
|
||||
|
||||
eim.setIntProperty("statusStg7", 1);
|
||||
eim.setIntProperty("yuletePassed", -1);
|
||||
} else {
|
||||
cm.sendOk("You guys are such a pain, geez. Very well, I present you my newest weapon, brought by the finest combined alchemy of Alcadno's and Zenumist's, those that the boring people of Magatia societies have banned to bring along, the #rmighty Frankenroid#k!");
|
||||
eim.dropMessage(5, "Yulete: I present you my newest weapon, brought by the finest combined alchemy of Alcadno's and Zenumist's, those that the boring people of Magatia societies have banned to bring along, the mighty Frankenroid!!");
|
||||
|
||||
var mapobj = eim.getMapInstance(926110401);
|
||||
var bossobj = MapleLifeFactory.getMonster(9300152);
|
||||
mapobj.spawnMonsterOnGroundBelow(bossobj, new Packages.java.awt.Point(250, 100));
|
||||
|
||||
eim.setIntProperty("statusStg7", 2);
|
||||
eim.setIntProperty("yuletePassed", -1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
58
scripts/npc/2112011.js
Normal file
58
scripts/npc/2112011.js
Normal file
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
This file is part of the OdinMS Maple Story Server
|
||||
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
|
||||
Matthias Butz <matze@odinms.de>
|
||||
Jan Christian Meyer <vimes@odinms.de>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as
|
||||
published by the Free Software Foundation version 3 as published by
|
||||
the Free Software Foundation. You may not use, modify or distribute
|
||||
this program under any other version of the GNU Affero General Public
|
||||
License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/* Yulete
|
||||
Traces of Yulete (926110500)
|
||||
Talking
|
||||
*/
|
||||
|
||||
var status;
|
||||
|
||||
function start() {
|
||||
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.sendSimple("Defeated... So, that's how Yulete's legacy will reach it's end, oh how woe is this... Hope you guys are happy now, as I will pass my days rotting in a dark cellar. Everything I've done was for the sake of Magatia!! (sob)\r\n #Ll# Hey man, come now, cheer up! There were not many damages that couldn't be resolved here. Magatia created these forbidding laws to protect it's people from the undoings a greater power like this would do if it reaches wrong hands. That's not the end for you, accept rehabilitation from the Societies and everything will work out!#l");
|
||||
} else if (status == 1){
|
||||
cm.sendNext("... Are you guys forgiving me after all that I've done? Well, I guess I was blinded by the great source of power that could be discovered that way, maybe they're right saying a human can't simply fathom on the usage of those powers without corrupting theirselves along the way... I am profoundly sorry, and to make myself up with everyone I'm willing to help the Societies again wherever I can on the progress of alchemy. Thank you.");
|
||||
} else {
|
||||
if(!cm.isQuestCompleted(7770)) cm.completeQuest(7770);
|
||||
|
||||
cm.warp(926110600);
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
70
scripts/npc/2112013.js
Normal file
70
scripts/npc/2112013.js
Normal file
@@ -0,0 +1,70 @@
|
||||
/*
|
||||
This file is part of the OdinMS Maple Story Server
|
||||
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
|
||||
Matthias Butz <matze@odinms.de>
|
||||
Jan Christian Meyer <vimes@odinms.de>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as
|
||||
published by the Free Software Foundation version 3 as published by
|
||||
the Free Software Foundation. You may not use, modify or distribute
|
||||
this program under any other version of the GNU Affero General Public
|
||||
License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @author: Ronan
|
||||
* @npc: Investigation Result
|
||||
* @func: Gives MagatiaPQ stg1 item
|
||||
*/
|
||||
|
||||
function start() {
|
||||
var eim = cm.getEventInstance();
|
||||
var book = "stg1_b" + (cm.getNpcObjectId() % 26);
|
||||
|
||||
var res = eim.getIntProperty(book);
|
||||
if(res > -1) {
|
||||
eim.setIntProperty(book, -1);
|
||||
|
||||
if(res == 0) { // mesos
|
||||
var mgain = 500 * cm.getPlayer().getMesoRate();
|
||||
cm.sendNext("Earned " + mgain + " mesos!");
|
||||
cm.gainMeso(mgain);
|
||||
} else if(res == 1) { // exp
|
||||
var egain = 500 * cm.getPlayer().getExpRate();
|
||||
cm.sendNext("Earned " + egain + " exp!");
|
||||
cm.gainExp(egain);
|
||||
} else if(res == 2) { // letter
|
||||
var letter = 4001130;
|
||||
if(!cm.canHold(letter)) {
|
||||
cm.sendOk("You got a letter, however it didn't fit on your inventory, so you put it back.");
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
|
||||
cm.gainItem(letter, 1);
|
||||
cm.sendNext("You found a letter, strategically placed here as it seems.");
|
||||
} else if(res == 3) { // pass
|
||||
cm.sendNext("You found the trigger to the next stage.");
|
||||
|
||||
var eim = cm.getEventInstance();
|
||||
eim.showClearEffect();
|
||||
eim.giveEventPlayersStageReward(1);
|
||||
eim.setIntProperty("statusStg1", 1);
|
||||
|
||||
cm.getMap().getReactorByName("d00").hitReactor(cm.getClient());
|
||||
}
|
||||
} else {
|
||||
cm.sendNext("There is nothing here.");
|
||||
}
|
||||
|
||||
cm.dispose();
|
||||
}
|
||||
67
scripts/npc/2112018.js
Normal file
67
scripts/npc/2112018.js
Normal file
@@ -0,0 +1,67 @@
|
||||
/*
|
||||
This file is part of the OdinMS Maple Story Server
|
||||
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
|
||||
Matthias Butz <matze@odinms.de>
|
||||
Jan Christian Meyer <vimes@odinms.de>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as
|
||||
published by the Free Software Foundation version 3 as published by
|
||||
the Free Software Foundation. You may not use, modify or distribute
|
||||
this program under any other version of the GNU Affero General Public
|
||||
License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @author: Ronan
|
||||
* @npc: Romeo & Juliet
|
||||
* @func: MagatiaPQ exit
|
||||
*/
|
||||
|
||||
var status;
|
||||
|
||||
function start() {
|
||||
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--;
|
||||
|
||||
var eim = cm.getEventInstance();
|
||||
|
||||
if(status == 0) {
|
||||
if(eim.getIntProperty("escortFail") == 1) {
|
||||
cm.sendNext("Thanks to you, we were capable of reunion once again. Yulete will now be forwarded to jail for attempt against the Law of Magatia. Once again, thank you.");
|
||||
} else {
|
||||
cm.sendNext("Thanks to you, we were capable of reunion once again. Yulete will now pass through rehabilitation, as his studies are invaluable for the growth of our town, and all his doings were being made because he was blinded by the greed for power, although it was for the sake of Magatia. Once again, thank you.");
|
||||
}
|
||||
} else {
|
||||
if(eim.giveEventReward(cm.getPlayer())) {
|
||||
cm.warp((eim.getIntProperty("isAlcadno") == 0) ? 261000011 : 261000021);
|
||||
} else {
|
||||
cm.sendOk("Please free a slot on one of your inventories before receiving your reward.");
|
||||
}
|
||||
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -83,6 +83,8 @@ function action(mode, type, selection) {
|
||||
}
|
||||
|
||||
cm.sendPrev(sendStr);
|
||||
} else if(status == 2) {
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user