|  [Release] Message Customizer! Live (Gradient) | 
| Author: | Message: | 
| markee Veteran Member
 
      
 
  
 Posts: 1622
 Reputation: 50
 37 /
  /  Joined: Jan 2006
 
 | | RE: [Release] Gradient text v1.20 quote:Originally posted by stuartbennett
 ok i have any idea, i would like to be able to rainbow gradient my message so it starts off as red then goes through the other colours of the rainbow until finally going to pink, unfortunately the existing gradient script doesnt give you the option of using more than 2 colours in the gradient, can this be fixed?
 
 This could be done but it is going to take quite a lot more effort, I'll see what I can do for you.  Do you think I should make a special one that makes a rainbow ow one that you can have 3 or more colours gradients? Either way I think it will become quite messy and long when you type something with all the hidden colours, especially for short messages like 'ok' and it will reduce the amount you can write quite substancially even using the BBcode for the gradients.  I will still see what I can do for you though | 
 | 
| 07-23-2006 11:33 PM |  | 
|  | 
| stuartbennett Senior Member
 
     
 
  
 Posts: 952
 Reputation: 1
 44 /
  /  Joined: Nov 2003
 
 | | RE: [Release] Gradient text v1.20 markee, thanks for looking into it for me, i guess either way would be cool i look to you guys to make the best choice on this one after all you have the experience in making these things. i do see your point about reducing how much you can type in messenger, i dont suppose its possible for anyone to write a script that increases the amount of characters message can have, i know plus does this up to 1100 but maybe if a script could take it upto say 11000 thatd be plenty even for long messages with gradients. as for short messages well perhaps below a certain amount of characters a rainbow wont be possible in which case it would just use a few colours from the rainbow i am not really sure. | 
 | 
| 07-24-2006 05:53 AM |  | 
|  | 
| NanaFreak Scripting Contest Winner
 
      
 
 Posts: 1476
 Reputation: 53
 33 /
  /  Joined: Jul 2006
 
 | | O.P.  RE: [Release] Gradient text v1.21 Sorry but there is a new version. The old one (v1.20) wouldnt let BBCode work. But it is fixed now sorry about that. Now for hexdecimals you dont need the #. This post was edited on 07-24-2006 at 10:05 AM by NanaFreak.
 | 
 | 
| 07-24-2006 09:36 AM |  | 
|  | 
| stuartbennett Senior Member
 
     
 
  
 Posts: 952
 Reputation: 1
 44 /
  /  Joined: Nov 2003
 
 | | RE: [Release] Gradient text v1.21 sounds great ill download the update as soon as i get home tonight. | 
 | 
| 07-24-2006 11:46 AM |  | 
|  | 
| Shondoit Full Member
 
    
 
  Hmm, Just Me...
 
 Posts: 227
 Reputation: 15
 37 /
  /  Joined: Jul 2006
 
 | | RE: [Release] Gradient text v1.21 Hey JJ, I downloaded your script for learning purposes, and when I went to your script I noticed the Hex to Decimal stuff, colorcode to number. I think I can make that piece of code a lot shorter? Do you want me to help you out? This post was edited on 07-24-2006 at 07:04 PM by Shondoit.
 | 
 | 
| 07-24-2006 07:04 PM |  | 
|  | 
| markee Veteran Member
 
      
 
  
 Posts: 1622
 Reputation: 50
 37 /
  /  Joined: Jan 2006
 
 | | RE: [Release] Gradient text v1.21 quote:Originally posted by Shondoit
 Hey JJ, I downloaded your script for learning purposes, and when I went to your script I noticed the Hex to Decimal stuff, colorcode to number. I think I can make that piece of code a lot shorter? Do you want me to help you out?
 
 That would be nice.  I just tried to get it done quickly so that it would be ready for the weekend like I said it was going to be.  I don't mind it how it is already but if people are willing to help to make my code better then I'm very willing to listen.
 
If you need help understanding anything in it either to help you learn just PM me or something an I'll be glad to help, I know the script doesn't explain much. | 
 | 
