Convert event scripts to Graal
This commit is contained in:
@@ -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 = 21, maxLevel = 30;
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user