Slot Max & Wind Walk fix + reviewed scripted portals

Fixed slotMax function caching up dirtied player data.
Fixed many portals not supposed to warp players to "random spawnpoints".
Fixed Wind Walk not being cancellable by attacking.
This commit is contained in:
ronancpl
2017-11-03 17:06:48 -02:00
parent 64af2cfa00
commit 1fead59c57
145 changed files with 3139 additions and 2726 deletions

View File

@@ -2,10 +2,10 @@
function enter(pi) {
if (pi.getPlayer().getEvents().getGagaRescue().fallAndGet() > 3) {
pi.warp(922240200);
pi.warp(922240200, 0);
pi.getPlayer().cancelEffect(2360002);
} else
pi.warp(pi.getPlayer().getMapId());
pi.warp(pi.getPlayer().getMapId(), 0);
return true;
}

View File

@@ -2,10 +2,10 @@
function enter(pi) {
if (pi.getPlayer().getEvents().getGagaRescue().fallAndGet() > 3) {
pi.warp(922240200);
pi.warp(922240200, 0);
pi.getPlayer().cancelEffect(2360002);
} else
pi.warp(pi.getPlayer().getMapId());
pi.warp(pi.getPlayer().getMapId(), 0);
return true;
}

View File

@@ -2,10 +2,10 @@
function enter(pi) {
if (pi.getPlayer().getEvents().getGagaRescue().fallAndGet() > 3) {
pi.warp(922240200);
pi.warp(922240200, 0);
pi.getPlayer().cancelEffect(2360002);
} else
pi.warp(pi.getPlayer().getMapId());
pi.warp(pi.getPlayer().getMapId(), 0);
return true;
}

View File

@@ -2,10 +2,10 @@
function enter(pi) {
if (pi.getPlayer().getEvents().getGagaRescue().fallAndGet() > 3) {
pi.warp(922240200);
pi.warp(922240200, 0);
pi.getPlayer().cancelEffect(2360002);
} else
pi.warp(pi.getPlayer().getMapId());
pi.warp(pi.getPlayer().getMapId(), 0);
return true;
}

View File

