Maplers' Well-known Battlegrounds

Fulfilled merge of Drago's AriantPQ PR #438 into the source!
Adjusted MCPQ map limits predicted within battlefield's map info node.
Added max number-of-players option when creating a AriantPQ lobby.
Added party creation check when trying to create one inside the AriantPQ rooms.
Adjusted several AriantPQ mechanics, in order to either improve the existent features or make those that was still unavailable work seamlessly (score update, ariant batlle points).
This commit is contained in:
ronancpl
2019-04-19 21:20:46 -03:00
50 changed files with 1595 additions and 492 deletions

50
scripts/npc/2101016.js Normal file
View File

@@ -0,0 +1,50 @@
var arena;
var status = 0;
importPackage(Packages.client);
function start() {
arena = cm.getPlayer().getAriantColiseum();
if (arena == null) {
cm.sendOk("Ei, não vi você em campo durante as atividades do coliseu! O que você está fazendo aqui?");
cm.dispose();
return;
}
status = -1;
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) {
copns = arena.getAriantScore(cm.getPlayer());
if (copns < 1 && !cm.getPlayer().isGM()) {
cm.sendOk("Que pena, voc<6F> nao conseguiu nenhuma j<>ia!");
cm.dispose();
} else {
cm.sendNext("Ok, vamos ver...Voc<6F> foi muito bem, e voc<6F> trouxe #b" + copns + "#k j<>ias que eu adoro. Como voc<6F> completou a partida, vou recompens<6E>-lo com a pontua<75><61>o da Arena de Batalhas de #b" + arena.getAriantRewardTier(cm.getPlayer()) + " Pontos#k. Se voc<6F> quiser saber mais sobre a pontua<75><61>o de Arena de Batalha, ent<6E>o fale com #b#p2101015##k.");
}
} else if (status == 1) {
//cm.warp(980010020, 0);
copns = arena.getAriantRewardTier(cm.getPlayer());
arena.clearAriantRewardTier(cm.getPlayer());
arena.clearAriantScore(cm.getPlayer());
cm.removeAll(4031868);
cm.getPlayer().gainExp(92.7 * cm.getPlayer().getExpRate() * copns, true, true);
cm.getPlayer().gainAriantPoints(copns);
cm.dispose();
}
}
}