• Changing SyncTerm Display speed, and...

    From Android8675@VERT/SHODAN to All on Thursday, March 29, 2018 09:24:59
    So, trying to slow down my BBS from spitting out ANSI screens too quickly. I noticed eChicken has it setup to slow down SyncTerm during long draws and reset for menus. So I guess I'm wondering how he did it. I read that SyncTerm uses a VT500 ansi code to change speeds, but where do you insert that code?

    Tried adding the code to .asc (Ctrl-a) files, no go.
    Tried using console.putmsg('\e[0;8*r');, no luck.
    Maybe <ctrl-a>"9600b.ans and put the rate code in an ansi file? Seems redundant

    Code is <esc>[0;8*r where first number is 0, 1 or blank, and second number is speed 0 for unlimited through 9 I think for 115200

    So is my thinking correct, or is my execution wrong?

    Second Question...

    I want to make it so when players exit a door game it will ask the user if they want to display a high-score file.

    Wondering how I should build this so it can be easily added to any doorgame with a score file?

    I figured I'd want to use one of the .ini config files and have a [doorscores] section where you had:

    <door-int-code> = <url/filename to score file>

    If a line exists for the door being played, upon exit the user would be asked if they want to view the file.

    I'd also like to be able to see the score file on the website using something like ansilove.js. If the door has a score file, link it next to the game.

    So, help me out here. Should I just drop some new lines into xtrn_sec.js, or write my own addon and have it called after the door runs?

    bonus points if you help me get started.

    -A.


    ... Celibacy is not hereditary.

    ---
    þ Synchronet þ Shodan's Core @ ShodansCore.com
  • From echicken@VERT/ECBBS to Android8675 on Thursday, March 29, 2018 17:47:39
    Re: Changing SyncTerm Display speed, and...
    By: Android8675 to All on Thu Mar 29 2018 09:24:59

    So, trying to slow down my BBS from spitting out ANSI screens too quickly.
    I noticed eChicken has it setup to slow down SyncTerm during long draws and reset for menus. So I guess I'm wondering how he did it. I read that

    SyncTerm uses a VT500 ansi code to change speeds, but where do you insert that code?
    Tried using console.putmsg('\e[0;8*r');, no luck.
    Code is <esc>[0;8*r where first number is 0, 1 or blank, and second number

    There are .js libraries to make this easier. This might work:

    var Ansi = load({}, "ansiterm_lib.js");
    var cterm = load({}, "cterm_lib.js");

    // If the terminal is any version of SyncTERM
    if (typeof console.cterm_version != 'undefined') {
    Ansi.send("speed", "set", 7);
    // 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11
    // 300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 76800, 115200
    }

    console.printfile('poop.ans');

    // Reset to normal speed
    if (typeof console.cterm_version != 'undefined') {
    Ansi.send("speed", "clear");
    }

    I want to make it so when players exit a door game it will ask the user if
    they want to display a high-score file.

    Wondering how I should build this so it can be easily added to any doorgame with a score file?

    I would make a JS module that accepts the internal code of an external program to execute as a command-line parameter. It would launch that xtrn, then prompt the user and display the appropriate file if desired. I would modify my shell / xtrn_sec.js so that it calls bbs.exec('?door-launcher.js [code]') instead of bbs.exec_xtrn('[code]'). A mapping of internal codes to score files could be kept in a config file as you described.

    If the 'clean-up command line' for a door could be hijacked for this purpose instead, that would be an easier option (I haven't tried that and I'm doubtful).

    I'd also like to be able to see the score file on the website using something like ansilove.js. If the door has a score file, link it next to the game.

    We have a 'handler' script that converts ANSI graphics into HTML. See 'ctrl/web_handler.ini'. The [JavaScript] section should have an entry like:

    ans = asc_handler.js

    When a '.ans' file is requested by a web client, the server passes the request to 'asc_handler.js', which formats and sends output to the client. You would need to do something like this to cause the file to be loaded directly from the
    server:

    <iframe src="/scores/lord.ans"></iframe>

    The file would need to exist somewhere under the server's document root. There are other ways to accomplish serving this file (XMLHttpRequest, etc.) which I won't get into right now.

    Alternatively, in an XJS file you could do this:

    <pre style="font-family: Courier New, monospace">
    <?xjs
    var f = new File('/sbbs/text/scores/lord.ans');
    f.open('r');
    var text = f.readAll(8192);
    f.close();
    write(html_encode(text.join('\r\n'), true, false, true, true)); ?>
    </pre>

    The 'html_encode' part is the same thing that asc_handler.js is doing. This method has the benefit of allowing you to load the file from a place outside of

    your document root.

    You would want that <pre> block to be in something with a black background.

    Lastly, I did write a client-side .bin -> PNG rendering thing for the avatar gallery on my website. It doesn't parse .ans at the moment, but that could be added easily enough. We can explore that if you don't like the look of the HTML-encoded ANSI.

    ---
    echicken
    electronic chicken bbs - bbs.electronicchicken.com - 416-273-7230

    ---
    þ Synchronet þ electronic chicken bbs - bbs.electronicchicken.com
  • From Digital Man@VERT to Android8675 on Thursday, March 29, 2018 17:51:52
    Re: Changing SyncTerm Display speed, and...
    By: Android8675 to All on Thu Mar 29 2018 09:24 am

    So, trying to slow down my BBS from spitting out ANSI screens too quickly.

    The simplest thing would be to convert it to a Ctrl-A/.ASC file using ans2asc and use the -delay option:

    -delay <interval> insert a 1/10th second delay code at output byte interval
    (lower interval values result in more delays, slower display)

    I
    noticed eChicken has it setup to slow down SyncTerm during long draws and reset for menus. So I guess I'm wondering how he did it. I read that SyncTerm uses a VT500 ansi code to change speeds, but where do you insert that code?

    You could put them in the .ans or .asc files, but you'd have to be sure to reset/revert the speed setting too.

    Tried adding the code to .asc (Ctrl-a) files, no go.
    Tried using console.putmsg('\e[0;8*r');, no luck.
    Maybe <ctrl-a>"9600b.ans and put the rate code in an ansi file? Seems redundant

    Code is <esc>[0;8*r where first number is 0, 1 or blank, and second number is speed 0 for unlimited through 9 I think for 115200

    So is my thinking correct, or is my execution wrong?

    See exec/load/ansiterm_lib.js for a reference.

    Second Question...

    I want to make it so when players exit a door game it will ask the user if they want to display a high-score file.

    Wondering how I should build this so it can be easily added to any doorgame with a score file?

    I figured I'd want to use one of the .ini config files and have a [doorscores] section where you had:

    <door-int-code> = <url/filename to score file>

    If a line exists for the door being played, upon exit the user would be asked if they want to view the file.

    I'd also like to be able to see the score file on the website using something like ansilove.js. If the door has a score file, link it next to the game.

    So, help me out here. Should I just drop some new lines into xtrn_sec.js, or write my own addon and have it called after the door runs?

    bonus points if you help me get started.

    Modding xtrn_sec.js seems to make the most sense there.

    digital man

    Synchronet "Real Fact" #63:
    "Baja" (name of Synchronet PCMS compiler/languege) is pronounced "ba-ha". Norco, CA WX: 75.5øF, 29.0% humidity, 12 mph ENE wind, 0.00 inches rain/24hrs

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Android8675@VERT/SHODAN to echicken on Friday, March 30, 2018 08:37:35
    Re: Changing SyncTerm Display speed, and...
    By: echicken to Android8675 on Thu Mar 29 2018 05:47 pm

    I would make a JS module that accepts the internal code of an external program to execute as a command-line parameter. It would launch that xtrn, then prompt the user and display the appropriate file if desired. I would modify my shell / xtrn_sec.js so that it calls bbs.exec('?door-launcher.js [code]') instead of bbs.exec_xtrn('[code]'). A mapping of internal codes to score files could be kept in a config file as you described.

    That sounds like a good plan, that would require fewer changes than...

    If the 'clean-up command line' for a door could be hijacked for this purpose instead, that would be an easier option (I haven't tried that and I'm doubtful).

    Yeah, plus you'd have to update all the door entries. Using mod_opts.ini for the config seems like the best place.

    What's great about that is I could display a file before the game starts and another afterwards, like a game description/history.

    Thanks eC.
    -A.


    ... The best audience is intelligent, well-educated and a little drunk.

    ---
    þ Synchronet þ Shodan's Core @ ShodansCore.com
  • From echicken@VERT/ECBBS to Android8675 on Friday, March 30, 2018 12:35:43
    Re: Changing SyncTerm Display speed, and...
    By: Android8675 to echicken on Fri Mar 30 2018 08:37:35

    I would make a JS module that accepts the internal code of an
    external program to execute as a command-line parameter. It would

    That sounds like a good plan, that would require fewer changes than...

    It occurs to me that this could just as easily be a function in xtrn_sec.js or whatever you launch doors from. You'll need to modify it anyway, and this doesn't have to be its own script.

    function launch(code) {
    bbs.exec_xtrn(code);
    if (console.yesno('Display scores')) {
    var f = new File(system.ctrl_dir + 'scores.ini');
    f.open('r');
    var ini = f.iniGetObject();
    f.close();
    if (ini[code]) {
    console.clear(LIGHTGRAY);
    console.printfile(ini[code]);
    console.pause();
    }
    }
    }

    ---
    echicken
    electronic chicken bbs - bbs.electronicchicken.com - 416-273-7230
    þ Synchronet þ electronic chicken bbs - bbs.electronicchicken.com
  • From MRO@VERT/BBSESINF to Android8675 on Friday, March 30, 2018 12:30:05
    Re: Changing SyncTerm Display speed, and...
    By: Android8675 to All on Thu Mar 29 2018 09:24 am

    So, trying to slow down my BBS from spitting out ANSI screens too quickly. I noticed eChicken has it setup to slow down SyncTerm during long draws and reset for menus. So I guess I'm wondering how he did it. I read that SyncTerm uses a VT500 ansi code to change speeds, but where do you insert that code?

    Tried adding the code to .asc (Ctrl-a) files, no go.
    Tried using console.putmsg('\e[0;8*r');, no luck.
    Maybe <ctrl-a>"9600b.ans and put the rate code in an ansi file? Seems redundant

    Code is <esc>[0;8*r where first number is 0, 1 or blank, and second number is speed 0 for unlimited through 9 I think for 115200

    you can use ansimation to slow it down or you can use ctrl+a codes
    to delay it.

    i've done both ways and they work fine.

    there's also .js code that slows it down that's been around for many years.

    just please give the user a way to abort the display because long ansis get annoying real fast.
    ---
    þ Synchronet þ ::: BBSES.info - free BBS services :::
  • From Android8675@VERT/SHODAN to Digital Man on Friday, March 30, 2018 11:05:42
    Re: Changing SyncTerm Display speed, and...
    By: Digital Man to Android8675 on Thu Mar 29 2018 05:51 pm

    So, trying to slow down my BBS from spitting out ANSI screens too
    quickly.

    The simplest thing would be to convert it to a Ctrl-A/.ASC file using ans2asc and use the -delay option:

    I like that. does that basically make a bigger file so it takes longer to draw?

    eC already gave me some code that I just dropped into my logon.js, and it works great.

    Hey, when logon.js does load("loadfonts.js");, kind of take a while? Does it make sense to drop a "loading fonts message somewhere in there..."

    ---
    þ Synchronet þ Shodan's Core @ ShodansCore.com
  • From echicken@VERT/ECBBS to Android8675 on Friday, March 30, 2018 16:55:29
    Re: Changing SyncTerm Display speed, and...
    By: Android8675 to Digital Man on Fri Mar 30 2018 11:05:42

    The simplest thing would be to convert it to a Ctrl-A/.ASC file
    using ans2asc and use the -delay option:

    eC already gave me some code that I just dropped into my logon.js, and it works great.

    I'm not sure if I've ever used ans2asc, but I suppose it's much easier to use DM's suggestion. (I'm not sure if that takes advantage of SyncTERM's native speed emulation feature though, which is probably the most accurate way of simulating scrolling at a particular rate. I believe there's also some crap in ansiview for simulating this on non-SyncTERM terminals, with abortable output; can dig that out if you want it.)

    ---
    echicken
    electronic chicken bbs - bbs.electronicchicken.com - 416-273-7230
    þ Synchronet þ electronic chicken bbs - bbs.electronicchicken.com
  • From Digital Man@VERT to Android8675 on Friday, March 30, 2018 15:53:32
    Re: Changing SyncTerm Display speed, and...
    By: Android8675 to Digital Man on Fri Mar 30 2018 11:05 am

    Re: Changing SyncTerm Display speed, and...
    By: Digital Man to Android8675 on Thu Mar 29 2018 05:51 pm

    So, trying to slow down my BBS from spitting out ANSI screens too
    quickly.

    The simplest thing would be to convert it to a Ctrl-A/.ASC file using ans2asc and use the -delay option:

    I like that. does that basically make a bigger file so it takes longer to draw?

    eC already gave me some code that I just dropped into my logon.js, and it works great.

    Hey, when logon.js does load("loadfonts.js");, kind of take a while?

    It sends up to 16KB, but that should happen pretty quick still.

    Does it
    make sense to drop a "loading fonts message somewhere in there..."

    Possibly. I'll look into it.


    digital man

    This Is Spinal Tap quote #2:
    Nigel Tufnel: Well, this piece is called "Lick My Love Pump".
    Norco, CA WX: 82.5øF, 34.0% humidity, 14 mph NE wind, 0.00 inches rain/24hrs

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Digital Man@VERT to echicken on Friday, March 30, 2018 15:55:50
    Re: Changing SyncTerm Display speed, and...
    By: echicken to Android8675 on Fri Mar 30 2018 04:55 pm

    Re: Changing SyncTerm Display speed, and...
    By: Android8675 to Digital Man on Fri Mar 30 2018 11:05:42

    The simplest thing would be to convert it to a Ctrl-A/.ASC file
    using ans2asc and use the -delay option:

    eC already gave me some code that I just dropped into my logon.js, and it works great.

    I'm not sure if I've ever used ans2asc, but I suppose it's much easier to use DM's suggestion. (I'm not sure if that takes advantage of SyncTERM's native speed emulation feature though, which is probably the most accurate way of simulating scrolling at a particular rate. I believe there's also some crap in ansiview for simulating this on non-SyncTERM terminals, with abortable output; can dig that out if you want it.)

    The ans2asc -delay feature just adds additional "delay" Ctrl-A codes (at the interval the sysop desires, lower interval = more delays). It's not as accurate as SyncTERM's speed emulation, but it's also terminal-independant.

    digital man

    This Is Spinal Tap quote #45:
    I don't really think the end can be assessed as of itself as being the end Norco, CA WX: 82.5øF, 34.0% humidity, 14 mph NE wind, 0.00 inches rain/24hrs

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Android8675@VERT/SHODAN to echicken on Tuesday, April 10, 2018 10:51:52
    Re: Changing SyncTerm Display speed, and...
    By: echicken to Android8675 on Fri Mar 30 2018 12:35 pm

    It occurs to me that this could just as easily be a function in xtrn_sec.js or whatever you launch doors from. You'll need to modify it anyway, and this doesn't have to be its own script.

    function launch(code) {
    bbs.exec_xtrn(code);
    if (console.yesno('Display scores')) {
    var f = new File(system.ctrl_dir + 'scores.ini');
    f.open('r');
    var ini = f.iniGetObject();
    f.close();
    if (ini[code]) {
    console.clear(LIGHTGRAY);
    console.printfile(ini[code]);
    console.pause();
    }
    }
    }

    That's amazingly just what I was looking for.

    So I could drop this in before main in xtrn_sec.js, replace bbs.exec_xtrn(prog_list[i].code); with launch(prog_list[i].code);...

    what's the format for scores.ini?

    doorcode = filename?

    Out of curiousity, would this also display files from urls? For example, pull the score file from BBS Links (http://games.bbslink.net/score.php?door=lord&type=ansi) or DoorParty or CoA, etc?


    ... A bird in the hand is safer than one overhead.

    ---
    þ Synchronet þ Shodan's Core @ ShodansCore.com
  • From echicken@VERT/ECBBS to Android8675 on Tuesday, April 10, 2018 15:45:39
    Re: Door Scores...
    By: Android8675 to echicken on Tue Apr 10 2018 10:51:52

    what's the format for scores.ini?

    doorcode = filename?

    I think that's correct. 'filename' probably needs to be a complete path to a file.

    Out of curiousity, would this also display files from urls? For example,

    No, that sample function will only display a file that exists on your local filesystem. It could be adapted though.

    load('http.js'); // add this near the top of your script

    function launch(code) {
    bbs.exec_xtrn(code);
    if (console.yesno('Display scores')) {
    var f = new File(system.ctrl_dir + 'scores.ini');
    f.open('r');
    var ini = f.iniGetObject();
    f.close();
    if (ini[code]) {
    console.clear(BG_BLACK|LIGHTGRAY);
    if (ini[code].search(/^http/) > -1) {
    const http = new HTTPRequest();
    const ans = http.Get(ini[code]);
    console.putmsg(ans);
    } else {
    console.printfile(ini[code]);
    }
    console.pause();
    }
    }
    }

    That might work. It'll assume that any value from the ini file beginning with "http" is a URL to some file to download and display.

    Would be best to wrap your calls to launch() in a try ... catch block, since the HTTP request (or file access) might fail.

    You could also put the config in ctrl/modopts.ini instead of its own file, and use modopts.js to load settings.

    pull the score file from BBS Links

    I did recently make a thing for displaying BBSLink scores:

    https://github.com/echicken/bbslink-things

    It's a bit redundant to the example provided above, but it might be worth looking at.

    ---
    echicken
    electronic chicken bbs - bbs.electronicchicken.com - 416-273-7230
    þ Synchronet þ electronic chicken bbs - bbs.electronicchicken.com
  • From Android8675@VERT/SHODAN to echicken on Tuesday, April 10, 2018 16:11:02
    Re: Door Scores...
    By: echicken to Android8675 on Tue Apr 10 2018 03:45 pm

    I was thinking something like this:

    function launch(code) {
    bbs.exec_xtrn(code);
    console.crlf();
    var f = new File(system.ctrl_dir + 'scores.ini');
    f.open('r');
    var ini = f.iniGetObject();
    f.close();
    if (ini[code]) {
    console.clear(BG_BLACKIGHTGRAY);
    if (console.yesno('Display score file')) {
    if (ini[code].search(/^http/) > -1) {
    const http = new HTTPRequest();
    const ans = http.Get(ini[code]);
    console.putmsg(ans);
    } else {
    console.printfile(ini[code]);
    }
    console.pause();
    }
    }
    }

    So it'll first see if there's even an entry then ask if the player wants to display the score file? I'm tinkering with it now, will post when finished.

    pull the score file from BBS Links

    I did recently make a thing for displaying BBSLink scores:

    https://github.com/echicken/bbslink-things

    It's a bit redundant to the example provided above, but it might be worth looking at.

    I am looking at it now. I might even fork it, get some git practice, etc.

    Thanks again,
    -A.


    ... Music is essentially useless, as life is.

    ---
    þ Synchronet þ Shodan's Core @ ShodansCore.com
  • From echicken@VERT/ECBBS to Android8675 on Tuesday, April 10, 2018 21:43:23
    Re: Door Scores...
    By: Android8675 to echicken on Tue Apr 10 2018 16:11:02

    So it'll first see if there's even an entry then ask if the player wants to display the score file? I'm tinkering with it now, will post when finished.

    Yep, you've got the right idea. You could also check if the score file exists / if the HTTP request succeeds (though this might cause a delay) before bothering the user at all. If BBSLink, DoorParty, etc. all publish score files it might be worth turning this into a common module.

    ---
    echicken
    electronic chicken bbs - bbs.electronicchicken.com - 416-273-7230
    þ Synchronet þ electronic chicken bbs - bbs.electronicchicken.com
  • From Bill McGarrity@VERT/TEQUILAM to echicken on Wednesday, April 11, 2018 02:14:00
    echicken wrote to Android8675 on 04-10-18 21:43 <=-

    Re: Door Scores...
    By: Android8675 to echicken on Tue Apr 10 2018 16:11:02

    So it'll first see if there's even an entry then ask if the player wants to display the score file? I'm tinkering with it now, will post when finished.

    Yep, you've got the right idea. You could also check if the score file exists / if the HTTP request succeeds (though this might cause a delay) before bothering the user at all. If BBSLink, DoorParty, etc. all
    publish score files it might be worth turning this into a common
    module.

    DoorParty offers .png files for download but it's basically the same principle. Here's the url for LORD at DoorParty..

    http://wiki.throwbackbbs.com/lib/exe/fetch.php?media=scores:rpg:lord.png


    --

    Bill

    Telnet: tequilamockingbirdonline.net
    Web: bbs.tequilamockingbirdonline.net
    FTP: ftp.tequilamockingbirdonline.net:2121
    IRC: irc.tequilamockingbirdonline.net Ports: 6661-6670 SSL: +6697
    Radio: radio.tequilamockingbirdonline.net:8010/live


    ... Look Twice... Save a Life!!! Motorcycles are Everywhere!!!
    --- MultiMail/Win32 v0.50
    þ Synchronet þ TequilaMockingbird Online - Toms River, NJ
  • From Android8675@VERT/SHODAN to echicken on Wednesday, April 11, 2018 15:23:55
    Re: Door Scores...
    By: echicken to Android8675 on Tue Apr 10 2018 09:43 pm

    So it'll first see if there's even an entry then ask if the player
    wants to display the score file? I'm tinkering with it now, will
    post when finished.
    Yep, you've got the right idea. You could also check if the score file exists / if the HTTP request succeeds (though this might cause a delay) before bothering the user at all. If BBSLink, DoorParty, etc. all publish score files it might be worth turning this into a common module.

    function launch(code) {
    bbs.exec_xtrn(code);
    console.crlf();
    var f = new File(system.ctrl_dir + 'scores.ini');
    f.open('r');
    var ini = f.iniGetObject(ScoreFiles);
    f.close();
    if (ini[code]) {
    console.clear(BG_BLACKIGHTGRAY);
    if (console.yesno('Display score file')) {
    if (ini[code].search(/^http/) > -1) {
    const http = new HTTPRequest();
    const ans = http.Get(ini[code]);
    console.putmsg(ans);
    } else {
    console.printfile(ini[code]);
    }
    console.pause();
    }
    }
    }

    So if there's an entry in the .ini [ScoreFiles] it'll prompt, otherwise it just moves on.

    Still testing. Next, multiple files, check that file/url exists before prompting. I'm going to move it all to a module once it's working because I want to turn this into a door launcher.

    User starts Game
    Display opening .asc file (History, or whatever)
    run game
    Display score files if any after game

    Going to expand Run Game to an actual Interactive Fiction Interpreter assuming I can find open source code that'll do what I want it too.
    --
    Android8675@ShodansCore



    ... The public is wonderfully tolerant. It forgives everything except genius.

    ---
    þ Synchronet þ Shodan's Core @ ShodansCore.com
  • From Android8675@VERT/SHODAN to Bill McGarrity on Wednesday, April 11, 2018 15:25:56
    Re: Door Scores...
    By: Bill McGarrity to echicken on Wed Apr 11 2018 02:14 am

    DoorParty offers .png files for download but it's basically the same principle. Here's the url for LORD at DoorParty.. http://wiki.throwbackbbs.com/lib/exe/fetch.php?media=scores:rpg:lord.png

    Serve up the raw .ans! ;)
    --
    Android8675@ShodansCore

    ---
    þ Synchronet þ Shodan's Core @ ShodansCore.com
  • From Android8675@VERT/SHODAN to echicken on Wednesday, April 11, 2018 15:40:10
    Re: Door Scores...
    By: Android8675 to echicken on Wed Apr 11 2018 03:23 pm

    Oops...

    Weirdness: ReferenceError: ScoreFiles is not defined (ZORKI)

    I used try/catch on the above code. My .ini file looks like:

    [ScoreFiles]
    ZORKI = ../xtrn/if/DATA/zork1-scores.asc
    ZORKII = ../xtrn/if/DATA/zork2-scores.asc

    code is:

    try {
    launch(prog_list[i].code);
    }
    catch(e) {
    console.writeln("Weirdness: " + e + "(" + prog_list[i].code + ")");
    log("ERR:" + e + "(" + prog_list[i].code + ")");
    }


    function launch(code) {
    bbs.exec_xtrn(code);
    console.crlf();
    var f = new File(system.ctrl_dir + 'scores.ini');
    f.open('r');
    var ini = f.iniGetObject(ScoreFiles);
    f.close();
    if (ini[code]) {
    console.clear(BG_BLACKIGHTGRAY);
    if (console.yesno('Display score file')) {
    if (ini[code].search(/^http/) > -1) {
    const http = new HTTPRequest();
    const ans = http.Get(ini[code]);
    console.putmsg(ans);
    } else {
    console.printfile(ini[code]);
    }
    console.pause();
    }
    }
    }
    --
    Android8675@ShodansCore

    ---
    þ Synchronet þ Shodan's Core @ ShodansCore.com
  • From Bill McGarrity@VERT/TEQUILAM to Android8675 on Wednesday, April 11, 2018 19:34:00
    Android8675 wrote to Bill McGarrity on 04-11-18 15:25 <=-

    Re: Door Scores...
    By: Bill McGarrity to echicken on Wed Apr 11 2018 02:14 am

    DoorParty offers .png files for download but it's basically the same principle. Here's the url for LORD at DoorParty.. http://wiki.throwbackbbs.com/lib/exe/fetch.php?media=scores:rpg:lord.png

    Serve up the raw .ans! ;)


    LOL... tell him that!!! ;)


    --

    Bill

    Telnet: tequilamockingbirdonline.net
    Web: bbs.tequilamockingbirdonline.net
    FTP: ftp.tequilamockingbirdonline.net:2121
    IRC: irc.tequilamockingbirdonline.net Ports: 6661-6670 SSL: +6697
    Radio: radio.tequilamockingbirdonline.net:8010/live


    ... Look Twice... Save a Life!!! Motorcycles are Everywhere!!!
    --- MultiMail/Win32 v0.50
    þ Synchronet þ TequilaMockingbird Online - Toms River, NJ
  • From echicken@VERT/ECBBS to Android8675 on Wednesday, April 11, 2018 23:03:45
    Re: Door Scores...
    By: Android8675 to echicken on Wed Apr 11 2018 15:40:10

    Weirdness: ReferenceError: ScoreFiles is not defined (ZORKI)

    [ScoreFiles]
    ZORKI = ../xtrn/if/DATA/zork1-scores.asc
    ZORKII = ../xtrn/if/DATA/zork2-scores.asc

    console.writeln("Weirdness: " + e + "(" + prog_list[i].code + ")");

    var ini = f.iniGetObject(ScoreFiles);

    You should be providing a string as an argument:

    var ini = f.iniGetObject('ScoreFiles');

    Instead you're referencing a variable (ScoreFiles, sans quotes) which has not been defined.

    You could also 'fix' this error by adding this line above the f.iniGetObject one:

    var ScoreFiles = 'ScoreFiles';

    (That's a dumb solution, but I just added it to illustrate the problem. Now you would have a variable named ScoreFiles defined, and assigned to it would be the string 'ScoreFiles', which would be a valid argument to f.iniGetObject.)

    ---
    echicken
    electronic chicken bbs - bbs.electronicchicken.com - 416-273-7230
    þ Synchronet þ electronic chicken bbs - bbs.electronicchicken.com
  • From echicken@VERT/ECBBS to Android8675 on Wednesday, April 11, 2018 23:05:55
    Re: Door Scores...
    By: Android8675 to Bill McGarrity on Wed Apr 11 2018 15:25:56

    Serve up the raw .ans! ;)

    I'm sure that could be arranged. We can bug maskreet about it; the .ans files are probably already being copied to his webserver so that they can be put through ansilove (I'm assuming that's what he's using).

    ---
    echicken
    electronic chicken bbs - bbs.electronicchicken.com - 416-273-7230
    þ Synchronet þ electronic chicken bbs - bbs.electronicchicken.com
  • From Android8675@VERT/SHODAN to echicken on Thursday, April 12, 2018 08:13:37
    Re: Door Scores...
    By: echicken to Android8675 on Wed Apr 11 2018 11:03 pm

    You should be providing a string as an argument:
    var ini = f.iniGetObject('ScoreFiles');

    You could also 'fix' this error by adding this line above the f.iniGetObject one:
    var ScoreFiles = 'ScoreFiles';

    Look at you... Prof. eChicken

    Thanks.
    --
    Android8675@ShodansCore



    ... The English may not like music, but they absolutely love the noise it makes

    ---
    þ Synchronet þ Shodan's Core @ ShodansCore.com
  • From Android8675@VERT/SHODAN to maskreet on Thursday, April 12, 2018 08:15:45
    Re: Door Scores...
    By: echicken to Android8675 on Wed Apr 11 2018 11:05 pm

    Serve up the raw .ans! ;)

    I'm sure that could be arranged. We can bug maskreet about it; the .ans files are probably already being copied to his webserver so that they can be put through ansilove (I'm assuming that's what he's using).

    I love that ansilove.js. I want to use it with the web, just figuring out how I want it to look.

    eC, your ansiview, does it have a webpage for ecwebv4?
    --
    Android8675@ShodansCore



    ... To know the world one must construct it.

    ---
    þ Synchronet þ Shodan's Core @ ShodansCore.com
  • From Android8675@VERT/SHODAN to echicken on Thursday, April 12, 2018 09:02:01
    Re: Door Scores...
    By: Android8675 to echicken on Thu Apr 12 2018 08:13 am

    Re: Door Scores...
    By: echicken to Android8675 on Wed Apr 11 2018 11:03 pm

    You should be providing a string as an argument:
    var ini = f.iniGetObject('ScoreFiles');

    OK, that resolved that problem, but it seems that the internal code read is case sensitive. For example if the INI file contains:

    ZORKI = filename

    that won't work, but

    zorki = filename

    will work. That just something I have to make a note about?

    I figured that out by just printing the code passed to the
    function. So yeah me.
    --
    Android8675@ShodansCore

    ---
    þ Synchronet þ Shodan's Core @ ShodansCore.com
  • From echicken@VERT/ECBBS to Android8675 on Thursday, April 12, 2018 12:40:22
    Re: Door Scores...
    By: Android8675 to maskreet on Thu Apr 12 2018 08:15:45

    eC, your ansiview, does it have a webpage for ecwebv4?

    Not at the moment, but it probably will at some point.

    ---
    echicken
    electronic chicken bbs - bbs.electronicchicken.com - 416-273-7230
    þ Synchronet þ electronic chicken bbs - bbs.electronicchicken.com
  • From echicken@VERT/ECBBS to Android8675 on Thursday, April 12, 2018 12:57:11
    Re: Door Scores...
    By: Android8675 to echicken on Thu Apr 12 2018 09:02:01

    OK, that resolved that problem, but it seems that the internal code read is case sensitive. For example if the INI file contains:

    ZORKI = filename

    that won't work, but

    zorki = filename

    I remember hearing that it's supposed to be case-insensitive or uppercase, but there seems to be some inconsistency. When I dump a list of all internal codes for external programs on my system (via JS) they are all lowercase.

    will work. That just something I have to make a note about?

    Might be easiest to write a script to dump information on your external programs so you'll know what to put in the ini file. You can put this in a file and run it via jsexec:

    xtrn_area.sec_list.forEach(
    function (e) {
    writeln(e.name + ', ' + e.code);
    e.prog_list.forEach(
    function (ee) {
    writeln('\t' + ee.name + ', ' + ee.code);
    }
    );
    }
    );

    ---
    echicken
    electronic chicken bbs - bbs.electronicchicken.com - 416-273-7230
    þ Synchronet þ electronic chicken bbs - bbs.electronicchicken.com