The great MCPQ Merge offensive
Fulfilled the lovely pull request #427 from @dragoso, which added in backing code content to HeavenMS. Implemented structural changes for the Marriage wishlist, in order to receive, maintain and distribute gifts to spouses. Added untradeable check on wishlist gift handler. Adjusted CPQ drops to actually load from DB rathe than hard-coded. Fixed CPQ "random disease to player/party" functionality not applying properly. Adjusted how CPQ maps are generated. It directly loads a new area from WZ (this process should at least removes the player's spawned mobs) rather than reset the cache at every MCPQ creation.
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
var map = 980030000;
|
||||
var minLvl = 30;
|
||||
var maxLvl = 255;
|
||||
var minAmt = 0;
|
||||
var maxAmt = 6;
|
||||
var cpqMinLvl = 30;
|
||||
var cpqMaxLvl = 255;
|
||||
var cpqMinAmt = 0;
|
||||
var cpqMaxAmt = 6;
|
||||
|
||||
function start() {
|
||||
status = -1;
|
||||
@@ -24,34 +23,35 @@ function action(mode, type, selection) {
|
||||
if (status == 0) {
|
||||
if (cm.getParty() == null) {
|
||||
status = 10;
|
||||
cm.sendOk("#eÉ necessário criar um grupo antes de começar o Festival de Monstros!#k");
|
||||
cm.sendOk("#e<EFBFBD> necess<EFBFBD>rio criar um grupo antes de come<EFBFBD>ar o Festival de Monstros!#k");
|
||||
} else if (!cm.isLeader()) {
|
||||
status = 10;
|
||||
cm.sendOk("Se você quer começar o Festival, avise o #blíder do grupo#k para falar comigo.");
|
||||
cm.sendOk("Se voc<EFBFBD> quer come<EFBFBD>ar o Festival, avise o #bl<EFBFBD>der do grupo#k para falar comigo.");
|
||||
} else {
|
||||
var leaderMapid = cm.getMapId();
|
||||
var party = cm.getParty().getMembers();
|
||||
var inMap = cm.partyMembersInMap();
|
||||
var lvlOk = 0;
|
||||
var isInMap = 0;
|
||||
var isOutMap = 0;
|
||||
for (var i = 0; i < party.size(); i++) {
|
||||
if (party.get(i).getLevel() >= minLvl && party.get(i).getLevel() <= maxLvl) {
|
||||
if (party.get(i).getLevel() >= cpqMinLvl && party.get(i).getLevel() <= cpqMaxLvl) {
|
||||
lvlOk++;
|
||||
}
|
||||
if (party.get(i).getPlayer().getMapId()!= 980030000) {
|
||||
//isInMap = false;
|
||||
isInMap++
|
||||
|
||||
if (party.get(i).getPlayer().getMapId() != leaderMapid) {
|
||||
isOutMap++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (party >= 1) {
|
||||
status = 10;
|
||||
cm.sendOk("Você não tem número suficiente de pessoas em seu grupo. Você precisa de um grupo com #b" + minAmt + "#k - #r" + maxAmt + "#k membros e eles devem estar no mapa com você.");
|
||||
cm.sendOk("Voc<EFBFBD> n<EFBFBD>o tem n<EFBFBD>mero suficiente de pessoas em seu grupo. Voc<EFBFBD> precisa de um grupo com #b" + cpqMinAmt + "#k - #r" + cpqMaxAmt + "#k membros e eles devem estar no mapa com voc<EFBFBD>.");
|
||||
} else if (lvlOk != inMap) {
|
||||
status = 10;
|
||||
cm.sendOk("Certifique se todos em seu grupo estão dentre os níveis corretos (" + minLvl + "~" + maxLvl + ")!");
|
||||
} else if (isInMap > 0) {
|
||||
cm.sendOk("Certifique se todos em seu grupo est<EFBFBD>o dentre os n<EFBFBD>veis corretos (" + cpqMinLvl + "~" + cpqMaxLvl + ")!");
|
||||
} else if (isOutMap > 0) {
|
||||
status = 10;
|
||||
cm.sendOk("Existe alguém do grupo que não esta no mapa!");
|
||||
cm.sendOk("Existe algu<EFBFBD>m do grupo que n<EFBFBD>o esta no mapa!");
|
||||
} else {
|
||||
cm.sendCPQMapLists2();
|
||||
}
|
||||
@@ -67,10 +67,10 @@ function action(mode, type, selection) {
|
||||
}
|
||||
} else {
|
||||
var party = cm.getParty().getMembers();
|
||||
if ((selection === 0 || selection === 1 ) && party.size() < 2) {
|
||||
cm.sendOk("Você precisa de no mínimo 2 player para entrar na competição.");
|
||||
} else if ((selection === 2 ) && party.size() < 3) {
|
||||
cm.sendOk("Você precisa de no mínimo 3 player para entrar na competição.");
|
||||
if ((selection === 0 || selection === 1 ) && party.size() < 1) {
|
||||
cm.sendOk("Voc<EFBFBD> precisa de no m<EFBFBD>nimo 2 player para entrar na competi<EFBFBD><EFBFBD>o.");
|
||||
} else if ((selection === 2 ) && party.size() < 1) {
|
||||
cm.sendOk("Voc<EFBFBD> precisa de no m<EFBFBD>nimo 3 player para entrar na competi<EFBFBD><EFBFBD>o.");
|
||||
} else {
|
||||
cm.cpqLobby2(selection);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user