Jump to content
KeyWorld

roBrowser - Ragnarok Online for Web Browsers

Recommended Posts

2014/04/02 16:42:09 [error] 16301#0: *106 open() "/usr/share/nginx/html/roBrowser/client/data/texture/lots/ro2_leafy01.bmp" failed (2: No such file or directory), client: 111.91.78.91,  

This even happens if I load my RO Folder (Via Drag and Drop) Using Chrome. (I have the file in GRF in local folder, even in data folder of local folder, Also that file exists in the data folder of VPS and GRF) The above file also exists.

 

This causes MAP to not load and loading stucks at 100% (after char select)

Edited by Dastgir Pojee

Share this post


Link to post
Share on other sites
[Sat Apr 05 20:21:43 2014] [error] [client 127.0.0.1] File does not exist: C:/Xampp/htdocs/ro/client/data/texture/xc3x80xc2xafxc3x80xc3xbaxc3x80xc3x8exc3x85xc3x8dxc3x86xc3xa4xc3x80xc3x8cxc2xbdxc2xba/bgi_temp.png, referer: http://localhost/ro/build/ThreadEventHandler.js[Sat'>http://localhost/ro/build/ThreadEventHandler.js[Sat Apr 05 20:21:43 2014] [error] [client 127.0.0.1] File does not exist: C:/Xampp/htdocs/ro/client/data/lua files/admin/pcjobname.lub, referer: http://localhost/ro/build/ThreadEventHandler.js[Sat'>http://localhost/ro/build/ThreadEventHandler.js[Sat Apr 05 20:21:43 2014] [error] [client 127.0.0.1] File does not exist: C:/Xampp/htdocs/ro/client/data/lua files/admin/pcjobnamegender.lub, referer: http://localhost/ro/build/ThreadEventHandler.js[Sat'>http://localhost/ro/build/ThreadEventHandler.js[Sat Apr 05 20:21:43 2014] [error] [client 127.0.0.1] File does not exist: C:/Xampp/htdocs/ro/client/data/lua files/datainfo/weapontable.lub, referer: http://localhost/ro/build/ThreadEventHandler.js[Sat'>http://localhost/ro/build/ThreadEventHandler.js[Sat Apr 05 20:21:44 2014] [error] [client 127.0.0.1] File does not exist: C:/Xampp/htdocs/ro/client/data/texture/xc3x80xc2xafxc3x80xc3xbaxc3x80xc3x8exc3x85xc3x8dxc3x86xc3xa4xc3x80xc3x8cxc2xbdxc2xba/scroll0down.png, referer: http://localhost/ro/build/ThreadEventHandler.js

Apache errors..

 

@edit

 

In Chrome It works great but when i am using firefox it only shows black screen..

 

@edit

I managed to make it work with firefox. I didn't notice that I set debug to true. >.<

Edited by quesoph

Share this post


Link to post
Share on other sites

@Dastgir Pojee

I don't think it's related to the image. Even if roBrowser can't run a resource it continue to run (except if it's a RSW, GND or GAT file, but in this cas it show an error window).

So your best luck here is to open your web browser development console to check for errors.

Share this post


Link to post
Share on other sites

@Dastgir Pojee

I don't think it's related to the image. Even if roBrowser can't run a resource it continue to run (except if it's a RSW, GND or GAT file, but in this cas it show an error window).

So your best luck here is to open your web browser development console to check for errors.

 
But, PacketClient = 20130807 , So Shoundn't it read luafiles514 folder?

Share this post


Link to post
Share on other sites

Would it be possible to add some kind langtype support, such as chinese? Seems changing encoding on browser is not enough to display those characters.

Share this post


Link to post
Share on other sites

@Dastgir Pojee

No for now roBrowser doesn't read luafiles514 folder (what the hell is this name ?)

