Reworked Autoassigner & Hero's Will & Trade + Visual NX + New commands

Reworked autoassigner (improved limits between required secondary and
surplus primary stats). Hero's will removes most of diseases, tonic
removes slow. Added visual info for collected NX cards. Added commands
cake (cake boss with customizable HP) and setgmlevel. Reworked Trade
system now checking for slots smartly (instead of just checking for
empty slots).
This commit is contained in:
ronancpl
2017-09-01 01:20:01 -03:00
parent 001125ccdb
commit 74b4ca4132
179 changed files with 36378 additions and 35614 deletions

View File

@@ -22,29 +22,47 @@
/* Ms. Tan
Henesys Skin Change.
*/
var status = 0;
var status;
var skin = Array(0, 1, 2, 3, 4);
var price = 1000000;
function start() {
cm.sendSimple("Well, hello! Welcome to the Henesys Skin-Care! Would you like to have a firm, tight, healthy looking skin like mine? With a #b#t5153000##k, you can let us take care of the rest and have the kind of skin you've always wanted~!\r\n#L1#I would like to buy a #b#t5153000##k for " + price + " mesos, please!#l\r\n\#L2#I already have a Coupon!#l");
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode < 1)
cm.dispose();
else {
status++;
if (status == 1)
cm.sendStyle("With our specialized machine, you can see yourself after the treatment in advance. What kind of skin-treatment would you like to do? Choose the style of your liking.", skin);
else {
if (cm.haveItem(5153000)){
cm.gainItem(5153000, -1);
cm.setSkin(selection);
cm.sendOk("Enjoy your new and improved skin!");
} else
cm.sendOk("Um... you don't have the skin-care coupon you need to receive the treatment. Sorry, but I am afraid we can't do it for you...");
cm.dispose();
if (mode == -1) {
cm.dispose();
} else {
if (mode == 0 && type > 0) {
cm.dispose();
return;
}
if (mode == 1)
status++;
else
status--;
if (status == 0) {
cm.sendSimple("Well, hello! Welcome to the Henesys Skin-Care! Would you like to have a firm, tight, healthy looking skin like mine? With a #b#t5153000##k, you can let us take care of the rest and have the kind of skin you've always wanted~!\r\n#L1#I already have a Coupon!#l");
}
else if (status == 1) {
if (cm.haveItem(5153000)){
cm.sendStyle("With our specialized machine, you can see yourself after the treatment in advance. What kind of skin-treatment would you like to do? Choose the style of your liking.", skin);
} else {
cm.sendOk("Um... you don't have the skin-care coupon you need to receive the treatment. Sorry, but I am afraid we can't do it for you...");
cm.dispose();
return;
}
}
else {
cm.gainItem(5153000, -1);
cm.setSkin(selection);
cm.sendOk("Enjoy your new and improved skin!");
cm.dispose();
}
}
}
}

13
scripts/npc/1012115.js Normal file
View File

@@ -0,0 +1,13 @@
function start() {
var status = cm.getQuestStatus(20706);
if (status == 0) {
cm.sendNext("It looks like there's nothing suspicious in the area.");
} else if (status == 1) {
cm.forceCompleteQuest(20706);
cm.sendNext("You have spotted the shadow! Better report to #p1103001#.");
} else if (status == 2) {
cm.sendNext("The shadow has already been spotted. Better report to #p1103001#.");
}
cm.dispose();
}

4
scripts/npc/1012116.js Normal file
View File

@@ -0,0 +1,4 @@
function start() {
cm.sendNext("It looks like there's nothing suspecious in the area.");
cm.dispose();
}

81
scripts/npc/1012117.js Normal file
View File

@@ -0,0 +1,81 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
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/>.
*/
/*
NPC Name: Big Headward
Map(s): Victoria Road : Henesys Hair Salon (100000104)
Description: Random haircut
*/
var status = 0;
var mhair = Array(30040, 30050, 30100, 30130, 30180, 30220, 30260, 30330, 30350, 30580);
var fhair = Array(31020, 31160, 31180, 31220, 31290, 31330, 31420, 31440, 31480, 31590);
var hairnew = Array();
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) {
cm.sendSimple("If you use this regular coupon, your hair may transform into a random new look...do you still want to do it using #b#t5150040##k, I will do it anyways for you. But don't forget, it will be random!\r\n\#L2#OK! (Uses #i5150040# #t5150040#)#l");
} else if (status == 1) {
cm.sendYesNo("If you use the EXP coupon your hair will change RANDOMLY with a chance to obtain a new experimental style that even you didn't think was possible. Are you going to use #b#t5150040##k and really change your hairstyle?");
}
else if (status == 2) {
if (cm.haveItem(5150040) == true){
hairnew = Array();
if (cm.getPlayer().getGender() == 0) {
for(var i = 0; i < mhair.length; i++) {
hairnew.push(mhair[i] + parseInt(cm.getPlayer().getHair() % 10));
}
}
else {
for(var i = 0; i < fhair.length; i++) {
hairnew.push(fhair[i] + parseInt(cm.getPlayer().getHair() % 10));
}
}
cm.gainItem(5150040, -1);
cm.setHair(hairnew[Math.floor(Math.random() * hairnew.length)]);
cm.sendOk("Enjoy your new and improved hairstyle!");
} else {
cm.sendOk("Hmmm...it looks like you don't have our designated coupon...I'm afraid I can't give you a haircut without it. I'm sorry...");
}
cm.dispose();
}
}
}

