Savior Commit

Fixed some bugs regarding dojo, updated drop data, minor tweaks on
Mystic Doors, added expeditions for Showa Manor, Zakum and Pink Bean,
smart search for item slots on quest/npc rewarding system, attempt on
boss HPbar to focus on player's current target, quests with selectable
rewards now hands the item correctly, after the first PQ instance next
ones are loaded more smoothly.
This commit is contained in:
ronancpl
2017-08-04 00:04:46 -03:00
parent c09bc02c85
commit 0a2e382c3b
968 changed files with 25555 additions and 7362 deletions

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 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/>.
*/
/*
Vs Pink Bean - Clear stage portal
@author Ronan
*/
function enter(pi) {
pi.warp(270050000);
return true;
}

30
scripts/portal/Pinkin.js Normal file
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 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/>.
*/
/*
Vs Pink Bean - Ressurection stage portal
@author Ronan
*/
function enter(pi) {
pi.warp(270050100);
return true;
}

39
scripts/portal/Zakum03.js Normal file
View File

@@ -0,0 +1,39 @@
/*
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/>.
*/
/*
Zakum PQ portal
*/
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.");
return false;
}
if (pi.getEventInstance().gridCheck(pi.getPlayer()) == -1) {
pi.getPlayer().dropMessage(5,"Your have yet to claim your prize. Talk to Aura.");
return false;
}
pi.warp(211042300);
return true;
}

View File

@@ -24,15 +24,16 @@
*/
function enter(pi) {
if (!pi.haveItem(4001017)) {
pi.getPlayer().dropMessage(6,"You do not have the Eye of Fire. You may not face the boss.");
if (!pi.isQuestStarted(100200)) {
pi.getPlayer().dropMessage(5,"You need approval from the masters to battle. You may not attempt the boss right now.");
return false;
}
//var exped = pi.getEventManager("ZakumBattle").getInstance("ZakumBattle_" + pi.getPlayer().getClient().getChannel());
//if (exped != null) {
// pi.getPlayer().dropMessage(6,"The battle at Zakum's Altar is currently underway.");
// return false;
//}
}
if (!pi.isQuestCompleted(100201)) {
pi.getPlayer().dropMessage(5,"You do not have completed all the trials yet. You may not attempt the boss right now.");
return false;
}
pi.warp(211042400,"west00");
return true;
}

View File

@@ -20,15 +20,15 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*
* @author: kevintjuh93/moogra
* @author: kevintjuh93, moogra
* @portal: dojang_exit
* @purpose: warps user out
*/
function enter(pi) {
var map = pi.getPlayer().getSavedLocation("MIRROR");
if(map == -1)
map = 100000000;
var map = pi.getPlayer().getSavedLocation("MIRROR");
if(map == -1) map = 100000000;
pi.warp(map);
return true;
}

View File

