Private Server Info and Support Thread

05/06/2017 21:21 manulaiko3.0#2881
Quote:
Originally Posted by 0wnix View Post
Okay ty, I'll see what I can do against that then
You certainly could color names, a clear example is the members of your same clan. However I ignore which packet made this, maybe some map event related packet ("0|n...")
05/06/2017 21:28 0wnix#2882
Quote:
Originally Posted by manulaiko3.0 View Post
You certainly could color names, a clear example is the members of your same clan. However I ignore which packet made this, maybe some map event related packet ("0|n...")
From what I've seen so far, username's label color is defined on living entity creation ("C" packet)
However I found out that in the video's window, colors are formatted with sort of html tags (<blue></blue>...)
I could "clone" this function and make it works with player's labels just by appending the "html" tags between chars (that way I could have colored usernames, but also multiple colors per username)


[Only registered and activated users can see links. Click Here To Register...]
05/06/2017 22:25 manulaiko3.0#2883
Quote:
Originally Posted by 0wnix View Post
From what I've seen so far, username's label color is defined on living entity creation ("C" packet)
However I found out that in the video's window, colors are formatted with sort of html tags (<blue></blue>...)
I could "clone" this function and make it works with player's labels just by appending the "html" tags between chars (that way I could have colored usernames, but also multiple colors per username)


[Only registered and activated users can see links. Click Here To Register...]
I would have to look at that, I'm sure there's an easier method rather than editing main.swf, at least for white/blue/green/red usernames, idk about other colors.

I'll take a look at the client and tell you if I find something.
05/06/2017 22:41 0wnix#2884
Quote:
Originally Posted by manulaiko3.0 View Post
I would have to look at that, I'm sure there's an easier method rather than editing main.swf, at least for white/blue/green/red usernames, idk about other colors.

I'll take a look at the client and tell you if I find something.

I've been trying things on the main.swf but every time I saved it, it got corrupted... I will try with another decompiler
I found an "easy" way to do it


Code:
       else if(this.clanDiplomacy == 2)
         {
            _loc4_ = PatternManager.colorPatterns["noAttackPact"];
         }
         else if(this.clanDiplomacy == 3)
         {
            _loc4_ = PatternManager.colorPatterns["atWar"];
         }


// _loc4_ is the clan tag and _loc3_ the username
I could just add more colors depending of the clanDiplomacy (sent through the "C" packet) and register them in game.xml
Still I need to be able to rebuild the client without corrupting it :3
05/06/2017 23:00 manulaiko3.0#2885
Quote:
Originally Posted by 0wnix View Post
I've been trying things on the main.swf but every time I saved it, it got corrupted... I will try with another decompiler
I found an "easy" way to do it


Code:
       else if(this.clanDiplomacy == 2)
         {
            _loc4_ = PatternManager.colorPatterns["noAttackPact"];
         }
         else if(this.clanDiplomacy == 3)
         {
            _loc4_ = PatternManager.colorPatterns["atWar"];
         }


// _loc4_ is the clan tag and _loc3_ the username
I could just add more colors depending of the clanDiplomacy (sent through the "C" packet) and register them in game.xml
Still I need to be able to rebuild the client without corrupting it :3
Try with JPEX FFDec, if still doesn't work you'll probably have to edit the bytecode with flasm
05/06/2017 23:27 cryz35#2886
Quote:
Originally Posted by manulaiko3.0 View Post
Try with JPEX FFDec, if still doesn't work you'll probably have to edit the bytecode with flasm
edit bytecode with JPEXS. if it doesnt work, try increasing maxstacks.
wrong quote. lul
05/06/2017 23:34 0wnix#2887
Quote:
Originally Posted by manulaiko3.0 View Post
Try with JPEX FFDec, if still doesn't work you'll probably have to edit the bytecode with flasm



[Only registered and activated users can see links. Click Here To Register...]


Worked by editing P-code instead of AS-code - btw I only managed to insert _loc3_ = PatternManager.colorPatterns["test"]; because I don't understand how the ifs work in P-code (ofs0173, ofs0157 etc.. ??)

EDIT: I've managed to add ifs by editing the addresses, for example if you have ifne ofs0157, then for your next if you will have ofs0157:getlocal_0
[Only registered and activated users can see links. Click Here To Register...]
game.xml
Code:
      <color key="pydo1" color="555555"/>
        <color key="pydo2" color="b663ff"/>
        <color key="pydo3" color="e9f904"/>
        <color key="pydo4" color="33ff33"/>
05/07/2017 00:33 manulaiko3.0#2888
Quote:
Originally Posted by 0wnix View Post
[Only registered and activated users can see links. Click Here To Register...]


Worked by editing P-code instead of AS-code - btw I only managed to insert _loc3_ = PatternManager.colorPatterns["test"]; because I don't understand how the ifs work in P-code (ofs0173, ofs0157 etc.. ??)

