Fixed Pet Name Tag + quest 3927

Fixed some issues related to Pet Name Tag item and quest 3927.
This commit is contained in:
ronancpl
2017-05-17 19:27:44 -03:00
parent 3fc338467b
commit d736d00964
14 changed files with 142 additions and 56 deletions

View File

@@ -1,5 +1,8 @@
Changes from the original v83 WZs:
Character.wz/*:
Upgraded info of some items.
Map.wz/MapX/*:
Fixed entries of portals placed incorrectly.
@@ -19,7 +22,7 @@ Ronan Lana's MobBookUpdate facility.
P.S.:
Yeah, these explanations are pretty simplistic, I know. If one really wants to
compare the two WZ systems, I recommend do the following:
compare the original v83 WZ with the ones I provided, I recommend do the following:
- Open HaRepacker and, for each MapleSolaxiaV2's WZ file, extract all the XMLs
for "Private Server".
- Now, install MapleStory from "ManagerMsv83.exe" on an other folder and do the

View File

@@ -218,4 +218,11 @@ Sistema de Lobbys na BRPQ: aloca lobbys disponiveis para times de acordo com o l
Sword Earrings: +30HP -> +1 W.att / Shield Earrings: +1ACC -> +1 M.att
15 Maio 2017,
Implementação da LMPQ.
Implementação da LMPQ.
16 Maio 2017,
Implementação da HPQ.
17 Maio 2017,
Correção de bug com o item "Pet Name Tag", que não retirava o item após ser usado.
Correção em bug de uma quest (id 3927) de Ariant que envolve uma "parede".

View File

@@ -3,27 +3,34 @@
<editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/>
<open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
<group>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/npc/world0/1012113.js</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/npc/world0/2040047_old.js</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/reactor/9108004.js</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/reactor/9108001.js</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/net/server/channel/handlers/MobDamageMobFriendlyHandler.java</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/reactor/9108002.js</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/event/KerningPQ.js</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/npc/world0/1012114.js</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/reactor/9108005.js</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/npc/world0/9201134.js</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/event/LudiPQ.js</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/npc/world0/2030010.js</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/event/HenesysPQ.js</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/npc/world0/9040005.js</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/scripting/event/EventInstanceManager.java</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/npc/world0/1012112.js</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/reactor/9108000.js</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/server/maps/MapleMap.java</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/npc/world0/2131000.js</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/server/quest/requirements/InfoExRequirement.java</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/client/inventory/Item.java</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/scripting/map/MapScriptMethods.java</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/npc/world0/2101000.js</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/npc/world0/2103001.js</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/quest/1021.js</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/client/inventory/Equip.java</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/net/server/channel/handlers/UseCashItemHandler.java</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/quest/3927.js</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/scripting/quest/QuestActionManager.java</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/scripting/quest/QuestScriptManager.java</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/client/MapleCharacter.java</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/client/MapleClient.java</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/reactor/9108003.js</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/server/maps/MapleMap.java</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/client/inventory/ModifyInventory.java</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/client/inventory/MaplePet.java</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/npc/world0/2111009.js</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/server/MapleShop.java</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/wz/String.wz/Npc.img.xml</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/quest/20522.js</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/tools/MaplePacketCreator.java</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/client/inventory/MapleInventory.java</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/npc/world0/2101001.js</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/npc/world0/2094001.js</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/client/MapleQuestStatus.java</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/net/server/channel/handlers/QuestActionHandler.java</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/npc/world0/2131002.js</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/server/quest/MapleQuest.java</file>
</group>
</open-files>
</project-private>

View File

@@ -4,7 +4,7 @@
*/
var isPq = true;
var minPlayers = 1, maxPlayers = 6;
var minPlayers = 3, maxPlayers = 6;
var minLevel = 10, maxLevel = 200;
var entryMap = 910010000;
var exitMap = 910010300;

View File

