Client clean-up + PiratePQ Implementation
Major update on client packets, now properly making unseen killed monsters not appear as residual on a player's client. Many updates revolving the PiratePQ environment as well.
This commit is contained in:
27
scripts/npc/world0/2041029.js
Normal file
27
scripts/npc/world0/2041029.js
Normal file
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
This file is part of the OdinMS Maple Story Server
|
||||
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
|
||||
Matthias Butz <matze@odinms.de>
|
||||
Jan Christian Meyer <vimes@odinms.de>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as
|
||||
published by the Free Software Foundation version 3 as published by
|
||||
the Free Software Foundation. You may not use, modify or distribute
|
||||
this program under any other version of the GNU Affero General Public
|
||||
License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
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/>.
|
||||
*/
|
||||
|
||||
function start() {
|
||||
cm.sendOk("Up ahead is the mysterious forest of Elin. Go through #bthe portal of time#k if you are ready to unveil some of the mysteries of the past of Victoria Island, as how it used to be at it's dawn.");
|
||||
cm.dispose();
|
||||
}
|
||||
|
||||
@@ -78,7 +78,7 @@ function action(mode, type, selection) {
|
||||
cm.dispose();
|
||||
}
|
||||
else {
|
||||
em.startInstance(cm.getParty(),cm.getPlayer().getMap());
|
||||
em.startInstance(cm.getParty(),cm.getPlayer().getMap(), 1);
|
||||
party = cm.getParty().getMembers();
|
||||
}
|
||||
cm.dispose();
|
||||
|
||||
@@ -19,7 +19,77 @@
|
||||
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/>.
|
||||
*/
|
||||
|
||||
var status = -1;
|
||||
|
||||
function start() {
|
||||
cm.warp(100000000, 0);
|
||||
cm.dispose();
|
||||
}
|
||||
status = -1;
|
||||
action(1, 0, 0);
|
||||
}
|
||||
|
||||
function action(mode, type, selection) {
|
||||
if (mode == 1)
|
||||
status++;
|
||||
else
|
||||
status--;
|
||||
if (status == 0) {
|
||||
cm.removeAll(4001117);
|
||||
cm.removeAll(4001120);
|
||||
cm.removeAll(4001121);
|
||||
cm.removeAll(4001122);
|
||||
cm.sendSimple("#b#L0#Get me out of here.#l\r\n#L1#Give me Pirate Hat.#l#k");
|
||||
} else if (status == 1) {
|
||||
if (selection == 0) {
|
||||
if (!cm.canHold(4001129, 1)) {
|
||||
cm.sendOk("Please make room in ETC.");
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
cm.gainItem(4001129, 1);
|
||||
cm.warp(251010404,0);
|
||||
} else { //TODO JUMP
|
||||
if (cm.haveItem(1003267, 1)) {
|
||||
cm.sendOk("You have the best hat.");
|
||||
} else if (cm.haveItem(1002573, 1)) {
|
||||
if (cm.haveItem(4001129, 20)) {
|
||||
if (cm.canHold(1003267,1)) {
|
||||
cm.gainItem(1002573, -1);
|
||||
cm.gainItem(4001129, -20);
|
||||
cm.gainItem(1003267,1);
|
||||
cm.sendOk("I have given you the hat.");
|
||||
} else {
|
||||
cm.sendOk("Please make room.");
|
||||
}
|
||||
} else {
|
||||
cm.sendOk("You need 20 #t4001129# to get the next hat.");
|
||||
}
|
||||
} else if (cm.haveItem(1002572, 1)) {
|
||||
if (cm.haveItem(4001129, 20)) {
|
||||
if (cm.canHold(1002573,1)) {
|
||||
cm.gainItem(1002572, -1);
|
||||
cm.gainItem(4001129, -20);
|
||||
cm.gainItem(1002573,1);
|
||||
cm.sendOk("I have given you the hat.");
|
||||
} else {
|
||||
cm.sendOk("Please make room.");
|
||||
}
|
||||
} else {
|
||||
cm.sendOk("You need 20 #t4001129# to get the next hat.");
|
||||
}
|
||||
} else {
|
||||
if (cm.haveItem(4001129, 20)) {
|
||||
if (cm.canHold(1002572,1)) {
|
||||
cm.gainItem(4001129, -20);
|
||||
cm.gainItem(1002572,1);
|
||||
cm.sendOk("I have given you the hat.");
|
||||
} else {
|
||||
cm.sendOk("Please make room.");
|
||||
}
|
||||
} else {
|
||||
cm.sendOk("You need 20 #t4001129# to get the next hat.");
|
||||
}
|
||||
}
|
||||
}
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
|
||||
129
scripts/npc/world0/2094002.js
Normal file
129
scripts/npc/world0/2094002.js
Normal file
@@ -0,0 +1,129 @@
|
||||
var status = -1;
|
||||
var level = 1;
|
||||
|
||||
function start() {
|
||||
action(1,0,0);
|
||||
}
|
||||
|
||||
function action(mode, type, selection) {
|
||||
if (mode == 1) {
|
||||
status++;
|
||||
} else {
|
||||
status--;
|
||||
}
|
||||
if (cm.getPlayer().getMapId() == 925100700) {
|
||||
cm.removeAll(4001117);
|
||||
cm.removeAll(4001120);
|
||||
cm.removeAll(4001121);
|
||||
cm.removeAll(4001122);
|
||||
cm.warp(251010404,0);
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
var em = cm.getEventManager("PiratePQ");
|
||||
if (em == null) {
|
||||
cm.sendNext("The event isn't started...");
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
|
||||
level = em.getProperty("level");
|
||||
if (!cm.isLeader()) {
|
||||
cm.sendNext("I wish for your leader to talk to me.");
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
switch(cm.getPlayer().getMapId()) {
|
||||
case 925100000:
|
||||
cm.sendNext("We are heading into the Pirate Ship now! To get in, we must destroy all the monsters guarding it.");
|
||||
cm.dispose();
|
||||
break;
|
||||
case 925100100:
|
||||
var emp = em.getProperty("stage2");
|
||||
if (emp == null) {
|
||||
em.setProperty("stage2", "0");
|
||||
emp = "0";
|
||||
}
|
||||
if (emp.equals("0")) {
|
||||
if (cm.haveItem(4001120,20)) {
|
||||
cm.sendNext("Excellent! Now hunt me 20 Rising Medals.");
|
||||
cm.gainItem(4001120,-20);
|
||||
cm.getMap().killAllMonsters();
|
||||
em.setProperty("stage2", "1");
|
||||
} else {
|
||||
cm.sendNext("We are heading into the Pirate Ship now! To get in, we must qualify ourselves as noble pirates. Hunt me 20 Rookie Medals.");
|
||||
if(cm.countMonster() < 1) cm.getPlayer().getMap().spawnAllMonsterIdFromMapSpawnList(9300114, level, true);
|
||||
}
|
||||
} else if (emp.equals("1")) {
|
||||
if (cm.haveItem(4001121,20)) {
|
||||
cm.sendNext("Excellent! Now hunt me 20 Veteran Medals.");
|
||||
cm.gainItem(4001121,-20);
|
||||
cm.getMap().killAllMonsters();
|
||||
em.setProperty("stage2", "2");
|
||||
} else {
|
||||
cm.sendNext("We are heading into the Pirate Ship now! To get in, we must qualify ourselves as noble pirates. Hunt me 20 Rising Medals.");
|
||||
if(cm.countMonster() < 1) cm.getPlayer().getMap().spawnAllMonsterIdFromMapSpawnList(9300115, level, true);
|
||||
}
|
||||
} else if (emp.equals("2")) {
|
||||
if (cm.haveItem(4001122,20)) {
|
||||
cm.sendNext("Excellent! Now let us go.");
|
||||
cm.gainItem(4001122,-20);
|
||||
cm.getMap().killAllMonsters();
|
||||
em.setProperty("stage2", "3");
|
||||
} else {
|
||||
cm.sendNext("We are heading into the Pirate Ship now! To get in, we must qualify ourselves as noble pirates. Hunt me 20 Veteran Medals.");
|
||||
if(cm.countMonster() < 1) cm.getPlayer().getMap().spawnAllMonsterIdFromMapSpawnList(9300116, level, true);
|
||||
}
|
||||
} else {
|
||||
cm.sendNext("The next stage has opened. GO!");
|
||||
}
|
||||
cm.dispose();
|
||||
break;
|
||||
case 925100200:
|
||||
case 925100300:
|
||||
cm.sendNext("To assault the pirate ship, we must destroy the guards first.");
|
||||
cm.dispose();
|
||||
break;
|
||||
case 925100201:
|
||||
if (cm.getMap().getMonsters().size() == 0) {
|
||||
cm.sendNext("Excellent.");
|
||||
if (em.getProperty("stage2a") == "0") {
|
||||
cm.getMap().setReactorState();
|
||||
em.setProperty("stage2a", "1");
|
||||
}
|
||||
} else {
|
||||
cm.sendNext("These bellflowers are in hiding. We must liberate them.");
|
||||
}
|
||||
cm.dispose();
|
||||
break;
|
||||
case 925100301:
|
||||
if (cm.getMap().getMonsters().size() == 0) {
|
||||
cm.sendNext("Excellent.");
|
||||
if (em.getProperty("stage3a").equals("0")) {
|
||||
cm.getMap().setReactorState();
|
||||
em.setProperty("stage3a", "1");
|
||||
}
|
||||
} else {
|
||||
cm.sendNext("These bellflowers are in hiding. We must liberate them.");
|
||||
}
|
||||
cm.dispose();
|
||||
break;
|
||||
case 925100202:
|
||||
case 925100302:
|
||||
cm.sendNext("These are the Captains and Krus which devote their whole life to Lord Pirate. Kill them as you see fit.");
|
||||
cm.dispose();
|
||||
break;
|
||||
case 925100400:
|
||||
cm.sendNext("These are the sources of the ship's power. We must seal it by using the Old Metal Keys on the doors!");
|
||||
cm.dispose();
|
||||
break;
|
||||
case 925100500:
|
||||
if (cm.getMap().getMonsters().size() == 0) {
|
||||
cm.warpParty(925100600);
|
||||
} else {
|
||||
cm.sendNext("Defeat all monsters! Even Lord Pirate's minions!");
|
||||
}
|
||||
cm.dispose();
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,10 @@
|
||||
var status = -1;
|
||||
|
||||
var exchangeItem = 4000439;
|
||||
|
||||
function start() {
|
||||
action(1, 0, 0);
|
||||
}
|
||||
|
||||
function action(mode, type, selection) {
|
||||
if (mode == 1) {
|
||||
status++;
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
var status = -1;
|
||||
|
||||
var exchangeItem = 4000437;
|
||||
|
||||
function start() {
|
||||
action(1, 0, 0);
|
||||
}
|
||||
|
||||
function action(mode, type, selection) {
|
||||
if (mode == 1) {
|
||||
status++;
|
||||
|
||||
8
scripts/npc/world0/2131004.js
Normal file
8
scripts/npc/world0/2131004.js
Normal file
@@ -0,0 +1,8 @@
|
||||
function start() {
|
||||
action(1,0,0);
|
||||
}
|
||||
|
||||
function action(mode, type, selection) {
|
||||
cm.sendNext("Zzzzz...");
|
||||
cm.dispose();
|
||||
}
|
||||
@@ -1,7 +1,10 @@
|
||||
var status = -1;
|
||||
|
||||
var exchangeItem = 4000436;
|
||||
|
||||
function start() {
|
||||
action(1, 0, 0);
|
||||
}
|
||||
|
||||
function action(mode, type, selection) {
|
||||
if (mode == 1) {
|
||||
status++;
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
var status = -1;
|
||||
|
||||
var exchangeItem = 4000440;
|
||||
|
||||
function start() {
|
||||
action(1, 0, 0);
|
||||
}
|
||||
|
||||
function action(mode, type, selection) {
|
||||
if (mode == 1) {
|
||||
status++;
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
var status = -1;
|
||||
|
||||
var exchangeItem = 4000438;
|
||||
|
||||
function start() {
|
||||
action(1, 0, 0);
|
||||
}
|
||||
|
||||
function action(mode, type, selection) {
|
||||
if (mode == 1) {
|
||||
status++;
|
||||
|
||||
@@ -7,4 +7,4 @@
|
||||
function start(){
|
||||
cm.sendOk("Hmmm! For you to make your way here, far away from the Camp, you must be one strong individual. Let's explore new areas and find a place to establish our own town!!");
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,7 @@
|
||||
function start() {
|
||||
action(1,0,0);
|
||||
}
|
||||
|
||||
function action(mode, type, selection) {
|
||||
cm.sendNext("Call me Dark Lord. I will give thieves a place in society... watch in a few years!");
|
||||
cm.dispose();
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
function start() {
|
||||
action(1,0,0);
|
||||
}
|
||||
|
||||
function action(mode, type, selection) {
|
||||
cm.sendNext("The magic of this forest is amazing...");
|
||||
cm.dispose();
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
function start() {
|
||||
action(1,0,0);
|
||||
}
|
||||
|
||||
function action(mode, type, selection) {
|
||||
cm.sendNext("Being young doesn't mean I'm any different from those guys. I'll show them!");
|
||||
cm.dispose();
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
var status = -1;
|
||||
|
||||
function start() {
|
||||
action(1,0,0);
|
||||
}
|
||||
|
||||
function action(mode, type, selection) {
|
||||
if (mode == 1) {
|
||||
status++;
|
||||
|
||||
73
scripts/npc/world0/2133000.txt
Normal file
73
scripts/npc/world0/2133000.txt
Normal file
@@ -0,0 +1,73 @@
|
||||
var status = -1;
|
||||
|
||||
function action(mode, type, selection) {
|
||||
if (mode == 1) {
|
||||
status++;
|
||||
} else {
|
||||
if (status == 0) {
|
||||
cm.dispose();
|
||||
}
|
||||
status--;
|
||||
}
|
||||
if (status == 0) {
|
||||
cm.removeAll(4001163);
|
||||
cm.removeAll(4001169);
|
||||
cm.removeAll(2270004);
|
||||
cm.sendSimple("#b#L0#Give me Altaire Earrings.#l\r\n#L1#Give me Glittering Altaire Earrings.#l\r\n#L3#Give me Brilliant Altaire Earrings.#l\r\n#L2#Attempt Forest of Poison Haze.#l#k");
|
||||
} else if (status == 1) {
|
||||
if (selection == 0) {
|
||||
if (!cm.haveItem(1032060) && cm.haveItem(4001198, 10)) {
|
||||
cm.gainItem(1032060,1);
|
||||
cm.gainItem(4001198, -10);
|
||||
} else {
|
||||
cm.sendOk("You either have Altair Earrings already or you do not have 10 Altair Fragments");
|
||||
}
|
||||
} else if (selection == 1){
|
||||
if (cm.haveItem(1032060) && !cm.haveItem(1032061) && cm.haveItem(4001198, 10)) {
|
||||
cm.gainItem(1032060,-1);
|
||||
cm.gainItem(1032061, 1);
|
||||
cm.gainItem(4001198, -10);
|
||||
} else {
|
||||
cm.sendOk("You either don't have Altair Earrings already or you do not have 10 Altair Fragments");
|
||||
}
|
||||
} else if (selection == 1){
|
||||
if (cm.haveItem(1032061) && !cm.haveItem(1032101) && cm.haveItem(4001198, 10)) {
|
||||
cm.gainItem(1032061,-1);
|
||||
cm.gainItem(1032101, 1);
|
||||
cm.gainItem(4001198, -10);
|
||||
} else {
|
||||
cm.sendOk("You either don't have Glittering Altair Earrings already or you do not have 10 Altair Fragments");
|
||||
}
|
||||
} else if (selection == 2) {
|
||||
if (cm.getPlayer().getParty() == null || !cm.isLeader()) {
|
||||
cm.sendOk("The leader of the party must be here.");
|
||||
} else {
|
||||
var party = cm.getPlayer().getParty().getMembers();
|
||||
var mapId = cm.getPlayer().getMapId();
|
||||
var next = true;
|
||||
var size = 0;
|
||||
var it = party.iterator();
|
||||
while (it.hasNext()) {
|
||||
var cPlayer = it.next();
|
||||
var ccPlayer = cm.getPlayer().getMap().getCharacterById(cPlayer.getId());
|
||||
if (ccPlayer == null || ccPlayer.getLevel() < 70 || ccPlayer.getLevel() > 255) {
|
||||
next = false;
|
||||
break;
|
||||
}
|
||||
size += (ccPlayer.isGM() ? 4 : 1);
|
||||
}
|
||||
if (next && size >= 2) {
|
||||
var em = cm.getEventManager("Ellin");
|
||||
if (em == null) {
|
||||
cm.sendOk("Please try again later.");
|
||||
} else {
|
||||
em.startInstance(cm.getPlayer().getParty(), cm.getPlayer().getMap(), 120);
|
||||
}
|
||||
} else {
|
||||
cm.sendOk("All 2+ members of your party must be here and above level 70.");
|
||||
}
|
||||
}
|
||||
}
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,9 @@
|
||||
var status = -1;
|
||||
|
||||
function start() {
|
||||
action(1,0,0);
|
||||
}
|
||||
|
||||
function action(mode, type, selection) {
|
||||
if (mode == 1) {
|
||||
status++;
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
var status = -1;
|
||||
|
||||
function start() {
|
||||
action(1,0,0);
|
||||
}
|
||||
|
||||
function action(mode, type, selection) {
|
||||
if (mode == 1) {
|
||||
status++;
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
var status = -1;
|
||||
|
||||
function start() {
|
||||
action(1,0,0);
|
||||
}
|
||||
|
||||
function action(mode, type, selection) {
|
||||
if (mode == 1) {
|
||||
status++;
|
||||
|
||||
Reference in New Issue
Block a user