Horntail PQ & Exped + Equip levelup fix
Added Horntail PQ and boss fight. Fixed short integer overflow of equipment stats on client messing up player stats.
This commit is contained in:
@@ -47,68 +47,15 @@ function action(mode, type, selection) {
|
||||
else
|
||||
status--;
|
||||
if (status == 0) {
|
||||
// Slate has no preamble, directly checks if you're in a party
|
||||
if (cm.getParty() == null) { // no party
|
||||
cm.sendOk("If you want to attempt the quest, try making a party and getting 6 People...");
|
||||
if(cm.haveItem(4001086)) {
|
||||
cm.sendYesNo("Do you want to access #b#m240050400##k right now?");
|
||||
} else {
|
||||
cm.sendOk("Those who don't have the #r#t4001086##k must prove their valor before challenging #bHorntail#k.");
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
if (!cm.isLeader()) { // not party leader
|
||||
cm.sendSimple("You are not the party leader.");
|
||||
cm.dispose();
|
||||
}
|
||||
else {
|
||||
// Check teh partyy
|
||||
var party = cm.getParty().getMembers();
|
||||
var mapId = cm.getPlayer().getMapId();
|
||||
var next = true;
|
||||
var levelValid = 0;
|
||||
var inMap = 0;
|
||||
// Temp removal for testing
|
||||
if (party.size() < minPlayers || party.size() > maxPlayers)
|
||||
next = false;
|
||||
else {
|
||||
for (var i = 0; i < party.size() && next; i++) {
|
||||
if ((party.get(i).getLevel() >= minLevel) && (party.get(i).getLevel() <= maxLevel))
|
||||
levelValid += 1;
|
||||
if (party.get(i).getMapId() == mapId)
|
||||
inMap += 1;
|
||||
}
|
||||
if (levelValid < party.size() || inMap < party.size())
|
||||
next = false;
|
||||
}
|
||||
if (next) {
|
||||
// Kick it into action. Slate says nothing here, just warps you in.
|
||||
var em = cm.getEventManager("HontalePQ");
|
||||
if (em == null) {
|
||||
cm.dispose();
|
||||
}
|
||||
else {
|
||||
// Begin the PQ.
|
||||
if(!em.startInstance(cm.getParty(),cm.getPlayer().getMap())) {
|
||||
cm.sendOk("A party in your name is already registered in this event.");
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
//force the two scripts on portals in the map
|
||||
//eim = cm.getPlayer().getEventInstance();
|
||||
var map = eim.getMapInstance(240050100);
|
||||
var bulbMap = eim.getMapInstance(240050200);
|
||||
//map.getPortal(7).setScriptName("hontale_BtoB1");
|
||||
//map.getPortal(2).setScriptName("hontale_C");
|
||||
// Remove pass/coupons
|
||||
party = cm.getPlayer().getEventInstance().getPlayers();
|
||||
}
|
||||
cm.dispose();
|
||||
}
|
||||
else {
|
||||
cm.sendOk("Your party is not a party of six. Make sure all your members are present and qualified to participate in this quest. I see #b" + levelValid.toString() + " #kmembers are in the right level range, and #b" + inMap.toString() + "#k are in my map. If this seems wrong, #blog out and log back in,#k or reform the party.");
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
cm.sendOk("RAWR!?!?!?");
|
||||
cm.warp(240050400);
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user