Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

AresDEV - V83

Newbie Spellweaver
Joined
Jul 21, 2012
Messages
87
Reaction score
4

Introduction
I used to code Minecraft Hacked Clients, code hacks for an FPS game called BlackShot.
Now I am coming back to MapleStory development.
I used Java in Minecraft, and C++ for BlackShot.

Okay, back to topic.
I would not say that I am very good in Java, or C++.
I only know the basics of Java and C++.

I am starting this new development to learn more on Java.

So far, this source is based of MoopleDEV.

I am open to ALL criticism, suggestions and opinions.

Goals & Aims
I wish to learn from this project of mine, and further improve my knowledge of programming.
Thereafter, I hope to make the source stable, clean and GMS - Like, since I am allergic to sphagetti code ( kinda OCD ) and am a big fan of "stock" MapleStory.

Revision Log
Code:
[Revision 1]
+ Based off MoopleDEV Revision 120
+ Project->Source->Format & Project->Source->Clean Up...
+ Tweaked Script Engine for Java 8 ( Credits: http://forum.ragezone.com/f427/tweaking-script-engine-java-8-a-1008662/ )
+ Implemented NX format ( Not working as of yet, some minor bugs. Credits: http://forum.ragezone.com/f427/moopledev-rev120-nx-patch-937004/ )
- Removed MoopleDEV's INI usage
+ Kinda "fucked up" Moople's multi world. Using an enum in ServerConstants for now to load the worlds. ( Bad coding )

[Revision 2]
+World - related settings are now defined in WorldConstants.java
+New Command Handler ( I used the same method that I used for my Minecraft Hacked Client! )

Todo Log
Code:
~Implement a better way of handling multi world.
      For example, a world can has it's own "server" message. ( Need ideas on how to go about doing this, perhaps a WorldConstants.java for defining worlds (?) )
~Fix up and revamp MoopleDev's original commands.
      I think MoopleDev Revision 120 doesn't have a warp command.
~Fix up the Maple Watch Leaf Brigade ( Need help on this one. No idea how it works )
      Make it so that it only happens to normal GM and below.
~Fix up NX implementation.
       Most .nx files give a NULL pointer exception after loading or parsing. One example, Skill.nx. Somehow UI.nx and Sound.nx work 100% fine.

Does anybody have a good way to handle multi world?
I removed Moople's INI because I didn't like that way of handling.

I am currently using an enum somewhat like Helisium's.

NOTE
If anybody wants to help contribute or guide me along the journey, feel free to add me on Skype.


CaezerDaBoss

You can view the source .
 
Last edited:
Newbie Spellweaver
Joined
Jul 21, 2012
Messages
87
Reaction score
4
Someone please advice me on how I should go about handling the Commands,

Example;
Code:
	public static boolean executePlayerCommand(MapleClient c, String[] sub,
			char heading) {

		final MapleCharacter player = c.getPlayer();

		if (heading == '/') {
			switch (sub[0]) {
			case "help":
				player.addYellowMessage("If you are stuck, use /dispose!");
				break;
			case "dispose":
				NPCScriptManager.getInstance().dispose(c);
				c.announce(MaplePacketCreator.enableActions());
				player.addMessage("Sorry for the bug! Your character has been disposed!");
				break;
			default:
				if (player.gmLevel() == 0) {
					player.addYellowMessage("Please do /help for more information!");
				}
				return false;
			}
		}
		return true;
	}

Should I use a switch, or if - else statements ?

Switch looks neater, and cleaner.

One whole chunk of if - else statements probably isn't nice.
I just started working on the commands today.

Decided that;
/ - Player Commands
! - GM Commands
@ - Admin Commands

Please give me any constructive critism, suggestions or opinions on how I should go about handling the commands!
Thank you!
 
Joined
Apr 10, 2008
Messages
4,087
Reaction score
1,264
I'd suggest to make an abstract class 'Command' that has properties like name, arguments, etcetera, and then an abstract method called 'execute (MapleCharacter character' and make command files inherit from that.
 
Newbie Spellweaver
Joined
Jul 21, 2012
Messages
87
Reaction score
4
I'd suggest to make an abstract class 'Command' that has properties like name, arguments, etcetera, and then an abstract method called 'execute (MapleCharacter character' and make command files inherit from that.

Thank you. I will go and read up on abstract classes.



I've always favored the lithium structured commands ^ :p

I will download lithium and check out how it handles commands :)
 
Newbie Spellweaver
Joined
Jul 21, 2012
Messages
87
Reaction score
4
UPDATE:

GUYS I MANAGED TO COME UP WITH A COMMAND MANAGER!

Thanks SharpAceX for guiding me along!

Check the main post for changes :p
 
Newbie Spellweaver
Joined
Jul 21, 2012
Messages
87
Reaction score
4
Keep up the good work. Bootiful github, I feel like this development has potential.

lel, I accepted your skype request. It's weekends for me, so I can get back to working on this development.
 
Back
Top