----- Original Message ----- From: "George Greer" <greerga@CIRCLEMUD.ORG> > CircleMUD is too easy to read, so from this point forward all code will > look like this: > > #include <stdio.h> > main(t,_,a) > char *a; > { > return!0<t?t<3?main(-79,-13,a+main(-87,1-_,main(-86,0,a+1)+a)): > 1,t<_?main(t+1,_,a):3,main(-94,-27+t,a)&&t==2?_<13? > main(2,_+1,"%s %d %d\n"):9:16:t<0?t<-72?main(_,t, > "@n'+,#'/*{}w+/w#cdnr/+,{}r/*de}+,/*{*+,/w{%+,/w#q#n+,/#{l+,/n{n+,/+#n+,/#\ > ;#q#n+,/+k#;*+,/'r :'d*'3,}{w+K w'K:'+}e#';dq#'l \ > q#'+d'K#!/+k#;q#'r}eKK#}w'r}eKK{nl]'/#;#q#n'){)#}w'){){nl]'/+#n';d}rw' i;# \ > ){nl]!/n{n#'; r{#w'r nc{nl]'/#{l,+'K {rw' iK{;[{nl]'/w#q#n'wk nw' \ > iwk{KK{nl]!/w{%'l##w#' i; :{nl]'/*{q#'ld;r'}{nlwb!/*de}'c \ > ;;{nl'-{}rw]'/+,}##'*}#nc,',#nw]'/+kd'+e}+;#'rdq#w! nr'/ ') }+}{rl#'{n' ')#\ > }'+}##(!!/") > :t<-50?_==*a?putchar(31[a]):main(-65,_,a+1):main((*a=='/')+t,_,a+1) > :0<t?main(2,2,"%s"):*a=='/'||main(0,main(-61,*a, > "!ek;dc i@bK'(q)-[w]*%n+r3#l,{}:\nuwloca-O;m .vpbks,fxntdCeghiry"),a+1); > } [snip] I applied this patch which I thought was bpl19 to my CircleMUD (I replaced the main() function), and now all my MUD does is display the 12 days of Christmas! Can you please help! I tried restoring from backup but my tape drive ate the tape. Any ideas? BTW, there's a misspelling: On the first day of Christmas my true love gave to me a partridge in a per tree. --- ObCircle: I played with the parser.c file that was contributed way back when, a couple days ago. For those of you unfamiliar, it works as follows: "I am [a fish.\a goat.\Great Teacher Largo!]" After being parsed, will return one of: "I am a fish.", "I am a goat.", or "I am Great Teacher Largo!" When you expand upon it, you end up being able to do evaluations and decide what text you want to display, based on the character who is looking, i.e., in room descriptions. I thought about taking this further, and making a fake little markup language, but stopped after toying with it for a bit. Very dirty code. But, it eventually would have handled the following: Tag Key: Q = Query (contains a subset of options). O = Option (checked within query tags, with no source, it equals the 'else'). P = Paragraph (indent = true by default) B = Bold (or "red") <q> <o source="character.intelligence <= 5"> <p indent="false">I are liking big dumb rocks, they are nice.</p> <p indent="true">Ooh, but this is shiny rock. Me likey rock much.</p> </o> <o source="character.intelligence <= 10"> <p>You notice some black rocks here, with one particularly shiny one present.</p> </o> <o> <p>Some fine specimens of obsidian lay here. You could probably <b>harvest</b> some.</p> </o> </q> Output for <= 5: I are liking big dumb rocks, they are nice. Ooh, but this is shiny rock. Me likey rock much. Output for <= 10 (but not <= 5): You notice some black rocks here, with one particularly shiny one present. Otherwise, output is: Some fine specimens of obsidian lay here. You could probably \c01harvest\c00 some. The deal here, is that the queries are cleaner (although more verbose), multiple paragraphs can be done (i.e., what I hate about /f and /fi in the editor), and with a PHP or perl parser, it could all be viewed via a web browser as well, if one desired in the future. Anyway, I decided not to pour much more time into it, and work on other, more fruitful projects. I think it allows more dynamic creation of data, with finer controls on the output than was available with the old parser. Any thoughts to contribute? -k. -- +---------------------------------------------------------------+ | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html | | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html | +---------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/06/01 PST