But to be honest, I have some doubts about lua support and I think about dropping it from roBrowser and instead playing with javascript file stored in DB (I don't have a good enough lua/lub loader).

 

@Aeonim

Just change the page meta charset (from api.html if you are using the api to run roBrowser) would be enough.

Share this post


Link to post
Share on other sites

@Dastgir Pojee

No for now roBrowser doesn't read luafiles514 folder (what the hell is this name ?)

But to be honest, I have some doubts about lua support and I think about dropping it from roBrowser and instead playing with javascript file stored in DB (I don't have a good enough lua/lub loader).

 

@Aeonim

Just change the page meta charset (from api.html if you are using the api to run roBrowser) would be enough.

its named luafiles514 because it is compiled with (lua 5.1.4)

What if we have customs and want to use it with roBrowser, we would need to edit other files for roBrowser?

Share this post


Link to post
Share on other sites

That make sense.

 

For now roBrowser only parse some lub files.

// (from src/DB/DBManager.js)		DB.loadLuaByteTable('data/lua files/admin/pcidentity.lub',      onLoad());		DB.loadLuaByteTable('data/lua files/admin/pcjobname.lub',       onLoad());		DB.loadLuaByteTable('data/lua files/admin/pcjobnamegender.lub', onLoad());		DB.loadLuaByteTable('data/lua files/datainfo/accessoryid.lub',  onLoad());		DB.loadLuaByteTable('data/lua files/datainfo/accname.lub',      onLoad());		DB.loadLuaByteTable('data/lua files/datainfo/npcidentity.lub',  onLoad());		DB.loadLuaByteTable('data/lua files/datainfo/jobname.lub',      onLoad());		DB.loadLuaByteTable('data/lua files/datainfo/petinfo.lub',      onLoad());		DB.loadLuaByteTable('data/lua files/datainfo/weapontable.lub',  onLoad());
And there is no guaranty at all that it do it well (the loader is buggy).

So for now if you want to be sure to have custom hats/mobs, better to add it directly on the DB folder.

 

For items, it load them from old client files.

Share this post


Link to post
Share on other sites

Just change the page meta charset (from api.html if you are using the api to run roBrowser) would be enough.

That's the first thing I tried, apparently it truncates multi-byte character into single byte.

Share this post


Link to post
Share on other sites

That's the first thing I tried, apparently it truncates multi-byte character into single byte.

Ok I see, so I guess I just need an option to parse string as uint16 instead of uint8 to make it work.

Just to be sure, it means the max length of your character's name in chinese is 12 ? (24/2)

Share this post


Link to post
Share on other sites

If my .htacess is not producing any error, does it mean that my webhost is not reading it?

 

 

# Cause I am using http://client.domainname.com/ErrorDocument 404 /index.phpasdfsafd

I use asdfsafd to produce an error.. but It shows only white screen.

 

If my webhost is not reading it what should I do ?.

Edited by quesoph

Share this post


Link to post
Share on other sites

 

 

That's the first thing I tried, apparently it truncates multi-byte character into single byte.

Ok I see, so I guess I just need an option to parse string as uint16 instead of uint8 to make it work.

Just to be sure, it means the max length of your character's name in chinese is 12 ? (24/2)

 

 

As packet specification, yes it would be 12.

But I'm not sure use uint16 would solve the problem though, because a string can also mixed with numbers and English alphabets, those are still single byte.

Share this post


Link to post
Share on other sites

As packet specification, yes it would be 12.

But I'm not sure use uint16 would solve the problem though, because a string can also mixed with numbers and English alphabets, those are still single byte.

I guess in all case it use two bytes even if it's alpha in this case (just the second byte set to 0).

By chance, can you give me the binary data of a player talking with chinese and alphanumeric text in the same message ? Would be great to figure it out :D

 

 

If my .htacess is not producing any error, does it mean that my webhost is not reading it?

 

I use asdfsafd to produce an error.. but It shows only white screen.

If my webhost is not reading it what should I do ?.

If you have a white page, the .htaccess is read ! In the other case it would show a 404 error page. Try to set the debug mode to true to find the error.

I did some updates to the remote client code two days ago, it should be easier to debug.

Share this post


Link to post
Share on other sites

I guess in all case it use two bytes even if it's alpha in this case (just the second byte set to 0).

By chance, can you give me the binary data of a player talking with chinese and alphanumeric text in the same message ? Would be great to figure it out :D

So here I sent 测试test123

Hex: B2 E2 CA D4 74 65 73 74 31 32 33

Data sent to server: f3 00 17 00 53 61 6b 61 20 3a 20 b2 e2 ca d4 74 65 73 74 31 32 33 00

Share this post


Link to post
Share on other sites

Ok so it's just charset...

Good news there is an API in progress for browser, but only available in Firefox, a shim exist.

 

Would be good to have the list of charset based on the langtype, anyone want to help to generate it ?

Aeomin, if I'm not wrong the charset you used is "gbk" (I tested big5, euc-jp, euc-kr, ... without success).

Share this post


Link to post
Share on other sites

Ok so it's just charset...

Good news there is an API in progress for browser, but only available in Firefox, a shim exist.

 

Would be good to have the list of charset based on the langtype, anyone want to help to generate it ?

Aeomin, if I'm not wrong the charset you used is "gbk" (I tested big5, euc-jp, euc-kr, ... without success).

yes I use gbk, which is what client uses. big5 is for traditional chinese, I'm not sure whether Taiwan RO or so uses it but gbk includes both simplified chinese and traditional chinese. jp and kr is Japanese and Korean.

By charset I assume you are using it in webgl render text? I guess what you are trying is convert to unicode and render using freetype. If that's the case, I'll try find something.

Edited by Aeomin

Share this post


Link to post
Share on other sites

@Aeomin

I did some work but can't find a way to encode it again to the packet.

So I start working using TextEncoder/TextDecoder api, a WIP draft, there is a shim available so great for now.

 

I start with a binary:

var data = new Uint8Array([0xB2, 0xE2, 0xCA, 0xD4, 0x74, 0x65, 0x73, 0x74, 0x31, 0x32, 0x33]);

Decode it:

var str = TextDecoder('gbk').decode(data);// result: "测试test123"

 

Works great, it print "测试test123".

Now the problem is when you have the string and want to pack it to the binary (to send the text to the server).

var data = TextEncoder().encode(str);// result: [ 0xE6, 0xB5, 0x8B, 0xE8, 0xAF, 0x95, 0x74, 0x65, 0x73, 0x74, 0x31, 0x32, 0x33 ];

As you see it doesn't match the first binary data.

Currently checking if there is not a way to fix it without having to recode all charset functions by hand.

 

Edit: Just did some progress, I'll give some news soon.

Edited by KeyWorld

Share this post


Link to post
Share on other sites

@Aeomin

I did some work but can't find a way to encode it again to the packet.

So I start working using TextEncoder/TextDecoder api, a WIP draft, there is a shim available so great for now.

 

I start with a binary:

var data = new Uint8Array([0xB2, 0xE2, 0xCA, 0xD4, 0x74, 0x65, 0x73, 0x74, 0x31, 0x32, 0x33]);
Decode it:
var str = TextDecoder('gbk').decode(data);// result: "测试test123"
 

Works great, it print "测试test123".

Now the problem is when you have the string and want to pack it to the binary (to send the text to the server).

var data = TextEncoder().encode(str);// result: [ 0xE6, 0xB5, 0x8B, 0xE8, 0xAF, 0x95, 0x74, 0x65, 0x73, 0x74, 0x31, 0x32, 0x33 ];
As you see it doesn't match the first binary data.

Currently checking if there is not a way to fix it without having to recode all charset functions by hand.

 

Edit: Just did some progress, I'll give some news soon.

 

 

You can try https://github.com/inexorabletash/text-encoding

Share this post


Link to post
Share on other sites

That's why i used, with some comments to encode back to the original charset.

 

I did a branch "charset" to test, now i just need the charset of each langtype to complete it.

Share this post


Link to post
Share on other sites

That's why i used, with some comments to encode back to the original charset.

 

I did a branch "charset" to test, now i just need the charset of each langtype to complete it.

What's the format for the charset?

 

BTW, I'm not sure whether the langtype you are basing of clientinfo. If was basing on clientinfo, then japan would be 2 and china would be 3, there is no sakray.

Edited by Aeomin

Share this post


Link to post
Share on other sites

This is what I have for now:

		var charset = 'utf-8';		// TODO: find charset based on langtype		switch (Session.LangType) {			case 0x00: // CLIENTTYPE_KOREAN			case 0x01: // CLIENTTYPE_ENGLISH			case 0x02: // CLIENTTYPE_SAKRAY			case 0x03: // CLIENTTYPE_JAPAN			case 0x04: // CLIENTTYPE_CHINA			case 0x05: // CLIENTTYPE_TAIWAN			case 0x06: // CLIENTTYPE_HONGKONG			case 0x07: // CLIENTTYPE_THAI			case 0x08: // CLIENTTYPE_LOCAL			case 0x09: // CLIENTTYPE_JAPAN_SAKRAY			case 0x0a: // CLIENTTYPE_THAI_SAKRAY			case 0x0b: // CLIENTTYPE_TAIWAN_SAKRAY			case 0x0c: // CLIENTTYPE_INDONESIA			case 0x0d: // CLIENTTYPE_INDONESIA_SAKRAY			case 0x0e: // CLIENTTYPE_ENGLISH_SAKRAY			case 0x0f: // CLIENTTYPE_PHILIPPINE			case 0x10: // CLIENTTYPE_MALAYSIA			case 0x11: // CLIENTTYPE_SINGAPORE			case 0x12: // CLIENTTYPE_PHILIPPINE_SAKRAY			case 0x13: // CLIENTTYPE_THAI_FREE			case 0x14: // CLIENTTYPE_GERMANY			case 0x15: // CLIENTTYPE_INDIA			case 0x16: // CLIENTTYPE_BRAZIL			case 0x17: // CLIENTTYPE_AUSTRALIA			case 0x18: // CLIENTTYPE_KOREAN_PK			case 0x19: // CLIENTTYPE_RUSSIA			case 0x1a: // CLIENTTYPE_VIETNAM			case 0x1b: // CLIENTTYPE_PHILIPPINE_PK			case 0x1c: // CLIENTTYPE_JAPAN_PK			case 0x1d: // CLIENTTYPE_THAI_PK			case 0x1e: // CLIENTTYPE_CHILE			case 0x1f: // CLIENTTYPE_FRANCE			case 0x20: // CLIENTTYPE_VIETNAM_PK			case 0x21: // CLIENTTYPE_VIETNAM_SAKRAY			case 0x22: // CLIENTTYPE_INDONESIA_PK			case 0x23: // CLIENTTYPE_UAE		}

 

And I'll add :

case 0xFF: charset = 'gbk'; break; // example

 

But for now I don't have any source informations about it.

Share this post


Link to post
Share on other sites

April news

  • [*]Did some updates to the website:
http://www.robrowser.com/ [*]Add support for 2014 packets. [*]Introduce NPC Store UI. [*]Add Skill description Window. [*]Add support for multiple map-server. [*]Introduce Screenshot system (alt + P) - experimental. [*]Introduce a lot of effects. [*]Add a STR Viewer to the repo. [*]Add emotions and status effects. [*]As all months, massive bugs fix.

 

 

emotions.jpg
status.jpg
meteor.jpg
store.jpg
skill.jpg
screenshot.jpg

Edited by KeyWorld

Share this post


Link to post
Share on other sites

Woot nice. Awesomely done <3 I played your Demo and a server that uses the browser and it's fantastic. The only issue is... roBrowser is pretty laggy with Safari but when I use Chrome it's a lot better ;3

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.