When the queue is empty, disable the speedwalk timer.ģ. When the parsing is done and the queue has been updated, enable the speedwalk timer. If you get 15e you insert 15 east commands into your queue. You make an alias that parses the speed walk command and translates it into single direction commands and stores them in the above command queue table. Technically, this queue consists of a simple function that gets called by a timer object when the timer fires and a table that holds your direction commands as single elements.Ģ. The time will depend on how fast your MUD allows you to walk. You need a command queue that's get called by a timer that schedules your next move. I am figuring probably a while loop that concatenates the directions into a long string and then sends that string as an output, but I am not skilled enough in lua code or regular expressions to be able to build it myself.Ĭan a script kiddie out there help me? It would be super keen.ġ. Might need a char at the end to let the script know the dirs are done to.not sureįor example, that first speed walk I gave would need to output as:Į e e e e e e e e e e e e e e s s s s s e e s s I need an alias or script of some time that can recognize this speed dirs (maybe by a special character I put in front of them, I am partial to the tilda (~) and then expand them into a chain that the mud will accept. Which is a chain I will not expand for you, since it's long, but you get the point. Representing go 15 east, 5 south, 2 east, and 2 southĩsws3ws2w2s2w3sws5w2sws2w3s6wswn3ws4wnwsw2n3w3nw5n2wn7w2nwsws3wndn2e4n8ws The format of these directions are repeat. " \n " end end setClipboardText ( parsed ) end registerAnonymousEventHandler ( "onMouseCopyExample", "onMouseCopyExample" ) ansi2decho ansi2decho(text, default_colour) Converts ANSI colour sequences in text to colour tags that can be processed by the decho() function.For the mud I play there is a online guide that gives a series of speedwalk directions to locations in the mud. symbol end end if l ~= endRow then parsed = parsed. symbol else lastColor = color parsed = parsed. An example showing implementing a hecho-friendly copy option: addMouseEvent ( "hecho copy", "onMouseCopyExample" ) function rgbToHex ( r, g, b ) local rgb = ( r * 0x10000 ) ( g * 0x100 ) b return string.format ( "#%x", rgb ) end function onMouseCopyExample ( event, menu, window, startCol, startRow, endCol, endRow ) - Check whether there's an actual selection if startCol = endCol and startRow = endRow then return end local parsed = "" local lastColor = nil - Loop through each symbol within the range for l = startRow, endRow do local cStart = l = startRow and startCol or 0 moveCursor ( window, cStart, l ) local cEnd = l = endRow and endCol or # getCurrentLine () - 1 for c = cStart, cEnd do selectSection ( window, c, 1 ) local symbol = getSelection ( window ) or "" - Convert the foreground color to a hex format, suitable for hecho local color = rgbToHex ( getFgColor ( window )) - Don't repeat the color if previous one was the same if color = lastColor then parsed = parsed. They deal mainly with miniconsole/label/gauge creation and manipulation as well as displaying or formatting information on the screen.ĪddCommandLineMenuEvent addCommandLineMenuEvent( label, eventName)Īdds item to right click menu associated with command line. All functions that help you construct custom GUIs.
0 Comments
Leave a Reply. |