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:
ronancpl
2017-08-11 12:41:35 -03:00
parent f78defec1f
commit e0a27e00ab
185 changed files with 3316 additions and 527 deletions

View File

@@ -0,0 +1,4 @@
function enter(pi) {
pi.warp(926110401, 0); //next
return(true);
}

View File

@@ -0,0 +1,9 @@
function enter(pi) {
if (pi.getEventInstance().getIntProperty("statusStg2") == 1) {
pi.warp(926110100, 0); //next
return(true);
} else {
pi.playerMessage(5, "The portal is not opened yet.");
return(false);
}
}

View File

@@ -0,0 +1,9 @@
function enter(pi) {
if (pi.getEventInstance().getIntProperty("statusStg1") == 1) {
pi.warp(926110001, 0); //next
return(true);
} else {
pi.playerMessage(5, "The portal is not opened yet.");
return(false);
}
}

View File

@@ -0,0 +1,9 @@
function enter(pi) {
if (pi.getEventInstance().getIntProperty("statusStg3") == 3) {
pi.warp(926110200, 0); //next
return(true);
} else {
pi.playerMessage(5, "The portal is not opened yet.");
return(false);
}
}

View File

@@ -0,0 +1,9 @@
function enter(pi) {
if (pi.getMap().getReactorByName("jnr3_out1").getState() == 1) {
pi.warp(926110201, 0);
return(true);
} else {
pi.playerMessage(5, "The door is not opened yet.");
return(false);
}
}

View File

@@ -0,0 +1,9 @@
function enter(pi) {
if (pi.getMap().getReactorByName("jnr3_out2").getState() == 1) {
pi.warp(926110202, 0);
return(true);
} else {
pi.playerMessage(5, "The door is not opened yet.");
return(false);
}
}

View File

@@ -0,0 +1,9 @@
function enter(pi) {
if (pi.getMap().getReactorByName("jnr3_out3").getState() == 1) {
pi.warp(926110203, 0); //next
return(true);
} else {
pi.playerMessage(5, "The door is not opened yet.");
return(false);
}
}

16
scripts/portal/jnr4_r1.js Normal file
View File

@@ -0,0 +1,16 @@
function enter(pi) {
var eim = pi.getEventInstance();
var area = eim.getIntProperty("statusStg5");
var reg = 0;
if((area >> reg) % 2 == 0) {
area |= (1 << reg);
eim.setIntProperty("statusStg5", area);
pi.warp(926110301 + reg, 0); //next
return(true);
} else {
pi.playerMessage(5, "This room is already being explored.");
return(false);
}
}

16
scripts/portal/jnr4_r2.js Normal file
View File

@@ -0,0 +1,16 @@
function enter(pi) {
var eim = pi.getEventInstance();
var area = eim.getIntProperty("statusStg5");
var reg = 1;
if((area >> reg) % 2 == 0) {
area |= (1 << reg);
eim.setIntProperty("statusStg5", area);
pi.warp(926110301 + reg, 0); //next
return(true);
} else {
pi.playerMessage(5, "This room is already being explored.");
return(false);
}
}

16
scripts/portal/jnr4_r3.js Normal file
View File

@@ -0,0 +1,16 @@
function enter(pi) {
var eim = pi.getEventInstance();
var area = eim.getIntProperty("statusStg5");
var reg = 2;
if((area >> reg) % 2 == 0) {
area |= (1 << reg);
eim.setIntProperty("statusStg5", area);
pi.warp(926110301 + reg, 0); //next
return(true);
} else {
pi.playerMessage(5, "This room is already being explored.");
return(false);
}
}

16
scripts/portal/jnr4_r4.js Normal file
View File

@@ -0,0 +1,16 @@
function enter(pi) {
var eim = pi.getEventInstance();
var area = eim.getIntProperty("statusStg5");
var reg = 3;
if((area >> reg) % 2 == 0) {
area |= (1 << reg);
eim.setIntProperty("statusStg5", area);
pi.warp(926110301 + reg, 0); //next
return(true);
} else {
pi.playerMessage(5, "This room is already being explored.");
return(false);
}
}

65
scripts/portal/jnr5_rp.js Normal file
View File

