After more color tests - the colors are fine the way they are. Unsure why but they do work on a ### ### ### style format. It takes time to get a feel for the color shifts because as far as I can tell it isnt an exact 0-255 for each set of ### but it seems it is close.
So for instance it going R### G### B###: 000 000 050 (just type 50 for color) is a blue 000 000 000 is a deep black....way darker then sony ever allowed. Easiest to get a sense of where ya want to be by picking a number like 50 then adding a digit 500, 5000, 5000 etc and youll see the colors change and will give you a place to start. Don't think coloring weaps and shields is possible at this time so removing sql from submission for now |
You don't need an int64 to hold a color, they are 24 bits and fit just fine in an int.
Try something like this. I didn't compile it, but you should be able to get the idea from it. Code:
if(!strcasecmp(sep->arg[1], "armorcolor")) { 1) Change Bot::GetID to be const, don't make a new function that does exactly the same thing. 2) You don't need to use Bot::GetEquipmentColor() to call your function, just GetEquipmetColor() will call it. 3) You don't need Bot::SendWearChange at all. It's just a copy of Mob::SendWearChange. |
Quote:
Running tests right now. Criimson |
Sorry, I made a typo in the original code.
Here are the two corrected bits. Code:
uint32 setcolor = (red << 16) | (green << 8) | blue; |
Well the code as written doesn't work. It returns 1 no matter what is entered.
Will keep testing and trying to figure it out Being able to enter RGB would be nice. AFter looking at a couple of websites on color in code I was wondering does EQ use RGB or ARGB? EDIT: didnt see your reply will look into it Good sites: http://www.codeproject.com/KB/graphics/color.aspx http://developer.android.com/referen...ics/Color.html |
Yeah, sorry about the errors. Editing in the reply window is a pain. :(
The colors themselves are just RGB. I'm not sure what the high byte is actually used for, but if you look at Mob::SetSlotTint it seems like the client either expects a 0 for no color, or 0xff for any color. I don't know if any other value might work there. I'd guess the current value was found through either trial and error or packet collects to make the client happy. |
I have to say: lerxst2112 you are great
I really appreciate all of the help while I learn. I am too stubborn to say I can't do it or learn it and its nice to have someone help when stuck. Your code works great. I had to remove the Code:
if(setcolor) { Criimson EDIT: yea using this RGB system is nice. I sat there for like 5 minutes just testing it on my enchanter, watching her rob change |
Yes, when examined as an integer that will be a negative number, but the reality is that the colors are 4 separate bytes, so displaying it as one int doesn't make sense.
If it works without that then I guess it's fine, but the other code that manipulates colors does do it that way. If you need to display the color you could extract the values again and display that. Something like this assuming the color variable is named color. Code:
uint8 red = (color >> 16) & 0xff; I'm glad it works, and I hope you enjoy your colorful bots. :) |
The check was already there but written differently. For some reason when I compiled with your check it would hang on that and not except any input. So I just went with my original check.
And yea its nice to be able to say I want my druid in green and not have to hunt through tons of almost random numbers to find a shade close. Now its "I want this color" and wham |
Hey wow you guys took it and ran with it. I am hoping I get some time soon to check this stuff out too. Great job guys.
|
Quote:
|
All times are GMT -4. The time now is 11:51 PM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.