Alliances & Pet autopot improvement + Crafters patch
Improved Alliance invitations now using "invite popups" just like buddy, party and guild invites. Pet autopot now properly uses up pots from the inventory, fetching from other inventory slots when one place has been completely used up but the "stop criteria" hasn't been fulfilled yet. Pet autopot now properly detects pots with healing factor defined by the character's pool. Fixed old exploit with mineral/jewel crafters. Patched Doorway's questlines.
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
importPackage(Packages.server.life);
|
||||
|
||||
function start(ms) {
|
||||
|
||||
var pos = new java.awt.Point(461, 61);
|
||||
var mobId = 9400612;
|
||||
var mobName = "Marbas";
|
||||
|
||||
var player = ms.getPlayer();
|
||||
var map = player.getMap();
|
||||
|
||||
@@ -10,6 +12,6 @@ function start(ms) {
|
||||
return;
|
||||
}
|
||||
|
||||
map.spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(mobId), new java.awt.Point(461, 61));
|
||||
player.message("Marbas has appeared!");
|
||||
map.spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(mobId), pos);
|
||||
player.message(mobName + " has appeared!");
|
||||
}
|
||||
17
scripts/map/onUserEnter/677000003.js
Normal file
17
scripts/map/onUserEnter/677000003.js
Normal file
@@ -0,0 +1,17 @@
|
||||
importPackage(Packages.server.life);
|
||||
|
||||
function start(ms) {
|
||||
var pos = new java.awt.Point(467, 0);
|
||||
var mobId = 9400610;
|
||||
var mobName = "Amdusias";
|
||||
|
||||
var player = ms.getPlayer();
|
||||
var map = player.getMap();
|
||||
|
||||
if(map.getMonsterById(mobId) != null){
|
||||
return;
|
||||
}
|
||||
|
||||
map.spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(mobId), pos);
|
||||
player.message(mobName + " has appeared!");
|
||||
}
|
||||
17
scripts/map/onUserEnter/677000005.js
Normal file
17
scripts/map/onUserEnter/677000005.js
Normal file
@@ -0,0 +1,17 @@
|
||||
importPackage(Packages.server.life);
|
||||
|
||||
function start(ms) {
|
||||
var pos = new java.awt.Point(201, 80);
|
||||
var mobId = 9400609;
|
||||
var mobName = "Andras";
|
||||
|
||||
var player = ms.getPlayer();
|
||||
var map = player.getMap();
|
||||
|
||||
if(map.getMonsterById(mobId) != null){
|
||||
return;
|
||||
}
|
||||
|
||||
map.spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(mobId), pos);
|
||||
player.message(mobName + " has appeared!");
|
||||
}
|
||||
17
scripts/map/onUserEnter/677000007.js
Normal file
17
scripts/map/onUserEnter/677000007.js
Normal file
@@ -0,0 +1,17 @@
|
||||
importPackage(Packages.server.life);
|
||||
|
||||
function start(ms) {
|
||||
var pos = new java.awt.Point(171, 50);
|
||||
var mobId = 9400611;
|
||||
var mobName = "Crocell";
|
||||
|
||||
var player = ms.getPlayer();
|
||||
var map = player.getMap();
|
||||
|
||||
if(map.getMonsterById(mobId) != null){
|
||||
return;
|
||||
}
|
||||
|
||||
map.spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(mobId), pos);
|
||||
player.message(mobName + " has appeared!");
|
||||
}
|
||||
@@ -1,13 +1,17 @@
|
||||
importPackage(Packages.server.life);
|
||||
|
||||
function start(ms) {
|
||||
spawnMob(251, -841, 9400613, ms.getPlayer().getMap());
|
||||
}
|
||||
function start(ms) {
|
||||
var pos = new java.awt.Point(251, -841);
|
||||
var mobId = 9400613;
|
||||
var mobName = "Valefor";
|
||||
|
||||
var player = ms.getPlayer();
|
||||
var map = player.getMap();
|
||||
|
||||
function spawnMob(x, y, id, map) {
|
||||
if(map.getMonsterById(id) != null)
|
||||
return;
|
||||
|
||||
var mob = MapleLifeFactory.getMonster(id);
|
||||
map.spawnMonsterOnGroundBelow(mob, new java.awt.Point(x, y));
|
||||
if(map.getMonsterById(mobId) != null){
|
||||
return;
|
||||
}
|
||||
|
||||
map.spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(mobId), pos);
|
||||
player.message(mobName + " has appeared!");
|
||||
}
|
||||
@@ -106,7 +106,7 @@ function action(mode, type, selection) {
|
||||
if (selectedType != 4)
|
||||
selectedItem = selection;
|
||||
else
|
||||
qty = selection;
|
||||
qty = (selection > 0) ? selection : (-selection <= 0 ? 1 : -selection);
|
||||
if (selectedType == 0) { //bow refine
|
||||
var matSet = [[4003001,4000000],[4011001,4003000],[4003001,4000016],[4011001,4021006,4003000],[4011001,4011006,4021003,4021006,4003000],[4011004,4021000,4021004,4003000],[4021008,4011001,4011006,4003000,4000014]];
|
||||
var matQtySet = [[5,30],[1,3],[30,50],[2,2,8],[5,5,3,3,30],[7,6,3,35],[1,10,3,40,50]];
|
||||
|
||||
@@ -136,7 +136,7 @@ function action(mode, type, selection) {
|
||||
qty = 1;
|
||||
}
|
||||
else
|
||||
qty = selection;
|
||||
qty = (selection > 0) ? selection : (-selection <= 0 ? 1 : -selection);
|
||||
|
||||
if (selectedType == 2){ //helmet refine
|
||||
var itemSet = new Array(1002042,1002041,1002002,1002044,1002003,1002040,1002007,1002052,1002011,1002058,1002009,1002056,1002087,1002088,1002050,1002049,1002047,1002048,1002099,1002098,1002085,1002028,1002022,1002101);
|
||||
|
||||
@@ -116,7 +116,7 @@ function action(mode, type, selection) {
|
||||
qty = 1;
|
||||
}
|
||||
else
|
||||
qty = selection;
|
||||
qty = (selection > 0) ? selection : (-selection <= 0 ? 1 : -selection);
|
||||
|
||||
if (selectedType == 0){ //glove refine
|
||||
var itemSet = new Array(1082003,1082000,1082004,1082001,1082007,1082008,1082023,1082009,1082059);
|
||||
|
||||
56
scripts/npc/1040000.js
Normal file
56
scripts/npc/1040000.js
Normal file
@@ -0,0 +1,56 @@
|
||||
/*
|
||||
This file is part of the HeavenMS (MapleSolaxiaV2) MapleStory Server
|
||||
Copyleft (L) 2017 RonanLana
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as
|
||||
published by the Free Software Foundation version 3 as published by
|
||||
the Free Software Foundation. You may not use, modify or distribute
|
||||
this program under any other version of the GNU Affero General Public
|
||||
License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
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/>.
|
||||
*/
|
||||
|
||||
var status;
|
||||
|
||||
function start() {
|
||||
status = -1;
|
||||
action(1, 0, 0);
|
||||
}
|
||||
|
||||
function action(mode, type, selection) {
|
||||
if (mode == -1) {
|
||||
cm.dispose();
|
||||
} else {
|
||||
if (mode == 0 && type > 0) {
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
if (mode == 1)
|
||||
status++;
|
||||
else
|
||||
status--;
|
||||
|
||||
if(status == 0) {
|
||||
if(cm.isQuestStarted(28177) && !cm.haveItem(4032479)) {
|
||||
if(cm.canHold(4032479)) {
|
||||
cm.gainItem(4032479, 1);
|
||||
cm.sendOk("Huh, are you looking for me? Chief Stan sent you here, right? But hey, I am not the suspect you seek. If I have some proof? Here, take this and return it to #b#p1012003##k.");
|
||||
} else {
|
||||
cm.sendOk("Hey, make a slot available before talking to me.");
|
||||
}
|
||||
} else {
|
||||
cm.sendOk("Zzzzzz...");
|
||||
}
|
||||
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -138,7 +138,7 @@ function action(mode, type, selection) {
|
||||
qty = 1;
|
||||
}
|
||||
else
|
||||
qty = selection;
|
||||
qty = (selection > 0) ? selection : (-selection <= 0 ? 1 : -selection);
|
||||
|
||||
if (selectedType == 0){ //glove refine
|
||||
var itemSet = new Array(1082002,1082029,1082030,1082031,1082032,1082037,1082042,1082046,1082075,1082065,1082092);
|
||||
|
||||
@@ -129,7 +129,7 @@ function action(mode, type, selection) {
|
||||
qty = 1;
|
||||
}
|
||||
else
|
||||
qty = selection;
|
||||
qty = (selection > 0) ? selection : (-selection <= 0 ? 1 : -selection);
|
||||
|
||||
last_use = false;
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ function action(mode, type, selection) {
|
||||
qty = 1;
|
||||
}
|
||||
else
|
||||
qty = selection;
|
||||
qty = (selection > 0) ? selection : (-selection <= 0 ? 1 : -selection);
|
||||
|
||||
if (selectedType == 0){ //Making a Knuckler
|
||||
var itemSet = new Array(1482001, 1482002, 1482003, 1482004, 1482005, 1482006, 1482007);
|
||||
|
||||
@@ -30,6 +30,33 @@ No specific function, useless text.
|
||||
*/
|
||||
|
||||
function start() {
|
||||
cm.sendOk("(Scratch scratch...)");
|
||||
cm.dispose();
|
||||
status = -1;
|
||||
action(1, 0, 0);
|
||||
}
|
||||
|
||||
function action(mode, type, selection) {
|
||||
if (mode == -1) {
|
||||
cm.dispose();
|
||||
} else {
|
||||
if (mode == 0 && type > 0) {
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
if (mode == 1)
|
||||
status++;
|
||||
else
|
||||
status--;
|
||||
|
||||
if(status == 0) {
|
||||
if(!cm.haveItem(4220153)) {
|
||||
cm.sendOk("(Scratch scratch...)");
|
||||
cm.dispose();
|
||||
} else {
|
||||
cm.sendYesNo("Hey, nice #bTreasure Map#k you have there? #rCan I keep it#k for the Nautilus crew, if you don't need it any longer?");
|
||||
}
|
||||
} else if(status == 1) {
|
||||
cm.gainItem(4220153, -1);
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -182,7 +182,7 @@ function action(mode, type, selection) {
|
||||
qty = 1;
|
||||
}
|
||||
else
|
||||
qty = selection;
|
||||
qty = (selection > 0) ? selection : (-selection <= 0 ? 1 : -selection);
|
||||
|
||||
if (selectedType == 5){ //arrow refine
|
||||
var itemSet = new Array(2060000,2061000,2060001,2061001,2060002,2061002);
|
||||
|
||||
@@ -196,7 +196,7 @@ function action(mode, type, selection) {
|
||||
qty = 1;
|
||||
}
|
||||
else
|
||||
qty = selection;
|
||||
qty = (selection > 0) ? selection : (-selection <= 0 ? 1 : -selection);
|
||||
|
||||
var prompt = "You want me to make ";
|
||||
if (qty == 1)
|
||||
|
||||
@@ -120,7 +120,7 @@ function action(mode, type, selection) {
|
||||
qty = 1;
|
||||
}
|
||||
else
|
||||
qty = selection;
|
||||
qty = (selection > 0) ? selection : (-selection <= 0 ? 1 : -selection);
|
||||
|
||||
var prompt = "You want me to make ";
|
||||
if (qty == 1)
|
||||
|
||||
@@ -43,7 +43,7 @@ function action(mode, type, selection) {
|
||||
cm.warp(270050000);
|
||||
}
|
||||
else {
|
||||
cm.sendOk("You cannot receive an event prize without having an empty room in your EQUIP, USE, SET-UP or ETC inventory.");
|
||||
cm.sendOk("You cannot receive an event prize without having an empty room in your EQUIP, USE, SET-UP and ETC inventory.");
|
||||
}
|
||||
|
||||
cm.dispose();
|
||||
|
||||
@@ -58,7 +58,7 @@ function action(mode, type, selection) {
|
||||
}
|
||||
|
||||
else if (status == 3) {
|
||||
qty = selection;
|
||||
qty = (selection > 0) ? selection : (-selection <= 0 ? 1 : -selection);
|
||||
last_use = false;
|
||||
|
||||
var prompt = "You want us to make ";
|
||||
|
||||
@@ -58,7 +58,7 @@ function action(mode, type, selection) {
|
||||
}
|
||||
|
||||
else if (status == 3) {
|
||||
qty = selection;
|
||||
qty = (selection > 0) ? selection : (-selection <= 0 ? 1 : -selection);
|
||||
last_use = false;
|
||||
|
||||
var prompt = "So, you want me to make ";
|
||||
|
||||
30
scripts/npc/9201128.js
Normal file
30
scripts/npc/9201128.js
Normal file
@@ -0,0 +1,30 @@
|
||||
var map = 677000004;
|
||||
var quest = 28179;
|
||||
var status = -1;
|
||||
|
||||
function start(mode, type, selection) {
|
||||
action(1, 0, 0);
|
||||
}
|
||||
|
||||
function action(mode, type, selection) {
|
||||
if (mode == 1) {
|
||||
status++;
|
||||
} else {
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
if (status == 0) {
|
||||
if (cm.isQuestStarted(quest)) {
|
||||
cm.sendYesNo("Would you like to move to #b#m" + map + "##k?");
|
||||
} else {
|
||||
cm.sendOk("The entrance is blocked by a strange force.");
|
||||
cm.dispose();
|
||||
}
|
||||
} else {
|
||||
if(cm.haveItem(4001341, 1)) cm.gainItem(4001341, -1);
|
||||
if(cm.haveItem(4032478, 1)) cm.gainItem(4032478, -1);
|
||||
|
||||
cm.warp(map, 0);
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
@@ -1,61 +1,27 @@
|
||||
/*
|
||||
Demon's Doorway
|
||||
Marbas the Demon! Quest
|
||||
Victoria Road: The Tree That Grew III
|
||||
*/
|
||||
var map = 677000000;
|
||||
var quest = 28198;
|
||||
var status = -1;
|
||||
|
||||
var status;
|
||||
|
||||
function start(){
|
||||
status = -1;
|
||||
function start(mode, type, selection) {
|
||||
action(1, 0, 0);
|
||||
}
|
||||
|
||||
function action(mode, type, selection){
|
||||
if (mode == -1){
|
||||
cm.dispose();
|
||||
}
|
||||
else{
|
||||
if (mode == 0 && status ==0){
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
|
||||
if (mode == 1)
|
||||
status++;
|
||||
else
|
||||
status--;
|
||||
|
||||
if (status == 0){
|
||||
cm.sendNext("#r\t[Requirements to Enter]\r\n\r\n\t\t1.#k Job must be Magician or Blaze Wizard.\r\n\t\t#r2.#k Must be under level 40.\r\n\t\t#r3.#k Must have #b#t4032495##k.");
|
||||
}
|
||||
else if (status == 1){
|
||||
var jobId = cm.getJobId();
|
||||
|
||||
if ((jobId >= 200 && jobId <= 232) || (jobId >= 1100 && jobId <= 1112)){
|
||||
if (cm.getLevel() < 40){
|
||||
if (cm.hasItem(4032495)){
|
||||
cm.sendYesNo("#kAll conditions have been satisfied. Do you wish to enter?");
|
||||
}
|
||||
else{
|
||||
cm.sendOk("\t\tYou do not have #b#t4032495# #i4032495#");
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
else{
|
||||
cm.sendOk("\tYour #blevel#k is too high.");
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
else{
|
||||
cm.sendOk("\tThis is not for you! #rBegone#k you fool!");
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
else if (status == 2){
|
||||
cm.warp(677000000, 2);
|
||||
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
function action(mode, type, selection) {
|
||||
if (mode == 1) {
|
||||
status++;
|
||||
} else {
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
if (status == 0) {
|
||||
if (cm.isQuestStarted(quest)) {
|
||||
cm.sendYesNo("Would you like to move to #b#m" + map + "##k?");
|
||||
} else {
|
||||
cm.sendOk("The entrance is blocked by a strange force.");
|
||||
cm.dispose();
|
||||
}
|
||||
} else {
|
||||
cm.warp(map, 0);
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,5 @@
|
||||
var map = 677000008;
|
||||
var quest = 28219;
|
||||
var status = -1;
|
||||
|
||||
function start(mode, type, selection) {
|
||||
@@ -12,16 +14,17 @@ function action(mode, type, selection) {
|
||||
return;
|
||||
}
|
||||
if (status == 0) {
|
||||
if (cm.isQuestStarted(28219)) {
|
||||
cm.sendYesNo("Would you like to move to Valefor's Strolling Place?");
|
||||
} else {
|
||||
cm.sendOk("The entrance is blocked by a strange force.");
|
||||
cm.dispose();
|
||||
}
|
||||
if (cm.isQuestStarted(quest)) {
|
||||
cm.sendYesNo("Would you like to move to #b#m" + map + "##k?");
|
||||
} else {
|
||||
cm.sendOk("The entrance is blocked by a strange force.");
|
||||
cm.dispose();
|
||||
}
|
||||
} else {
|
||||
if(cm.haveItem(4032485, 1)) cm.gainItem(4032485, -1);
|
||||
if(cm.haveItem(4001355, 1)) cm.gainItem(4001355, -1);
|
||||
cm.warp(677000008,0);
|
||||
|
||||
cm.warp(map, 0);
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
31
scripts/npc/9201131.js
Normal file
31
scripts/npc/9201131.js
Normal file
@@ -0,0 +1,31 @@
|
||||
var map = 677000002;
|
||||
var quest = 28238;
|
||||
var status = -1;
|
||||
|
||||
function start(mode, type, selection) {
|
||||
action(1, 0, 0);
|
||||
}
|
||||
|
||||
function action(mode, type, selection) {
|
||||
if (mode == 1) {
|
||||
status++;
|
||||
} else {
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
if (status == 0) {
|
||||
if (cm.isQuestStarted(quest)) {
|
||||
cm.sendYesNo("Would you like to move to #b#m" + map + "##k?");
|
||||
} else {
|
||||
cm.sendOk("The entrance is blocked by a strange force.");
|
||||
cm.dispose();
|
||||
}
|
||||
} else {
|
||||
if(cm.haveItem(4032481, 1)) cm.gainItem(4032481, -1);
|
||||
if(cm.haveItem(4032482, 1)) cm.gainItem(4032482, -1);
|
||||
if(cm.haveItem(4032483, 1)) cm.gainItem(4032483, -1);
|
||||
|
||||
cm.warp(map, 0);
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
34
scripts/npc/9201132.js
Normal file
34
scripts/npc/9201132.js
Normal file
@@ -0,0 +1,34 @@
|
||||
var map = 677000006;
|
||||
var quest = 28256;
|
||||
var status = -1;
|
||||
|
||||
function start(mode, type, selection) {
|
||||
action(1, 0, 0);
|
||||
}
|
||||
|
||||
function action(mode, type, selection) {
|
||||
if (mode == 1) {
|
||||
status++;
|
||||
} else {
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
if (status == 0) {
|
||||
if (cm.isQuestStarted(quest)) {
|
||||
cm.sendYesNo("Would you like to move to #b#m" + map + "##k?");
|
||||
} else {
|
||||
cm.sendOk("The entrance is blocked by a strange force.");
|
||||
cm.dispose();
|
||||
}
|
||||
} else {
|
||||
if(cm.haveItem(4001362, 1)) cm.gainItem(4001362, -cm.getItemQuantity(4001362));
|
||||
if(cm.haveItem(4001363, 1)) cm.gainItem(4001363, -cm.getItemQuantity(4001363));
|
||||
if(cm.haveItem(4032486, 1)) cm.gainItem(4032486, -1);
|
||||
if(cm.haveItem(4032488, 1)) cm.gainItem(4032488, -1);
|
||||
if(cm.haveItem(4032489, 1)) cm.gainItem(4032489, -1);
|
||||
if(cm.haveItem(4220153, 1)) cm.gainItem(4220153, -1);
|
||||
|
||||
cm.warp(map, 0);
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
@@ -32,12 +32,12 @@ function enter(pi) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if(pi.getPlayer().getEventInstance().giveEventReward(pi.getPlayer(), evLevel)) {
|
||||
if(!pi.getPlayer().getEventInstance().giveEventReward(pi.getPlayer(), evLevel)) {
|
||||
pi.warp(970030000);
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
pi.message("You cannot receive an event prize without having an empty room in your EQUIP, USE, SET-UP or ETC inventory.");
|
||||
pi.message("Make a room available on all EQUIP, USE, SET-UP and ETC inventory to claim an event prize.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
3
scripts/reactor/1202003.js
Normal file
3
scripts/reactor/1202003.js
Normal file
@@ -0,0 +1,3 @@
|
||||
function act() {
|
||||
rm.dropItems();
|
||||
}
|
||||
3
scripts/reactor/1202004.js
Normal file
3
scripts/reactor/1202004.js
Normal file
@@ -0,0 +1,3 @@
|
||||
function act() {
|
||||
rm.dropItems();
|
||||
}
|
||||
Reference in New Issue
Block a user