@@ -0,0 +1,65 @@
/*
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
*jnr5_rp
*/
function enter(pi) {
var mapplayer = "stage6_comb" + (pi.getMapId() % 10);
var eim = pi.getEventInstance();
if(eim.getProperty(mapplayer) == null) {
var comb = "";
for(var i = 0; i < 10; i++) {
var r = Math.floor((Math.random() * 4));
comb += r.toString();
}
eim.setProperty(mapplayer, comb);
}
var comb = eim.getProperty(mapplayer);
var name = pi.getPortal().getName().substring(2, 4);
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
if(pRow < 9) {
pi.warp(pi.getMapId(), pi.getPortal().getId() + 4);
} else {
if(eim.getIntProperty("statusStg6") == 0) {
eim.setIntProperty("statusStg6", 1);
eim.giveEventPlayersStageReward(6);
}
pi.warp(pi.getMapId(), 1);
}
} else { //fail
pi.warp(pi.getMapId(), 2);
}
return false;
}

View File

@@ -0,0 +1,9 @@
function enter(pi) {
if (pi.getMap().getReactorByName("jnr6_out").getState() == 1) {
pi.warp(926110300);
return(true);
} else {
pi.playerMessage(5, "The portal is not opened yet.");
return(false);
}
}

View File

@@ -0,0 +1,9 @@
function enter(pi) {
if (pi.getMap().getReactorByName("jnr31_out").getState() == 1) {
pi.warp(926110200, 1);
return(true);
} else {
pi.playerMessage(5, "The door is not opened yet.");
return(false);
}
}

View File

@@ -0,0 +1,9 @@
function enter(pi) {
if (pi.getMap().getReactorByName("jnr32_out").getState() == 1) {
pi.warp(926110200, 2);
return(true);
} else {
pi.playerMessage(5, "The door is not opened yet.");
return(false);
}
}

View File

@@ -0,0 +1,4 @@
function enter(pi) {
pi.warp(261000021, 0);
return(true);
}

View File

@@ -0,0 +1,30 @@
/*
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/>.
*/
function enter(pi) {
if(pi.isQuestCompleted(7770)) {
pi.warp(926130000, "out00");
return true;
} else {
pi.playerMessage(5, "This pipe seems too dark to venture inside.");
return false;
}
}

View File

@@ -0,0 +1,4 @@
function enter(pi) {
pi.warp(926100401, 0); //next
return(true);
}

View File

@@ -0,0 +1,9 @@
function enter(pi) {
if (pi.getEventInstance().getIntProperty("statusStg2") == 1) {
pi.warp(926100100, 0); //next
return(true);
} else {
pi.playerMessage(5, "The portal is not opened yet.");
return(false);
}
}

View File

@@ -0,0 +1,9 @@
function enter(pi) {
if (pi.getEventInstance().getIntProperty("statusStg1") == 1) {
pi.warp(926100001, 0); //next
return(true);
} else {
pi.playerMessage(5, "The portal is not opened yet.");
return(false);
}
}

View File

@@ -0,0 +1,9 @@
function enter(pi) {
if (pi.getEventInstance().getIntProperty("statusStg3") == 3) {
pi.warp(926100200, 0); //next
return(true);
} else {
pi.playerMessage(5, "The portal is not opened yet.");
return(false);
}
}

View File

@@ -0,0 +1,9 @@
function enter(pi) {
if (pi.getMap().getReactorByName("rnj3_out1").getState() == 1) {
pi.warp(926100201, 0);
return(true);
} else {
pi.playerMessage(5, "The door is not opened yet.");
return(false);
}
}

View File

@@ -0,0 +1,9 @@
function enter(pi) {
if (pi.getMap().getReactorByName("rnj3_out2").getState() == 1) {
pi.warp(926100202, 0);
return(true);
} else {
pi.playerMessage(5, "The door is not opened yet.");
return(false);
}
}

View File

@@ -0,0 +1,9 @@
function enter(pi) {
if (pi.getMap().getReactorByName("rnj3_out3").getState() == 1) {
pi.warp(926100203, 0); //next
return(true);
} else {
pi.playerMessage(5, "The door is not opened yet.");
return(false);
}
}

