CWKPQ inclusion

Added some CWKPQ imports for the server. Enabled basic mechanics for a
run, but still WIP.
This commit is contained in:
ronancpl
2017-06-26 01:34:56 -03:00
parent 6b2b3616d6
commit a7beff1bb4
101 changed files with 4455 additions and 3821 deletions

View File

@@ -0,0 +1,11 @@
function enter(pi) {
if (pi.getEventInstance().getIntProperty("glpq1") == 0) {
pi.getEventInstance().dropMessage(5, "This path is currently blocked.");
return false;
} else {
pi.warp(610030200, 0);
return true;
}
}

View File

@@ -0,0 +1,9 @@
function enter(pi) {
if (pi.getPlayer().getJob().getJobNiche() == 1) {
pi.warp(610030510,0);
return true;
} else {
pi.playerMessage(5, "Only warriors may enter this portal.");
return false;
}
}

View File

@@ -0,0 +1,9 @@
function enter(pi) {
if (pi.getPlayer().getJob().getJobNiche() == 3) {
pi.warp(610030540,0);
return true;
} else {
pi.playerMessage(5, "Only bowmen may enter this portal.");
return false;
}
}

View File

@@ -0,0 +1,9 @@
function enter(pi) {
if (pi.getPlayer().getJob().getJobNiche() == 2) {
pi.warp(610030521,0);
return true;
} else {
pi.playerMessage(5, "Only mages may enter this portal.");
return false;
}
}

View File

@@ -0,0 +1,9 @@
function enter(pi) {
if (pi.getPlayer().getJob().getJobNiche() == 4) {
pi.warp(610030530,0);
return true;
} else {
pi.playerMessage(5, "Only thieves may enter this portal.");
return false;
}
}

View File

@@ -0,0 +1,9 @@
function enter(pi) {
if (pi.getPlayer().getJob().getJobNiche() == 5) {
pi.warp(610030550,0);
return true;
} else {
pi.playerMessage(5, "Only pirates may enter this portal.");
return false;
}
}

View File

@@ -0,0 +1,14 @@
function enter(pi) {
var eim = pi.getEventInstance();
if (eim != null) {
if (eim.getIntProperty("glpq2") == 5) {
pi.warp(610030300, 0);
return true;
} else {
pi.playerMessage(5, "The portal has not been activated yet!");
return false;
}
}
return false;
}

View File

@@ -0,0 +1,28 @@
function enter(pi) {
var eim = pi.getEventInstance();
if (eim != null) {
pi.warp(610030300, 0);
if (eim.getIntProperty("glpq3") < 5 || eim.getIntProperty("glpq3_p") < 5) {
if(eim.getIntProperty("glpq3_p") == 5) {
pi.mapMessage(6, "Not all Sigils have been activated yet. Make sure they have all been activated to proceed to the next stage.");
} else {
eim.setIntProperty("glpq3_p", eim.getIntProperty("glpq3_p") + 1);
if(eim.getIntProperty("glpq3_p") == 5) {
pi.mapMessage(6, "The Antellion grants you access to the next portal! Proceed!");
eim.showClearEffect(610030300, "3pt", 2);
} else {
pi.mapMessage(6, "An adventurer has passed through! " + (5 - eim.getIntProperty("glpq3_p")) + " to go.");
}
}
}
else {
pi.getPlayer().dropMessage(6, "The portal at the bottom has already been opened! Proceed there!");
}
return true;
}
return false;
}

View File

@@ -0,0 +1,14 @@
function enter(pi) {
var eim = pi.getEventInstance();
if (eim != null) {
if (eim.getIntProperty("glpq3") != 5 || eim.getIntProperty("glpq3_p") != 5) {
pi.playerMessage(5, "The portal is not opened yet.");
return false;
} else {
pi.warp(610030400, 0);
return true;
}
}
return false;
}

View File

@@ -0,0 +1,14 @@
function enter(pi) {
var eim = pi.getEventInstance();
if (eim != null) {
if (eim.getIntProperty("glpq4") < 5){
pi.playerMessage(5, "The portal is not opened yet.");
return false;
} else {
pi.warp(610030500, 0);
return true;
}
}
return false;
}

View File

@@ -0,0 +1,19 @@
function enter(pi) {
var eim = pi.getEventInstance();
if (eim != null) {
if (eim.getIntProperty("glpq5") < 5){
pi.playerMessage(5, "The portal is not opened yet.");
return false;
} else {
pi.removeAll(4001256);
pi.removeAll(4001257);
pi.removeAll(4001258);
pi.removeAll(4001259);
pi.removeAll(4001260);
pi.warp(610030600, 0);
return true;
}
}
return false;
}

View File

@@ -0,0 +1,14 @@
function enter(pi) {
var eim = pi.getEventInstance();
if (eim != null) {
if (eim.getIntProperty("glpq6") < 3){
pi.playerMessage(5, "The portal is not opened yet.");
return false;
} else {
pi.warp(610030700, 0);
return true;
}
}
return false;
}

View File

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

View File

@@ -0,0 +1,16 @@
function enter(pi) {
var react = pi.getMap().getReactorByName("mob0");
if (react.getState() < 1) {
react.forceHitReactor(1);
pi.getEventInstance().setIntProperty("glpq1", 1);
pi.getEventInstance().dropMessage(5, "A strange force starts being emitted from the portal apparatus, showing a hidden path once blocked now open.");
pi.warp(610030100, 0);
pi.getEventInstance().showClearEffect();
return true;
}
pi.getEventInstance().dropMessage(5, "The portal apparatus is malfunctional, due to the last transportation. The finding another way through.");
return false;
}

View File

@@ -2,7 +2,7 @@ function enter(pi) {
if (pi.isQuestActive(2324)) {
pi.forceCompleteQuest(2324);
pi.removeAll(2430015);
pi.playerMessage("Quest complete.");
pi.playerMessage(5, "Quest complete.");
}
pi.warp(106020501,0);
return true;