Jump to content
Sign in to follow this  
estriole

EST - AUTO TEXT COLOR PLUS

Recommended Posts

EST - AUTO TEXT COLOR PLUS

v.1.0

Author: Estriole

Introduction
  This script created because i got tired adding \c[4]Nobita\c[0] in the show
message box. so this script make it automatic. each time i wrote Nobita it will
change the color to what i set in the module. useful to color actor names or
places or important things. i also add capitalization correction too. so if you
write nobita. it could fixed to Nobita(what you set in the config) if you want.
both auto color and auto caps correct can be binded to switch too if you don't
want to always using it.

Feature
- auto change color text you defined in the module
- auto correct capitalization to what you defined in the module
- have switch function for both feature (set it to 0 to make it always active).
- SAVE lots of development time. you don't have to write \c[x]blablabla\c[0] anymore.

 

Screenshot

autocolor.jpg

 

Demo

Not needed

 

Script

http://pastebin.com/c2C0u2c9

 

Possible bugs

 

 

if you put some short word in the config. ex:

"Nobi" => 10,

"Nobita" => 2,

 

it will ignore nobita and only color nobi instead. since when processing Nobi. it will change nobita to \c[10]Nobi\c[0]ta. thus the second search "nobita" didn't match. if we put nobita first and nobi second. it will become \c[2]Nobita\c[0] and then it will go to second search. and will match and become \c[2]\c[10]Nobi\c[0]ta\c[0]. thus having the same result. so this script is useful only for unique names. names like "Snow" could mess the color :D. if you type the weather snowing. it will color the snow part.

 

but i provide the switch feature. so you can turn of the switch for that message only.

 

 

bugs solved.

 

Author Note
First of all... Yes! I made Doraemon Games.

second. i'm a bit busy at current time. got new job. building houses (planning to build 122 houses). still learning and adapting to this new job.

so this little script is all i can do for now (postpone the mags system for holder for now >.<).

 

ps: anyone have experience on building houses? pm me and share your knowledge like what problem usually encountered? (if you're willing of course) :D.

Edited by estriole

Share this post


Link to post
Share on other sites

This is gonna be extremely helpful,and time saving ^^,also love the Doraemon characters XD

Share this post


Link to post
Share on other sites

yeah. this script made because i notice that i type \c[x]text\c[0] too much. and sometimes i forgot. Nobita use what color? not to mention because extra escape character fill the message box window. and make us harder to see text...

then i also sometimes write the capitalization wrong. ex: nobita instead Nobita (type too quickly). thus this script was born :D.

 

this script is from 'lazy' people for 'lazy' peoples :D.

Share this post


Link to post
Share on other sites

This is a stroke of genius! I was having the same problems with remembering which color I had for one thing, what color Items, places, and characters were supposed to be. This will help out a LOT! :) Kudos!

Share this post


Link to post
Share on other sites

Hey,is there anyway make a disable function or something? What I mean is when I type damage,it makes it look like this

IPHbjN1.png

Share this post


Link to post
Share on other sites

ah... you use global escape code. by default escape code only work on message window. this script still have a problem with short word in conversation.

btw can i know what global escape code script you use?

 

i'll try experimenting later on how to handle those "short" words :D. (maybe i can combine it with the regexp so if the word have another letter before or after it. it won't change color... duh gotta read the regexp class again :D...)

 

 

EDIT: updated the script to v 1.1

solved the problem with mag coloring damage :D.

 

note: IT'S SOOO HARD working with regexp. i trial and error SO many times. >.<. but apparently it's working now. but tell me if there's something wrong.

 

i try with mag word.

the result

mag => color

(space)mag => color

(space)mag(space) => color

mag(space) => color

damage => don't color

damag => don't color

mage => don't color

"mag" => color the mag part only

'mag' => color the mag part only

"mage" => don't color

"damag" => don't color

'mage'=> don't color

'damag' => don't color

 

i include " and ' in check because it can be used like Giant's or "Nobita".

anymore character that i should add?

 

EDIT2: d*mn! forgot ! and ?.

 

updated the script again. now support ! and ? after the text. suggestion for anymore character to add???

 

version number don't change

 

report if any bugs encountered. thx :D.

Edited by estriole

Share this post


Link to post
Share on other sites

@sgt twilight: update the script again. grab it again (i think it's final now).

regexp sure is confusing... i have the regexp from which i already try and fail before (in my head it should work but it fail). and by removing one symbol. it working!!

for reference... it's the difference between (?!) and (?<!). apparently (?<!) cannot be used after the text. i confused myself. maybe someone with more regexp knowledge can explain it:. since they both have same explanation in the regexp doc file.

updated the script to v1.2

change log: improved regexp. now the only time the text not colored is when (before/after) (\w) type character (a-z, 0-9, and underscore)

so we can use !mag!, <mag>, etc.

EDIT: found the answer LOL. didn't read it carefully. if only i read it carefully it will save lots of time. my bad.

(?!pat) - Negative lookahead assertion: ensures that the following characters do not match pat, but doesn't include those characters in the matched text

(?<!pat) - Negative lookbehind assertion: ensures that the preceding characters do not match pat, but doesn't include those characters in the

Edited by estriole

Share this post


Link to post
Share on other sites

I know it is a little too late to talk about it... But if you write the name with spaces " Nobita " and " Nobi " it won't confuse the words and just colorize what you want it to colorize.

Anyway, thank you very much for the script!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×