It determines the type of message I believe (been a while). For example if you wanted a yes or no message the 0x2 would change to another value.
There are 2 textboxes that I'm aware of, Signs and Talking boxes. The green in emerald is the normal talk box, whereas the gray one is the sign. Yes the value after "@identidifier" does determine that. You should check out a quick tutorial of what the actualy values are.
Hey my ASM task has become way simpler so you might be able to help this time. Basically it's after the intro finishes the screen stays pitch black until the level script in my room starts (which will have a command to make the screen come back in).