Reformat and clean up map scripts

This commit is contained in:
P0nk
2021-09-09 23:32:43 +02:00
parent f76b9954a7
commit 0c1545f81d
87 changed files with 473 additions and 466 deletions

View File

@@ -19,6 +19,7 @@
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/>.
*/
/*
*@Author: Moogra, Traitor, Ronan
*@Map(s): All Dojo fighting maps
@@ -30,13 +31,13 @@ function start(ms) {
ms.getPlayer().resetEnteredScript();
var stage = Math.floor(ms.getMapId() / 100) % 100;
var callBoss = false;
if (stage % 6 == 0) {
ms.getClient().getChannelServer().dismissDojoSchedule(ms.getMapId(), ms.getParty());
ms.getClient().getChannelServer().setDojoProgress(ms.getMapId());
} else {
callBoss = ms.getClient().getChannelServer().setDojoProgress(ms.getMapId());
var realstage = stage - ((stage / 6) | 0);
var mob = ms.getMonsterLifeFactory(9300183 + realstage);
if (callBoss && mob != null && ms.getPlayer().getMap().getMonsterById(9300216) == null) {

View File

@@ -1,4 +1,4 @@
function start(ms) {
ms.getPlayer().resetEnteredScript();
ms.spawnMonster(9300331, -28, 0);
function start(ms) {
ms.getPlayer().resetEnteredScript();
ms.spawnMonster(9300331, -28, 0);
}

View File

@@ -1,16 +1,16 @@
function start(ms){
function start(ms) {
if(ms.getQuestStatus(2175) == 1){
var mobId = 9300156;
var player = ms.getPlayer();
var map = player.getMap();
if (ms.getQuestStatus(2175) == 1) {
var mobId = 9300156;
var player = ms.getPlayer();
var map = player.getMap();
if(map.getMonsterById(mobId) != null){
return;
}
if (map.getMonsterById(mobId) != null) {
return;
}
const LifeFactory = Java.type('server.life.LifeFactory');
const Point = Java.type('java.awt.Point');
map.spawnMonsterOnGroundBelow(LifeFactory.getMonster(mobId), new Point(-1027, 216));
}
const LifeFactory = Java.type('server.life.LifeFactory');
const Point = Java.type('java.awt.Point');
map.spawnMonsterOnGroundBelow(LifeFactory.getMonster(mobId), new Point(-1027, 216));
}
}

View File

@@ -1,11 +1,11 @@
var eventName = "Boats";
var toMap = 200090010;
function start(ms) {
var em = ms.getClient().getEventManager(eventName);
//is the player late to start the travel?
if(em.getProperty("docked") == "false") {
ms.getClient().getPlayer().warpAhead(toMap);
}
function start(ms) {
var em = ms.getClient().getEventManager(eventName);
//is the player late to start the travel?
if (em.getProperty("docked") == "false") {
ms.getClient().getPlayer().warpAhead(toMap);
}
}

View File

@@ -1,23 +1,24 @@
function start(ms) {
if(ms.getMapId() == 108010101) { // Archer
spawnMob(188, 20, 9001002, ms.getPlayer().getMap());
} else if(ms.getMapId() == 108010301) { // Warrior
spawnMob(188, 20, 9001000, ms.getPlayer().getMap());
} else if(ms.getMapId() == 108010201) { // Mage
spawnMob(188, 20, 9001001, ms.getPlayer().getMap());
} else if(ms.getMapId() == 108010401) { // Thief
spawnMob(188, 20, 9001003, ms.getPlayer().getMap());
} else if(ms.getMapId() == 108010501) { // Pirate
spawnMob(188, 20, 9001008, ms.getPlayer().getMap());
}
if (ms.getMapId() == 108010101) { // Archer
spawnMob(188, 20, 9001002, ms.getPlayer().getMap());
} else if (ms.getMapId() == 108010301) { // Warrior
spawnMob(188, 20, 9001000, ms.getPlayer().getMap());
} else if (ms.getMapId() == 108010201) { // Mage
spawnMob(188, 20, 9001001, ms.getPlayer().getMap());
} else if (ms.getMapId() == 108010401) { // Thief
spawnMob(188, 20, 9001003, ms.getPlayer().getMap());
} else if (ms.getMapId() == 108010501) { // Pirate
spawnMob(188, 20, 9001008, ms.getPlayer().getMap());
}
}
function spawnMob(x, y, id, map) {
if(map.getMonsterById(id) != null)
return;
if (map.getMonsterById(id) != null) {
return;
}
const LifeFactory = Java.type('server.life.LifeFactory');
const Point = Java.type('java.awt.Point');
var mob = LifeFactory.getMonster(id);
map.spawnMonsterOnGroundBelow(mob, new Point(x, y));
const LifeFactory = Java.type('server.life.LifeFactory');
const Point = Java.type('java.awt.Point');
var mob = LifeFactory.getMonster(id);
map.spawnMonsterOnGroundBelow(mob, new Point(x, y));
}

View File

@@ -1,23 +1,24 @@
function start(ms) {
if(ms.getMapId() == 108010101) { // Archer
spawnMob(188, 20, 9001002, ms.getPlayer().getMap());
} else if(ms.getMapId() == 108010301) { // Warrior
spawnMob(188, 20, 9001000, ms.getPlayer().getMap());
} else if(ms.getMapId() == 108010201) { // Mage
spawnMob(188, 20, 9001001, ms.getPlayer().getMap());
} else if(ms.getMapId() == 108010401) { // Thief
spawnMob(188, 20, 9001003, ms.getPlayer().getMap());
} else if(ms.getMapId() == 108010501) { // Pirate
spawnMob(188, 20, 9001008, ms.getPlayer().getMap());
}
if (ms.getMapId() == 108010101) { // Archer
spawnMob(188, 20, 9001002, ms.getPlayer().getMap());
} else if (ms.getMapId() == 108010301) { // Warrior
spawnMob(188, 20, 9001000, ms.getPlayer().getMap());
} else if (ms.getMapId() == 108010201) { // Mage
spawnMob(188, 20, 9001001, ms.getPlayer().getMap());
} else if (ms.getMapId() == 108010401) { // Thief
spawnMob(188, 20, 9001003, ms.getPlayer().getMap());
} else if (ms.getMapId() == 108010501) { // Pirate
spawnMob(188, 20, 9001008, ms.getPlayer().getMap());
}
}
function spawnMob(x, y, id, map) {
if(map.getMonsterById(id) != null)
return;
if (map.getMonsterById(id) != null) {
return;
}
const LifeFactory = Java.type('server.life.LifeFactory');
const Point = Java.type('java.awt.Point');
var mob = LifeFactory.getMonster(id);
map.spawnMonsterOnGroundBelow(mob, new Point(x, y));
const LifeFactory = Java.type('server.life.LifeFactory');
const Point = Java.type('java.awt.Point');
var mob = LifeFactory.getMonster(id);
map.spawnMonsterOnGroundBelow(mob, new Point(x, y));
}

View File

@@ -1,23 +1,24 @@
function start(ms) {
if(ms.getMapId() == 108010101) { // Archer
spawnMob(188, 20, 9001002, ms.getPlayer().getMap());
} else if(ms.getMapId() == 108010301) { // Warrior
spawnMob(188, 20, 9001000, ms.getPlayer().getMap());
} else if(ms.getMapId() == 108010201) { // Mage
spawnMob(188, 20, 9001001, ms.getPlayer().getMap());
} else if(ms.getMapId() == 108010401) { // Thief
spawnMob(188, 20, 9001003, ms.getPlayer().getMap());
} else if(ms.getMapId() == 108010501) { // Pirate
spawnMob(188, 20, 9001008, ms.getPlayer().getMap());
}
if (ms.getMapId() == 108010101) { // Archer
spawnMob(188, 20, 9001002, ms.getPlayer().getMap());
} else if (ms.getMapId() == 108010301) { // Warrior
spawnMob(188, 20, 9001000, ms.getPlayer().getMap());
} else if (ms.getMapId() == 108010201) { // Mage
spawnMob(188, 20, 9001001, ms.getPlayer().getMap());
} else if (ms.getMapId() == 108010401) { // Thief
spawnMob(188, 20, 9001003, ms.getPlayer().getMap());
} else if (ms.getMapId() == 108010501) { // Pirate
spawnMob(188, 20, 9001008, ms.getPlayer().getMap());
}
}
function spawnMob(x, y, id, map) {
if(map.getMonsterById(id) != null)
return;
if (map.getMonsterById(id) != null) {
return;
}
const LifeFactory = Java.type('server.life.LifeFactory');
const Point = Java.type('java.awt.Point');
var mob = LifeFactory.getMonster(id);
map.spawnMonsterOnGroundBelow(mob, new Point(x, y));
const LifeFactory = Java.type('server.life.LifeFactory');
const Point = Java.type('java.awt.Point');
var mob = LifeFactory.getMonster(id);
map.spawnMonsterOnGroundBelow(mob, new Point(x, y));
}

View File

@@ -1,23 +1,24 @@
function start(ms) {
if(ms.getMapId() == 108010101) { // Archer
spawnMob(188, 20, 9001002, ms.getPlayer().getMap());
} else if(ms.getMapId() == 108010301) { // Warrior
spawnMob(188, 20, 9001000, ms.getPlayer().getMap());
} else if(ms.getMapId() == 108010201) { // Mage
spawnMob(188, 20, 9001001, ms.getPlayer().getMap());
} else if(ms.getMapId() == 108010401) { // Thief
spawnMob(188, 20, 9001003, ms.getPlayer().getMap());
} else if(ms.getMapId() == 108010501) { // Pirate
spawnMob(188, 20, 9001008, ms.getPlayer().getMap());
}
if (ms.getMapId() == 108010101) { // Archer
spawnMob(188, 20, 9001002, ms.getPlayer().getMap());
} else if (ms.getMapId() == 108010301) { // Warrior
spawnMob(188, 20, 9001000, ms.getPlayer().getMap());
} else if (ms.getMapId() == 108010201) { // Mage
spawnMob(188, 20, 9001001, ms.getPlayer().getMap());
} else if (ms.getMapId() == 108010401) { // Thief
spawnMob(188, 20, 9001003, ms.getPlayer().getMap());
} else if (ms.getMapId() == 108010501) { // Pirate
spawnMob(188, 20, 9001008, ms.getPlayer().getMap());
}
}
function spawnMob(x, y, id, map) {
if(map.getMonsterById(id) != null)
return;
if (map.getMonsterById(id) != null) {
return;
}
const LifeFactory = Java.type('server.life.LifeFactory');
const Point = Java.type('java.awt.Point');
var mob = LifeFactory.getMonster(id);
map.spawnMonsterOnGroundBelow(mob, new Point(x, y));
const LifeFactory = Java.type('server.life.LifeFactory');
const Point = Java.type('java.awt.Point');
var mob = LifeFactory.getMonster(id);
map.spawnMonsterOnGroundBelow(mob, new Point(x, y));
}

View File

@@ -1,23 +1,24 @@
function start(ms) {
if(ms.getMapId() == 108010101) { // Archer
spawnMob(188, 20, 9001002, ms.getPlayer().getMap());
} else if(ms.getMapId() == 108010301) { // Warrior
spawnMob(188, 20, 9001000, ms.getPlayer().getMap());
} else if(ms.getMapId() == 108010201) { // Mage
spawnMob(188, 20, 9001001, ms.getPlayer().getMap());
} else if(ms.getMapId() == 108010401) { // Thief
spawnMob(188, 20, 9001003, ms.getPlayer().getMap());
} else if(ms.getMapId() == 108010501) { // Pirate
spawnMob(188, 20, 9001008, ms.getPlayer().getMap());
}
if (ms.getMapId() == 108010101) { // Archer
spawnMob(188, 20, 9001002, ms.getPlayer().getMap());
} else if (ms.getMapId() == 108010301) { // Warrior
spawnMob(188, 20, 9001000, ms.getPlayer().getMap());
} else if (ms.getMapId() == 108010201) { // Mage
spawnMob(188, 20, 9001001, ms.getPlayer().getMap());
} else if (ms.getMapId() == 108010401) { // Thief
spawnMob(188, 20, 9001003, ms.getPlayer().getMap());
} else if (ms.getMapId() == 108010501) { // Pirate
spawnMob(188, 20, 9001008, ms.getPlayer().getMap());
}
}
function spawnMob(x, y, id, map) {
if(map.getMonsterById(id) != null)
return;
if (map.getMonsterById(id) != null) {
return;
}
const LifeFactory = Java.type('server.life.LifeFactory');
const Point = Java.type('java.awt.Point');
var mob = LifeFactory.getMonster(id);
map.spawnMonsterOnGroundBelow(mob, new Point(x, y));
const LifeFactory = Java.type('server.life.LifeFactory');
const Point = Java.type('java.awt.Point');
var mob = LifeFactory.getMonster(id);
map.spawnMonsterOnGroundBelow(mob, new Point(x, y));
}

View File

@@ -23,9 +23,9 @@ const Point = Java.type('java.awt.Point');
var spawnPos = new Point(2830, 78);
function start(ms) {
var mapobj = ms.getMap();
if(!mapobj.containsNPC(npcid)) {
ms.spawnNpc(npcid, spawnPos, mapobj);
}
var mapobj = ms.getMap();
if (!mapobj.containsNPC(npcid)) {
ms.spawnNpc(npcid, spawnPos, mapobj);
}
}

View File

@@ -23,9 +23,9 @@ const Point = Java.type('java.awt.Point');
var spawnPos = new Point(3395, -322);
function start(ms) {
var mapobj = ms.getMap();
if(!mapobj.containsNPC(npcid)) {
ms.spawnNpc(npcid, spawnPos, mapobj);
}
var mapobj = ms.getMap();
if (!mapobj.containsNPC(npcid)) {
ms.spawnNpc(npcid, spawnPos, mapobj);
}
}

View File

@@ -23,9 +23,9 @@ const Point = Java.type('java.awt.Point');
var spawnPos = new Point(500, -522);
function start(ms) {
var mapobj = ms.getMap();
if(!mapobj.containsNPC(npcid)) {
ms.spawnNpc(npcid, spawnPos, mapobj);
}
var mapobj = ms.getMap();
if (!mapobj.containsNPC(npcid)) {
ms.spawnNpc(npcid, spawnPos, mapobj);
}
}

View File

@@ -23,9 +23,9 @@ const Point = Java.type('java.awt.Point');
var spawnPos = new Point(-2263, -582);
function start(ms) {
var mapobj = ms.getMap();
if(!mapobj.containsNPC(npcid)) {
ms.spawnNpc(npcid, spawnPos, mapobj);
}
var mapobj = ms.getMap();
if (!mapobj.containsNPC(npcid)) {
ms.spawnNpc(npcid, spawnPos, mapobj);
}
}

View File

@@ -23,9 +23,9 @@ const Point = Java.type('java.awt.Point');
var spawnPos = new Point(372, 70);
function start(ms) {
var mapobj = ms.getMap();
if(!mapobj.containsNPC(npcid)) {
ms.spawnNpc(npcid, spawnPos, mapobj);
}
var mapobj = ms.getMap();
if (!mapobj.containsNPC(npcid)) {
ms.spawnNpc(npcid, spawnPos, mapobj);
}
}

View File

@@ -20,6 +20,6 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
function start(ms) {
ms.setQuestProgress(20010, 20022, 1);
function start(ms) {
ms.setQuestProgress(20010, 20022, 1);
}

View File

@@ -20,6 +20,6 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
function start(ms) {
ms.setQuestProgress(20010, 20022, 1);
function start(ms) {
ms.setQuestProgress(20010, 20022, 1);
}

View File

@@ -1,11 +1,11 @@
var eventName = "Boats";
var toMap = 200090000;
function start(ms) {
var em = ms.getClient().getEventManager(eventName);
//is the player late to start the travel?
if(em.getProperty("docked") == "false") {
ms.getClient().getPlayer().warpAhead(toMap);
}
function start(ms) {
var em = ms.getClient().getEventManager(eventName);
//is the player late to start the travel?
if (em.getProperty("docked") == "false") {
ms.getClient().getPlayer().warpAhead(toMap);
}
}

View File

@@ -1,11 +1,11 @@
var eventName = "Trains";
var toMap = 200090100;
function start(ms) {
var em = ms.getClient().getEventManager(eventName);
//is the player late to start the travel?
if(em.getProperty("docked") == "false") {
ms.getClient().getPlayer().warpAhead(toMap);
}
function start(ms) {
var em = ms.getClient().getEventManager(eventName);
//is the player late to start the travel?
if (em.getProperty("docked") == "false") {
ms.getClient().getPlayer().warpAhead(toMap);
}
}

View File

@@ -1,11 +1,11 @@
var eventName = "Cabin";
var toMap = 200090200;
function start(ms) {
var em = ms.getClient().getEventManager(eventName);
//is the player late to start the travel?
if(em.getProperty("docked") == "false") {
ms.getClient().getPlayer().warpAhead(toMap);
}
function start(ms) {
var em = ms.getClient().getEventManager(eventName);
//is the player late to start the travel?
if (em.getProperty("docked") == "false") {
ms.getClient().getPlayer().warpAhead(toMap);
}
}

View File

@@ -1,11 +1,11 @@
var eventName = "Genie";
var toMap = 200090400;
function start(ms) {
var em = ms.getClient().getEventManager(eventName);
//is the player late to start the travel?
if(em.getProperty("docked") == "false") {
ms.getClient().getPlayer().warpAhead(toMap);
}
function start(ms) {
var em = ms.getClient().getEventManager(eventName);
//is the player late to start the travel?
if (em.getProperty("docked") == "false") {
ms.getClient().getPlayer().warpAhead(toMap);
}
}

View File

@@ -2,13 +2,13 @@
var mapId = 200090000;
function start(ms) {
var map = ms.getClient().getChannelServer().getMapFactory().getMap(mapId);
var map = ms.getClient().getChannelServer().getMapFactory().getMap(mapId);
if(map.getDocked()) {
const PacketCreator = Java.type('tools.PacketCreator');
ms.getClient().sendPacket(PacketCreator.musicChange("Bgm04/ArabPirate"));
ms.getClient().sendPacket(PacketCreator.crogBoatPacket(true));
}
if (map.getDocked()) {
const PacketCreator = Java.type('tools.PacketCreator');
ms.getClient().sendPacket(PacketCreator.musicChange("Bgm04/ArabPirate"));
ms.getClient().sendPacket(PacketCreator.crogBoatPacket(true));
}
return true;
return true;
}

View File

@@ -2,13 +2,13 @@
var mapId = 200090010;
function start(ms) {
var map = ms.getClient().getChannelServer().getMapFactory().getMap(mapId);
var map = ms.getClient().getChannelServer().getMapFactory().getMap(mapId);
if(map.getDocked()) {
const PacketCreator = Java.type('tools.PacketCreator');
ms.getClient().sendPacket(PacketCreator.musicChange("Bgm04/ArabPirate"));
ms.getClient().sendPacket(PacketCreator.crogBoatPacket(true));
}
if (map.getDocked()) {
const PacketCreator = Java.type('tools.PacketCreator');
ms.getClient().sendPacket(PacketCreator.musicChange("Bgm04/ArabPirate"));
ms.getClient().sendPacket(PacketCreator.crogBoatPacket(true));
}
return true;
return true;
}

View File

@@ -1,11 +1,11 @@
var eventName = "Trains";
var toMap = 200090110;
function start(ms) {
var em = ms.getClient().getEventManager(eventName);
//is the player late to start the travel?
if(em.getProperty("docked") == "false") {
ms.getClient().getPlayer().warpAhead(toMap);
}
function start(ms) {
var em = ms.getClient().getEventManager(eventName);
//is the player late to start the travel?
if (em.getProperty("docked") == "false") {
ms.getClient().getPlayer().warpAhead(toMap);
}
}

View File

@@ -1,11 +1,11 @@
var eventName = "Cabin";
var toMap = 200090210;
function start(ms) {
var em = ms.getClient().getEventManager(eventName);
//is the player late to start the travel?
if(em.getProperty("docked") == "false") {
ms.getClient().getPlayer().warpAhead(toMap);
}
function start(ms) {
var em = ms.getClient().getEventManager(eventName);
//is the player late to start the travel?
if (em.getProperty("docked") == "false") {
ms.getClient().getPlayer().warpAhead(toMap);
}
}

View File

@@ -1,11 +1,11 @@
var eventName = "Genie";
var toMap = 200090410;
function start(ms) {
var em = ms.getClient().getEventManager(eventName);
//is the player late to start the travel?
if(em.getProperty("docked") == "false") {
ms.getClient().getPlayer().warpAhead(toMap);
}
function start(ms) {
var em = ms.getClient().getEventManager(eventName);
//is the player late to start the travel?
if (em.getProperty("docked") == "false") {
ms.getClient().getPlayer().warpAhead(toMap);
}
}

View File

@@ -1,11 +1,11 @@
var eventName = "AirPlane";
var toMap = 540010002;
function start(ms) {
var em = ms.getClient().getEventManager(eventName);
//is the player late to start the travel?
if(em.getProperty("docked") == "false") {
ms.getClient().getPlayer().warpAhead(toMap);
}
function start(ms) {
var em = ms.getClient().getEventManager(eventName);
//is the player late to start the travel?
if (em.getProperty("docked") == "false") {
ms.getClient().getPlayer().warpAhead(toMap);
}
}

View File

@@ -1,11 +1,11 @@
var eventName = "AirPlane";
var toMap = 540010101;
function start(ms) {
var em = ms.getClient().getEventManager(eventName);
//is the player late to start the travel?
if(em.getProperty("docked") == "false") {
ms.getClient().getPlayer().warpAhead(toMap);
}
function start(ms) {
var em = ms.getClient().getEventManager(eventName);
//is the player late to start the travel?
if (em.getProperty("docked") == "false") {
ms.getClient().getPlayer().warpAhead(toMap);
}
}

View File

@@ -1,11 +1,11 @@
var eventName = "Subway";
var toMap = 600010003;
function start(ms) {
var em = ms.getClient().getEventManager(eventName);
//is the player late to start the travel?
if(em.getProperty("docked") == "false") {
ms.getClient().getPlayer().warpAhead(toMap);
}
function start(ms) {
var em = ms.getClient().getEventManager(eventName);
//is the player late to start the travel?
if (em.getProperty("docked") == "false") {
ms.getClient().getPlayer().warpAhead(toMap);
}
}

View File

@@ -1,11 +1,11 @@
var eventName = "Subway";
var toMap = 600010005;
function start(ms) {
var em = ms.getClient().getEventManager(eventName);
//is the player late to start the travel?
if(em.getProperty("docked") == "false") {
ms.getClient().getPlayer().warpAhead(toMap);
}
function start(ms) {
var em = ms.getClient().getEventManager(eventName);
//is the player late to start the travel?
if (em.getProperty("docked") == "false") {
ms.getClient().getPlayer().warpAhead(toMap);
}
}

View File

@@ -1,17 +1,17 @@
function start(ms) {
const Point = Java.type('java.awt.Point');
var pos = new Point(461, 61);
var mobId = 9400612;
var mobName = "Marbas";
var player = ms.getPlayer();
var map = player.getMap();
const Point = Java.type('java.awt.Point');
var pos = new Point(461, 61);
var mobId = 9400612;
var mobName = "Marbas";
if(map.getMonsterById(mobId) != null){
return;
}
var player = ms.getPlayer();
var map = player.getMap();
const LifeFactory = Java.type('server.life.LifeFactory');
map.spawnMonsterOnGroundBelow(LifeFactory.getMonster(mobId), pos);
player.message(mobName + " has appeared!");
if (map.getMonsterById(mobId) != null) {
return;
}
const LifeFactory = Java.type('server.life.LifeFactory');
map.spawnMonsterOnGroundBelow(LifeFactory.getMonster(mobId), pos);
player.message(mobName + " has appeared!");
}

View File

@@ -1,17 +1,17 @@
function start(ms) {
const Point = Java.type('java.awt.Point');
var pos = new Point(467, 0);
var mobId = 9400610;
var mobName = "Amdusias";
var player = ms.getPlayer();
var map = player.getMap();
const Point = Java.type('java.awt.Point');
var pos = new Point(467, 0);
var mobId = 9400610;
var mobName = "Amdusias";
if(map.getMonsterById(mobId) != null){
return;
}
var player = ms.getPlayer();
var map = player.getMap();
const LifeFactory = Java.type('server.life.LifeFactory');
map.spawnMonsterOnGroundBelow(LifeFactory.getMonster(mobId), pos);
player.message(mobName + " has appeared!");
if (map.getMonsterById(mobId) != null) {
return;
}
const LifeFactory = Java.type('server.life.LifeFactory');
map.spawnMonsterOnGroundBelow(LifeFactory.getMonster(mobId), pos);
player.message(mobName + " has appeared!");
}

View File

@@ -1,17 +1,17 @@
function start(ms) {
const Point = Java.type('java.awt.Point');
var pos = new Point(201, 80);
var mobId = 9400609;
var mobName = "Andras";
var player = ms.getPlayer();
var map = player.getMap();
const Point = Java.type('java.awt.Point');
var pos = new Point(201, 80);
var mobId = 9400609;
var mobName = "Andras";
if(map.getMonsterById(mobId) != null){
return;
}
var player = ms.getPlayer();
var map = player.getMap();
const LifeFactory = Java.type('server.life.LifeFactory');
map.spawnMonsterOnGroundBelow(LifeFactory.getMonster(mobId), pos);
player.message(mobName + " has appeared!");
if (map.getMonsterById(mobId) != null) {
return;
}
const LifeFactory = Java.type('server.life.LifeFactory');
map.spawnMonsterOnGroundBelow(LifeFactory.getMonster(mobId), pos);
player.message(mobName + " has appeared!");
}

View File

@@ -1,17 +1,17 @@
function start(ms) {
const Point = Java.type('java.awt.Point');
var pos = new Point(171, 50);
var mobId = 9400611;
var mobName = "Crocell";
var player = ms.getPlayer();
var map = player.getMap();
const Point = Java.type('java.awt.Point');
var pos = new Point(171, 50);
var mobId = 9400611;
var mobName = "Crocell";
if(map.getMonsterById(mobId) != null){
return;
}
var player = ms.getPlayer();
var map = player.getMap();
const LifeFactory = Java.type('server.life.LifeFactory');
map.spawnMonsterOnGroundBelow(LifeFactory.getMonster(mobId), pos);
player.message(mobName + " has appeared!");
if (map.getMonsterById(mobId) != null) {
return;
}
const LifeFactory = Java.type('server.life.LifeFactory');
map.spawnMonsterOnGroundBelow(LifeFactory.getMonster(mobId), pos);
player.message(mobName + " has appeared!");
}

View File

@@ -1,17 +1,17 @@
function start(ms) {
const Point = Java.type('java.awt.Point');
var pos = new Point(251, -841);
var mobId = 9400613;
var mobName = "Valefor";
var player = ms.getPlayer();
var map = player.getMap();
const Point = Java.type('java.awt.Point');
var pos = new Point(251, -841);
var mobId = 9400613;
var mobName = "Valefor";
if(map.getMonsterById(mobId) != null){
return;
}
var player = ms.getPlayer();
var map = player.getMap();
const LifeFactory = Java.type('server.life.LifeFactory');
map.spawnMonsterOnGroundBelow(LifeFactory.getMonster(mobId), pos);
player.message(mobName + " has appeared!");
if (map.getMonsterById(mobId) != null) {
return;
}
const LifeFactory = Java.type('server.life.LifeFactory');
map.spawnMonsterOnGroundBelow(LifeFactory.getMonster(mobId), pos);
player.message(mobName + " has appeared!");
}

View File

@@ -1,17 +1,17 @@
function start(ms) {
const Point = Java.type('java.awt.Point');
var pos = new Point(842, 0);
var mobId = 9400633;
var mobName = "Astaroth";
var player = ms.getPlayer();
var map = player.getMap();
const Point = Java.type('java.awt.Point');
var pos = new Point(842, 0);
var mobId = 9400633;
var mobName = "Astaroth";
if(map.getMonsterById(mobId) != null){
return;
}
var player = ms.getPlayer();
var map = player.getMap();
const LifeFactory = Java.type('server.life.LifeFactory');
map.spawnMonsterOnGroundBelow(LifeFactory.getMonster(mobId), pos);
player.message(mobName + " has appeared!");
if (map.getMonsterById(mobId) != null) {
return;
}
const LifeFactory = Java.type('server.life.LifeFactory');
map.spawnMonsterOnGroundBelow(LifeFactory.getMonster(mobId), pos);
player.message(mobName + " has appeared!");
}

View File

@@ -20,6 +20,6 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
function start(ms) {
ms.setQuestProgress(21000, 21002, 1);
function start(ms) {
ms.setQuestProgress(21000, 21002, 1);
}

View File

@@ -1,8 +1,8 @@
function start(ms) {
var map = ms.getClient().getChannelServer().getMapFactory().getMap(922000000);
map.clearDrops();
map.resetReactors();
map.shuffleReactors();
var map = ms.getClient().getChannelServer().getMapFactory().getMap(922000000);
map.clearDrops();
map.resetReactors();
map.shuffleReactors();
return(true);
return (true);
}

View File

@@ -1,10 +1,10 @@
function start(ms){
var player = ms.getPlayer();
var map = player.getMap();
if(ms.isQuestStarted(21747) && ms.getQuestProgressInt(21747, 9300351) == 0) {
const LifeFactory = Java.type('server.life.LifeFactory');
const Point = Java.type('java.awt.Point');
map.spawnMonsterOnGroundBelow(LifeFactory.getMonster(9300351), new Point(897, 51));
}
function start(ms) {
var player = ms.getPlayer();
var map = player.getMap();
if (ms.isQuestStarted(21747) && ms.getQuestProgressInt(21747, 9300351) == 0) {
const LifeFactory = Java.type('server.life.LifeFactory');
const Point = Java.type('java.awt.Point');
map.spawnMonsterOnGroundBelow(LifeFactory.getMonster(9300351), new Point(897, 51));
}
}

View File

@@ -1,10 +1,10 @@
function start(ms) {
var map = ms.getClient().getChannelServer().getMapFactory().getMap(926000000);
map.resetPQ(1);
if(map.countMonster(9100013) == 0) {
map.spawnMonsterOnGroundBelow(LifeFactory.getMonster(9100013), new java.awt.Point(82, 200));
}
return(true);
function start(ms) {
var map = ms.getClient().getChannelServer().getMapFactory().getMap(926000000);
map.resetPQ(1);
if (map.countMonster(9100013) == 0) {
map.spawnMonsterOnGroundBelow(LifeFactory.getMonster(9100013), new java.awt.Point(82, 200));
}
return (true);
}

View File

@@ -18,8 +18,8 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
function start(ms) {
var map = ms.getClient().getChannelServer().getMapFactory().getMap(926000010);
map.resetPQ(1);
return(true);
function start(ms) {
var map = ms.getClient().getChannelServer().getMapFactory().getMap(926000010);
map.resetPQ(1);
return (true);
}

View File

@@ -1,6 +1,6 @@
function getInactiveReactors(map) {
var reactors = new Array();
var reactors = [];
var iter = map.getReactors().iterator();
while (iter.hasNext()) {
var mo = iter.next();
@@ -8,13 +8,13 @@ function getInactiveReactors(map) {
reactors.push(mo);
}
}
return reactors;
}
function start(ms) {
var map = ms.getClient().getChannelServer().getMapFactory().getMap(926120300);
map.resetReactors(getInactiveReactors(map));
return(true);
function start(ms) {
var map = ms.getClient().getChannelServer().getMapFactory().getMap(926120300);
map.resetReactors(getInactiveReactors(map));
return (true);
}

View File

@@ -1,6 +1,6 @@
function start(ms) {
var py = ms.getPyramid();
if (py != null) {
py.sendScore(ms.getPlayer());
}
var py = ms.getPyramid();
if (py != null) {
py.sendScore(ms.getPlayer());
}
}

View File

@@ -20,7 +20,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
function start(ms) {
ms.lockUI();
ms.showIntro("Effect/Direction4.img/PromiseDragon/Scene" + ms.getPlayer().getGender());
function start(ms) {
ms.lockUI();
ms.showIntro("Effect/Direction4.img/PromiseDragon/Scene" + ms.getPlayer().getGender());
}

View File

@@ -1,3 +1,3 @@
function start(ms) {
ms.setStandAloneMode(true);
function start(ms) {
ms.setStandAloneMode(true);
}

View File

@@ -1,3 +1,3 @@
function start(ms) {
ms.mapEffect("resistance/tutorialGuide");
function start(ms) {
ms.mapEffect("resistance/tutorialGuide");
}

View File

@@ -1,4 +1,4 @@
function start(ms) {
ms.updateAreaInfo(23007, "exp1=1;exp2=1;exp3=1;exp4=1");//force
ms.showInfo("Effect/OnUserEff.img/guideEffect/resistanceTutorial/userTalk");
function start(ms) {
ms.updateAreaInfo(23007, "exp1=1;exp2=1;exp3=1;exp4=1");//force
ms.showInfo("Effect/OnUserEff.img/guideEffect/resistanceTutorial/userTalk");
}

View File

@@ -1,3 +1,3 @@
function start(ms) {
ms.openNpc(2159012);
function start(ms) {
ms.openNpc(2159012);
}

View File

@@ -1,4 +1,4 @@
function start(ms) {
ms.setDirectionMode(false);
ms.openNpc(2159006);
function start(ms) {
ms.setDirectionMode(false);
ms.openNpc(2159006);
}

View File

@@ -1,3 +1,3 @@
function start(ms) {
ms.openNpc(2159007);
function start(ms) {
ms.openNpc(2159007);
}

View File

@@ -1,4 +1,4 @@
function start(ms) {
ms.setDirectionMode(true);
ms.showIntro("Effect/Direction4.img/Resistance/TalkJ");
function start(ms) {
ms.setDirectionMode(true);
ms.showIntro("Effect/Direction4.img/Resistance/TalkJ");
}

View File

@@ -1,3 +1,3 @@
function start(ms) {
ms.setDirectionMode(false);
function start(ms) {
ms.setDirectionMode(false);
}

View File

@@ -21,5 +21,5 @@
*/
function start(ms) {
ms.displayAranIntro();
ms.displayAranIntro();
}

View File

@@ -20,7 +20,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
function start(ms) {
ms.unlockUI();
ms.getClient().getQM().forceStartQuest(22015);
function start(ms) {
ms.unlockUI();
ms.getClient().getQM().forceStartQuest(22015);
}

View File

@@ -1,5 +1,5 @@
function start(ms) {
ms.setDirectionStatus(true);
ms.setDirectionStatus(true);
ms.showIntro("Effect/Direction4.img/cannonshooter/Scene00");
ms.showIntro("Effect/Direction4.img/cannonshooter/out00");
}

View File

@@ -1,5 +1,5 @@
function start(ms) {
ms.playSound("cannonshooter/flying");
ms.playSound("cannonshooter/flying");
ms.sendDirectionInfo("Effect/Direction4.img/effect/cannonshooter/balloon/0", 9000, 0, 0, 0, -1);
ms.sendDirectionInfo(1, 1500);
ms.setDirectionStatus(true);

View File

@@ -1,4 +1,4 @@
function start(ms) {
ms.lockUI();
ms.showIntro("Effect/Direction4.img/crash/Scene" + ms.getPlayer().getGender());
ms.lockUI();
ms.showIntro("Effect/Direction4.img/crash/Scene" + ms.getPlayer().getGender());
}

View File

@@ -21,5 +21,5 @@
*/
function start(ms) {
ms.displayCygnusIntro();
ms.displayCygnusIntro();
}

View File

@@ -19,6 +19,7 @@
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/>.
*/
/*
*@Author: Moogra, Traitor, Ronan
*@Map(s): All Dojo fighting maps
@@ -29,12 +30,12 @@
function start(ms) {
ms.getPlayer().resetEnteredScript();
var stage = Math.floor(ms.getPlayer().getMap().getId() / 100) % 100;
ms.getPlayer().showDojoClock();
if (stage % 6 > 0) {
var realstage = stage - ((stage / 6) | 0);
ms.dojoEnergy();
ms.playSound("Dojang/start");
ms.showEffect("dojang/start/stage");
ms.showEffect("dojang/start/number/" + realstage);

View File

@@ -28,10 +28,10 @@ var messages = Array("Your courage for challenging the Mu Lung Dojo is commendab
function start(ms) {
if (ms.getPlayer().getMap().getId() == 925020000) {
if(ms.getPlayer().getMap().findClosestPlayerSpawnpoint(ms.getPlayer().getPosition()).getId() == 0) {
if (ms.getPlayer().getMap().findClosestPlayerSpawnpoint(ms.getPlayer().getPosition()).getId() == 0) {
ms.getPlayer().startMapEffect(messages[(Math.random() * messages.length) | 0], 5120024);
}
ms.resetDojoEnergy();
} else {
ms.getPlayer().resetEnteredScript(); //in case the person dcs in here we set it at dojang_tuto portal

View File

@@ -20,6 +20,6 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
function start(ms) {
ms.unlockUI();
function start(ms) {
ms.unlockUI();
}

View File

@@ -25,24 +25,24 @@
*
*/
function start(ms) {
if (ms.getPlayer().getMapId() == 110000000 || (ms.getPlayer().getMapId() >= 100000000 && ms.getPlayer().getMapId() < 105040300)) {
ms.explorerQuest(29005, "Beginner Explorer");//Beginner Explorer
} else if (ms.getPlayer().getMapId() >= 105040300 && ms.getPlayer().getMapId() <= 105090900) {
ms.explorerQuest(29014, "Sleepywood Explorer");//Sleepywood Explorer
} else if (ms.getPlayer().getMapId() >= 200000000 && ms.getPlayer().getMapId() <= 211041800) {
ms.explorerQuest(29006, "El Nath Mts. Explorer");//El Nath Mts. Explorer
} else if (ms.getPlayer().getMapId() >= 220000000 && ms.getPlayer().getMapId() <= 222010400) {
ms.explorerQuest(29007, "Ludus Lake Explorer");//Ludus Lake Explorer
} else if (ms.getPlayer().getMapId() >= 230000000 && ms.getPlayer().getMapId() <= 230040401) {
ms.explorerQuest(29008, "Undersea Explorer");//Undersea Explorer
} else if (ms.getPlayer().getMapId() >= 250000000 && ms.getPlayer().getMapId() <= 251010500) {
ms.explorerQuest(29009, "Mu Lung Explorer");//Mu Lung Explorer
} else if (ms.getPlayer().getMapId() >= 260000000 && ms.getPlayer().getMapId() <= 261030000) {
ms.explorerQuest(29010, "Nihal Desert Explorer");//Nihal Desert Explorer
} else if (ms.getPlayer().getMapId() >= 240000000 && ms.getPlayer().getMapId() <= 240050000) {
ms.explorerQuest(29011, "Minar Forest Explorer");//Minar Forest Explorer
}
if (ms.getPlayer().getMapId() == 104000000) {
ms.mapEffect("maplemap/enter/104000000");
}
if (ms.getPlayer().getMapId() == 110000000 || (ms.getPlayer().getMapId() >= 100000000 && ms.getPlayer().getMapId() < 105040300)) {
ms.explorerQuest(29005, "Beginner Explorer");//Beginner Explorer
} else if (ms.getPlayer().getMapId() >= 105040300 && ms.getPlayer().getMapId() <= 105090900) {
ms.explorerQuest(29014, "Sleepywood Explorer");//Sleepywood Explorer
} else if (ms.getPlayer().getMapId() >= 200000000 && ms.getPlayer().getMapId() <= 211041800) {
ms.explorerQuest(29006, "El Nath Mts. Explorer");//El Nath Mts. Explorer
} else if (ms.getPlayer().getMapId() >= 220000000 && ms.getPlayer().getMapId() <= 222010400) {
ms.explorerQuest(29007, "Ludus Lake Explorer");//Ludus Lake Explorer
} else if (ms.getPlayer().getMapId() >= 230000000 && ms.getPlayer().getMapId() <= 230040401) {
ms.explorerQuest(29008, "Undersea Explorer");//Undersea Explorer
} else if (ms.getPlayer().getMapId() >= 250000000 && ms.getPlayer().getMapId() <= 251010500) {
ms.explorerQuest(29009, "Mu Lung Explorer");//Mu Lung Explorer
} else if (ms.getPlayer().getMapId() >= 260000000 && ms.getPlayer().getMapId() <= 261030000) {
ms.explorerQuest(29010, "Nihal Desert Explorer");//Nihal Desert Explorer
} else if (ms.getPlayer().getMapId() >= 240000000 && ms.getPlayer().getMapId() <= 240050000) {
ms.explorerQuest(29011, "Minar Forest Explorer");//Minar Forest Explorer
}
if (ms.getPlayer().getMapId() == 104000000) {
ms.mapEffect("maplemap/enter/104000000");
}
}

View File

@@ -1,4 +1,4 @@
function start(ms) {
ms.lockUI();
ms.showIntro("Effect/Direction4.img/getDragonEgg/Scene" + ms.getPlayer().getGender());
ms.lockUI();
ms.showIntro("Effect/Direction4.img/getDragonEgg/Scene" + ms.getPlayer().getGender());
}

View File

@@ -21,6 +21,6 @@
*/
function start(ms) {
ms.unlockUI();
ms.mapEffect("maplemap/enter/10000");
ms.unlockUI();
ms.mapEffect("maplemap/enter/10000");
}

View File

@@ -20,6 +20,6 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
function start(ms) {
ms.mapEffect("maplemap/enter/1000000");
function start(ms) {
ms.mapEffect("maplemap/enter/1000000");
}

View File

@@ -20,6 +20,6 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
function start(ms) {
ms.mapEffect("maplemap/enter/1010000");
function start(ms) {
ms.mapEffect("maplemap/enter/1010000");
}

View File

@@ -20,6 +20,6 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
function start(ms) {
ms.mapEffect("maplemap/enter/1010100");
function start(ms) {
ms.mapEffect("maplemap/enter/1010100");
}

View File

@@ -20,6 +20,6 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
function start(ms) {
ms.mapEffect("maplemap/enter/1010200");
function start(ms) {
ms.mapEffect("maplemap/enter/1010200");
}

View File

@@ -20,6 +20,6 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
function start(ms) {
ms.mapEffect("maplemap/enter/1010300");
function start(ms) {
ms.mapEffect("maplemap/enter/1010300");
}

View File

@@ -1,4 +1,4 @@
function start(ms) {
ms.unlockUI();
ms.mapEffect("maplemap/enter/1020000");
ms.unlockUI();
ms.mapEffect("maplemap/enter/1020000");
}

View File

@@ -20,7 +20,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
function start(ms) {
ms.unlockUI();
ms.mapEffect("maplemap/enter/20000");
function start(ms) {
ms.unlockUI();
ms.mapEffect("maplemap/enter/20000");
}

View File

@@ -20,6 +20,6 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
function start(ms) {
ms.mapEffect("maplemap/enter/30000");
function start(ms) {
ms.mapEffect("maplemap/enter/30000");
}

View File

@@ -20,6 +20,6 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
function start(ms) {
ms.mapEffect("maplemap/enter/40000");
function start(ms) {
ms.mapEffect("maplemap/enter/40000");
}

View File

@@ -20,6 +20,6 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
function start(ms) {
ms.mapEffect("maplemap/enter/50000");
function start(ms) {
ms.mapEffect("maplemap/enter/50000");
}

View File

@@ -21,5 +21,5 @@
*/
function start(ms) {
ms.goAdventure();
ms.goAdventure();
}

View File

@@ -21,5 +21,5 @@
*/
function start(ms) {
ms.startExplorerExperience();
ms.startExplorerExperience();
}

View File

@@ -21,5 +21,5 @@
*/
function start(ms) {
ms.goLith();
ms.goLith();
}

View File

@@ -21,5 +21,5 @@
*/
function start(ms) {
ms.startExplorerExperience();
ms.startExplorerExperience();
}

View File

@@ -21,5 +21,5 @@
*/
function start(ms) {
ms.startExplorerExperience();
ms.startExplorerExperience();
}

View File

@@ -21,5 +21,5 @@
*/
function start(ms) {
ms.startExplorerExperience();
ms.startExplorerExperience();
}

View File

@@ -21,5 +21,5 @@
*/
function start(ms) {
ms.startExplorerExperience();
ms.startExplorerExperience();
}

View File

@@ -25,5 +25,5 @@
*
*/
function start(ms) {
ms.touchTheSky();
ms.touchTheSky();
}

View File

@@ -1,9 +1,9 @@
function start(ms) {
ms.teachSkill(20000014, -1, 0, -1);
ms.teachSkill(20000015, -1, 0, -1);
ms.teachSkill(20000016, -1, 0, -1);
ms.teachSkill(20000017, -1, 0, -1);
ms.teachSkill(20000018, -1, 0, -1);
ms.unlockUI();
ms.showIntro("Effect/Direction1.img/aranTutorial/ClickLilin");
ms.teachSkill(20000014, -1, 0, -1);
ms.teachSkill(20000015, -1, 0, -1);
ms.teachSkill(20000016, -1, 0, -1);
ms.teachSkill(20000017, -1, 0, -1);
ms.teachSkill(20000018, -1, 0, -1);
ms.unlockUI();
ms.showIntro("Effect/Direction1.img/aranTutorial/ClickLilin");
}

View File

@@ -20,7 +20,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
function start(ms) {
ms.lockUI();
ms.showIntro("Effect/Direction4.img/meetWithDragon/Scene" + ms.getPlayer().getGender());
function start(ms) {
ms.lockUI();
ms.showIntro("Effect/Direction4.img/meetWithDragon/Scene" + ms.getPlayer().getGender());
}

View File

@@ -1,9 +1,9 @@
function start(ms){
var mobId = 3300000 + (Math.floor(Math.random() * 3) + 5);
var player = ms.getPlayer();
var map = player.getMap();
function start(ms) {
var mobId = 3300000 + (Math.floor(Math.random() * 3) + 5);
var player = ms.getPlayer();
var map = player.getMap();
const LifeFactory = Java.type('server.life.LifeFactory');
const Point = Java.type('java.awt.Point');
map.spawnMonsterOnGroundBelow(LifeFactory.getMonster(mobId), new Point(-28, -67));
const LifeFactory = Java.type('server.life.LifeFactory');
const Point = Java.type('java.awt.Point');
map.spawnMonsterOnGroundBelow(LifeFactory.getMonster(mobId), new Point(-28, -67));
}

View File

@@ -1,6 +1,6 @@
function start(ms) {
if (ms.isQuestCompleted(21101) && ms.containsAreaInfo(21019, "miss=o;arr=o;helper=clear")) {
ms.updateAreaInfo(21019, "miss=o;arr=o;ck=1;helper=clear");
}
ms.unlockUI();
if (ms.isQuestCompleted(21101) && ms.containsAreaInfo(21019, "miss=o;arr=o;helper=clear")) {
ms.updateAreaInfo(21019, "miss=o;arr=o;ck=1;helper=clear");
}
ms.unlockUI();
}

View File

@@ -1,6 +1,6 @@
function start(ms) {
if (ms.containsAreaInfo(21019, "miss=o;helper=clear")) {
ms.updateAreaInfo(21019, "miss=o;arr=o;helper=clear");
ms.showInfo("Effect/OnUserEff.img/guideEffect/aranTutorial/tutorialArrow3");
}
if (ms.containsAreaInfo(21019, "miss=o;helper=clear")) {
ms.updateAreaInfo(21019, "miss=o;arr=o;helper=clear");
ms.showInfo("Effect/OnUserEff.img/guideEffect/aranTutorial/tutorialArrow3");
}
}

View File

@@ -1,5 +1,5 @@
function start(ms) {
if (ms.getJobId() == 1000 && ms.getLevel() >= 10) {
ms.unlockUI();
}
if (ms.getJobId() == 1000 && ms.getLevel() >= 10) {
ms.unlockUI();
}
}