From what I've seen so far, username's label color is defined on living entity creation ("C" packet)Quote:
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...")
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.Quote:
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...]
Quote:
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.
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
Try with JPEX FFDec, if still doesn't work you'll probably have to edit the bytecode with flasmQuote:
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
I could just add more colors depending of the clanDiplomacy (sent through the "C" packet) and register them in game.xmlCode: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
Still I need to be able to rebuild the client without corrupting it :3
Quote:
Try with JPEX FFDec, if still doesn't work you'll probably have to edit the bytecode with flasm
<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.Quote:
[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"/>
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 :pQuote:
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.
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.Quote:
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 :/
That's a great class! Keep up the good work!Quote:
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.
"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 =)Quote:
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"