Nexus - How to echo on prompt line

Does anyone know how to do this? I am writing a stat gain/loss counter script for Nexus, and having the echoes always printing on a new line below the prompt rather than on the prompt line itself, which is where it would ideally be, is distracting.

Best Answer

Answers

  • edited December 2012
    Gag the match, then just contacenate the string together with what you want to echo.
    More speciically, something like.. echo(args[0]+yourIntendedOutput), or whatever it is to print to the screen.
    Edit: Scratch that last bit, thought nexus was the html5 client.
  • Just to be clear, are you talking about the old Java Nexus client, or the new HTML client at http://client.lusternia.com?

    If it's the HTML client, there isn't currently a way to automatically append text to the prompt line, but you could (as @Meae suggested) use the print() function to "fake" a prompt line (with whatever additions you need).

    Let me know if it's indeed the HTML client and I'll be happy to help with a specific example.

    - Cromm
  • I'm using the old Java client found at http://lusternia.com/nexusnew/
  • Trigger:
    {<}{d}h, {d}m, {d}e, {d}p, {d}en, {d}w {w}{>}
    to:
    #gag // gags the prompt sent by the server
    #echo_ $1 //adds 1st number to prompt
    #echo_ h, //adds "h, " to prompt
    #echo_  $2 //adds 2nd number to prompt
    #echo_ m, //adds "m, " to prompt
    #echo_  $3 //adds 3rd number to prompt
    #echo_ e, //adds "e, " to prompt
    #echo_  $4 //adds 4th number to prompt
    #echo_ p, //adds "p, " to prompt
    #echo_  $5 //adds 5th number to prompt
    #echo_ en, //adds "en, " to prompt
    #echo_  $6 //adds 6th number to prompt
    #echo_ w, //adds "w, " to prompt
    #echo_  $7 //adds balances and "-" symbol to prompt
    #echo_ $foo //adds contents of variable foo to prompt
    #echo // echos all of the above on one line as the new prompt

    Replace $foo with the variable containing whatever you want appended onto your prompt. If variable foo contains the message "bar" sans quotes, the result should, in theory, look something like:

    1242h, 2535m, 2535e, 3p, 12535en, 14241w Bexrl- bar
  • If I were to use that script, I would also need to change the colour of the echo to look like a normal prompt, which in turn would need to change when stats fall below certain percentages (so that they're green at normal levels, yellow when moderate and red when low). So... does anyone know how to do that code?
Sign In or Register to comment.