@@ -0,0 +1,14 @@
var status = -1;
function start() {
action(1, 0, 0);
}
function action(mode, type, selection) {
if(cm.isQuestStarted(3927)) {
cm.sendNext("If I had an iron hammer and a dagger, a bow and an arrow...");
cm.setQuestProgress(3927, 1);
}
cm.dispose();
}

67
scripts/quest/3927.js Normal file
View File

@@ -0,0 +1,67 @@
/*
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/>.
*/
/*
Author : Ronan Lana
*/
var status = -1;
function end(mode, type, selection) {
if (mode == -1) {
qm.dispose();
} else {
if (mode == 0 && status == 0) {
qm.dispose();
return;
}
if (mode == 1)
status++;
else
status--;
if(qm.getQuestProgress(3927) == 0) { // didn't find the wall yet, eh?
qm.sendOk("Did you find the wall? Look closely, the wall is more near than you think!");
qm.dispose();
return;
}
if (status == 0) {
qm.sendSimple("Did you find the wall?\r\n#L0##b I did, but... I have no idea what it's talking about.#l");
} else if (status == 1) {
qm.sendSimple("What did it say?\r\n#L0##b 'If I had an iron hammer and a dagger, a bow and an arrow...'#l\r\n#L1# 'Byron S2 Sirin'#l\r\n#L2# 'Ahhh I forgot.'");
} else if (status == 2) {
if(selection == 0) {
qm.sendOk("If I had an iron hammer and a dagger... a bow and an arrow... what does that mean? Do you want me to tell you? I don't know myself. It's something you should think about. If you need a clue... it would go something like... a weapon is just an item... until someone uses it...?");
qm.gainExp(1000 * qm.getPlayer().getExpRate());
qm.forceCompleteQuest();
} else if(selection == 1) {
qm.sendOk("Man, Jiyur wrote on the wall again! Arrgh!!");
} else {
qm.sendOk("What? You forgot? Do you remember where it was written?");
}
qm.dispose();
}
}
}

View File

@@ -203,8 +203,8 @@ public class MaplePet extends Item {
saveToDb();
Item petz = owner.getInventory(MapleInventoryType.CASH).getItem(getPosition());
if (petz == null) return;
owner.forceUpdateItem(petz);
if (petz != null)
owner.forceUpdateItem(petz);
}
public void setLevel(byte level) {

View File

@@ -69,8 +69,6 @@ public final class QuestActionHandler extends AbstractMaplePacketHandler {
if(quest.canComplete(player, npc)) {
QuestScriptManager.getInstance().end(c, questid, npc);
player.getClient().getSession().write(MaplePacketCreator.showSpecialEffect(9)); //show effect when completion
player.getMap().broadcastMessage(player, MaplePacketCreator.showForeignEffect(player.getId(), 9));//show effect around players I guess
}
}
}

View File

@@ -376,11 +376,14 @@ public final class UseCashItemHandler extends AbstractMaplePacketHandler {
c.announce(MaplePacketCreator.enableActions());
return;
}
Item item = player.getInventory(MapleInventoryType.CASH).getItem(pet.getPosition());
String newName = slea.readMapleAsciiString();
pet.setName(newName);
pet.saveToDb();
player.forceUpdateItem(item);
Item item = player.getInventory(MapleInventoryType.CASH).getItem(pet.getPosition());
if (item != null)
player.forceUpdateItem(item);
player.getMap().broadcastMessage(player, MaplePacketCreator.changePetName(player, newName, 1), true);
c.announce(MaplePacketCreator.enableActions());
remove(c, itemId);

View File

