Dori Posted November 11, 2013 Posted November 11, 2013 (edited) How can I put 2 different colors to the item amount and the item name according to this script? mes "- "+ getd(".@pt_"+ .@j3 +"["+ (.@i+1) +"]") +" "+ getitemname(getd(".@pt_"+ .@j3 +"["+ .@i +"]")); Edited November 11, 2013 by Phenex Quote
GmOcean Posted November 11, 2013 Posted November 11, 2013 By using color codes before each section that has a different color (this includes if you want text to display as black). mes "- ^FF0000"+ getd(".@pt_"+ .@j3 +"["+ (.@i+1) +"]") +" ^0000FF"+ getitemname(getd(".@pt_"+ .@j3 +"["+ .@i +"]")); That will make your above message display as wanted. ^RRGGBB ex. ^FF0000 = RED ex. ^00FF00 = GREEN ex. ^0000FF = BLUE ex. ^FFFFFF = WHITE ex. ^000000 = BLACK You can also refer to here: Color Codes for a list of other colors, the middle 6 Letters/numbers are what you use. 2 Quote
Dori Posted November 11, 2013 Author Posted November 11, 2013 (edited) It didn't quite work. The color for the item amount worked fine, but for the names; the color worked for the names but it continued on to the rest of the text the npc says.This is where I have been stuck too. Here how it looks like: - 5 apples- 5 orranges- 8 nuts bring these items bla bla bla bla that first dash (-) is black but the rest of them are also blue. Edited November 11, 2013 by Phenex Quote
0 Emistry Posted November 11, 2013 Posted November 11, 2013 mes "- ^FF0000"+ getd(".@pt_"+ .@j3 +"["+ (.@i+1) +"]") +" ^0000FF"+ getitemname(getd(".@pt_"+ .@j3 +"["+ .@i +"]"))+"^000000"; 1 Quote
GmOcean Posted November 11, 2013 Posted November 11, 2013 (edited) If, you fully read my first post, you'll see that, I mentioned, you must put the black code ( ^000000 ) in front of text that displays black. Colorizing text in rA/eA work like this: mes "This will appear as black because its a new script, so don't worry about leaving colors in the end of scripts."; mes "^FF0000 Everything from now on will be red, until I change the color again."; mes "^000000 Now everything will be black. ^00FF00 And now all green until I change it again. ^000000"; mes "You'll notice that I used the code for black at the end of the above line, thus making all this black. ^0000FF"; close; // I put blue at the end of this script but it doesn't matter because the script ended, a new script will always appear in black. Edited November 11, 2013 by GmOcean Quote
Question
Dori
How can I put 2 different colors to the item amount and the item name according to this script?
Edited by Phenex5 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.