| 07-25-2006 02:57 AM |  | 
|  | 
| Psycko New Member
 
  
 
 Posts: 4
 Joined: Jul 2006
 
 | | RE: [Release] Gradient text v1.21 Ever considered building in the hexadecimal color codes?
 It would be a bit more convenient than having to look them up online.
 
 You could do base colors, if you dont wanna get too complicated.
 
 
 (By the way, I'm not able to choose black as part of my gradient. Is this a bug?)
 | 
 | 
| 07-26-2006 08:14 AM |  | 
|  | 
| markee Veteran Member
 
      
 
  
 Posts: 1622
 Reputation: 50
 37 /
  /  Joined: Jan 2006
 
 | | RE: RE: [Release] Gradient text v1.21 quote:Originally posted by Psycko
 Ever considered building in the hexadecimal color codes?
 
 It would be a bit more convenient than having to look them up online.
 
 You could do base colors, if you dont wanna get too complicated.
 
 
 (By the way, I'm not able to choose black as part of my gradient. Is this a bug?)
 
 
 Ok, I quickly fixed this bug with the colour black for you, I'll first update it here and when Jay_Jay is online next he will update the main post.  Also you don't need to know the hexadecimal, you can use the numbers like 0 for white, 1 for black, 3 for green, etc just like as if you were using the gradients normally, I even have it convert from this to hexadecimal for you.  An easier way of getting the hexadecimal also is to make a custom colour in the select colour area (bottom right corner).  I hope this helps and I'm sorry for your confusion, maybe we should have stated it better.
EDIT:  File updated on front page, enjoy  This post was edited on 07-26-2006 at 09:39 AM by markee.
 | 
 | 
| 07-26-2006 08:50 AM |  | 
|  | 
| Shondoit Full Member
 
    
 
  Hmm, Just Me...
 
 Posts: 227
 Reputation: 15
 37 /
  /  Joined: Jul 2006
 
 | | RE: [Release] Gradient text v1.22 JJ/Markee 
I'm done changing the code it is a lot smaller now, and a lot easier to read... 
I've added two functions: convertToHex and convertToDec and changed the average colors algorithm...
 
I haven't tested it yet, but it shouldn't give any problems...
 code:function convertToHex(val)
 {
 var Hex = "0123456789ABCDEF";
 var ret = "";
 while (n != 0)
 {
 ret = Hex.charAt(n & 16) + ret;
 n >>>= 4;
 }
 return (ret.length == 0) ? "0" : ret;
 }
 function convertToDec(val)
 {
 return parseInt(val,16)
 }
 //IRC Stuff
 function Irc(sMessage,ChatWnd)
 {
 var Message = sMessage
 var length = Message.length
 var WSH = new ActiveXObject('WScript.Shell');
 var colour1 = WSH.RegRead(MsgPlus.ScriptRegPath + Messenger.MyUserId + "\\irc\\colour1")
 var colour2 = WSH.RegRead(MsgPlus.ScriptRegPath + Messenger.MyUserId + "\\irc\\colour2")
 var c11 = convertToDec(colour1.substr(0,2))
 var c12 = convertToDec(colour1.substr(2,2))
 var c13 = convertToDec(colour1.substr(4,2))
 var c21 = convertToDec(colour2.substr(0,2))
 var c22 = convertToDec(colour2.substr(2,2))
 var c23 = convertToDec(colour2.substr(4,2))
 k = (length >= 16) ? 16 : length;
 var A = ((c21 - c11) / k);
 var B = ((c22 - c12) / k);
 var C = ((c23 - c13) / k);
 var colour = new Array();
 for (i = 0; i <= k-1; i++)
 {
 var U1 = convertToHex(Math.round(A * i + c11));
 var U2 = convertToHex(Math.round(B * i + c12));
 var U3 = convertToHex(Math.round(C * i + c13));
 var number = "" + U1 + U2 + U3;
 colour[i] = number
 }
 var eMessage = "0";
 var x = 0;
 var j = length/16;
 if (length >= 16)
 {
 for(i = 0; i < length; i++)
 {
 if (i == Math.floor(x*j))
 {
 eMessage = eMessage + "#" + colour[x] + "" + Message.charAt(i)
 x++
 }
 else
 {
 eMessage = eMessage + Message.charAt(i)
 }
 }
 if (i == 16)
 {
 eMessage = eMessage + ""
 }
 }
 else
 {
 for(k = 0; k < length; k++)
 {
 eMessage = eMessage + "#" + colour[k] + "" + Message.charAt(k) + ""
 }
 }
 Message = eMessage
 return Message;
 }
 
This post was edited on 07-26-2006 at 11:25 AM by Shondoit.
 | 
 | 
| 07-26-2006 11:24 AM |  | 
|  | 
| Psycko New Member
 
  
 
 Posts: 4
 Joined: Jul 2006
 
 | | RE: RE: [Release] Gradient text v1.21 quote:Originally posted by Psycko
 Ever considered building in the hexadecimal color codes?
 
 It would be a bit more convenient than having to look them up online.
 
 You could do base colors, if you dont wanna get too complicated.
 
 
 (By the way, I'm not able to choose black as part of my gradient. Is this a bug?)
 
 
 Thanks. (: | 
 | 
| 07-27-2006 03:40 AM |  | 
|  | 
| Pages: (18): 
« First
 
«
 
 1
 2
 3
 [ 4 ]
 5
 6
 7
 8
 
»
 
Last » | 
|  |