@@ -269,6 +269,16 @@ public class AbstractPlayerInteraction {
}
}
public void setQuestProgress(int qid, int progress) {
MapleQuestStatus status = c.getPlayer().getQuest(MapleQuest.getInstance(qid));
status.setProgress(status.getAnyProgressKey(), String.valueOf(progress));
}
public void setQuestProgress(int qid, int pid, int progress) {
MapleQuestStatus status = c.getPlayer().getQuest(MapleQuest.getInstance(qid));
status.setProgress(pid, String.valueOf(progress));
}
public int getQuestProgress(int qid) {
MapleQuestStatus status = c.getPlayer().getQuest(MapleQuest.getInstance(qid));
String progress = status.getProgress(status.getAnyProgressKey());

View File

@@ -256,9 +256,6 @@ public class MapleQuest {
for (MapleQuestAction a : completeActs.values()) {
a.run(c, selection);
}
c.getClient().getSession().write(MaplePacketCreator.showSpecialEffect(9)); // Quest completion
c.getMap().broadcastMessage(c, MaplePacketCreator.showForeignEffect(c.getId(), 9), false); //use 9 instead of 12 for both
}
}
@@ -297,6 +294,9 @@ public class MapleQuest {
newStatus.setForfeited(c.getQuest(this).getForfeited());
newStatus.setCompletionTime(System.currentTimeMillis());
c.updateQuest(newStatus);
c.getClient().getSession().write(MaplePacketCreator.showSpecialEffect(9)); // Quest completion
c.getMap().broadcastMessage(c, MaplePacketCreator.showForeignEffect(c.getId(), 9), false); //use 9 instead of 12 for both
return true;
}

View File

@@ -27426,10 +27426,8 @@
</imgdir>
<imgdir name="3927">
<imgdir name="0">
<string name="info" value="0"/>
</imgdir>
<imgdir name="1">
<int name="exp" value="1000"/>
</imgdir>
</imgdir>
<imgdir name="3928">

View File

@@ -48355,11 +48355,7 @@
</imgdir>
<imgdir name="1">
<int name="npc" value="2101000"/>
<imgdir name="infoex">
<imgdir name="0">
<string name="value" value="1"/>
</imgdir>
</imgdir>
<string name="endscript" value="q3927e"/>
</imgdir>
</imgdir>
<imgdir name="3928">

View File

@@ -30133,23 +30133,6 @@
</imgdir>
<imgdir name="3927">
<imgdir name="1">
<string name="0" value="Did you find the wall?\r\n#L0##b I did, but... I have no idea what it&apos;s talking about.#l"/>
<string name="1" value="What did it say?\r\n#L0##b &apos;If I had an iron hammer and a dagger, a bow and an arrow...&apos;#l\r\n#L1# &apos;Byron♡ Sirin&apos;#l\r\n#L2# &apos;Ahhh I forgot.&apos;"/>
<string name="2" value="If I had an iron hammer and a dagger... a bow and an arrow... what does that mean? Do you want me to tell you? I don&apos;t know myself. It&apos;s something you should think about. If you need a clue... it would go something like... a weapon is just an item... until someone uses it...?"/>
<imgdir name="stop">
<imgdir name="npc">
<string name="0" value="I guess you haven&apos;t found #p2103001# yet. Well it&apos;d be tough for you to locate the Sand Bandits anyway..."/>
</imgdir>
<imgdir name="0">
<int name="answer" value="1"/>
</imgdir>
<imgdir name="1">
<string name="1" value="Man, Jiyur wrote on the wall again! Arrgh!!"/>
<string name="2" value="What? You forgot? Do you remember where it was written?"/>
<int name="answer" value="1"/>
</imgdir>
</imgdir>
<int name="ask" value="1"/>
</imgdir>
<imgdir name="0">
<string name="0" value="#m260000000# is a resourceful place that has Lidium, an ore that can only be found at the Oasis and the Nihal Desert. No thanks to the greedy queen, who charges ridiculous amount of taxes, everyone&apos;s struggling these days. Apparently the queen is a fairy from Orbis... and she spends all of the tax money to bring in unfathomable amounts of treasures.\r\n#L0##bWhat does the Sultan do?#l"/>