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...")
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)
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)
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 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
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
Try with JPEX FFDec, if still doesn't work you'll probably have to edit the bytecode with flasm
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 game.xml
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 game.xml
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
Unfortunately, with my trick, I can't have multicolored usernames :/
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
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
I've been working on properly building the drones packet, this is the result:
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):
One more pic 'cuz it's cool af:
I'm using client 1.6 but it should work with client 4.1 too.
I've been working on properly building the drones packet, this is the result:
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):
One more pic 'cuz it's cool af:
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.
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 =)
Private private server :P READ FOR MORE INFO 12/01/2010 - SRO Private Server - 12 Replies hey guys im wondering if there is anyway to make a real private server like ZSZC or SWSRO or MYSRO but to where i can only play and level a character and as if it was a real private server. but just for me, not like an emulator where im already lvl 90 or 120 or whatever. i mean one where i set the rates and i level. if not then ok u can close this. but i was just wondering.