Horntail PQ & Exped + Equip levelup fix

Added Horntail PQ and boss fight. Fixed short integer overflow of
equipment stats on client messing up player stats.
This commit is contained in:
ronancpl
2017-07-20 12:02:59 -03:00
parent 8fab2a6e3e
commit c09bc02c85
137 changed files with 1154 additions and 583 deletions

View File

@@ -0,0 +1,3 @@
//some quest where you must use hidden portals
function enter(pi) {
}

View File

@@ -1,4 +1,4 @@
/* By RonanLana */
/* @author RonanLana */
function enter(pi) {
if (!pi.haveItem(4000381)) {

View File

@@ -0,0 +1,15 @@
function enter(pi) {
if (pi.getQuestStatus(20407) == 2) {
pi.warp(924010200,0);
return true;
} else if (pi.getQuestStatus(20406) == 2) {
pi.warp(924010100,0);
return true;
} else if (pi.getQuestStatus(20404) == 2) {
pi.warp(924010000,0);
return true;
} else {
pi.playerMessage(5, "I shouldn't go here.. it's creepy!");
return false;
}
}

View File

@@ -19,7 +19,8 @@
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 Lerk, Ronan
/* @Author Lerk
* @Author Ronan
*
* Guild Quest Waiting Room - Entry Portal (map 990000000)
*/

View File

@@ -21,39 +21,21 @@
*/
function enter(pi) {
if (pi.getPlayer().getMapId() == 240060000) {
var nextMap = 240060100;
var eim = pi.getPlayer().getEventInstance()
var target = eim.getMapInstance(nextMap);
var targetPortal = target.getPortal("sp");
// only let people through if the eim is ready
var avail = eim.getProperty("head1");
if (avail != "yes") {
// do nothing; send message to player
pi.getPlayer().dropMessage(6, "Horntail\'s Seal is Blocking this Door.");
return false;
}else {
pi.getPlayer().changeMap(target, targetPortal);
if (eim.getProperty("head2spawned") != "yes") {
eim.setProperty("head2spawned", "yes");
eim.schedule("headTwo", 5000);
}
return true;
}
if(pi.getEventInstance().getIntProperty("defeatedHead") >= 1) {
pi.warp(240060100, 0);
return true;
} else {
pi.getPlayer().dropMessage(6, "Horntail\'s Seal is Blocking this Door.");
return false;
}
} else if (pi.getPlayer().getMapId() == 240060100) {
var nextMap = 240060200;
var eim = pi.getPlayer().getEventInstance()
var target = eim.getMapInstance(nextMap);
var targetPortal = target.getPortal("sp");
// only let people through if the eim is ready
var avail = eim.getProperty("head2");
if (avail != "yes") {
// do nothing; send message to player
pi.getPlayer().dropMessage(6, "Horntail\'s Seal is Blocking this Door.");
return false;
}else {
pi.getPlayer().changeMap(target, targetPortal);
return true;
}
if(pi.getEventInstance().getIntProperty("defeatedHead") >= 2) {
pi.warp(240060200, 0);
return true;
} else {
pi.getPlayer().dropMessage(6, "Horntail\'s Seal is Blocking this Door.");
return false;
}
}
return true;
return false;
}

View File

@@ -29,10 +29,10 @@ function enter(pi) {
var target = eim.getMapInstance(nextMap);
var targetPortal = target.getPortal("sp");
// only let people through if the eim is ready
var avail = eim.getProperty("2stageclear");
var avail = eim.getProperty("1stageclear");
if (avail == null) {
// do nothing; send message to player
pi.getPlayer().dropMessage(6, "This door is closed.");
pi.getPlayer().dropMessage(6, "Horntail\'s Seal is Blocking this Door.");
return false;
}else {
pi.getPlayer().changeMap(target, targetPortal);
@@ -45,10 +45,10 @@ function enter(pi) {
var target = eim.getMapInstance(nextMap);
var targetPortal = target.getPortal("sp");
// only let people through if the eim is ready
var avail = eim.getProperty("3stageclear");
var avail = eim.getProperty("2stageclear");
if (avail == null) {
// do nothing; send message to player
pi.getPlayer().dropMessage(6, "This door is closed.");
pi.getPlayer().dropMessage(6, "Horntail\'s Seal is Blocking this Door.");
return false;
}else {
pi.getPlayer().changeMap(target, targetPortal);
@@ -61,10 +61,10 @@ function enter(pi) {
var target = eim.getMapInstance(nextMap);
var targetPortal = target.getPortal("sp");
// only let people through if the eim is ready
var avail = eim.getProperty("4stageclear");
var avail = eim.getProperty("3stageclear");
if (avail == null) {
// do nothing; send message to player
pi.getPlayer().dropMessage(6, "This door is closed.");
pi.getPlayer().dropMessage(6, "Horntail\'s Seal is Blocking this Door.");
return false;
}else {
pi.getPlayer().changeMap(target, targetPortal);
@@ -77,10 +77,10 @@ function enter(pi) {
var target = eim.getMapInstance(nextMap);
var targetPortal = target.getPortal("sp");
// only let people through if the eim is ready
var avail = eim.getProperty("5stageclear");
var avail = eim.getProperty("4stageclear");
if (avail == null) {
// do nothing; send message to player
pi.getPlayer().dropMessage(6, "This door is closed.");
pi.getPlayer().dropMessage(6, "Horntail\'s Seal is Blocking this Door.");
return false;
}else {
pi.getPlayer().changeMap(target, targetPortal);
@@ -88,14 +88,26 @@ function enter(pi) {
}
}
else if (pi.getPlayer().getMapId() == 240050105) {
if (pi.haveItem(4001091, 6) && pi.isLeader()) {
pi.gainItem(4001091, -6);
pi.getPlayer().dropMessage(6, "The six keys break the seal for a flash...");
pi.warp(240050100, "st00");
var nextMap = 240050100;
var eim = pi.getPlayer().getEventInstance()
var target = eim.getMapInstance(nextMap);
var targetPortal = target.getPortal("st00");
var avail = eim.getProperty("5stageclear");
if (avail == null) {
if (pi.haveItem(4001092) && pi.isEventLeader()) {
pi.getEventInstance().showClearEffect();
pi.getPlayer().dropMessage(6, "The leader's key break the seal for a flash...");
pi.getPlayer().changeMap(target, targetPortal);
eim.setIntProperty("5stageclear", 1);
return true;
} else {
pi.getPlayer().dropMessage(6, "Horntail\'s Seal is blocking this door. Only the leader with the key can lift this seal.");
return false;
}
}else {
pi.getPlayer().changeMap(target, targetPortal);
return true;
} else {
pi.getPlayer().dropMessage(6, "Horntail\'s Seal is blocking this door.");
return false;
}
}
return true;

View File

@@ -24,20 +24,15 @@
*/
function enter(pi) {
var nextMap = 240050101;
var eim = pi.getPlayer().getEventInstance()
var target = eim.getMapInstance(nextMap);
var targetPortal = target.getPortal("sp");
// only let people through if the eim is ready
var avail = eim.getProperty("1stageclear");
if (!pi.haveItem(4001092, 1)) {
// do nothing; send message to player
pi.getPlayer().dropMessage(6, "Horntail\'s Seal is Blocking this Door.");
if (pi.getMap().countPlayers() == 1) {
pi.getPlayer().dropMessage(6, "As the last player on this map, you are compelled to wait for the incoming keys.");
return false;
}else {
pi.gainItem(4001092, -1);
pi.getPlayer().dropMessage(6, "The key disentegrates as Horntail\'s Seal is broken for a flash...");
pi.getPlayer().changeMap(target, targetPortal);
if(pi.haveItem(4001087)) {
pi.getPlayer().dropMessage(6, "You cannot pass to the next map holding the 1st Crystal Key in your inventory.");
return false;
}
pi.warp(240050101);
return true;
}
}

View File

@@ -23,31 +23,23 @@
**hontale_c.js
@author Jvlaple
@author Ronan
*/
function enter(pi) {
if (pi.isLeader() == true) {
if (pi.isEventLeader() == true) {
var eim = pi.getPlayer().getEventInstance();
var party = eim.getPlayers();
var target;
var theWay = eim.getProperty("theWay");
var target;
if (theWay != null) {
if (theWay = "light") {
target = eim.getMapInstance(240050300); //light
} else {
target = eim.getMapInstance(240050310); //dark
}
var theWay = pi.getMap().getReactorByName("light").getState();
if (theWay == 1) {
target = 240050300; //light
} else if(theWay == 3) {
target = 240050310; //dark
} else {
pi.playerMessage(5, "Hit the Lightbulb to determine your fate!");
return false;
}
var targetPortal = target.getPortal("sp");
//Warp the full party into the map...
var partyy = pi.getPlayer().getEventInstance().getPlayers();
for (var i = 0; i < partyy.size(); i++) {
party.get(i).changeMap(target, targetPortal);
}
eim.warpEventTeam(target);
return true;
} else {
pi.playerMessage(6, "You are not the party leader. Only the party leader may proceed through this portal.");

View File

@@ -20,6 +20,6 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
function enter(pi) {
pi.warp(240060000, "st00");
pi.warp(240050400, "sp");
return true;
}

View File

@@ -0,0 +1,5 @@
function enter(pi) {
pi.saveLocation("MIRROR");
pi.warp(926010000, 0);
return true;
}