Convert portal scripts to Graal
This commit is contained in:
@@ -18,9 +18,8 @@
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
importPackage(Packages.client);
|
||||
|
||||
function isTigunMorphed(ch) {
|
||||
const MapleBuffStat = Java.type('client.MapleBuffStat');
|
||||
return ch.getBuffSource(MapleBuffStat.MORPH) == 2210005;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
importPackage(Packages.server.life);
|
||||
|
||||
function enter(pi) {
|
||||
if (pi.getMap().getReactorByName("sMob1").getState() >= 1 && pi.getMap().getReactorByName("sMob2").getState() >= 1 && pi.getMap().getReactorByName("sMob3").getState() >= 1 && pi.getMap().getReactorByName("sMob4").getState() >= 1 && pi.getMap().getMonsters().size() == 0) {
|
||||
var eim = pi.getEventInstance();
|
||||
@@ -9,13 +7,15 @@ function enter(pi) {
|
||||
var chests = parseInt(eim.getProperty("openedChests"));
|
||||
var boss;
|
||||
|
||||
const MapleLifeFactory = Java.type('server.life.MapleLifeFactory');
|
||||
if(chests == 0) boss = MapleLifeFactory.getMonster(9300119); //lord pirate
|
||||
else if(chests == 1) boss = MapleLifeFactory.getMonster(9300105); //angry lord pirate
|
||||
else boss = MapleLifeFactory.getMonster(9300106); //enraged lord pirate
|
||||
|
||||
boss.changeDifficulty(level, true);
|
||||
|
||||
pi.getMap(925100500).spawnMonsterOnGroundBelow(boss, new java.awt.Point(777, 140));
|
||||
const Point = Java.type('java.awt.Point');
|
||||
pi.getMap(925100500).spawnMonsterOnGroundBelow(boss, new Point(777, 140));
|
||||
eim.setProperty("spawnedBoss", "true");
|
||||
}
|
||||
|
||||
|
||||
@@ -25,14 +25,13 @@
|
||||
* @maps: All Dojo fighting maps
|
||||
*/
|
||||
|
||||
importPackage(Packages.constants.game);
|
||||
|
||||
function enter(pi) {
|
||||
try {
|
||||
if (pi.getPlayer().getMap().getMonsterById(9300216) != null) {
|
||||
pi.goDojoUp();
|
||||
pi.getPlayer().getMap().setReactorState();
|
||||
var stage = Math.floor(pi.getPlayer().getMapId() / 100) % 100;
|
||||
const GameConstants = Java.type('constants.game.GameConstants');
|
||||
if ((stage - (stage / 6) | 0) == pi.getPlayer().getVanquisherStage() && !GameConstants.isDojoPartyArea(pi.getPlayer().getMapId())) // we can also try 5 * stage / 6 | 0 + 1
|
||||
pi.getPlayer().setVanquisherKills(pi.getPlayer().getVanquisherKills() + 1);
|
||||
} else {
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
importPackage(Packages.server.quest);
|
||||
importPackage(Packages.server.life);
|
||||
|
||||
function enter(pi) {
|
||||
if(pi.isQuestStarted(21201)) { // Second Job
|
||||
for (var i = 108000700; i < 108000709; i++){
|
||||
@@ -36,7 +33,9 @@ function enter(pi) {
|
||||
function spawnMob(x, y, id, map) {
|
||||
if(map.getMonsterById(id) != null)
|
||||
return;
|
||||
|
||||
|
||||
const MapleLifeFactory = Java.type('server.life.MapleLifeFactory');
|
||||
const Point = Java.type('java.awt.Point');
|
||||
var mob = MapleLifeFactory.getMonster(id);
|
||||
map.spawnMonsterOnGroundBelow(mob, new java.awt.Point(x, y));
|
||||
map.spawnMonsterOnGroundBelow(mob, new Point(x, y));
|
||||
}
|
||||
@@ -19,7 +19,6 @@
|
||||
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/>.
|
||||
*/
|
||||
importPackage(Packages.server.life);
|
||||
|
||||
function enter(pi) {
|
||||
if(pi.isQuestStarted(21301) && pi.getQuestProgressInt(21301, 9001013) == 0) {
|
||||
@@ -42,7 +41,9 @@ function enter(pi) {
|
||||
function spawnMob(x, y, id, map) {
|
||||
if(map.getMonsterById(id) != null)
|
||||
return;
|
||||
|
||||
|
||||
const MapleLifeFactory = Java.type('server.life.MapleLifeFactory');
|
||||
const Point = Java.type('java.awt.Point');
|
||||
var mob = MapleLifeFactory.getMonster(id);
|
||||
map.spawnMonsterOnGroundBelow(mob, new java.awt.Point(x, y));
|
||||
map.spawnMonsterOnGroundBelow(mob, new Point(x, y));
|
||||
}
|
||||
@@ -1,5 +1,3 @@
|
||||
importPackage(Packages.tools);
|
||||
|
||||
var leverSequenceExit = false;
|
||||
|
||||
function enterLeverSequence(pi) {
|
||||
@@ -30,6 +28,7 @@ function enterLeverSequence(pi) {
|
||||
}
|
||||
}
|
||||
|
||||
const MaplePacketCreator = Java.type('tools.MaplePacketCreator');
|
||||
if(countMiss > 0) {
|
||||
map.broadcastMessage(MaplePacketCreator.showEffect("quest/party/wrong_kor"));
|
||||
map.broadcastMessage(MaplePacketCreator.playSound("Party1/Failed"));
|
||||
|
||||
Reference in New Issue
Block a user