Files
sweetgum-server/scripts/npc/commands.js
ronancpl c3e3c6dfbb Event Recall + Cash Shop bestsellers + MapleSessionCoordinator rework
Implemented an event recall system. Players that went disconnected during an event instance are able to rejoin the ongoing event upon relogin.
Implemented a player-activity backed best-sellers system for the Cash Shop.
Patched the recently added selective loot system interfering with quest items, ever disabling drops after the player picked up one item.
Implemented a server flag for everlasting buffs.
Fixed some inconsistencies with Priest Dispel skill, sometimes crashing party players.
Fixed change job not properly showing effects for other players.
Fixed wrong fee value being taken from players that expands their guild size. Also, implemented GMS-like fee for this action.
Reworked the MapleSessionCoordinator, now evaluating client's HWID as well as remote IP. This's expected to lessen account drought time for players that are constantly changing their IP.

Last but not least, added world maps for Mushroom Castle, Zipangu, CBD/Malaysia and Ellin Forest regions. Original artwork content used on files depicted in this topic are rightful property of Nexon Corps., these files thoroughly trying to adhere the "Fair Use" disclaimer policy, their purpose being solely to fulfill gaming experience for the areas that were already present on v83 GMS but still lacked worldmaps. For more info regarding Fair Use, please refer to "http://www.dmlp.org/legal-guide/fair-use".
2018-09-07 14:55:29 -03:00

73 lines
2.3 KiB
JavaScript

/* @Author Ronan
* @Author Vcoc
Name: Steward
Map(s): Foyer
Info: Commands
Script: commands.js
*/
importPackage(Packages.client.command);
var status;
var common_heading = "@";
var staff_heading = "!";
var levels = ["Common", "Donator", "JrGM", "GM", "SuperGM", "Developer", "Admin"];
var commands;
function writeHeavenMSCommands() {
commands = CommandsExecutor.getInstance().getGmCommands();
}
function start() {
status = -1;
writeHeavenMSCommands();
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) {
var sendStr = "There are all available commands for you:\r\n\r\n#b";
for(var i = 0; i <= cm.getPlayer().gmLevel(); i++) {
sendStr += "#L" + i + "#" + levels[i] + "#l\r\n";
}
cm.sendSimple(sendStr);
} else if(status == 1) {
var lvComm, lvDesc, lvHead = (selection < 2) ? common_heading : staff_heading;
if(selection > 6) {
selection = 6;
} else if(selection < 0) {
selection = 0;
}
lvComm = commands.get(selection).getLeft();
lvDesc = commands.get(selection).getRight();
var sendStr = "The following commands are available for #b" + levels[selection] + "#k:\r\n\r\n";
for(var i = 0; i < lvComm.size(); i++) {
sendStr += " #L" + i + "# " + lvHead + lvComm.get(i) + " - " + lvDesc.get(i);
sendStr += "#l\r\n";
}
cm.sendPrev(sendStr);
} else {
cm.dispose();
}
}
}