Files
sweetgum-server/scripts/npc/2042007.js
ronancpl 83266508af CPQ tidyup patch + Guild Creation matcher + Solution to Login Accid=0
Adjusted AP gains, to get it to work following the AP Reset check method.
Fixed usage of inexistent itemids on CPQ and fishing.
Fixed one-of-a-kind items being lost in player trades due to missing inventory checks.
Implemented matching system for the guild creation phase. All players intending to join the new guild must be on the Guild Headquartes and accept the creation of the guild.
Fixed changing jobs not properly updating info on the party tab.
Fixed double tooltip information on CPQ actions UI.
Fixed CPQ not disbanding after a player leaves the party/instance.
Fixed checks for "in-progress" CPQ instances.
Fixed changing maps on CPQ not leading players back to the starting battlefield.
Reviewed login system, now preventing non-local IP connecting on local server and local IP on non-local server.
Reviewed login system, now cherrypicking sessions in transition state when trying to disconnect them due to a failed login (avoiding possible mishaps due to duplicate sessions of a same account).
Adjusted PiratePQ stage 2, now mobs respawn rather than making party leader request for new waves.
Adjusted Prime Minister, its spawn is no longer related to starting the quest. It should also allow party fights.
Fixed "forcevac" command not properly applying, rather sending to inventory, "consume-on-pickup" items.
Fixed (probably) accId = 0 issue on login, that was occurring due to client accountid's being set to 0 a while before being checked once again on finishLogin().
Fixed an issue with extended time on CPQ not properly showing the end-match's visual effect.
2019-03-26 16:28:41 -03:00

145 lines
6.4 KiB
JavaScript

/**
-- Version Info -----------------------------------------------------------------------------------
1.0 - First Version by Drago (MapleStorySA)
2.0 - Second Version by Jayd - translated CPQ contents to English
---------------------------------------------------------------------------------------------------
**/
var status = 0;
var rnk = -1;
function start() {
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();
} else {
if (status >= 0 && mode == 0) {
cm.sendOk("Alright then, I hope we can chat later next time.");
cm.dispose();
return;
}
if (mode == 1)
status++;
else
status--;
if (cm.getPlayer().getMapId() == 980030010) {
if (status == 0) {
cm.sendNext("I hope you had fun at the Monster Carnival!");
} else if (status > 0) {
cm.warp(980030000, 0);
cm.dispose();
}
} else if (cm.getChar().getMap().isCPQLoserMap()) {
if (status == 0) {
if (cm.getChar().getParty() != null) {
var shiu = "";
if (cm.getPlayer().getFestivalPoints() >= 300) {
shiu += "#rA#k";
cm.sendOk("Unfortunately, you either drew or lost the battle despite your excellent performance. Victory can be yours next time! \r\n\r\n#bYour result: " + shiu);
rnk = 10;
} else if (cm.getPlayer().getFestivalPoints() >= 100) {
shiu += "#rB#k";
rnk = 20;
cm.sendOk("Unfortunately, you either drew or lost the battle, even with your ultimate performance. Just a little bit, and the victory could have been yours! \r\n\r\n#bYour result: " + shiu);
} else if (cm.getPlayer().getFestivalPoints() >= 50) {
shiu += "#rC#k";
rnk = 30;
cm.sendOk("Unfortunately, you either drew or lost the battle. Victory is for those who strive. I see your efforts, so victory is not far from your reach. Keep it up!\r\n\r\n#bYour result: " + shiu);
} else {
shiu += "#rD#k";
rnk = 40;
cm.sendOk("Unfortunately, you either equalized or lost the battle, and your performance clearly reflects on it. I expect more from you next time. \r\n\r\n#bYour result: " + shiu);
}
} else {
cm.warp(980030000, 0);
cm.dispose();
}
} else if (status == 1) {
switch (rnk) {
case 10:
cm.warp(980030000, 0);
cm.gainExp(35000);
cm.dispose();
break;
case 20:
cm.warp(980030000, 0);
cm.gainExp(25000);
cm.dispose();
break;
case 30:
cm.warp(980030000, 0);
cm.gainExp(12500);
cm.dispose();
break;
case 40:
cm.warp(980030000, 0);
cm.gainExp(3500);
cm.dispose();
break;
default:
cm.warp(980030000, 0);
cm.dispose();
break;
}
}
} else if (cm.getChar().getMap().isCPQWinnerMap()) {
if (status == 0) {
if (cm.getChar().getParty() != null) {
var shi = "";
if (cm.getPlayer().getFestivalPoints() >= 300) {
shi += "#rA#k";
rnk = 1;
cm.sendOk("Congratulations on your victory!!! What a performance! The opposite group could not do anything! I hope the same good work next time! \r\n\r\n#bYour result: " + shi);
} else if (cm.getPlayer().getFestivalPoints() >= 100) {
shi += "#rB#k";
rnk = 2;
cm.sendOk("Congratulations on your victory! That was awesome! You did a good job against the opposing group! Just a little longer, and you'll definitely get an A next time! \r\n\r\n#bYour result: " + shi);
} else if (cm.getPlayer().getFestivalPoints() >= 50) {
shi += "#rC#k";
rnk = 3;
cm.sendOk("Congratulations on your victory. You did some things here and there, but that can not be considered a good victory. I expect more from you next time. \r\n\r\n#bYour result: " + shi);
} else {
shi += "#rD#k";
rnk = 4;
cm.sendOk("Congratulations on your victory, though your performance did not quite reflect that. Be more active in your next participation in the Monster Carnival! \r\n\r\n#bYour result: " + shi);
}
} else {
cm.warp(980030000, 0);
cm.dispose();
}
} else if (status == 1) {
switch (rnk) {
case 1:
cm.warp(980030000, 0);
cm.gainExp(875000);
cm.dispose();
break;
case 2:
cm.warp(980030000, 0);
cm.gainExp(700000);
cm.dispose();
break;
case 3:
cm.warp(980030000, 0);
cm.gainExp(555000);
cm.dispose();
break;
case 4:
cm.warp(980030000, 0);
cm.gainExp(100000);
cm.dispose();
break;
default:
cm.warp(980030000, 0);
cm.dispose();
break;
}
}
}
}
}