Convert event scripts to Graal

This commit is contained in:
P0nk
2021-04-17 19:43:00 +02:00
parent a18a1cb8ce
commit 3458d1c7b3
56 changed files with 273 additions and 237 deletions

View File

@@ -25,9 +25,6 @@
// GMS-like event string data thanks to iHealForLove
importPackage(Packages.client.inventory);
importPackage(Packages.server.life);
var isPq = true;
var minPlayers = 3, maxPlayers = 6;
var minLevel = 31, maxLevel = 40;
@@ -277,6 +274,7 @@ function monsterKilled(mob, eim) {
}
var mapObj = mob.getMap();
const Item = Java.type('client.inventory.Item');
var itemObj = new Item((forceDrop || Math.random() < 0.77) ? 4032094 : 4032095, 0, 1); // 77% chance of not fake
var dropper = eim.getPlayers().get(0);
@@ -305,9 +303,11 @@ function snowmanEvolve(eim, curLevel) {
eim.setIntProperty("snowmanLevel", curLevel + 2); // increment by 2 to decrement by 1 on friendlyKilled
mapobj.killMonster(snowman, null, false, 2);
const MapleLifeFactory = Java.type('server.life.MapleLifeFactory');
const Point = Java.type('java.awt.Point');
var snowman = MapleLifeFactory.getMonster(9400317 + (5 * difficulty) + curLevel);
mapobj.spawnMonsterOnGroundBelow(snowman, new java.awt.Point(-180, 15));
mapobj.spawnMonsterOnGroundBelow(snowman, new Point(-180, 15));
if(curLevel >= 4) {
mapobj.allowSummonState(false);