Yes, Sublime Text is awesome. I use it as well. I got the syntax working. Thanks.
That function you wrote though, looks awfully slow to me... you should never use any string operations in code that needs to run many times.
It sure is. Currently I'm limiting the mod so I don't need to care if it's duplicated or anything. However, I might add some sort of cache to reduce the load significantly. Currently I'm unsure of how to do that so it persists if the brick is duplicated or someone manually modifies the events through an another mod.
Well, this shouldn't be discussed in this topic. I'll try to find a way to make it faster. You make sure you make your code fast and I'll try to optimize mine.