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.
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,
\\/
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.
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
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 don also you can have random ansi menus ALA Renegade this way.
Sysop: | digital man |
---|---|
Location: | Riverside County, California |
Users: | 1,039 |
Nodes: | 16 (0 / 16) |
Uptime: | 15:29:42 |
Calls: | 500,926 |
Calls today: | 3 |
Files: | 109,372 |
D/L today: |
2,953 files (501M bytes) |
Messages: | 305,290 |