Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Bots

Development::Bots Forum for bots.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #23  
Old 07-18-2011, 11:23 PM
lerxst2112
Demi-God
 
Join Date: Aug 2010
Posts: 1,742
Default

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;
uint8 green = (color >> 8) & 0xff;
uint8 blue = color & 0xff;
I saw you commented out the check for the proper number of parameters. You should probably check that since trying to extract the values if the player doesn't type the line correctly could cause a crash or some very unpredictable behaviour.

I'm glad it works, and I hope you enjoy your colorful bots.
Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 09:27 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3