16
scripts/portal/rnj4_r1.js Normal file
View File

@@ -0,0 +1,16 @@
function enter(pi) {
var eim = pi.getEventInstance();
var area = eim.getIntProperty("statusStg5");
var reg = 0;
if((area >> reg) % 2 == 0) {
area |= (1 << reg);
eim.setIntProperty("statusStg5", area);
pi.warp(926100301 + reg, 0); //next
return(true);
} else {
pi.playerMessage(5, "This room is already being explored.");
return(false);
}
}

16
scripts/portal/rnj4_r2.js Normal file
View File

@@ -0,0 +1,16 @@
function enter(pi) {
var eim = pi.getEventInstance();
var area = eim.getIntProperty("statusStg5");
var reg = 1;
if((area >> reg) % 2 == 0) {
area |= (1 << reg);
eim.setIntProperty("statusStg5", area);
pi.warp(926100301 + reg, 0); //next
return(true);
} else {
pi.playerMessage(5, "This room is already being explored.");
return(false);
}
}

16
scripts/portal/rnj4_r3.js Normal file
View File

@@ -0,0 +1,16 @@
function enter(pi) {
var eim = pi.getEventInstance();
var area = eim.getIntProperty("statusStg5");
var reg = 2;
if((area >> reg) % 2 == 0) {
area |= (1 << reg);
eim.setIntProperty("statusStg5", area);
pi.warp(926100301 + reg, 0); //next
return(true);
} else {
pi.playerMessage(5, "This room is already being explored.");
return(false);
}
}

16
scripts/portal/rnj4_r4.js Normal file
View File

@@ -0,0 +1,16 @@
function enter(pi) {
var eim = pi.getEventInstance();
var area = eim.getIntProperty("statusStg5");
var reg = 3;
if((area >> reg) % 2 == 0) {
area |= (1 << reg);
eim.setIntProperty("statusStg5", area);
pi.warp(926100301 + reg, 0); //next
return(true);
} else {
pi.playerMessage(5, "This room is already being explored.");
return(false);
}
}

65
scripts/portal/rnj5_rp.js Normal file
View File

@@ -0,0 +1,65 @@
/*
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
*rnj5_rp
*/
function enter(pi) {
var mapplayer = "stage6_comb" + (pi.getMapId() % 10);
var eim = pi.getEventInstance();
if(eim.getProperty(mapplayer) == null) {
var comb = "";
for(var i = 0; i < 10; i++) {
var r = Math.floor((Math.random() * 4));
comb += r.toString();
}
eim.setProperty(mapplayer, comb);
}
var comb = eim.getProperty(mapplayer);
var name = pi.getPortal().getName().substring(2, 4);
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
if(pRow < 9) {
pi.warp(pi.getMapId(), pi.getPortal().getId() + 4);
} else {
if(eim.getIntProperty("statusStg6") == 0) {
eim.setIntProperty("statusStg6", 1);
eim.giveEventPlayersStageReward(6);
}
pi.warp(pi.getMapId(), 1);
}
} else { //fail
pi.warp(pi.getMapId(), 2);
}
return false;
}

View File

@@ -0,0 +1,9 @@
function enter(pi) {
if (pi.getMap().getReactorByName("rnj6_out").getState() == 1) {
pi.warp(926100300);
return(true);
} else {
pi.playerMessage(5, "The portal is not opened yet.");
return(false);
}
}

View File

@@ -0,0 +1,9 @@
function enter(pi) {
if (pi.getMap().getReactorByName("rnj31_out").getState() == 1) {
pi.warp(926100200, 1);
return(true);
} else {
pi.playerMessage(5, "The door is not opened yet.");
return(false);
}
}

View File

@@ -0,0 +1,9 @@
function enter(pi) {
if (pi.getMap().getReactorByName("rnj32_out").getState() == 1) {
pi.warp(926100200, 2);
return(true);
} else {
pi.playerMessage(5, "The door is not opened yet.");
return(false);
}
}

View File

@@ -0,0 +1,4 @@
function enter(pi) {
pi.warp(261000011, 0);
return(true);
}