EDIT: I've managed to add ifs by editing the addresses, for example if you have ifne ofs0157, then for your next if you will have ofs0157:getlocal_0
[Only registered and activated users can see links. Click Here To Register...]
game.xml
Code:
      <color key="pydo1" color="555555"/>
        <color key="pydo2" color="b663ff"/>
        <color key="pydo3" color="e9f904"/>
        <color key="pydo4" color="33ff33"/>
That's a nice work.

Btw, instead of manually setting the color you could send the hex color in the ship initialization and ship create commands.
05/07/2017 00:41 0wnix#2889
Quote:
Originally Posted by manulaiko3.0 View Post
That's a nice work.

Btw, instead of manually setting the color you could send the hex color in the ship initialization and ship create commands.
Thanks - regarding the hex thing, I think that would be much harder to achieve through p-code / also I now have every primary/secondary color, which is enough I guess :p


Unfortunately, with my trick, I can't have multicolored usernames :/
05/07/2017 00:49 S7K Yuuki#2890
Yay finally some quality posts!

Good to see you back @[Only registered and activated users can see links. Click Here To Register...]x ^^

Regards.-
05/07/2017 01:11 manulaiko3.0#2891
Quote:
Originally Posted by 0wnix View Post
Thanks - regarding the hex thing, I think that would be much harder to achieve through p-code / also I now have every primary/secondary color, which is enough I guess :p


Unfortunately, with my trick, I can't have multicolored usernames :/
For multicolored names I think the best solution would be sending the suername with the colors and formatting it in the client. Obviously won't be easy, but shouldn't be hard either.
Something like #0f0f0fUsername#ffffffMulti#c3c3c3Colored. Or using ANSI instead of hex colors
05/07/2017 01:54 0wnix#2892
Yeah that's somehow what I wanted to do first, but it would take way too much time for what it's worth - so I won't do that :V
05/09/2017 11:11 manulaiko3.0#2893
I've been working on properly building the drones packet, this is the result:

[Only registered and activated users can see links. Click Here To Register...]

It works with all drone combinations, from 0 to 12 (you can have more, but only 12 will be sent to the client).

This is how they're positioned:

* 1 to 4: all at bottom.
* 5: 3 at bottom, 1 to the left, 1 to the right.
* 6: 4 at bottom, 1 to the left, 1 to the right.
* 7: 3 at bottom, 2 to left, 2 to right.
* 8: 4 at bottom, 2 to left, 2 to right.
* 9: 3 at bottom, 3 to left, 3 to right.
* 10: 4 at bottom, 3 to left, 3 to right.
* 11: 3 at bottom, 4 to left, 4 to right.
* 12+: 4 at bottom, 4 to left, 4 to right.

You can edit how they're positioned by looking at the _setGroups method.
Here's the source so you can take a look at how they work (I won't be helping copypasters): [Only registered and activated users can see links. Click Here To Register...]

One more pic 'cuz it's cool af:
[Only registered and activated users can see links. Click Here To Register...]

I'm using client 1.6 but it should work with client 4.1 too.
05/09/2017 13:01 olitis1#2894
Quote:
Originally Posted by manulaiko3.0 View Post
I've been working on properly building the drones packet, this is the result:

[Only registered and activated users can see links. Click Here To Register...]

It works with all drone combinations, from 0 to 12 (you can have more, but only 12 will be sent to the client).

This is how they're positioned:

* 1 to 4: all at bottom.
* 5: 3 at bottom, 1 to the left, 1 to the right.
* 6: 4 at bottom, 1 to the left, 1 to the right.
* 7: 3 at bottom, 2 to left, 2 to right.
* 8: 4 at bottom, 2 to left, 2 to right.
* 9: 3 at bottom, 3 to left, 3 to right.
* 10: 4 at bottom, 3 to left, 3 to right.
* 11: 3 at bottom, 4 to left, 4 to right.
* 12+: 4 at bottom, 4 to left, 4 to right.

You can edit how they're positioned by looking at the _setGroups method.
Here's the source so you can take a look at how they work (I won't be helping copypasters): [Only registered and activated users can see links. Click Here To Register...]

One more pic 'cuz it's cool af:
[Only registered and activated users can see links. Click Here To Register...]

I'm using client 1.6 but it should work with client 4.1 too.
That's a great class! Keep up the good work!

Between, when I worked with 1.6 client, I noticed that movement wasn't smooth, it was like all the ships were moving slowlier than they should have.

Isn't the move's code like this?

Code:
"0|1|shipId|finalX|finalY|timeToReachFinalPoint"
05/10/2017 11:05 ItsTequila#2895
Quote:
Originally Posted by olitis1 View Post
That's a great class! Keep up the good work!

Between, when I worked with 1.6 client, I noticed that movement wasn't smooth, it was like all the ships were moving slowlier than they should have.

Isn't the move's code like this?

Code:
"0|1|shipId|finalX|finalY|timeToReachFinalPoint"
That's the hero movement packet. In fact that's the only packet you should send about your own movement. The other one which is the global move command you should send to all the rest of the entities however I tested it and well it doesn't make much of a difference to me but can do to you =)