61
scripts/npc/1052012.js Normal file
View File

@@ -0,0 +1,61 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
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/>.
*/
/*
NPC ID: 1052012
NPC NAME: Mong from Kong
@author Ronan
*/
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) {
cm.sendYesNo("So, are you going to use the Internet Cafe? There is a fee to use the spaces there, that is #b5,000 mesos#k. Are you going to enter the Cafe?");
} else if(status == 1) {
if(cm.getMeso() < 5000) {
cm.sendOk("Oh, you don't have the money, right? Sorry, I can't let you in.");
} else {
cm.warp(193000000);
}
cm.dispose();
}
}
}

32
scripts/npc/1052013.js Normal file
View File

@@ -0,0 +1,32 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
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/>.
*/
/*
NPC ID: 1052013
NPC NAME: Computer
@author Vcoc
*/
function start() {
cm.sendOk("MapleStory.exe stopped working... Please, restart the game.");
cm.dispose();
}

32
scripts/npc/1052014.js Normal file
View File

@@ -0,0 +1,32 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
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/>.
*/
/*
NPC ID: 1052014
NPC NAME: Vending Machine
@author Vcoc
*/
function start() {
cm.sendOk("At the moment, the machine is empty...");
cm.dispose();
}

32
scripts/npc/1052015.js Normal file
View File

@@ -0,0 +1,32 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
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/>.
*/
/*
NPC ID: 1052015
NPC NAME: Billy
@author Vcoc
*/
function start() {
cm.sendOk("Do you keep seeing blue screen? Ahhh... then restart the computer.");
cm.dispose();
}

View File

