Convert reactor scripts to Graal
This commit is contained in:
@@ -25,8 +25,6 @@
|
|||||||
*@author Jvlaple
|
*@author Jvlaple
|
||||||
*/
|
*/
|
||||||
|
|
||||||
importPackage(Packages.client.inventory);
|
|
||||||
|
|
||||||
function act() {
|
function act() {
|
||||||
var eim = rm.getPlayer().getEventInstance();
|
var eim = rm.getPlayer().getEventInstance();
|
||||||
var womanfred = eim.getMapFactory().getMap(240050100);
|
var womanfred = eim.getMapFactory().getMap(240050100);
|
||||||
@@ -64,7 +62,8 @@ function act() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
eim.setIntProperty(vvpStage + "stageclear", 1);
|
eim.setIntProperty(vvpStage + "stageclear", 1);
|
||||||
|
|
||||||
|
const Item = Java.type('client.inventory.Item');
|
||||||
var tehWomanfred = new Item(vvpKey, 0, 1);
|
var tehWomanfred = new Item(vvpKey, 0, 1);
|
||||||
var theWomanfred = womanfred.getReactorByName("keyDrop1");
|
var theWomanfred = womanfred.getReactorByName("keyDrop1");
|
||||||
var dropper = eim.getPlayers().get(0);
|
var dropper = eim.getPlayers().get(0);
|
||||||
|
|||||||
@@ -22,13 +22,11 @@
|
|||||||
/*2519000.js - Reactor used at the door on stage 4.
|
/*2519000.js - Reactor used at the door on stage 4.
|
||||||
*@author Ronan
|
*@author Ronan
|
||||||
*/
|
*/
|
||||||
|
|
||||||
importPackage(Packages.tools);
|
|
||||||
importPackage(java.awt);
|
|
||||||
|
|
||||||
function act() {
|
function act() {
|
||||||
var denyWidth = 320, denyHeight = 150;
|
var denyWidth = 320, denyHeight = 150;
|
||||||
var denyPos = rm.getReactor().getPosition();
|
var denyPos = rm.getReactor().getPosition();
|
||||||
|
const Rectangle = Java.type('java.awt.Rectangle');
|
||||||
var denyArea = new Rectangle(denyPos.getX() - denyWidth / 2, denyPos.getY() - denyHeight / 2, denyWidth, denyHeight);
|
var denyArea = new Rectangle(denyPos.getX() - denyWidth / 2, denyPos.getY() - denyHeight / 2, denyWidth, denyHeight);
|
||||||
|
|
||||||
rm.getReactor().getMap().setAllowSpawnPointInBox(false, denyArea);
|
rm.getReactor().getMap().setAllowSpawnPointInBox(false, denyArea);
|
||||||
|
|||||||
@@ -23,12 +23,10 @@
|
|||||||
*@author Ronan
|
*@author Ronan
|
||||||
*/
|
*/
|
||||||
|
|
||||||
importPackage(Packages.tools);
|
|
||||||
importPackage(java.awt);
|
|
||||||
|
|
||||||
function act() {
|
function act() {
|
||||||
var denyWidth = 320, denyHeight = 150;
|
var denyWidth = 320, denyHeight = 150;
|
||||||
var denyPos = rm.getReactor().getPosition();
|
var denyPos = rm.getReactor().getPosition();
|
||||||
|
const Rectangle = Java.type('java.awt.Rectangle');
|
||||||
var denyArea = new Rectangle(denyPos.getX() - denyWidth / 2, denyPos.getY() - denyHeight / 2, denyWidth, denyHeight);
|
var denyArea = new Rectangle(denyPos.getX() - denyWidth / 2, denyPos.getY() - denyHeight / 2, denyWidth, denyHeight);
|
||||||
|
|
||||||
rm.getReactor().getMap().setAllowSpawnPointInBox(false, denyArea);
|
rm.getReactor().getMap().setAllowSpawnPointInBox(false, denyArea);
|
||||||
|
|||||||
@@ -23,12 +23,10 @@
|
|||||||
*@author Ronan
|
*@author Ronan
|
||||||
*/
|
*/
|
||||||
|
|
||||||
importPackage(Packages.tools);
|
|
||||||
importPackage(java.awt);
|
|
||||||
|
|
||||||
function act() {
|
function act() {
|
||||||
var denyWidth = 320, denyHeight = 150;
|
var denyWidth = 320, denyHeight = 150;
|
||||||
var denyPos = rm.getReactor().getPosition();
|
var denyPos = rm.getReactor().getPosition();
|
||||||
|
const Rectangle = Java.type('java.awt.Rectangle');
|
||||||
var denyArea = new Rectangle(denyPos.getX() - denyWidth / 2, denyPos.getY() - denyHeight / 2, denyWidth, denyHeight);
|
var denyArea = new Rectangle(denyPos.getX() - denyWidth / 2, denyPos.getY() - denyHeight / 2, denyWidth, denyHeight);
|
||||||
|
|
||||||
rm.getReactor().getMap().setAllowSpawnPointInBox(false, denyArea);
|
rm.getReactor().getMap().setAllowSpawnPointInBox(false, denyArea);
|
||||||
|
|||||||
@@ -23,12 +23,10 @@
|
|||||||
*@author Ronan
|
*@author Ronan
|
||||||
*/
|
*/
|
||||||
|
|
||||||
importPackage(Packages.tools);
|
|
||||||
importPackage(java.awt);
|
|
||||||
|
|
||||||
function act() {
|
function act() {
|
||||||
var denyWidth = 320, denyHeight = 150;
|
var denyWidth = 320, denyHeight = 150;
|
||||||
var denyPos = rm.getReactor().getPosition();
|
var denyPos = rm.getReactor().getPosition();
|
||||||
|
const Rectangle = Java.type('java.awt.Rectangle');
|
||||||
var denyArea = new Rectangle(denyPos.getX() - denyWidth / 2, denyPos.getY() - denyHeight / 2, denyWidth, denyHeight);
|
var denyArea = new Rectangle(denyPos.getX() - denyWidth / 2, denyPos.getY() - denyHeight / 2, denyWidth, denyHeight);
|
||||||
|
|
||||||
var map = rm.getReactor().getMap();
|
var map = rm.getReactor().getMap();
|
||||||
|
|||||||
@@ -20,12 +20,11 @@
|
|||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
importPackage(Packages.server.life);
|
|
||||||
|
|
||||||
function spawnJrBoss(mobObj) {
|
function spawnJrBoss(mobObj) {
|
||||||
mobObj.getMap().killMonster(mobObj.getId());
|
mobObj.getMap().killMonster(mobObj.getId());
|
||||||
var spawnid = mobObj.getId() - 17;
|
var spawnid = mobObj.getId() - 17;
|
||||||
|
|
||||||
|
const MapleLifeFactory = Java.type('server.life.MapleLifeFactory');
|
||||||
var mob = MapleLifeFactory.getMonster(spawnid);
|
var mob = MapleLifeFactory.getMonster(spawnid);
|
||||||
mobObj.getMap().spawnMonsterOnGroundBelow(mob, mobObj.getPosition());
|
mobObj.getMap().spawnMonsterOnGroundBelow(mob, mobObj.getPosition());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,12 +26,11 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
importPackage(Packages.server.life);
|
|
||||||
|
|
||||||
function act(){
|
function act(){
|
||||||
var startId = 9400523;
|
var startId = 9400523;
|
||||||
var mobObj, mapObj = rm.getMap();
|
var mobObj, mapObj = rm.getMap();
|
||||||
|
|
||||||
|
const MapleLifeFactory = Java.type('server.life.MapleLifeFactory');
|
||||||
for(var i = 0; i < 7; i++) {
|
for(var i = 0; i < 7; i++) {
|
||||||
mobObj = MapleLifeFactory.getMonster(startId + Math.floor(Math.random() * 3));
|
mobObj = MapleLifeFactory.getMonster(startId + Math.floor(Math.random() * 3));
|
||||||
mapObj.spawnMonsterOnGroundBelow(mobObj, rm.getReactor().getPosition());
|
mapObj.spawnMonsterOnGroundBelow(mobObj, rm.getReactor().getPosition());
|
||||||
|
|||||||
@@ -26,12 +26,11 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
importPackage(Packages.server.life);
|
|
||||||
|
|
||||||
function act(){
|
function act(){
|
||||||
var startId = 9400523;
|
var startId = 9400523;
|
||||||
var mobObj, mapObj = rm.getMap();
|
var mobObj, mapObj = rm.getMap();
|
||||||
|
|
||||||
|
const MapleLifeFactory = Java.type('server.life.MapleLifeFactory');
|
||||||
for(var i = 0; i < 7; i++) {
|
for(var i = 0; i < 7; i++) {
|
||||||
mobObj = MapleLifeFactory.getMonster(startId + Math.floor(Math.random() * 3));
|
mobObj = MapleLifeFactory.getMonster(startId + Math.floor(Math.random() * 3));
|
||||||
mapObj.spawnMonsterOnGroundBelow(mobObj, rm.getReactor().getPosition());
|
mapObj.spawnMonsterOnGroundBelow(mobObj, rm.getReactor().getPosition());
|
||||||
|
|||||||
@@ -26,12 +26,11 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
importPackage(Packages.server.life);
|
|
||||||
|
|
||||||
function act(){
|
function act(){
|
||||||
var startId = 9400523;
|
var startId = 9400523;
|
||||||
var mobObj, mapObj = rm.getMap();
|
var mobObj, mapObj = rm.getMap();
|
||||||
|
|
||||||
|
const MapleLifeFactory = Java.type('server.life.MapleLifeFactory');
|
||||||
for(var i = 0; i < 7; i++) {
|
for(var i = 0; i < 7; i++) {
|
||||||
mobObj = MapleLifeFactory.getMonster(startId + Math.floor(Math.random() * 3));
|
mobObj = MapleLifeFactory.getMonster(startId + Math.floor(Math.random() * 3));
|
||||||
mapObj.spawnMonsterOnGroundBelow(mobObj, rm.getReactor().getPosition());
|
mapObj.spawnMonsterOnGroundBelow(mobObj, rm.getReactor().getPosition());
|
||||||
|
|||||||
@@ -27,9 +27,9 @@
|
|||||||
* [x]shows animation,
|
* [x]shows animation,
|
||||||
* [x]makes stirges and stuff appear
|
* [x]makes stirges and stuff appear
|
||||||
*/
|
*/
|
||||||
importPackage(Packages.tools);
|
|
||||||
|
|
||||||
function act() {
|
function act() {
|
||||||
|
const MaplePacketCreator = Java.type('tools.MaplePacketCreator');
|
||||||
rm.spawnMonster(9300061, 1, 0, 0); // (0, 0) is temp position
|
rm.spawnMonster(9300061, 1, 0, 0); // (0, 0) is temp position
|
||||||
rm.getClient().getMap().startMapEffect("Protect the Moon Bunny that's pounding the mill, and gather up 10 Moon Bunny's Rice Cakes!", 5120016, 7000);
|
rm.getClient().getMap().startMapEffect("Protect the Moon Bunny that's pounding the mill, and gather up 10 Moon Bunny's Rice Cakes!", 5120016, 7000);
|
||||||
rm.getClient().getMap().broadcastMessage(MaplePacketCreator.bunnyPacket()); // Protect the Moon Bunny!
|
rm.getClient().getMap().broadcastMessage(MaplePacketCreator.bunnyPacket()); // Protect the Moon Bunny!
|
||||||
|
|||||||
Reference in New Issue
Block a user