@@ -25,12 +25,12 @@
function enter(pi) {
if (!pi.getEventInstance().isEventCleared()) {
pi.getPlayer().dropMessage(5,"Your team has not yet completed the trials. Fetch the Fire Ore and give it to Aura first.");
pi.getPlayer().dropMessage(5, "Your team has not yet completed the trials. Fetch the Fire Ore and give it to Aura first.");
return false;
}
if (pi.getEventInstance().gridCheck(pi.getPlayer()) == -1) {
pi.getPlayer().dropMessage(5,"Your have yet to claim your prize. Talk to Aura.");
pi.getPlayer().dropMessage(5, "Your have yet to claim your prize. Talk to Aura.");
return false;
}

View File

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

View File

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

View File

@@ -32,7 +32,7 @@
function enter(pi) {
if (pi.getPlayer().haveItem(4031582) == true) {
pi.playPortalSound();
pi.warp(260000301);
pi.warp(260000301, 0);
return true;
} else {
pi.playerMessage(5, "You can enter only if you have a Entry Pass to the Palace.");

View File

@@ -1,6 +1,6 @@
function enter(pi) {
if (pi.isQuestStarted(2570)) {
pi.warp(120000101);
pi.warp(120000101, 0);
return true;
}
pi.earnTitle("You still got some stuff to take care of. I can see it in your eyes. Wait...no, those are eye boogers.");

View File

@@ -2,6 +2,6 @@
function enter(pi) {
pi.playPortalSound();
pi.warp(900090100);
pi.warp(900090100, 0);
return true;
}

View File

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

View File

@@ -1,5 +1,5 @@
function enter(pi) {
pi.playPortalSound();
pi.warp(100030100);
pi.playPortalSound();
pi.warp(100030100, 0);
return true;
}

View File

@@ -13,11 +13,16 @@ function enter(pi) {
var mapp = pi.getMap(map);
mapp.resetFully();
mapp.respawn(true);
pi.playPortalSound();
pi.warp(map, 0);
return true;
} else {
pi.playerMessage(5, "Someone is already in this map.");
return false;
}
} else {
pi.playerMessage(5, "Hall #1 can only be entered if you're engaged in Kiku's Acclimation Training.");
return false;
}
}

View File

@@ -1,18 +1,24 @@
function enter(pi) {
if (pi.hasItem(4032125) || pi.hasItem(4032126) || pi.hasItem(4032127) || pi.hasItem(4032128) || pi.hasItem(4032129)) {
pi.playerMessage(5, "You already have the proof of ability.");
return false;
}
if (pi.hasItem(4032125) || pi.hasItem(4032126) || pi.hasItem(4032127) || pi.hasItem(4032128) || pi.hasItem(4032129)) {
pi.playerMessage(5, "You already have the proof of ability.");
return false;
}
if (pi.isQuestStarted(20611) || pi.isQuestStarted(20612) || pi.isQuestStarted(20613) || pi.isQuestStarted(20614) || pi.isQuestStarted(20615)) {
if (pi.getPlayerCount(913020300) == 0) {
var map = pi.getMap(913020300);
map.killAllMonsters();
pi.warp(913020300, 0);
pi.spawnMonster(9300294, 87,88);
} else {
pi.playerMessage(5, "Someone is already attempting to defeat the boss. Better come back later.");
}
} else {
pi.playerMessage(5, "You cannot access this hall.");
if (pi.getPlayerCount(913020300) == 0) {
var map = pi.getMap(913020300);
map.killAllMonsters();
pi.playPortalSound();
pi.warp(913020300, 0);
pi.spawnMonster(9300294, 87,88);
return true;
} else {
pi.playerMessage(5, "Someone is already attempting to defeat the boss. Better come back later.");
return false;
}
} else {
pi.playerMessage(5, "You cannot access this hall.");
return false;
}
}

View File

@@ -1,5 +1,5 @@
function enter(pi) {
pi.playPortalSound();
pi.warp(900090102);
pi.warp(900090102, 0);
return true;
}

View File

@@ -1,6 +1,6 @@
function enter(pi) {
if(pi.isQuestStarted(22010) || pi.getPlayer().getJob().getId() != 2001) {
pi.warp(100030310);
pi.warp(100030310, 0);
} else {
pi.playerMessage(5, "Cannot enter the Lush Forest without a reason.");
}

View File

@@ -27,7 +27,7 @@ Sharen III's Grave Exit - Guild Quest
function enter(pi) {
if (pi.getPlayer().getMap().getReactorByName("ghostgate").getState() == 1) {
pi.warp(990000800);
pi.warp(990000800, 0);
return true;
}
else {

View File

@@ -32,7 +32,7 @@ function enter(pi) {
var timeLeft = Math.ceil((entryTime - timeNow) / 1000);
if(timeLeft <= 0) {
pi.warp(990000100);
pi.warp(990000100, 0);
return true;
}
else { //cannot proceed while allies can still enter

View File

@@ -32,7 +32,7 @@ function enter(pi) {
pi.getPlayer().dropMessage(6, "You cannot pass to the next map holding the 1st Crystal Key in your inventory.");
return false;
}
pi.warp(240050101);
pi.warp(240050101, 0);
return true;
}
}

View File

@@ -1,9 +1,9 @@
function enter(pi) {
pi.playPortalSound();
if(pi.isQuestStarted(22005)){
pi.warp(900020100);
pi.warp(900020100, 0);
} else{
pi.warp(100030301);
pi.warp(100030301, 0);
}
return true;
}

View File

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

View File

@@ -24,7 +24,7 @@ function enter(pi) {
var toMap = pi.getPlayer().getSavedLocation("FREE_MARKET");
pi.warp(toMap, pi.getMarketPortalId(toMap));
} catch(err) {
pi.warp(100000000);
pi.warp(100000000, 0);
}
return true;
}

View File

@@ -27,7 +27,7 @@ Stage 2: Door guarded by Dark Muscle Golems - Guild Quest
function enter(pi) {
if (pi.getPlayer().getMap().getReactorByName("metalgate").getState() == 1) {
pi.warp(990000431);
pi.warp(990000431, 0);
return true;
}
pi.playerMessage(5, "This way forward is not open yet.");

View File

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

View File

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

View File

@@ -21,6 +21,6 @@
*/
function enter(pi) {
pi.useItem(2210016);
pi.warp(200090510);
pi.warp(200090510, 0);
return true;
}

View File

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

View File

@@ -24,7 +24,7 @@
*/
function enter(pi) {
if (pi.getPlayer().getMap().getReactorByName("stonegate").getState() == 1) {
pi.warp(990000430);
pi.warp(990000430, 0);
return true;
} else {
pi.getPlayer().dropMessage(5, "The door is still blocked.");

View File

@@ -1,16 +1,16 @@
function enter(pi) {
if(pi.getPlayer().getMapId() == 130030001){
if(pi.isQuestStarted(20010)){
pi.warp(130030002);
pi.warp(130030002, 0);
} else {
pi.message("Please click on the NPC first to receive a quest");
pi.message("Please click on the NPC first to receive a quest.");
}
} else if(pi.getPlayer().getMapId() == 130030002){
pi.warp(130030003);
pi.warp(130030003, 0);
} else if(pi.getPlayer().getMapId() == 130030003){
pi.warp(130030004);
pi.warp(130030004, 0);
} else if(pi.getPlayer().getMapId() == 130030004){
pi.warp(130030005);
pi.warp(130030005, 0);
}
return true;
}