@@ -97,11 +97,13 @@ function action(mode, type, selection) {
if(avDojo < 0) {
if(avDojo == -1) cm.sendOk("All Dojo's are being used already. Wait for awhile before trying again.");
else cm.sendOk("Your party is already using the dojo. Wait for them to finish to enter.");
else cm.sendOk("Either your party is already using the Dojo or your party's allotted time on the Dojo has not expired yet. Wait for them to finish to enter.");
}
else {
cm.getClient().getChannelServer().getMapFactory().getMap(925020010 + avDojo).resetMapObjects();
cm.getClient().getChannelServer().resetDojo(925020010 + avDojo);
cm.resetDojoEnergy();
cm.warp(925020010 + avDojo, 0);
}
@@ -119,13 +121,15 @@ function action(mode, type, selection) {
if(avDojo < 0) {
if(avDojo == -1) cm.sendOk("All Dojo's are being used already. Wait for awhile before trying again.");
else cm.sendOk("Your party is already using the dojo. Wait for them to finish to enter.");
else cm.sendOk("Either your party is already using the Dojo or your party's allotted time on the Dojo has not expired yet. Wait for them to finish to enter.");
cm.getPlayer().setDojoStage(dojoWarp);
}
else {
var warpDojoMap = ((mode == 1) ? 925020000 + (dojoWarp + 1) * 100 + avDojo : 925020100 + avDojo);
cm.getClient().getChannelServer().resetDojoMap(warpDojoMap);
cm.getClient().getChannelServer().resetDojo(warpDojoMap);
cm.resetDojoEnergy();
cm.warp(warpDojoMap, 0);
}
@@ -136,11 +140,13 @@ function action(mode, type, selection) {
if(avDojo < 0) {
if(avDojo == -1) cm.sendOk("All Dojo's are being used already. Wait for awhile before trying again.");
else cm.sendOk("Your party is already using the dojo. Wait for them to finish to enter.");
else cm.sendOk("Either your party is already using the Dojo or your party's allotted time on the Dojo has not expired yet. Wait for them to finish to enter.");
}
else {
cm.getClient().getChannelServer().resetDojoMap(925020100 + avDojo);
cm.getClient().getChannelServer().resetDojo(925020100 + avDojo);
cm.resetDojoEnergy();
cm.warp(925020100 + avDojo, 0);
}
@@ -174,11 +180,13 @@ function action(mode, type, selection) {
if(avDojo < 0) {
if(avDojo == -1) cm.sendOk("All Dojo's are being used already. Wait for awhile before trying again.");
else cm.sendOk("Your party is already using the dojo. Wait for them to finish to enter.");
else cm.sendOk("Either your party is already using the Dojo or your party's allotted time on the Dojo has not expired yet. Wait for them to finish to enter.");
}
else {
cm.getClient().getChannelServer().resetDojoMap(925030100 + avDojo);
cm.getClient().getChannelServer().resetDojo(925030100 + avDojo);
cm.resetPartyDojoEnergy();
cm.warpParty(925030100 + avDojo);
}
@@ -209,7 +217,7 @@ function action(mode, type, selection) {
var belt = belts[selection];
var level = belt_level[selection];
var points = belt_points[selection];
if (cm.getPlayer().getDojoPoints() > points) {
if (cm.getPlayer().getDojoPoints() >= points) {
if (cm.getPlayer().getLevel() > level) {
cm.gainItem(belt, 1);
cm.sendNext("There is the #i" + belt + "# #b#t" + belt + "##k. You have proven your valor to ascend on the Dojo ranks. Well done!");
@@ -350,8 +358,12 @@ function action(mode, type, selection) {
if (mode == 0) {
cm.sendNext("Stop changing your mind! Soon, you'll be crying, begging me to go back.");
} else if (mode == 1) {
var dojoMapId = cm.getPlayer().getMap().getId();
cm.warp(925020002, 0);
cm.getPlayer().message("Can you make up your mind please?");
cm.getClient().getChannelServer().freeDojoSectionIfEmpty(dojoMapId);
}
cm.dispose();
}

View File

@@ -42,6 +42,7 @@ function writeSolaxiaCommandsLv6() { //Admin
comm_cursor = comm_lv6;
desc_cursor = desc_lv6;
addCommand("setgmlevel", "");
addCommand("warpworld", "");
addCommand("saveall", "");
addCommand("dcall", "");
@@ -90,9 +91,8 @@ function writeSolaxiaCommandsLv4() { //SuperGM
addCommand("pinkbean", "");
addCommand("pap", "");
addCommand("pianus", "");
addCommand("cake", "");
addCommand("playernpc", "");
addCommand("face", "");
addCommand("hair", "");
}
function writeSolaxiaCommandsLv3() { //GM
@@ -143,6 +143,8 @@ function writeSolaxiaCommandsLv3() { //GM
addCommand("killmap", "");
addCommand("night", "");
addCommand("npc", "");
addCommand("face", "");
addCommand("hair", "");
}
function writeSolaxiaCommandsLv2() { //JrGM

View File

@@ -23,28 +23,36 @@
* @Author Moogra, Ronan
*/
function enter(pi) {
var gate = pi.getPlayer().getMap().getReactorByName("door");
var currwarp = Date.now();
if ((gate != null && gate.getState() == 1) || pi.getMap().countMonsters() == 0) {
if (Math.floor(pi.getPlayer().getMapId() / 100) % 100 < 38) {
pi.getPlayer().message("You received " + pi.getPlayer().addDojoPointsByMap() + " training points. Your total training points score is now " + pi.getPlayer().getDojoPoints() + ".");
if(((Math.floor((pi.getPlayer().getMap().getId() + 100) / 100)) % 100) % 6 == 0) {
if(Math.floor(pi.getPlayer().getMapId() / 10000) == 92503) {
pi.warpParty(pi.getPlayer().getMap().getId() + 100, 925030100, 925033804);
if(currwarp - pi.getPlayer().getNpcCooldown() < 3000) return false; // this script can be ran twice when passing the dojo portal... strange.
pi.getPlayer().setNpcCooldown(currwarp);
var gate = pi.getPlayer().getMap().getReactorByName("door");
if(gate != null) {
if (gate.getState() == 1 || pi.getMap().countMonsters() == 0) {
if (Math.floor(pi.getPlayer().getMapId() / 100) % 100 < 38) {
pi.getPlayer().message("You received " + pi.getPlayer().addDojoPointsByMap() + " training points. Your total training points score is now " + pi.getPlayer().getDojoPoints() + ".");
if(((Math.floor((pi.getPlayer().getMap().getId() + 100) / 100)) % 100) % 6 == 0) {
if(Math.floor(pi.getPlayer().getMapId() / 10000) == 92503) {
pi.warpParty(pi.getPlayer().getMap().getId() + 100, 925030100, 925033804);
} else {
pi.warp(pi.getPlayer().getMap().getId() + 100, 0);
}
} else {
pi.warp(pi.getPlayer().getMap().getId() + 100, 0);
}
} else {
pi.warp(pi.getPlayer().getMap().getId() + 100, 0);
pi.warp(925020003, 0);
pi.getPlayer().gainExp(2000 * pi.getPlayer().getDojoPoints(), true, true, true);
}
return true;
} else {
pi.warp(925020003, 0);
pi.getPlayer().gainExp(2000 * pi.getPlayer().getDojoPoints(), true, true, true);
pi.getPlayer().message("The door is not open yet.");
return false;
}
return true;
} else {
pi.getPlayer().message("The door is not open yet.");
return false;
}
}