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:
ronancpl
2017-07-20 12:02:59 -03:00
parent 8fab2a6e3e
commit c09bc02c85
137 changed files with 1154 additions and 583 deletions

View File

@@ -19,12 +19,25 @@
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
//Fixed by Moogra
//Fixed by Moogra, Ronan
//Fixed grammar, javascript syntax
importPackage(Packages.client);
var status = 0;
var price = 100000;
function isTransformed(ch) {
return ch.getBuffSource(MapleBuffStat.MORPH) == 2210003;
}
function start() {
if(!(isTransformed(cm.getPlayer()) || cm.haveItem(4001086))) {
cm.sendOk("This is the cave of the mighty Horntail, supreme ruler of the Leafre Canyons, outsiders are not welcome. Get lost!");
cm.dispose();
return;
}
cm.sendSimple("Welcome to Cave of Life - Entrance ! Would you like to go inside and fight #rHorntail#k ? If you want to fight him, you may might need some #b#v2000005##k, so you can recover some HP if you have been hit by #rHorntail#k.\r\n#L1#I would like to buy 10 for 100,000 Mesos!#l\r\n\#L2#No thanks, let me in now!#l");
}
@@ -32,12 +45,17 @@ function action(mode, type, selection) {
if (mode < 1)
cm.dispose();
else if (selection == 1) {
if(cm.getMeso() >= price && cm.canHold(2000005)) {
cm.gainMeso(-price);
cm.gainItem(2000005, 10);
cm.sendOk("Thank you for buying the potion. Use it as well!");
} else
if(cm.getMeso() >= price) {
if(!cm.canHold(2000005)) {
cm.sendOk("Sorry, you don't have a slot on your inventory for the item!");
} else {
cm.gainMeso(-price);
cm.gainItem(2000005, 10);
cm.sendOk("Thank you for buying the potion. Use it as well!");
}
} else {
cm.sendOk("Sorry, you don't have enough mesos to buy them!");
}
cm.dispose();
} else if (selection == 2) {
if (cm.getLevel() > 99)