• Random Lines

    From Willowolf@VERT to All on Tue Aug 21 00:44:00 2001
    How would I program a random selection in Baja? I want to display random one-liners at logon to my users. I don't care if I have to program the one-liners into the baja .src file, I just want it simple.

    Thanks,
    \\/

    ---
    Synchronet Wolf Grotto -Las Vegas, NV- telnet://wolfgrotto.2y.net
  • From Amcleod@VERT to Willowolf on Tue Aug 21 04:41:57 2001
    RE: Random Lines
    BY: Willowolf to All on Tue Aug 21 2001 07:44 am

    How would I program a random selection in Baja? I want to display rand one-liners at logon to my users. I don't care if I have to program the one-liners into the baja .src file, I just want it simple.

    Get the BAJA documentation and look for the section on SWITCH/CASE which gives as an example, a small fragment of code that does random selections. Expand on this to your hearts content.
    ---
    Synchronet Vertrauen Home of Synchronet telnet://vert.synchro.net
  • From Jas Hud@VERT to Willowolf on Thu Aug 23 01:53:28 2001
    RE: Random Lines
    BY: Willowolf to All on Tue Aug 21 2001 07:44 am

    How would I program a random selection in Baja? I want to display rand one-liners at logon to my users. I don't care if I have to program the one-liners into the baja .src file, I just want it simple.

    Thanks,
    \\/


    compare_ars RANDOM 3 (or whatever you want)
    if_true
    printfile "x:\shit.txt"
    end_if
    compare_ars random 3
    if_true
    printfile "x:\shit2.txt"
    end_if
    # fallthrough
    printfile "x:\shit3.txt"
    goto duh
    :duh
    # oops, i forgot to put a "goto duh " before each end_if
    # ah well, might/might not be applicable

    you can also use random with an interger, but this way is easy
    ---
    Synchronet Vertrauen Home of Synchronet telnet://vert.synchro.net
  • From Jas Hud@VERT to All on Thu Aug 23 01:54:34 2001
    RE: Random Lines
    BY: Amcleod to Willowolf on Tue Aug 21 2001 11:41 am

    RE: Random Lines
    BY: Willowolf to All on Tue Aug 21 2001 07:44 am

    How would I program a random selection in Baja? I want to display r one-liners at logon to my users. I don't care if I have to program the one-liners into the baja .src file, I just want it simple.

    Get the BAJA documentation and look for the section on SWITCH/CASE which giv as an example, a small fragment of code that does random selections. Expand this to your hearts content.

    that one mime rumos thing is helpfull, so is aces one, though you have to
    fix up the code to get it to work.
    ---
    Synchronet Vertrauen Home of Synchronet telnet://vert.synchro.net
  • From Willowolf@VERT to Jas Hud on Fri Aug 24 21:11:00 2001
    RE: Random Lines
    BY: Jas Hud to Willowolf on Thu Aug 23 2001 08:53 am

    compare_ars RANDOM 3 (or whatever you want)
    if_true
    printfile "x:\shit.txt"
    end_if
    compare_ars random 3
    if_true
    printfile "x:\shit2.txt"
    end_if
    # fallthrough
    printfile "x:\shit3.txt"
    goto duh
    :duh
    # oops, i forgot to put a "goto duh " before each end_if
    # ah well, might/might not be applicable

    Thanks, I'll try that.

    \\/
    s/


    ---
    Synchronet Wolf Grotto -Las Vegas, NV- telnet://wolfgrotto.2y.net
  • From Jas Hud@VERT to Willowolf on Mon Aug 27 01:22:36 2001
    RE: Random Lines
    BY: Willowolf to Jas Hud on Sat Aug 25 2001 04:11 am

    RE: Random Lines
    BY: Jas Hud to Willowolf on Thu Aug 23 2001 08:53 am

    compare_ars RANDOM 3 (or whatever you want)
    if_true
    printfile "x:\shit.txt"
    end_if
    compare_ars random 3
    if_true
    printfile "x:\shit2.txt"
    end_if
    # fallthrough
    printfile "x:\shit3.txt"
    goto duh
    :duh
    # oops, i forgot to put a "goto duh " before each end_if
    # ah well, might/might not be applicable

    Thanks, I'll try that.

    \\/
    s/


    i'm such a sloppy programmer, i probably confused you, but i get the job done! also you can have random ansi menus ALA Renegade this way.
    ---
    Synchronet Vertrauen Home of Synchronet telnet://vert.synchro.net
  • From Willowolf@VERT to Jas Hud on Thu Aug 30 01:51:00 2001
    RE: all
    BY: Jas Hud to Willowolf on Mon Aug 27 2001 08:22 am

    i'm such a sloppy programmer, i probably confused you, but i get the job don also you can have random ansi menus ALA Renegade this way.

    Don't worry about it, if I have any questions, i'll let you know.

    \\/

    ---
    Synchronet Wolf Grotto -Las Vegas, NV- telnet://wolfgrotto.2y.net