Orbis PQ
Implemented Orbis PQ.
This commit is contained in:
9
scripts/portal/party3_gardenin.js
Normal file
9
scripts/portal/party3_gardenin.js
Normal file
@@ -0,0 +1,9 @@
|
||||
function enter(pi) {
|
||||
if (pi.getPlayer().getParty() != null && pi.isLeader() && pi.haveItem(4001055,1)) {
|
||||
pi.getEventInstance().warpEventTeam(920010100);
|
||||
return true;
|
||||
} else {
|
||||
pi.playerMessage(5,"Please get the leader in this portal, make sure you have the Root of Life.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
10
scripts/portal/party3_jail1.js
Normal file
10
scripts/portal/party3_jail1.js
Normal file
@@ -0,0 +1,10 @@
|
||||
function enter(pi) {
|
||||
if(pi.getEventInstance().getIntProperty("statusStg8") == 1) {
|
||||
pi.warp(920010910,0);
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
pi.playerMessage(5, "The storage is currently inaccessible, as the powers of the Pixies remains active within the tower.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
10
scripts/portal/party3_jail2.js
Normal file
10
scripts/portal/party3_jail2.js
Normal file
@@ -0,0 +1,10 @@
|
||||
function enter(pi) {
|
||||
if(pi.getEventInstance().getIntProperty("statusStg8") == 1) {
|
||||
pi.warp(920010920,0);
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
pi.playerMessage(5, "The storage is currently inaccessible, as the powers of the Pixies remains active within the tower.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
10
scripts/portal/party3_jail3.js
Normal file
10
scripts/portal/party3_jail3.js
Normal file
@@ -0,0 +1,10 @@
|
||||
function enter(pi) {
|
||||
if(pi.getEventInstance().getIntProperty("statusStg8") == 1) {
|
||||
pi.warp(920010930,0);
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
pi.playerMessage(5, "The storage is currently inaccessible, as the powers of the Pixies remains active within the tower.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
46
scripts/portal/party3_jailin.js
Normal file
46
scripts/portal/party3_jailin.js
Normal file
@@ -0,0 +1,46 @@
|
||||
importPackage(Packages.tools);
|
||||
|
||||
function enter(pi) {
|
||||
var map = pi.getMap();
|
||||
|
||||
var jailn = (pi.getMap().getId() / 10) % 10;
|
||||
var maxToggles = (jailn == 1) ? 7 : 6;
|
||||
|
||||
var mapProp = pi.getEventInstance().getProperty("jail" + jailn);
|
||||
|
||||
if(mapProp == null) {
|
||||
var seq = 0;
|
||||
|
||||
for(var i = 1; i <= maxToggles; i++) {
|
||||
if(Math.random() < 0.5) seq += (1 << i);
|
||||
}
|
||||
|
||||
pi.getEventInstance().setProperty("jail" + jailn, seq);
|
||||
mapProp = seq;
|
||||
}
|
||||
|
||||
mapProp = Number(mapProp);
|
||||
if(mapProp != 0) {
|
||||
var countMiss = 0;
|
||||
for(var i = 1; i <= maxToggles; i++) {
|
||||
if(!(pi.getMap().getReactorByName("lever" + i).getState() == (mapProp >> i) % 2)) {
|
||||
countMiss++;
|
||||
}
|
||||
}
|
||||
|
||||
if(countMiss > 0) {
|
||||
map.broadcastMessage(MaplePacketCreator.showEffect("quest/party/wrong_kor"));
|
||||
map.broadcastMessage(MaplePacketCreator.playSound("Party1/Failed"));
|
||||
|
||||
pi.playerMessage(5, "The right combination of levers is needed to pass. " + countMiss + " lever(s) are misplaced.");
|
||||
return false;
|
||||
}
|
||||
|
||||
map.broadcastMessage(MaplePacketCreator.showEffect("quest/party/clear"));
|
||||
map.broadcastMessage(MaplePacketCreator.playSound("Party1/Clear"));
|
||||
pi.getEventInstance().setProperty("jail" + jailn, "0");
|
||||
}
|
||||
|
||||
pi.warp(pi.getMapId() + 2,0);
|
||||
return true;
|
||||
}
|
||||
@@ -3,28 +3,51 @@
|
||||
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 Jvlaple
|
||||
*@author Ronan
|
||||
*party3_r4pt
|
||||
*/
|
||||
|
||||
function enter(pi) {
|
||||
pi.warp(920010600, Math.random() * 3 > 1 ? 14 : 2);
|
||||
return true;
|
||||
var eim = pi.getEventInstance();
|
||||
if(eim.getProperty("stage4_comb") == null) {
|
||||
var r = Math.floor((Math.random() * 3)) + 1;
|
||||
var s = Math.floor((Math.random() * 3)) + 1;
|
||||
|
||||
eim.setProperty("stage4_comb", "" + r + s);
|
||||
}
|
||||
|
||||
var pname = Number(pi.getPortal().getName().substring(4, 6));
|
||||
var cname = Number(eim.getProperty("stage4_comb"));
|
||||
|
||||
var secondPt = true;
|
||||
if(pi.getPortal().getId() < 14) {
|
||||
cname = Math.floor(cname / 10);
|
||||
secondPt = false;
|
||||
}
|
||||
|
||||
if ((pname % 10) == (cname % 10)) { //climb
|
||||
var nextPortal;
|
||||
if(secondPt) nextPortal = 1;
|
||||
else nextPortal = pi.getPortal().getId() + 3;
|
||||
|
||||
pi.warp(pi.getMapId(), nextPortal);
|
||||
} else { //fail
|
||||
pi.warp(pi.getMapId(), 2);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
54
scripts/portal/party3_r6pt.js
Normal file
54
scripts/portal/party3_r6pt.js
Normal file
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
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
|
||||
*party3_r4pt
|
||||
*/
|
||||
|
||||
function enter(pi) {
|
||||
var eim = pi.getEventInstance();
|
||||
if(eim.getProperty("stage6_comb") == null) {
|
||||
var comb = "0";
|
||||
|
||||
for(var i = 0; i < 16; i++) {
|
||||
var r = Math.floor((Math.random() * 4)) + 1;
|
||||
comb += r.toString();
|
||||
}
|
||||
|
||||
eim.setProperty("stage6_comb", comb);
|
||||
}
|
||||
|
||||
var comb = eim.getProperty("stage6_comb");
|
||||
|
||||
var name = pi.getPortal().getName().substring(2, 5);
|
||||
var portalId = parseInt(name, 10);
|
||||
|
||||
|
||||
var pRow = Math.floor(portalId / 10);
|
||||
var pCol = portalId % 10;
|
||||
|
||||
|
||||
if (pCol == parseInt(comb.substring(pRow, pRow + 1), 10)) { //climb
|
||||
pi.warp(pi.getMapId(), (pRow % 4 != 0) ? pi.getPortal().getId() + 4 : (pRow / 4));
|
||||
} else { //fail
|
||||
pi.warp(pi.getMapId(), 5);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
4
scripts/portal/party3_room1.js
Normal file
4
scripts/portal/party3_room1.js
Normal file
@@ -0,0 +1,4 @@
|
||||
function enter(pi) {
|
||||
pi.warp(920010200, 13);
|
||||
return true;
|
||||
}
|
||||
4
scripts/portal/party3_room2.js
Normal file
4
scripts/portal/party3_room2.js
Normal file
@@ -0,0 +1,4 @@
|
||||
function enter(pi) {
|
||||
pi.warp(920010300, 1);
|
||||
return true;
|
||||
}
|
||||
4
scripts/portal/party3_room3.js
Normal file
4
scripts/portal/party3_room3.js
Normal file
@@ -0,0 +1,4 @@
|
||||
function enter(pi) {
|
||||
pi.warp(920010400, 8);
|
||||
return true;
|
||||
}
|
||||
4
scripts/portal/party3_room4.js
Normal file
4
scripts/portal/party3_room4.js
Normal file
@@ -0,0 +1,4 @@
|
||||
function enter(pi) {
|
||||
pi.warp(920010500, 3);
|
||||
return true;
|
||||
}
|
||||
4
scripts/portal/party3_room5.js
Normal file
4
scripts/portal/party3_room5.js
Normal file
@@ -0,0 +1,4 @@
|
||||
function enter(pi) {
|
||||
pi.warp(920010600, 17);
|
||||
return true;
|
||||
}
|
||||
4
scripts/portal/party3_room6.js
Normal file
4
scripts/portal/party3_room6.js
Normal file
@@ -0,0 +1,4 @@
|
||||
function enter(pi) {
|
||||
pi.warp(920010700, 23);
|
||||
return true;
|
||||
}
|
||||
10
scripts/portal/party3_room8.js
Normal file
10
scripts/portal/party3_room8.js
Normal file
@@ -0,0 +1,10 @@
|
||||
function enter(pi) {
|
||||
if(pi.getEventInstance().getIntProperty("statusStg8") == 1) {
|
||||
pi.warp(920011000,0);
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
pi.playerMessage(5, "The storage is currently inaccessible, as the powers of the Pixies remains active within the tower.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
36
scripts/portal/party3_roomout.js
Normal file
36
scripts/portal/party3_roomout.js
Normal file
@@ -0,0 +1,36 @@
|
||||
function enter(pi) {
|
||||
var exitPortal = 0;
|
||||
|
||||
switch(pi.getMapId()) {
|
||||
case 920010200:
|
||||
exitPortal = 4;
|
||||
break;
|
||||
|
||||
case 920010300:
|
||||
exitPortal = 12;
|
||||
break;
|
||||
|
||||
case 920010400:
|
||||
exitPortal = 5;
|
||||
break;
|
||||
|
||||
case 920010500:
|
||||
exitPortal = 13;
|
||||
break;
|
||||
|
||||
case 920010600:
|
||||
exitPortal = 15;
|
||||
break;
|
||||
|
||||
case 920010700:
|
||||
exitPortal = 14;
|
||||
break;
|
||||
|
||||
case 920011000:
|
||||
exitPortal = 16;
|
||||
break;
|
||||
}
|
||||
|
||||
pi.warp(920010100, exitPortal);
|
||||
return true;
|
||||
}
|
||||
Reference in New Issue
Block a user