@@ -20,16 +20,24 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* @Author Moogra
* @Author Moogra, Ronan
*/
function enter(pi) {
if (pi.getPlayer().getMap().getReactorByName("door").getState() == 1) {
if ((pi.getPlayer().getMapId() / 100) % 100 != 38) {
if (pi.getPlayer().getMap().getCharacters().size() == 1) {
pi.resetMap(pi.getPlayer().getMapId());
}
var gate = pi.getPlayer().getMap().getReactorByName("door");
if ((gate != null && gate.getState() == 1) || pi.getMap().countMonsters() == 0) {
if (Math.floor(pi.getPlayer().getMapId() / 100) % 100 < 38) {
pi.getPlayer().message("You received " + pi.getPlayer().addDojoPointsByMap() + " training points. Your total training points score is now " + pi.getPlayer().getDojoPoints() + ".");
pi.warp(pi.getPlayer().getMap().getId() + 100, 0);
if(((Math.floor((pi.getPlayer().getMap().getId() + 100) / 100)) % 100) % 6 == 0) {
if(Math.floor(pi.getPlayer().getMapId() / 10000) == 92503) {
pi.warpParty(pi.getPlayer().getMap().getId() + 100, 925030100, 925033804);
} else {
pi.warp(pi.getPlayer().getMap().getId() + 100, 0);
}
} else {
pi.warp(pi.getPlayer().getMap().getId() + 100, 0);
}
} else {
pi.warp(925020003, 0);
pi.getPlayer().gainExp(2000 * pi.getPlayer().getDojoPoints(), true, true, true);

View File

@@ -28,9 +28,11 @@
function enter(pi) {
if (pi.getPlayer().getMap().getMonsterById(9300216) != null) {
pi.getPlayer().enteredScript("dojang_Msg", pi.getPlayer().getMap().getId());
pi.getPlayer().setFinishedDojoTutorial();
pi.warp(925020001, 0);
return true;
} else {
pi.getPlayer().message("So Gong: Haha! You're going to run away like a coward? I won't let you get away that easily!");
return false;
}
return true;
}

View File

@@ -28,17 +28,17 @@
function enter(pi) {
try {
if (pi.getPlayer().getMap().getMonsterById(9300216) != null) {
pi.goDojoUp();
pi.getPlayer().getMap().setReactorState();
var stage = (pi.getPlayer().getMapId() / 100) % 100;
if ((stage - (stage / 6) | 0) == pi.getPlayer().getVanquisherStage() && !pi.getPlayer().getDojoParty()) // we can also try 5 * stage / 6 | 0 + 1
pi.getPlayer().setVanquisherKills(pi.getPlayer().getVanquisherKills() + 1);
} else {
pi.getPlayer().message("There are still some monsters remaining.");
}
pi.enableActions();
return true;
if (pi.getPlayer().getMap().getMonsterById(9300216) != null) {
pi.goDojoUp();
pi.getPlayer().getMap().setReactorState();
var stage = Math.floor(pi.getPlayer().getMapId() / 100) % 100;
if ((stage - (stage / 6) | 0) == pi.getPlayer().getVanquisherStage() && !pi.getPlayer().getDojoParty()) // we can also try 5 * stage / 6 | 0 + 1
pi.getPlayer().setVanquisherKills(pi.getPlayer().getVanquisherKills() + 1);
} else {
pi.getPlayer().message("There are still some monsters remaining.");
}
pi.enableActions();
return true;
} catch(err) {
pi.getPlayer().dropMessage(err);
}

View File

@@ -24,6 +24,6 @@ Leave the Cave of Life - Entrance Map and go back to the Peak of the Big Nest (2
*/
function enter(pi) {
pi.warp(240040600, "st00");
pi.warp(240040600, 4);
return true;
}

View File

@@ -25,8 +25,15 @@
*/
function enter(pi) {
if(pi.isQuestStarted(6153)) {
pi.warp(910500200, 0);
return true;
if(pi.getWarpMap(910500200).countPlayers() == 0) {
pi.resetMapObjects(910500200);
pi.warp(910500200, 0);
return true;
} else {
pi.getPlayer().message("Some other player is currently inside.");
return false;
}
} else {
pi.getPlayer().message("A mysterious force won't let you in.");
return false;

View File

@@ -20,7 +20,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
function enter(pi) {
if (pi.getPlayer().getEventInstance().getProperty("canWarp")) {
if (pi.getPlayer().getMap().countMonsters() == 0) {
pi.warp(910500200, "out01");
return true;
}

View File

@@ -25,8 +25,15 @@
*/
function enter(pi) {
if(pi.isQuestStarted(6240)) {
pi.warp(921100200, 0);
return true;
if(pi.getWarpMap(921100200).countPlayers() == 0) {
pi.resetMapObjects(921100200);
pi.warp(921100200, 0);
return true;
} else {
pi.getPlayer().message("Some other player is currently inside.");
return false;
}
} else {
pi.getPlayer().message("A mysterious force won't let you in.");
return false;

View File

@@ -25,9 +25,17 @@
*/
function enter(pi) {
if(pi.isQuestStarted(6202)) {
pi.getPlayer().getClient().getChannelServer().getMapFactory().getMap(910200000).resetReactors(); // Make sure they actually can do what they need...
pi.warp(910200000, 0);
return true;
if(pi.getWarpMap(910200000).countPlayers() == 0) {
pi.resetMapObjects(910200000);
pi.warp(910200000, 0);
return true;
} else {
pi.getPlayer().message("Some other player is currently inside.");
return false;
}
}
pi.getPlayer().message("A mysterious force won't let you in.");
return false;
}

View File

@@ -25,8 +25,15 @@
*/
function enter(pi) {
if(pi.isQuestStarted(6242)) {
pi.warp(921100210, 0);
return true;
if(pi.getWarpMap(921100210).countPlayers() == 0) {
pi.resetMapObjects(921100210);
pi.warp(921100210, 0);
return true;
} else {
pi.getPlayer().message("Some other player is currently inside.");
return false;
}
} else {
pi.getPlayer().message("A mysterious force won't let you in.");
return false;

View File

@@ -24,6 +24,18 @@
* @purpose Warps to the Junior Balrog map for the Rush Skill.
*/
function enter(pi) {
pi.warp(924000100, 0);
return true;
if(pi.isQuestStarted(6241) || pi.isQuestStarted(6243)) {
if(pi.getWarpMap(924000100).countPlayers() == 0) {
pi.resetMapObjects(924000100);
pi.warp(924000100, 0);
return true;
} else {
pi.getPlayer().message("Some other player is currently inside.");
return false;
}
}
pi.getPlayer().message("A mysterious force won't let you in.");
return false;
}

View File

@@ -27,8 +27,8 @@ function enter(pi) {
if(pi.isQuestStarted(6134)) {
pi.warp(922020000, 0);
return true;
} else {
pi.getPlayer().message("A mysterious force won't let you in.");
return false;
}
pi.getPlayer().message("A mysterious force won't let you in.");
return false;
}

View File

@@ -21,13 +21,19 @@
*/
/**
* @author DiscoveryMS (Twdtwd)
* @purpose Warps to the Forgotten Passage and gives you the needed item for the resurection.
* @purpose Warps to the Forgotten Passage and gives you the needed item for the resurrection.
*/
function enter(pi) {
if(pi.isQuestStarted(6134)) {
pi.warp(220070400, 3);
pi.gainItem(4031448, 1);
return true;
if(pi.canHold(4031448)) {
pi.gainItem(4031448, 1);
pi.warp(220070400, 3);
return true;
} else {
pi.getPlayer().message("Make room on your ETC to receive the quest item.");
return false;
}
} else {
pi.warp(220070400, 3);
return true;

View File

@@ -20,10 +20,22 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* @author DiscoveryMS (Twdtwd)
* @author DiscoveryMS (Twdtwd), Ronan
* @purpose Warps to the Cold Cave for Resurection.
*/
function enter(pi) {
pi.warp(923000100, 0);
return true;
if(pi.haveItem(4001108)) {
if(pi.getWarpMap(923000100).countPlayers() == 0) {
pi.resetMapObjects(923000100);
pi.warp(923000100, 0);
return true;
} else {
pi.getPlayer().message("Some other player is currently inside.");
return false;
}
}
pi.getPlayer().message("A mysterious force won't let you in.");
return false;
}

View File

@@ -25,8 +25,15 @@
*/
function enter(pi) {
if(pi.isQuestStarted(6110)) {
pi.warp(910500100, 0);
return true;
if(pi.getWarpMap(910500100).countPlayers() == 0) {
pi.resetMapObjects(910500100);
pi.warp(910500100, 0);
return true;
} else {
pi.getPlayer().message("Some other player is currently inside.");
return false;
}
} else {
pi.getPlayer().message("A mysterious force won't let you in.");
return false;

View File

@@ -25,8 +25,17 @@
*/
function enter(pi) {
if(pi.isQuestStarted(6230) || pi.haveItem(4001110)) {
pi.warp(922020200, 1);
return true;
if(pi.getWarpMap(922020200).countPlayers() == 0) {
pi.resetMapObjects(922020200);
pi.warp(922020200, 0);
return true;
} else {
pi.getPlayer().message("Some other player is currently inside.");
return false;
}
}
pi.getPlayer().message("A mysterious force won't let you in.");
return false;
}