Newbie Spellweaver
- Joined
- Feb 8, 2015
- Messages
- 38
- Reaction score
- 0
Hello everyone, instead of endlessly spamming the Help section with multiple threads. I'd rather just put all my questions, problems, etc. into one thread to prevent that. Thank you ahead of time for your help and I'd like to say it's very much appreciated. I will keep this thread organized, as maybe it will help others? Also, please keep in mind that before posting anything that I wish to receive help with. I DO search endlessly online for a fix and even attempt to go throughout the code messing with it myself. Once again, thank you for your time. <3
______________________________________________________________________
I am currently using MoopleDEV v83.
______________________________________________________________________
[1]
Goals:
Solution:
- Disable the creation of Cygnus or Aran, clicking either won't have the player directed to the creation screen.
- Upon clicking either Cygnus or Aran, player receives an error message.
Solution:
By using a function that creates a pop-up message and adding a return statement to cancel creation of character, ex:
Credit: chunkarama
Code:
if (job == 0) { // Knights of Cygnus c.announce(MaplePacketCreator.serverNotice(1, "You cannot create a Knight of Cygnus.")); // message
return; // stop here so they may not create this character
// newchar.setJob(MapleJob.NOBLESSE);
// newchar.setMapId(130030000);
// newchar.getInventory(MapleInventoryType.ETC).addItem(new Item(4161047, (byte) 0, (short) 1));
[2]
Goals:
Solution:
- If a player enters a disabled map, they are redirected to another.
- **Note: I am aware that this can be coded, but where exactly would I code the functions? I admit I am nothing near experienced in actual scripting/source development, only "experienced" in understanding what code is executing and such. Yes, I am willing to learn if I receive support.
Solution:
First navigate to GameConstants.java and add:
Secondly, you will need to add the following function to MapleCharacter.java, particularly under the function named changeMapBanish:
FAIL-SAFE:
If a player log-ins and is in a disabled map, they will be warped out.
First navigate to GameConstants.java and add:
Secondly, find PlayerLoggedinHandler.java and under:
Add:
Credit: Tenchio, chunkarama
Code:
public static int[] disabledMaps = { 100000000, 200000000 }; // Example maps (Henesys and Orbis)
Secondly, you will need to add the following function to MapleCharacter.java, particularly under the function named changeMapBanish:
Code:
private void changeMapInternal(final MapleMap to, final Point pos, final byte[] warpPacket) {
for (int i : GameConstants.disabledMaps) {
if (to.getId() == i && !this.isGM()) { // if PLAYER
dropMessage(1, "Unfortunately, the map you are trying to access is disabled for players.");
return; // Prevents entry of any disabled maps.
} else if (to.getId() == i && this.isGM()) { // if ADMIN
dropMessage(0, "Please keep in mind, the map you have entered is disabled for players."); // Only sends a message, does not prevent entry of disabled maps. Not entirely necessary, but is an option to have.
}
}
FAIL-SAFE:
If a player log-ins and is in a disabled map, they will be warped out.
First navigate to GameConstants.java and add:
Code:
public static int returnMap = 200000000; // Example map (Orbis)
Secondly, find PlayerLoggedinHandler.java and under:
Code:
player.sendMacros();
Code:
for (int i : GameConstants.disabledMaps) {
if (player.getMap().getId() == i && !player.isGM()) {
player.changeMap(GameConstants.returnMap);
player.dropMessage(1, "Upon logging in, you were found in a map which has been disabled. As a result, you have been warped to Orbis.");
}
}
Credit: Tenchio, chunkarama
[3] How would I fix client-side quests?
Information: Upon clicking to receive quest, or go into the detail of the quest. There is no result other than the NPC closing. **I've went through .wz files, but need further information on how to successfully fix the quests.
Goals:
Solution:
Goals:
- To fix these bugged client-side quests.
Solution:
There is currently no solution.
[4]
Goal:
Solution:
- For future reference.
- **For shits and giggles.
Solution:
Search through source files, open GeneralChatHandler.java and edit any of the heading values to a symbol of your choice.
Credit: chunkarama
Code:
if (heading == '/' || heading == '!' || heading == '@') { String[] sp = s.split(" ");
sp[0] = sp[0].toLowerCase().substring(1);
if (!Commands.executePlayerCommand(c, sp, heading)) {
if (chr.isGM()) {
if (!Commands.executeGMCommand(c, sp, heading)) {
Commands.executeAdminCommand(c, sp, heading);
}
}
}
[5]
Description: After searching Google & RageZone, every thread about the "fix" says "enable UI." Simple enough, no? Wrong. Where do you enable UI? In the event script, changeMapHandler.java, mapScriptMethods.java?
I do know the function that is needed to re-enable UI.
I've tried enabling UI after cut-scene but as javascript doesn't wait, it executes the entire script ending up with the UI available during the cut-scene.
*How would I delay a function?
**I've tried many other locations, no successful results though.
Solution:
I do know the function that is needed to re-enable UI.
I've tried enabling UI after cut-scene but as javascript doesn't wait, it executes the entire script ending up with the UI available during the cut-scene.
*How would I delay a function?
**I've tried many other locations, no successful results though.
Solution:
First navigate to scripts/map/onUserEnter and open explorationPoint.java.
Then replace:
with:
Final result:
Credit: Tenchio and myself.
Just kidding, we're not done. Finally release all your stress out on Nanazion!
Then replace:
Code:
if (ms.getPlayer().getMapId() == 104000000) {
ms.mapEffect("maplemap/enter/104000000");
}
}
Code:
else if (ms.getPlayer().getMapId() == 104000000) {
ms.mapEffect("maplemap/enter/104000000");
}
ms.unlockUI();
}
Just kidding, we're not done. Finally release all your stress out on Nanazion!
Attachments
You must be registered for see attachments list
Last edited: