[Battle Scripting] Re-Formatting Battle Messages

Discussion in 'Server and Client Scripting' started by Nightfall Alicorn, Apr 19, 2015.

  1. Nightfall Alicorn

    Nightfall Alicorn Left Pokémon Online, most likely not coming back.

    Joined:
    Oct 15, 2013
    Messages:
    491
    Likes Received:
    171
    PO Trainer Name:
    Nightmare Moon
    This is something I've wanted to do for a while but I don't know how to do it in battle scripting or if it's possible.

    I'm after something that detects messages, sys.stopEvent() like in beforeChannelMessage in client scripting, and then printing it out the string in html format that I can only see.

    The code below is just an example to help explain.
    Code (JavaScript):
    1. ({
    2.     onMessage(string) {
    3.         sys.stopEvent();
    4.         printHtml("<font color='#000000'>" + string + "</font>");
    5.     }
    6. }
    7. })
    I've had a look at http://pokemon-online.eu/threads/battle-scripting-next-update.14565/ but I don't think there's an action to print html or just regular text only I can only see.

    Any help or examples would be appreciated.