PokeMMO Server+Client (Browserbased)

Untitled - PokeMMO Server+Client (Browserbased) - RaGEZONE Forums

i use ip localhost,but stay can't regist and play the game
 
It's easiest if editing the haxe project source so i shall explain in that manner:

First to the client files:


Go to "RegisterScreen.hx" and find line 163 it should look like
Code:
regsocket.emit('register', {

either remove, or comment (//) out lines 166 and 167
Code:
		regsocket.emit('register', {
			username: usernameTxt.value,
			password: passwordTxt.value,
			//challenge: captchaChallenge,
			//response: captchaTxt.value,
			email: emailTxt.value
		});

Now open up the regServer's "regserver.node.js"
Find line 160, it should look like this:
Code:
socket.on('register', function(data){

Replace from line 160-175 with this:
Code:
		socket.on('register', function(data){
			if(data.username == null || data.password == null || data.email == null) return;
			
			if(lastRegisteredIPs.indexOf(ip) !== -1){
				socket.emit('registration', {result: 'registered_recently'});
				return;
			}
			
			createAccount(data.username, data.password, data.email, function(result){
					if(result == 'success'){
						lastRegisteredIPs.push(ip);
						setTimeout(function(){lastRegisteredIPs.remove(ip);}, 60 * 60 * 1000);
					}
					socket.emit('registration', {result: result});
				});
		});


hopefully that should allow people to register without entering the captcha, to remove the captcha boxes is not difficult and i assume you can do that.
 
No sorry, i cannot upload my files as I've done a lot of edits to them, will have a server released soon based on this source. Currently I'm working on the bag, I have the interface created, just need to add the images and items stuff.
 
okay, this should produce no errors on the registration server side now, you need to take the captcha out of the client side by yourself. do that by stopping it from sending the captcha and prevent it from checking a captcha.
 
Recently found this thread and I've set up a PokeMMO already. It's for me to get more into server -> client. If I get further on creating different functionality's I'll be sure to keep people up-to date if interested.

EDIT:

Small fix that annoyed me when going up the stairs in pallet_hero_home_1f.

Open the json map file and search for; "destination":"[\"pallet_hero_home_2f\", 10, 3, 3]", (Original on line 52) and replace it with; "destination":"{\"mapName\": \"pallet_hero_home_2f\", \"x\":10, \"y\":3, \"direction\":3}",

This should fix it so that the character won't get a null value as x and y.

EDITT:

Currently working on the in battle bag. (Thought this would be eassier first) When I got progress I'll share it with you.
 
Last edited:
Thanks DeathLord17, I'm always interested in a good project. Going back I see this exist for quite a while and I had the feeling there wasn't much of development.. that's pretty much what you get when people want to keep things for themselves..

EDIT:

Quick update, I read in this topic that someone made a /fix command cause people got stuck. Since I didn't see the code on this forum I thought of releasing it;

Search in server.out.node.js for; client.socket.on("useWarp",$bind(this,this.e_useWarp));
Add below that the following code;

Code:
if(client.accountLevel >= 0) client.socket.on("fixPlayer",function(data) {
        _g.warp("pallet_hero_home_2f", 1, 3, 0);
    });

In main.out.js search for; pokemmo.Chat.sendMessage = function() { var str = pokemmo.Chat.chatBox.value;

Add below that;

Code:
if(str.indexOf("/fix") == 0 && pokemmo.Game.accountLevel >= 0) {
        pokemmo.Connection.socket.emit("fixPlayer");
        pokemmo.Chat.resetChat();
        pokemmo.Main.jq(pokemmo.Main.onScreenCanvas).focus();
        return;
    }

Hope this helps.
 
Last edited:
Thanks DeathLord17, I'm always interested in a good project. Going back I see this exist for quite a while and I had the feeling there wasn't much of development.. that's pretty much what you get when people want to keep things for themselves..

EDIT:

Quick update, I read in this topic that someone made a /fix command cause people got stuck. Since I didn't see the code on this forum I thought of releasing it;

Search in server.out.node.js for; client.socket.on("useWarp",$bind(this,this.e_useWarp));
Add below that the following code;

Code:
if(client.accountLevel >= 0) client.socket.on("fixPlayer",function(data) {
        _g.warp("pallet_hero_home_2f", 1, 3, 0);
    });

In main.out.js search for; pokemmo.Chat.sendMessage = function() { var str = pokemmo.Chat.chatBox.value;

Add below that;

Code:
if(str.indexOf("/fix") == 0 && pokemmo.Game.accountLevel >= 0) {
        pokemmo.Connection.socket.emit("fixPlayer");
        pokemmo.Chat.resetChat();
        pokemmo.Main.jq(pokemmo.Main.onScreenCanvas).focus();
        return;
    }

Hope this helps.
Try making your command a bit more player friendly, like sending them back to the last pokecenter they used.
 
Back