Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 05-04-2012, 03:34 PM
Gunderak Gunderak is offline
Coder
Gunderak's Avatar
Join Date: Jun 2011
Location: Australia
Posts: 795
Gunderak is on a distinguished road
shared.getAlignmentColor(player.ap)

Not sure if it will help anyone, but I confused myself for a little bit but eventually figured it out.
If you would like to use this for custom names, to get the actual colors instead of it returning 0-255 (which won't help) you need to divide it by 255.
eg:
PHP Code:
  temp.apcolors shared.getAlignmentColor(player.ap);
  
//Gets the color in an array {red, green, blue}
  
temp.apcolors = {apcolors[0]/255apcolors[1]/255apcolors[2]/255};
  
//Divides the value by 255 to get the actual
  //color needed and add it to an array. 
__________________

Gund for president.

Remote PM {P*}x (Graal813044) from eraiphone -> Stefan: I hav 1 qustion
*Gunderak: he hav 1
*Gunderak: qustion

Last edited by Gunderak; 05-04-2012 at 05:39 PM..
Reply With Quote
 


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 +2. The time now is 07:04 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.