These objects I tend to carry with me all the time.
A general purpose tool for helping me code, design, and document my stuff on ifMud. Think of it as a remote control with a keypad and display screen. NOTE: Because this tool can change any field of any object I own, I've locked not just the editor itself, but I've locked the actions on it as well.
@create object editor;oe @set #9981 = expert @set #9981 = examinable @field #9981 = theobj : 9981 @field #9981 = _len : 0 @fail #9981 = Look and examine it, sure, but please don't take it. Thanks. @field #9981 = thefld : location @field #9981 = _off : 0 @lock #9981 = #8796 @field #9981 = fldcnt : 20 @desc #9981 = @print("It's a tool for examining and editing objects.%cEditing \"", thefld, "\" of ", @switch(@type(theobj), 0,"garbage",1,"room",2,"player",3,"exit",4,"object","unthing")," \"", @shortname(theobj),"\" #",theobj, @switch(@type(theobj),1,"", @print(" at \"",@shortname(@location(theobj)),"\" #",@location(theobj)) ),"."); --- @desc #9981 = @print("It's a tool for examining and editing objects.%cEditing \"", thefld, "\" of ", @switch(@type(theobj), 0,"garbage",1,"room",2,"player",3,"exit",4,"object","unthing")," \"", @shortname(theobj),"\" #",theobj, @switch(@type(theobj),1,"", @print(" at \"",@shortname(@location(theobj)),"\" #",@location(theobj))),"."); ===
Sets the value of the editor's "theobj" field to the number given. That is, tell the editor which object I'd like to examine and/or edit.
@action obj * = object editor : nowhere @set #9989 = puzzle @set #9989 = examinable @fail #9989 = The object editor only responds to its true owner. @lock #9989 = #8796 @field #9989 = varobj : 9981 @succe #9989 = @setfield("9981","theobj","%0"); @print("Now editing \"", thefld,"\" of ", @switch(@type(theobj), 0,"garbage",1,"room",2,"player",3,"exit",4,"object","unthing")," \"", @shortname(theobj),"\" #", theobj, @switch(@type(theobj),1,"", @print(" at \"",@shortname(@location(theobj)),"\" #",@location(theobj)) ),"."); @desc #9989 = Set the dbref of the object to edit.
Sets the value of the editor's "thefld" field to the fieldname given. That is, tell the editor which field of the current object I'd like to examine and/or edit.
@action fld * = object editor : nowhere @set #10052 = puzzle @set #10052 = examinable @fail #10052 = The object editor only responds to its true owner. @lock #10052 = #8796 @field #10052 = varobj : 9981 @succe #10052 = @setfield("9981","thefld","%0"); @print("Now editing \"", thefld,"\" of ", @switch(@type(theobj), 0,"garbage",1,"room",2,"player",3,"exit",4,"object","unthing")," \"", @shortname(theobj),"\" #", theobj, @switch(@type(theobj),1,"", @print(" at \"",@shortname(@location(theobj)),"\" #",@location(theobj)) ),"."); @desc #10052 = Set the name of the field to edit.
Appends the given text to the end of the current field of the current object. Before I started using Pueblo, I was using a Java client to visit ifMud, and this action was the only reasonable way I had if I wanted to enter long field values. Now, I have little use for this particular command.
@action app * = object editor : nowhere @set #10057 = puzzle @set #10057 = examinable @fail #10057 = The object editor only responds to its true owner. @lock #10057 = #8796 @succe #10057 = @setfield( @getfield("9981","theobj"), @getfield("9981","thefld"), @print(@getfield(@getfield("9981","theobj"),@getfield("9981","thefld")), " ","%4")) @desc #10057 = Append text to the end of the current object's current field.
When you start writing objects with hundreds of field values, it's no longer practical to examine the entire object. This command lets me view just the field that I'm interested in.
@action echo = object editor : nowhere @set #10102 = puzzle @set #10102 = examinable @fail #10102 = The object editor only responds to its true owner. @lock #10102 = #8796 @field #10102 = varobj : 9981 @succe #10102 = @getfield(theobj,thefld); @desc #10102 = Echo the value of the current item's current field. Note that this won't actually do anything if I don't own the object, or if the object isn't examinable.
Sets the value of the editor's "_off" field, which should be a number representing an substring selection offset within the current field's string value. See the rep and echo2 commands below.
@action off * = object editor : nowhere @set #10245 = puzzle @set #10245 = examinable @field #10245 = varobj : 9981 @succe #10245 = @setfield("9981","_off","%0"); @execute(@getfield("10253","success")) @desc #10245 = Sets the selection offset.
Sets the value of the editor's "_len" field, which should be a number representing a substring selection length within the current field's string value. See the rep and echo2 commands below.
@action len * = object editor : nowhere @set #10251 = puzzle @set #10251 = examinable @field #10251 = varobj : 9981 @succe #10251 = @setfield("9981","_len","%0"); @execute(@getfield("10253","success")) @desc #10251 = Sets the selection length.
Replaces the current selection in the current field of the current object with the given string. This is mostly useful just for book objects, if I want to delete an entry, or more likely, change the leading book text.
@action rep * = object editor : nowhere @set #10252 = puzzle @set #10252 = examinable @field #10252 = varobj : 9981 @lock #10252 = #8796 @succe #10252 = @setfield(theobj,thefld, @print(@substr(@getfield(theobj,thefld),"0",_off), "%4", @substr(@getfield(theobj,thefld),@add(_off, _len),@sub(@strlen(@getfield(theobj,thefld)), @add(_off,_len))))); @execute(@getfield("10253","success")) @desc #10252 = Replaces the current selection in the current object's current field with the given string.
Like echo, it displays the current field of the current object, but shows where the selection substring is (which is set with the off and len commands). The selection is enclosed between the [>>] and [<<].
@action echo2 = object editor : nowhere @set #10253 = examinable @field #10253 = varobj : 9981 @succe #10253 = @print("** selection is [",_off,".",_len, "] **%c"); @print(@substr(@getfield(theobj,thefld), "0",_off),"[>>]",@substr(@getfield(theobj,thefld), _off,_len),"[<<]",@substr(@getfield(theobj,thefld), @add(_off,_len),@sub(@strlen(@getfield(theobj, thefld)),@add(_off,_len)))) @desc #10253 = Same as echo, but shows the [selection] within square brackets.
As an alternative to the obj command, I can wave the editor at a local object by name, and set the editor's current object to be that object.
@action wave oe at * = object editor : nowhere @set #10479 = puzzle @field #10479 = varobj : 9981 @succe #10479 = @setfield("9981","theobj", @switch(1, @eq("%0","here"),@location("%#"), @eq(@object(@location("%#"),"%0"),"-1"),@object("%#","%0"), @object(@location("%#"),"%0") )); @print("Now editing \"", thefld,"\" of ", @switch(@type(theobj), 0,"garbage",1,"room",2,"player",3,"exit",4,"object","unthing")," \"", @shortname(theobj),"\" #", theobj, @switch(@type(theobj),1,"", @print(" at \"",@shortname(@location(theobj)),"\" #",@location(theobj)) ),"."); --- @succe #10479 = @setfield("9981","theobj", @switch(1, @eq("%0","here"),@location("%#"), @eq(@object(@location("%#"),"%0"),"-1"),@object("%#","%0"), @object(@location("%#"),"%0"))); @print("Now editing \"", thefld,"\" of ", @switch(@type(theobj), 0,"garbage",1,"room",2,"player",3,"exit",4,"object","unthing")," \"", @shortname(theobj),"\" #", theobj, @switch(@type(theobj),1,"", @print(" at \"",@shortname(@location(theobj)),"\" #",@location(theobj))),"."); === @desc #10479 = Wave the oe at an object by name to report its dbref, and also set the oe to edit it.
Counts fields in the current object, not counting some fields that @fieldloop() ignores. By giving a prefix, I can count just the fields that begin with that prefix. This is mostly useful for those objects with zillions of fields, and simple examining isn't practical.
@action fldcnt *;fldcnt = object editor : nowhere @set #10501 = puzzle @field #10501 = varobj : 9981 @lock #10501 = #8796 @succe #10501 = @s("fldcnt","0"); @fieldloop(theobj,"%0", @s("fldcnt",@add(fldcnt,1))); @print("The field count is ", fldcnt, "."); -- @succe #10501 = @s("fldcnt","0"); @fieldloop(theobj,"%0", @s("fldcnt",@add(fldcnt,1))); @print("The field count is ", fldcnt, "."); == @desc #10501 = Count the fields in the current object; use of the field prefix is optional.
Lists the fieldnames in the current object, not counting some fields that @fieldloop() ignores. By giving a prefix, I can list just the fields that begin with that prefix. Only the names of the fields are displayed, not the field values. This is mostly useful for those objects with zillions of fields, and simple examining isn't practical.
@action fldlst *;fldlst = object editor : nowhere @set #10502 = puzzle @field #10502 = varobj : 9981 @lock #10502 = #8796 @succe #10502 = @print("/"); @fieldloop(theobj,"%0"," %f /"); @desc #10502 = List the fields in the current object; use of the field prefix is optional.
Dumps the code for the current object, not including any actions or objects within it. The dumped code is enclosed within some html, so I can easily cut and paste it into these documentation pages. ("fgna_" means "flag name".)
@action code dump;dump = object editor : nowhere @set #10702 = examinable @field #10702 = fgna_abode : abode @field #10702 = fgna_book : book @field #10702 = fgna_builder : builder @field #10702 = fgna_chownok : chownok @field #10702 = fgna_dark : dark @field #10702 = fgna_examinable : examinable @field #10702 = fgna_expert : expert @field #10702 = fgna_female : female @field #10702 = fgna_going : going @field #10702 = fgna_jumpok : jumpok @field #10702 = fgna_linkok : linkok @field #10702 = fgna_male : male @field #10702 = fgna_nochannel : nochannel @field #10702 = fgna_noexclaim : noexclaim @field #10702 = fgna_nohilite : nohilite @field #10702 = fgna_noholler : noholler @field #10702 = fgna_puzzle : puzzle @field #10702 = fgna_quiet : quiet @field #10702 = fgna_slippery : slippery @field #10702 = fgna_spy : spy @field #10702 = fgna_visible : visible @field #10702 = fgna_wizard : wizard @field #10702 = fgna_zoned : zoned @field #10702 = part0 : @let("z"=>@getfield(9981,"theobj"), @tell("%#",@print("<a id=\"db%z\" name=\"db%z\"></a>%c<h", @switch(@type("%z"),1,2,3),">",@shortname("%z"), " (dbref #%z)</h",@switch(@type("%z"),1,2,3),">" ))); @field #10702 = part1 : @let("z"=>@getfield(9981,"theobj"), @switch(@type("%z"), 1,@tell("%#",@print("@dig ",@name("%z"))), 3,@switch(@type(@location("%z")), 1,@tell("%#",@print("@open ",@name("%z")," = ", @switch(@getfield("%z","action"),"-3","nowhere", @print("#",@getfield("%z","action"))) )), @tell("%#",@print("@action ",@name("%z"), " = ", @shortname(@location("%z"))," : ", @switch(@getfield("%z","action"),"-3","nowhere", @print("#",@getfield("%z","action"))) ))), 4,@tell("%#",@print("@create ",@name("%z"))))); @field #10702 = part2 : @let("z"=>@getfield(9981,"theobj"), @fieldloop("%!","fgna_", @switch(@testflag("%z","%v"), 1,@tell("%#","@set #%z = %v")))); @field #10702 = part3 : @let("z"=>@getfield(9981,"theobj"), @print(@fieldloop("%z","",@switch("%f", {"success","osuccess","drop","odrop","fail","ofail","lock"}, @tell("%#",@print("@",@substr("%f",0,5)," #%z = %v")), @tell("%#",@print("@field #%z = %f : %v")))), @switch(@strlen(@getfield("%z","zone")),{1,2,3,4,5}, @tell("%#",@print("@zone #%z = #", @getfield("%z","zone")))), @tell("%#",@print("@desc #%z = ", @getfield("%z","description"))) )); @lock #10702 = #8796 @succe #10702 = @call("%!","part0"); @tell("%#","<pre>"); @call("%!","part1"); @call("%!","part2"); @call("%!","part3"); @tell("%#","</pre>"); @desc #10702 = Displays all the original code that created the current object.
A more ambitious version of code dump, this command attempts to also report on the current object's children as well. Not recommended for heavily coded rooms; it's easier than you think to hit against the 64 @call limit.
@action room dump;rmdump = object editor : nowhere @desc rmdump = Dumps all the code for location theobj, and every non-player object there. @succ rmdump = @call("%!","rmhdr"); @call(10702,"success"); @fieldloop("%!", "obj_", @switch("1", @eq(@type("%v"), "2"), "", @print(@setfield(9981,"theobj","%v"),@call(10702,"success")) )); @fieldloop("%!", "obj_", @setfield("%!","%f","")); @field rmdump = rmhdr : @s("nobjs", "0"); @strloop(@getfield(@getfield(9981,"theobj"),"contents"), "x", @switch("%x", ",", @s("nobjs", @add(@g("nobjs"), "1")), @s(@print("obj_", @g("nobjs")), @print(@g(@print("obj_", @g("nobjs"))), "%x")) )); @tell("%#",@print("<ul>%c<li><a href=\"#", @getfield(9981,"theobj"),"\">", @shortname(@getfield(9981,"theobj")), "</a>%c<small>(", @s("rmhdr_contents",@getfield(@getfield(9981,"theobj"),"contents")), @substr(@fieldloop("%!", "obj_", @switch("1", @eq(@type("%v"), "2"), "", @print("<a href=\"#%v\">", @shortname("%v"), "</a>, ") )), "0", "-2"), ")</small></li>%c</ul>" ))
Originally, just a way for me to quickly teleport to the various areas of the CE Realm, a portable version of the Undernexus of Cosmic Reality. Later, I added scanning capabilities, which I probably should move over to the object editor.
@create transporting crystal;crystal;tc @set #10302 = expert @field #10302 = is_loc : 1 @field #10302 = is_flags : 1 @field #10302 = is_name : 0 @field #10302 = at_loc : 0 @field #10302 = dbr : 11236 @lock #10302 = #8796 @field #10302 = stat : @print("[", dbr, @switch(@type(dbr),1, "R",2,"P",3,"E",4,"","X"), ": ", @switch(is_name,1,@name(dbr),@shortname(dbr)), @switch(@and(is_loc,@gt(@location(dbr),0)),1, @print(" @ ", @shortname(@location(dbr)), " (", @location(dbr), ")")), @switch(is_flags,1,@print( @switch(@testflag(dbr,"abode"),1," +abo"), @switch(@testflag(dbr,"book"),1," +bk"), @switch(@testflag(dbr,"builder"),1," +bdr"), @switch(@testflag(dbr,"dark"),1," +drk"), @switch(@testflag(dbr,"examinable"),1," +ex"), @switch(@testflag(dbr,"expert"),1," +exp"), @switch(@testflag(dbr,"female"),1," +fem"), @switch(@testflag(dbr,"going"),1," +go"), @switch(@testflag(dbr,"jumpok"),1," +jmp"), @switch(@testflag(dbr,"linkok"),1," +lnk"), @switch(@testflag(dbr,"male"),1," +mal"), @switch(@testflag(dbr,"puzzle"),1," +puz"), @switch(@testflag(dbr,"quiet"),1," +qt"), @switch(@testflag(dbr,"slippery"),1," +slp"), @switch(@testflag(dbr,"spy"),1," +spy"), @switch(@testflag(dbr,"visible"),1," +vis"), @switch(@testflag(dbr,"wizard"),1," +wiz"), @switch(@testflag(dbr,"zoned"),1," +zon"), @switch(@gt(@strlen(@g(@print("ownerof_",dbr))),0),1, @print(" +own:",@shortname(@g(@print("ownerof_",dbr))))))), "] "); @field #10302 = filtstat : @switch(@or(@eq(otype,0),@eq(otype, @type(dbr))),1, @switch(is_at,1, @switch(@eq(at_loc,@location(dbr)),1, @call(10302,"stat")), @call(10302,"stat"))); @s("dbr",@add(1,dbr)); @field #10302 = xs : 01234567890123456789012345678901234567890123456789 0123456789012345678901234567890123456789012345678901234567890123456789 @field #10302 = xy : 8 @field #10302 = is_at : 0 @field #10302 = is_cr : 1 @field #10302 = otype : 0 @desc #10302 = This transporting crystal can transport its user to various points of interest. Just focus on the appropriate color.
@action white;go white;focus white = transporting crystal : #8856 @odrop #10306 = materializes out from a white haze in the light. @osucc #10306 = focuses on %p crystal and fades away into a white haze in the light. @succe #10306 = You focus on a white facet, which teleports you to... @desc #10306 = Teleport to Spaceport Lobby
@action black;go black;focus black = transporting crystal : #9623 @odrop #10307 = materializes out from a black haze in the light. @osucc #10307 = focuses on %p crystal and fades away into a black haze in the light. @succe #10307 = You focus on a black facet, which teleports you to... @desc #10307 = Teleport to Warp
@action silver;go silver;focus silver = transporting crystal : #14 @odrop #10308 = materializes out from a silver haze in the light. @osucc #10308 = focuses on %p crystal and fades away into a silver haze in the light. @succe #10308 = You focus on a silver facet, which teleports you to... @desc #10308 = Teleport to Adventurer's Lounge
@action red;go red;focus red = transporting crystal : #9231 @odrop #10309 = %n materializes out from a red haze in the light. @osucc #10309 = focuses on %p crystal and fades away into a red haze in the light. @succe #10309 = You focus on a red facet, which teleports you to... @desc #10309 = Teleport to Red Stardisc
@action orange;go orange;focus orange = transporting crystal : #9244 @odrop #10310 = materializes out from an orange haze in the light. @osucc #10310 = focuses on %p crystal and fades away into an orange haze in the light. @succe #10310 = You focus on an orange facet, which teleports you to... @desc #10310 = Teleport to Orange Stardisc
@action yellow;go yellow;focus yellow = transporting crystal : #9385 @odrop #10311 = materializes out from a yellow haze in the light. @osucc #10311 = focuses on %p crystal and fades away into a yellow haze in the light. @succe #10311 = You focus on a yellow facet, which teleports you to... @desc #10311 = Teleport to Yellow Stardisc
@action ultrablack;go ultrablack;focus ultrablack = transporting crystal : #9671 @odrop #10312 = materializes out from an ultrablack haze in the light. @osucc #10312 = focuses on %p crystal and fades away into an ultrablack light. @succe #10312 = You focus on an ultrablack facet, which teleports you to... @desc #10312 = Teleport to The Praw
@action green;go green;focus green = transporting crystal : #9453 @odrop #10313 = materializes out from a green haze in the light. @osucc #10313 = focuses on %p crystal and fades away into a green haze in the light. @succe #10313 = You focus on a green facet, which teleports you to... @desc #10313 = Teleport to Green Stardisc
@action blue;go blue;focus blue = transporting crystal : #9474 @odrop #10314 = materializes out from a blue haze in the light. @osucc #10314 = focuses on %p crystal and fades away into a blue haze in the light. @succe #10314 = You focus on a blue facet, which teleports you to... @desc #10314 = Teleport to Blue Stardisc
@action violet;go violet;focus violet = transporting crystal : #9475 @odrop #10315 = materializes out from a violet haze in the light. @osucc #10315 = focuses on %p crystal and fades away into a violet haze in the light. @succe #10315 = You focus on a violet facet, which teleports you to... @desc #10315 = Teleport to Violet Stardisc
@action clear;go clear;focus clear = transporting crystal : #9676 @odrop #10316 = materializes out from a clear haze in the light. @osucc #10316 = focuses on %p crystal and fades away into a clear haze in the light. @succe #10316 = You focus on a clear facet, which teleports you to... @desc #10316 = Teleport to Undernexus
@action hangman = transporting crystal : #10447 @odrop #10462 = arrives in an orange flash. @osucc #10462 = is enveloped by an orange flash, as %s goes off to play hangman. @succe #10462 = An orange flash surrounds you, and you're off to play hangman. @desc #10462 = Teleport to Starbase Hangman
A very powerful command, this command lets me scan up to a 100 objects at a time by their dbrefs. With the associated toggle command, the scan can be filtered in various ways. Note that the @success is written without a single @call or @execute, to avoid the dreaded 64 @call limit.
@action scan from * to *;scan * to *;scan * = transporting crystal : nowhere @set #10632 = puzzle @field #10632 = varobj : 10302 @field #10632 = dbr : 15 @succe #10632 = @s("dbr","%0"); @switch(@strlen("%1"),0,@s("xy",1),@s("xy",@add(@sub("%1","%0"),1))); @strloop(@substr(@g("xs"),0,@g("xy")),"x", @print(@switch(@or(@eq(@g("otype"),0),@eq(@g("otype"),@type(@g("dbr")))),1, @switch(1,@or( @eq(@g("is_at"),0),@eq(@g("at_loc"),@location(@g("dbr"))) ), @print("[", @g("dbr"), @switch(@type(@g("dbr")),1,"R",2,"P",3,"E",4,"","X"), ": ", @switch(@g("is_name"),"1",@name(@g("dbr")),@shortname(@g("dbr"))), @switch(@and(@g("is_loc"),@gt(@location(@g("dbr")),0)),"1", @print(" @ ", @shortname(@location(@g("dbr"))), " (", @location(@g("dbr")), ")")), @switch(@g("is_flags"),"1",@print( @switch(@testflag(@g("dbr"),"abode"),"1"," +abo"), @switch(@testflag(@g("dbr"),"book"),"1"," +bk"), @switch(@testflag(@g("dbr"),"builder"),"1"," +bdr"), @switch(@testflag(@g("dbr"),"chownok"),"1"," +ch"), @switch(@testflag(@g("dbr"),"dark"),"1"," +drk"), @switch(@testflag(@g("dbr"),"examinable"),"1"," +ex"), @switch(@testflag(@g("dbr"),"expert"),"1"," +exp"), @switch(@testflag(@g("dbr"),"female"),"1"," +fem"), @switch(@testflag(@g("dbr"),"going"),"1"," +go"), @switch(@testflag(@g("dbr"),"jumpok"),"1"," +jmp"), @switch(@testflag(@g("dbr"),"linkok"),"1"," +lnk"), @switch(@testflag(@g("dbr"),"male"),"1"," +mal"), @switch(@testflag(@g("dbr"),"puzzle"),"1"," +puz"), @switch(@testflag(@g("dbr"),"quiet"),"1"," +qt"), @switch(@testflag(@g("dbr"),"slippery"),"1"," +slp"), @switch(@testflag(@g("dbr"),"spy"),"1"," +spy"), @switch(@testflag(@g("dbr"),"visible"),"1"," +vis"), @switch(@testflag(@g("dbr"),"wizard"),"1"," +wiz"), @switch(@testflag(@g("dbr"),"zoned"),"1"," +zon"), @switch(@gt(@strlen(@g(@print("ownerof_",@g("dbr")))),0),"1", @print(" +own:",@shortname(@g(@print("ownerof_",@g("dbr")))))))), "] "))), @s("dbr",@add(1,@g("dbr")))));
A way of filtering the output of the scan action.
@action toggle *;tog * = transporting crystal : nowhere @set #10642 = puzzle @field #10642 = varobj : 10302 @succe #10642 = @switch("%0", {"flg","flag","flags"},@s("is_flags",@not(@g("is_flags"))), {"loc","location","locn","locations","locs","locns"}, @s("is_loc",@not(@g("is_loc"))), {"nam","name","names","na"},@s("is_name",@not(@g("is_name"))), {"at"},@s("is_at",@not(@g("is_at"))), {"cr"},@s("is_cr",@not(@g("is_cr"))), {"thing","things",4},@s("otype",4), {"exit","exits","action","actions",3},@s("otype",3), {"who","player","players","people",2},@s("otype",2), {"rm","room","rooms",1},@s("otype",1), {"all","any","anything","everything",0},@s("otype",0)); @print("Ok. Typ=", @g("otype"), ". Flg=", @g("is_flags"), ". Loc=", @g("is_loc"), ". Nam=", @g("is_name"), ". At=", @g("is_at"), ". Cr=", @g("is_cr")); @desc #10642 = Toggles various scan settings (flags|loc|names|at|cr|all|rm|player|exit|thing).
Since there is no @owner function in JotaCode, the only way to figure out who owns what is with the examine command. So if I want my scan action to report an object's owner, I must examine the object first, then use this command to remember who owns what. In practice, I only bother recording rooms' owners. Caveat One: there's nothing to prevent this remembered info from going out of date, eg: if the object is recycled. Caveat Two: this is hideously impractical, that its value is somewhat questionable.
@action remember * owns *;rem * owns * = transporting crystal : nowhere @set #10641 = puzzle @field #10641 = varobj : 10302 @succe #10641 = @s("ownerof_%1",@player("%0")); @print("Ok, %0 owns %1."); @desc #10641 = Remember who (name) owns what (number).
The master copy of the ifMud white pages, an attempt to record where everyone's accessible areas in the ifMud are. A slaved copy of this object is now in the Edifice Towers lobby (see publish action).
@create ifMud white pages;white pages;directory;homes;iwp @set #11123 = expert @field #11123 = listmode : verbose @desc #11123 = @print("A directory of people's homes/areas on ifMud, where they are, and how to visit them. Examine each action for more information on that action.%cThe current list mode is \"", @g("listmode"), "\".") ... many many fields omitted, eg: ... @field #11123 = nam_davidw : DavidW @field #11123 = ref_davidw : 8856 @field #11123 = jmp_davidw : 4 @field #11123 = dir_davidw : southeast (to Open Chamber), down ... etc etc etc ... @field #11123 = mmm_0 : Jan @field #11123 = mmm_1 : Feb @field #11123 = mmm_2 : Mar @field #11123 = mmm_3 : Apr @field #11123 = mmm_4 : May @field #11123 = mmm_5 : Jun @field #11123 = mmm_6 : Jul @field #11123 = mmm_7 : Aug @field #11123 = mmm_8 : Sep @field #11123 = mmm_9 : Oct @field #11123 = mmm_10 : Nov @field #11123 = mmm_11 : Dec @field #11123 = today : @print(@getfield(11123,@print("mmm_",@time("mon")))," ",@time("mday"),", ",@add(1900,@time("year")))
@action list *;list;list names *;list names;ln *;ln = ifMud white pages : nowhere @set #11124 = puzzle @field #11124 = varobj : 11123 @old_succe #11124 = @print("Under \"%0...\", you read: /"); @fieldloop(11123,"nam_%0",@print(" %v", @switch(@g("listmode"),"verbose",@print( ": ", @switch( @g(@print("ref_",@substr("%f",4))),"", @g(@print("loc_",@substr("%f",4))), @shortname(@g(@print("ref_",@substr("%f",4))))), @let("z"=>@g(@print("etn_",@substr("%f",4))), @switch(@gt("%z",0),1," (ET #%z)")), @let("y"=>@g(@print("rms_",@substr("%f",4))), @switch("%y",{0,""},"",1," [1rm]"," [%yrms]")), @switch(@g(@print("lkd_",@substr("%f",4))),1," (locked)"))), " /")); @succe #11124 = @print("Under \"%0...\", you read: /"); @fieldloop(11123,"nam_%0",@print(" %v", @switch(@g("listmode"),"verbose",@print( ": ", @switch( @g(@print("ref_",@substr("%f",4))),"", @g(@print("loc_",@substr("%f",4))), @shortname(@g(@print("ref_",@substr("%f",4))))), @s("tmp",""), @let("z"=>@g(@print("etn_",@substr("%f",4))), @switch(@gt("%z",0),1,@s("tmp",@print(@g("tmp"),", ET #%z")) )), @let("y"=>@g(@print("rms_",@substr("%f",4))), @switch("%y",{0,""},"",1, @s("tmp",@print(@g("tmp"),", 1rm")), @s("tmp",@print(@g("tmp"),", %yrms")) )), @switch(@g(@print("lkd_",@substr("%f",4))),1, @s("tmp",@print(@g("tmp"),", locked")) ), @switch(@gt(@strlen(@g("tmp")),0),1,@print( " [",@substr(@g("tmp"),2),"]" )) ))," /")); -- @succe #11124 = @print("Under \"%0...\", you read: /"); @fieldloop(11123,"nam_%0",@print(" %v", @switch(@g("listmode"),"verbose",@print( ": ", @switch( @g(@print("ref_",@substr("%f",4))),"", @g(@print("loc_",@substr("%f",4))), @shortname(@g(@print("ref_",@substr("%f",4))))), @s("tmp",""), @let("z"=>@g(@print("etn_",@substr("%f",4))), @switch(@gt("%z",0),1,@s("tmp",@print(@g("tmp"),", ET #%z")))), @let("y"=>@g(@print("rms_",@substr("%f",4))), @switch("%y",{0,""},"",1, @s("tmp",@print(@g("tmp"),", 1rm")), @s("tmp",@print(@g("tmp"),", %yrms")))), @switch(@g(@print("lkd_",@substr("%f",4))),1, @s("tmp",@print(@g("tmp"),", locked"))), @switch(@gt(@strlen(@g("tmp")),0),1,@print(" [",@substr(@g("tmp"),2),"]"))))," /")); == @desc #11124 = Lists names in the white pages. For example, "list a" lists all the names beginning with a, "list b" lists all the names beginning with b, and so forth. Every player listed is associated with the 'entrance room' of their region. If it's not marked "(locked)", then you may visit it. Players may have multiple regions listed, eg: "list Jota".
@name #11125 = brief @action brief = ifMud white pages : nowhere @set #11125 = puzzle @field #11125 = varobj : 11123 @succe #11125 = @s("listmode","brief"); @print("The listmode is now \"brief\"."); @desc #11125 = Sets the listing to 'brief' mode, ie: names only.
@action verbose = ifMud white pages : nowhere @field #11126 = varobj : 11123 @succe #11126 = @s("listmode","verbose"); @print("The listmode is now \"verbose\"."); @desc #11126 = Sets the listing to 'verbose' mode, ie: players are listed with associated locations.
@action visit;visit * = ifMud white pages : nowhere @set #11127 = puzzle @field #11127 = varobj : 11123 @succe #11127 = @switch(1,@gt(@g("jmp_%0"),0),@print( @s("whose",""), @s("whodone",0), @strloop(@g("nam_%0"),"x",@switch(@g("whodone"),0,@switch("%x", ".",@s("whodone",1),@s("whose",@print(@g("whose"),"%x")) ))), @tellroom(@location("%#"),-1, @print("%n heads off to visit ", @let("k"=>@print(@g("whose"),"'s "), "z"=>@switch( @g("ref_%0"),"",@g("loc_%0"),@shortname(@g("ref_%0")) ), @switch(1,@or(@eq(@g("shh_%0"),1),@eq(@lc("%k"), @lc(@substr("%z","0",@strlen("%k"))))),"%z.","%k%z.")))), @move("%#", @strcheck(@g("jmp_%0"),@g("ref_%0"))), @tellroom(@location("%#"),"%#","%n has dropped by for a visit.")), "No jump destination defined for \"%0\"." ); @switch(1,@gt(@strlen(@g("dir_%0")),0), @print("\"To continue to ", @strcheck(@g("loc_%0"),@shortname(@g("ref_%0"))), " from here: ", @g("dir_%0"), ".\"")); @desc #11127 = Teleports you as close as possible to the player's home/area, eg: "visit inky". The player's name must be entered in full. If the player has multiple areas, you may have to enter a codename for the area as well, eg: "visit Jota.Example". If necessary, further directions to follow are told to you after you teleport.
@action add;add * is * = ifMud white pages : nowhere @set #10761 = puzzle @field #10761 = varobj : 11123 @succe #10761 = @call(11123,"calc_who_0"); @switch(1, @not(@eq(@type(@g("who")),2)), @print("Add failed. \"%4\" does not refer to any player's name."), @not(@or(@eq("%#",8796), @eq("%#",@g("who")), @testflag("%#","wizard"))), @print("Add failed. Permission denied."), @not(@eq(@type("%1"),1)), @print("Add failed. \"%1\" is not a valid room number."), @gt(@strlen(@g("nam_%0")),0), @print("Add failed. Entry for \"%4\" is already defined."), @print(@s("nam_%0","%4"), @s("ref_%0","%1"), "Added.")); TODO ADD UPDATE @desc #10761 = SYNTAX %c add playername(.areaname) is roomref %cDESCRIPTION %c Adds a new entry to the white pages, eg: "add Floyd is 2341". Wizards may add entries under anyone's name; others may only add entries under their own name.
@action delete;delete * = ifMud white pages : nowhere @set #11182 = puzzle @field #11182 = varobj : 11123 @succe #11182 = @call(11123,"calc_who_0"); @switch(1, @not(@eq(@type(@g("who")),2)), @print("Delete failed. \"%4\" does not refer to any player's name."), @not(@or(@eq("%#",8796), @eq("%#",@g("who")), @testflag("%#","wizard"))), @print("Delete failed. Permission denied."), @not(@gt(@strlen(@g("nam_%0")),0)), @print("Delete failed. Entry for \"%4\" is not defined."), @print(@s("nam_%0",""), @s("ref_%0",""), @s("loc_%0",""), @s("jmp_%0",""), @s("etn_%0",""), @s("dir_%0",""), @s("lkd_%0",""), "Deleted.")); @desc #11182 = SYNTAX %c delete playername(.areaname) %cDESCRIPTION %c Deletes an entry from the white pages, eg: "delete Teresa.Swamp". Wizards may delete anyone's entries; others may only delete their own entries.
@action set = ifMud white pages : nowhere @name #11183 = set;set * of * = * @set #11183 = puzzle @field #11183 = varobj : 11123 @succe #11183 = @call(11123,"calc_who_1"); @switch(1, @not(@eq(@type(@g("who")),2)), @print("Set failed. \"%5\" does not refer to any player's name."), @not(@or(@eq("%#",8796), @eq("%#",@g("who")), @testflag("%#","wizard"))), @print("Set failed. Permission denied."), @not(@gt(@strlen(@g("nam_%1")),0)), @print("Set failed. Entry for \"%5\" is not defined."), @not(@or(@eq("%0","ref"), @eq("%0","jmp"), @eq("%0","dir"), @eq("%0","etn"), @eq("%0","lkd"), @eq("%0","rms"), @eq("%0","lom"), @eq("%0","rem"), @eq("%0","shh"))), @print("Set failed. Field must be one of ref, jmp, dir, etn, lkd, rms, shh, lom, rem."), @and(@eq("%0","jmp"),@gt(@strlen("%2"),0), @not(@and(@testflag("%2","jumpok"),@eq(@type("%2"),1)))), @print("Set failed. \"%2\" is not the dbref of a jumpok room."), @print(@s("%0_%1","%6"), "Set.", @s("upd_%1",@call(11123,"today")) )); --- @succe #11183 = @call(11123,"calc_who_1"); @switch(1, @not(@eq(@type(@g("who")),2)), @print("Set failed. \"%5\" does not refer to any player's name."), @not(@or(@eq("%#",8796), @eq("%#",@g("who")), @testflag("%#","wizard"))), @print("Set failed. Permission denied."), @not(@gt(@strlen(@g("nam_%1")),0)), @print("Set failed. Entry for \"%5\" is not defined."), @not(@or(@eq("%0","ref"), @eq("%0","jmp"), @eq("%0","dir"), @eq("%0","etn"), @eq("%0","lkd"), @eq("%0","rms"), @eq("%0","lom"), @eq("%0","rem"), @eq("%0","shh"))), @print("Set failed. Field must be one of ref, jmp, dir, etn, lkd, rms, shh, lom, rem."), @and(@eq("%0","jmp"),@gt(@strlen("%2"),0), @not(@and(@testflag("%2","jumpok"),@eq(@type("%2"),1)))), @print("Set failed. \"%2\" is not the dbref of a jumpok room."), @print(@s("%0_%1","%6"), "Set.", @s("upd_%1",@call(11123,"today")))); === @desc #11183 = SYNTAX %c set field of playername(.areaname) = value %cDESCRIPTION %c Changes a field's value for the named entry; in order words, edit the entry. Wizards may edit anyone's entries; others may only edit their own entries. %cFIELDS %c ref = The dbref of the target room. This is the 'entrance' room. %c jmp = The dbref of the closest room that is set jumpok. %c dir = Directions from the jumpok room to the target room, if applicable. %c etn = The Edifice Towers apartment number, if applicable. %c rms = Number of rooms in the area (when last checked). %c lkd = 1, if the target room is locked or otherwise unreachable. %c shh = 1, to suppress owner's name repetition in the visit message. %c lom = list of known lounge-o-matics in the area. %c rem = general remarks, comments about the area. %cEXAMPLE %c set jmp of belboz = 4 %c set dir of belboz = southeast (to Open Chamber), up %c set rms of belboz = 5 --- @desc #11183 = SYNTAX%c set field of playername(.areaname) = value%cDESCRIPTION%c Changes a field's value for the named entry; in order words, edit the entry. Wizards may edit anyone's entries; others may only edit their own entries.%cFIELDS%c ref = The dbref of the target room. This is the 'entrance' room.%c jmp = The dbref of the closest room that is set jumpok.%c dir = Directions from the jumpok room to the target room, if applicable.%c etn = The Edifice Towers apartment number, if applicable.%c lkd = 1, if the target room is locked or otherwise unreachable.%c rms = Number of rooms in the area (when last checked)%c shh = 1, to suppress owner's name repetition in the visit message.%c lom = list of known lounge-o-matics in the area.%c rem = general remarks, comments about the area.%cEXAMPLES%c set jmp of belboz = 4%c set dir of belboz = southeast (to Open Chamber), up%c set rms of belboz = 5 ===
@action publish = ifMud white pages : nowhere @field #11184 = varobj : 11123 @field #11184 = pubobj01 : @s("obj01",@object("%#","obj01")); @setflag(@g("obj01"),"expert"); @setfield(@g("obj01"),"name",@g("name")); @setfield(@g("obj01"),"listmode","brief"); @setfield(@g("obj01"),"description",@g("description")); @field #11184 = pubact01 : @s("act01",@object(@g("obj01"),"act01")); @setflag(@g("act01"),"puzzle"); @setfield(@g("act01"),"name",@getfield(11124,"name")); @setfield(@g("act01"),"varobj",11123); @setfield(@g("act01"),"description",@getfield(11124,"description")); @setfield(@g("act01"),"success","@call(11124,\"success\")"); @field #11184 = pubact02 : @s("act02",@object(@g("obj01"),"act02")); @setflag(@g("act02"),"puzzle"); @setfield(@g("act02"),"name",@getfield(11127,"name")); @setfield(@g("act02"),"varobj",11123); @setfield(@g("act02"),"description","@call(11127,\"description\")"); @setfield(@g("act02"),"success","@call(11127,\"success\")"); @field #11184 = pubact03 : @s("act03",@object(@g("obj01"),"act03")); @setflag(@g("act03"),"puzzle"); @setfield(@g("act03"),"name",@getfield(11125,"name")); @setfield(@g("act03"),"varobj",@g("obj01")); @setfield(@g("act03"),"description","@call(11125,\"description\")"); @setfield(@g("act03"),"success","@call(11125,\"success\")"); @field #11184 = pubact04 : @s("act04",@object(@g("obj01"),"act04")); @setflag(@g("act04"),"puzzle"); @setfield(@g("act04"),"name",@getfield(11126,"name")); @setfield(@g("act04"),"varobj",@g("obj01")); @setfield(@g("act04"),"description","@call(11126,\"description\")"); @setfield(@g("act04"),"success","@call(11126,\"success\")"); @field #11184 = pubact05 : @s("act05",@object(@g("obj01"),"act05")); @setflag(@g("act05"),"puzzle"); @setfield(@g("act05"),"name",@getfield(10761,"name")); @setfield(@g("act05"),"varobj",11123); @setfield(@g("act05"),"description","@call(10761,\"description\")"); @setfield(@g("act05"),"success","@call(10761,\"success\")"); @field #11184 = pubact06 : @s("act06",@object(@g("obj01"),"act06")); @setflag(@g("act06"),"puzzle"); @setfield(@g("act06"),"name",@getfield(11182,"name")); @setfield(@g("act06"),"varobj",11123); @setfield(@g("act06"),"description","@call(11182,\"description\")"); @setfield(@g("act06"),"success","@call(11182,\"success\")"); @field #11184 = pubact07 : @s("act07",@object(@g("obj01"),"act07")); @setflag(@g("act07"),"puzzle"); @setfield(@g("act07"),"name",@getfield(11183,"name")); @setfield(@g("act07"),"varobj",11123); @setfield(@g("act07"),"description","@call(11183,\"description\")"); @setfield(@g("act07"),"success","@call(11183,\"success\")"); @field #11184 = pubact08 : @s("act08",@object(@g("obj01"),"act08")); @setflag(@g("act08"),"puzzle"); @setfield(@g("act08"),"name",@getfield(11907,"name")); @setfield(@g("act08"),"varobj",11123); @setfield(@g("act08"),"description","@call(11907,\"description\")"); @setfield(@g("act08"),"success","@call(11907,\"success\")"); --- @field #11184 = pubact08 : @s("act08",@object(@g("obj01"),"act08")); @setflag(@g("act08"),"puzzle"); @setfield(@g("act08"),"name",@getfield(11907,"name")); @setfield(@g("act08"),"varobj",11123); @setfield(@g("act08"),"description","@call(11907,\"description\")"); @setfield(@g("act08"),"success","@call(11907,\"success\")"); === @succe #11184 = @call(11184,"pubobj01"); @call(11184,"pubact01"); @call(11184,"pubact02"); @call(11184,"pubact03"); @call(11184,"pubact04"); @call(11184,"pubact05"); @call(11184,"pubact06"); @call(11184,"pubact07"); @call(11184,"pubact08"); --- @succe #11184 = @call(11184,"pubobj01"); @call(11184,"pubact01"); @call(11184,"pubact02"); @call(11184,"pubact03"); @call(11184,"pubact04"); @call(11184,"pubact05"); @call(11184,"pubact06"); @call(11184,"pubact07"); @call(11184,"pubact08"); === @desc #11184 = Turns an object named "obj01" that you're holding into a mirror copy of the white pages. Also assumes that obj01 has actions act01..act07 defined. To quickly publish, cut and execute-paste the following: %c%c@create obj01 %c@action act01 = obj01 : nowhere %c@action act02 = obj01 : nowhere %c@action act03 = obj01 : nowhere %c@action act04 = obj01 : nowhere %c@action act05 = obj01 : nowhere %c@action act06 = obj01 : nowhere %c@action act07 = obj01 : nowhere %c@action act08 = obj01 : nowhere %cpublish --- ADD @desc #11184 = Turns an object named "obj01" that you're holding into a mirror copy of the white pages. Also assumes that obj01 has actions act01..act07 defined. To quickly publish, cut and execute-paste the following:%c%c@create obj01%c@action act01 = obj01 : nowhere%c@action act02 = obj01 : nowhere%c@action act03 = obj01 : nowhere%c@action act04 = obj01 : nowhere%c@action act05 = obj01 : nowhere%c@action act06 = obj01 : nowhere%c@action act07 = obj01 : nowhere%c@action act08 = obj01 : nowhere%cpublish ===
@action full;full * = ifMud white pages : nowhere @set #11907 = puzzle @field #11907 = varobj : 11123 @desc #11907 = SYNTAX%c full name[.areaname] %cDESCRIPTION%c Lists full info on one area, which can include where the lounge-o-matics are, existence of no-exit rooms, a brief description of the area, when the entry was last updated, and so on. %cEXAMPLE%c full jota.mod2 @succ #11907 = @switch(1,@gt(@g("ref_%0"),0),@print( "** ",@g("nam_%0")," **%cEntrance: ",@shortname(@g("ref_%0")), @switch(1,@gt(@g("etn_%0"),0),@print(" [ET #",@g("etn_%0"),"]")), " (dbref #",@g("ref_%0"),")%cNearest jump: ", @shortname(@g("jmp_%0"))," (dbref #",@g("jmp_%0"),")", @switch(1,@gt(@strlen(@g("dir_%0")),0),@print( "%cDirections from jump: ",@g("dir_%0") )), @switch(1,@or(@g("lkd_%0"),@g("shh_%0")),"%cFlags:"), @switch(1,@g("lkd_%0")," (locked)"), @switch(1,@g("shh_%0")," (shh)"), "%cRooms: ",@g("rms_%0"), @switch(1,@gt(@strlen(@g("lom_%0")),0),@print( "%cLounge-o-matic(s): ",@g("lom_%0") )), @switch(1,@gt(@strlen(@g("rem_%0")),0),@print( "%cRemarks: ",@g("rem_%0") )), "%cEntry last updated: ",@g("upd_%0") ),"Sorry. There's no listing for \"%4\"."); --- @succ #11907 = @switch(1,@gt(@g("ref_%0"),0),@print( "** ",@g("nam_%0")," **%cEntrance: ",@shortname(@g("ref_%0")), @switch(1,@gt(@g("etn_%0"),0),@print(" [ET #",@g("etn_%0"),"]")), " (dbref #",@g("ref_%0"),")%cNearest jump: ", @shortname(@g("jmp_%0"))," (dbref #",@g("jmp_%0"),")", @switch(1,@gt(@strlen(@g("dir_%0")),0),@print("%cDirections from jump: ",@g("dir_%0"))), @switch(1,@or(@g("lkd_%0"),@g("shh_%0")),"%cFlags:"), @switch(1,@g("lkd_%0")," (locked)"), @switch(1,@g("shh_%0")," (shh)"), "%cRooms: ",@g("rms_%0"), @switch(1,@gt(@strlen(@g("lom_%0")),0),@print("%cLounge-o-matic(s): ",@g("lom_%0"))), @switch(1,@gt(@strlen(@g("rem_%0")),0),@print("%cRemarks: ",@g("rem_%0"))), "%cEntry last updated: ",@g("upd_%0") ),"Sorry. There's no listing for \"%4\"."); ===
@create temporary tester;tester;tt @field #10250 = db : 11228 @field #10250 = talk : Testing talk. The value of %%0: [%0]. The value of %%1: [%1]. The value of %%2: [%2]. @field #10250 = eat : @location("204") @desc #10250 = It's just a test object.
Both "blug 3" and "blug 3 to 5" work properly. A test for the scan * to * action on the transporting crystal.
@action blug * to *;blug * = temporary tester : nowhere @set #11240 = puzzle @field #11240 = varobj : 10302 @desc #11240 = @succe #11240 = @print("toads: "); @s("dbr","%0"); @switch(@strlen("%1"),0,@s("xy",1),@s("xy",@add(@sub("%1","%0"),1))); @strloop(@substr(@g("xs"),0,@g("xy")),"x", @print(@switch(1,1, @switch("A slimy toad named",@substr(@shortname(@g("dbr")),0,18), @print("[", @g("dbr"), @switch(@type(@g("dbr")),1,"R",2,"P",3,"E",4,"","X"), ": ", @switch(@g("is_name"),"1",@name(@g("dbr")),@shortname(@g("dbr"))), @switch(@and(@g("is_loc"),@gt(@location(@g("dbr")),0)),"1", @print(" @ ", @shortname(@location(@g("dbr"))), " (", @location(@g("dbr")), ")")), "] "))), @s("dbr",@add(1,@g("dbr")))));
This object gets updated via talking to the aliens; see the Elder.
@create topic feedback file;topic file;feedback file;file;tff @fail #11762 = Sorry, but the topic feedback file isn't takeable. Why would you want it, anyway? @lock #11762 = #8796 @desc #11762 = What are people asking the aliens that they don't know about? [2002.01.25] DavidW asked Pete the Pirate about eyepatch. [2002.01.25] DavidW asked Mina the Mind about eyelash.
The ultimate in spy control for one's own area. The description should show the last/current visitor, his/her location, and the thirty last attempted actions (from lo to hi).
log_X
– logged messages, where X starts at 1 and
counts up to nlog
.nlog
– number of logged messages.visitor
– dbref of the last (or current) visitor
to the CE Realm.vis_do
– detected action that the current visitor
just did, expressed as a simple string. This is a temporary value only;
the value is moved to an appropriate log_X
field.vis_rm
– name of the room the current visitor
either just entered or looked at. Since some room names can change,
this is a string, not the room's dbref number. This is a temporary value only;
the value is moved to an appropriate log_X
field.@create CER monitor;cerm;monitor;cm @set #12434 = expert @field #12434 = visitor : 0 @field #12434 = nlog : 0 @field #12434 = lo : 0 @field #12434 = hi : 0 @field #12434 = log_1: d. @field #12434 = log_2: %c[Spaceport Lobby]%c @field #12434 = log_3: open mailbox. @field #12434 = log_4: x leaflet. @field #12434 = nlog : 4 @field #12434 = addlog : @switch(vis_do,"","",@print( @s(@print("log_",nlog),@print(vis_do,". ")), @s("nlog",@add(nlog,1)), @s("vis_do","") )); @switch(vis_rm,"","",@print( @s(@print("log_",nlog),@print("%c[",vis_rm,"]%c")), @s("nlog",@add(nlog,1)), @s("vis_rm","") )); @desc #12434 = @print("** Cosmic Encounter Realm monitor **"); @switch(visitor,0,"%cNo current visitor.",@print( "%cVisitor: ",@shortname(visitor)," (",visitor, ") @ ",@shortname(@location(visitor))," (", @location(visitor),")" )); @switch(nlog,0,"%cNo log recordings.",@print("%c", @s("lo",@sub(nlog,29)), @switch(@lt(lo,1),1,@s("lo",1)), @s("hi",nlog), @s("n",@add(@sub(hi,lo),1)), @strloop("123456789012345678901234567890","x",@print( @g(@print("log_",lo)), @s("lo",@add(lo,1)) )) )); --- @desc #12434 = @print("** Cosmic Encounter Realm monitor **"); @switch(visitor,0,"%cNo current visitor.",@print( "%cVisitor: ",@shortname(visitor)," (",visitor, ") @ ",@shortname(@location(visitor))," (", @location(visitor),")")); @switch(nlog,0,"%cNo log recordings.",@print("%c", @s("lo",@sub(nlog,29)), @switch(@lt(lo,1),1,@s("lo",1)), @s("hi",nlog), @s("n",@add(@sub(hi,lo),1)), @strloop("123456789012345678901234567890","x",@print( @g(@print("log_",lo)), @s("lo",@add(lo,1)))))); ===
@action cm test;cerm test = CER monitor : nowhere @set #12435 = puzzle @succe #12435 = @s("x1",0); @s("x2",0); @fieldloop(10290,"it_",@switch( @eq(@location("%v"),@getfield("%v","home")), 1,@s("x1",@add(@g("x1"),1)), 0,@s("x2",@add(@g("x2"),1)))); @print("CM Test%c-------%c", "#objects in place: ",@g("x1"),".%c", "#objects out of place: ",@g("x2"),"."); @field #12435 = x1 : 42 @field #12435 = x2 : 2 @desc #12435 = Report how many objects are in or out of place in the CER.
@action cm out;cerm out = CER monitor : nowhere @set #12437 = puzzle @succe #12437 = @print("CM Out of Place Objects%c-----------------------%c"); @fieldloop(10290,"it_",@switch( @eq(@location("%v"),@getfield("%v","home")), 0,@print( @shortname("%v")," (%v) @ ", @shortname(@location("%v")), " (", @location("%v"), ").%c"))); @desc #12437 = List which objects are out of place in the CER.
I copied this code from inky; he has a bell just like it. All it does is periodically send "(jingle, jingle)" messages to me, so my mud connection won't timeout due to lack of activity on the mud during lulls in conversation. The jingle command turns the bell's function on; jangle turns it off.
@create a small golden bell;golden bell;bell;asgb @set #16344 = dark @set #16344 = examinable @set #16344 = expert @set #16344 = slippery @field #16344 = enqueue_jingle : @s("jingle_process", @event(@strcheck(@getfield("%!", "varobj"), "%!"), "jingle", @g("jingle_time"), "Connection timeout fix (jingle jingle).")) @field #16344 = jingle : @print(@tell(@g("jingle_target"), "(jingle, jingle)"), @execute(@g("enqueue_jingle"))) @field #16344 = jingle_process : 15017 @field #16344 = jingle_target : 8796 @field #16344 = jingle_time : 300 @field #16344 = ohomemsg : fades out as soon as it touches the ground. @desc #16344 = It's a little golden bell.
@action jingle = a small golden bell : nowhere @set #16346 = examinable @succe #16346 = @switch(@g("jingle_process"), "", @print(@tell("%#", "You give the bell a shake, and it begins to chime in a slow but steady rhythm."), @execute(@g("enqueue_jingle"))), @tell("%#", "The bell is already chiming.")) @field #16346 = varobj : 16344
@action jangle = a small golden bell : nowhere @set #16347 = examinable @succe #16347 = @switch(@g("jingle_process"), "", @tell("%#", "The bell is not chiming."), @print(@tell("%#", "You touch the bell and stop its chiming."), @null(@killevent(@g("jingle_process"))), @s("jingle_process", ""))) @field #16347 = varobj : 16344
@set #8796 = spy @set #8796 = expert @set #8796 = puzzle @set #8796 = male @set #8796 = builder @field #8796 = game : Wrote games in Inform for two speed-ifs. Translated one ("Squeaky on the Moon") to Esperanto ("Fajfeta sur la Luno"), including the esper.h and esperg.h files. @field #8796 = connect : DavidW emerges from the dread Warp, seemingly no worse for the wear. @field #8796 = url : http://webhome.idirect.com/~dswxyz @field #8796 = old_plan : Playing games and enriching my mudArea. (The Cosmic Encounter Realm: go se of Long Hall, then down to visit it. Be amazed.) WIP tentatively to be called 'Towers of H'Annoy' (Yes, really. Be horrified.) Working on v0.2 of Esperanto files for Inform. @field #8796 = plan : %cIF Works in Progress (very slow progress, unfortunately) %c * "The Fox, The Dragon, and The Stale Loaf of Bread"%c (A bizarre fairytale adventure; should be good silly fun.) %c * "The Sewing Season" (Delayed RomanceComp game, in search of plot.) %c * "Towers of H'Annoy" (Yes, really. Be horrified.) %c * Esperanto language files for Inform %cJotaCode Areas in Progress %c * Cosmic Encounter Realm (from Long Hall, go southeast then down. Huge.) %c * Holodeck Simulation of "Balances" (Edifice Towers, apt #1008.) @field #8796 = connect : "I didn't brush my teeth this morning just so I could be fried bacon with a pretty smile." @field #8796 = connect : "You feel a little confused as to how you got here. Something to do with Helistar!" @field #8796 = disconnect : DavidW falls into the dread Warp. He is gone. @field #8796 = disconnect : @field #8796 = disconnect_1 : "Well, I gotta go hit the bricks." "Okay, you show those bricks a lesson." @field #8796 = disconnect_2 : "Help me home and I'll cook you... a good, thick, creamy stew. Yum, I'm getting hungry myssself. Let's go!" @field #8796 = disconnect_3 : "Next train: platform one" @field #8796 = disconnect_4 : "I don't suppose it ever occurred to you to feel sorry for Baskin-Robbins. They're going to go out of business waiting for you to buy anyone ice cream." @field #8796 = disconnect_old1 : DavidW falls into the dread Warp. He is gone. @field #8786 = disconnect_old2 : Holy gasking henfifes, Bat-Droke! @field #8796 = rname : David Welbourn @field #8796 = ohome : focuses on his crystal and fades away into a clear haze in the light. @field #8796 = address : davidwelbourn(a)hotmail*com @desc #8796 = @tell(8796,"[%n looks at you.]"); @switch(@location("%#"),9676,@print( @tell("%#","You see a guy wearing glasses, in stasis, not drinking tea. His hand points towards the ultrablack beam."),@call(10633,"each_turn") ), 2110,@tell("%#","You see a guy wearing glasses, a white turtleneck and a black jacket, and drinking some champagne."), 2499,@tell("%#","You see a guy wearing glasses and a black swimsuit, paddling about, idly."), @tell("%#","You see a guy wearing glasses, and drinking some tea.")); --- @desc #8796 = @tell(8796,"[%n looks at you.]"); @switch(@location("%#"),9676,@print( @tell("%#","You see a guy wearing glasses, in stasis, not drinking tea. His hand points towards the ultrablack beam."),@call(10633,"each_turn") ), 2110,@tell("%#","You see a guy wearing glasses, a white turtleneck and a black jacket, and drinking some champagne."), 2499,@tell("%#","You see a guy wearing glasses and a black swimsuit, paddling about, idly."), @tell("%#","You see a guy wearing glasses, and drinking some tea.")); ===
The cookies were created for Stacey, who gave them to nm, ... When last I checked, lurd had them.
@create peanut butter cookies;cookies;peanut butter cookie;cookie;pbc @field #10438 = eat : Mmmm. Delicious!! @desc #10438 = Thin and chewy with a slight crisp on the outside. Fresh from the oven! @field #10438 = smell : mmmm.
When last I checked, Stacey still had the ribbon.
@create ribbon to remember not to forget to remember not to forget to not forget to turn the oven off;ribbon;rtrntftrntftnftttoo @desc #10436 = Remember not to forget to remember not to forget to not forget to turn the oven off!
This stays in the Edifice Towers lobby and gets updated frequently. I think that leaving some signings on it helps encourage new signings.
@create vacancies notice;vacancy;vacancies;notice;vn @set #11157 = book @fail #11157 = Please don't take the notice. Sign the notice with corrections, if necessary. @lock #11157 = #8796 @desc #11157 = As of February 27, 2002, the vacant apartments in Edifice Towers are: apartments 5016 to 5019 on the fifth floor's east hall. Plus, Esrom is offering apartment 1009 for rent; mudmail Esrom if you want apt.1009. Help on apartments can be found by typing "help apartments".%c Also, there are five vacant quarters in Admiral Jota's space station; they are (0,0 S), (1,4 N), (1,6 N), (2,2 N), and (2,6 N). To visit the space station, go north to Long Hall, then southwest, southwest again, then step on pad. Please make your request to Admiral Jota if you want one of the space station rooms.%c Finally, mudmail jwalrus if you want any of the infinite amount of space available in the Argand Diagram, west and down from the lounge.%c -- DavidW%cp.s. This notice can be signed, if you want to note corrections. Jacqueline: I decided to move into 1013, so it's no longer available. Sorry! Housewarming party to be held soon... DavidW: SirBob has taken apt.5020 Reaver: I have taken 5012. DavidW: Donth has taken 5014; Donarius has taken 5013.
@create ifMud white pages;white pages;directory;homes;iwp @set #11185 = expert @fail #11185 = This copy of the white pages should stay in the Edifice Towers Ground Floor. If you'd like your own copy, please ask me. Thanks -- DavidW. @lock #11185 = #-1 @field #11185 = listmode : verbose @desc #11185 = @print("A directory of people's homes/areas on ifMud, where they are, and how to visit them. Examine each action for more information on that action. Ask DavidW if you'd like your own copy of this book.%cThe current list mode is \"", @g("listmode"), "\".")
@action list *;list;list names *;list names;ln *;ln = #11185 : nowhere @set #11186 = puzzle @field #11186 = varobj : 11123 @succe #11186 = @call(11124,"success") @desc #11186 = @print("A directory of people's homes/areas on ifMud, where they are, and how to visit them. Examine each action for more information on that action.%cThe current list mode is \"", @g("listmode"), "\".")
@action visit;visit * = #11185 : nowhere @set #11187 = puzzle @field #11187 = varobj : 11123 @succe #11187 = @call(11127,"success") @desc #11187 = @call(11127,"description")
@action brief = #11185 : nowhere @set #11188 = puzzle @field #11188 = varobj : 11185 @succe #11188 = @call(11125,"success") @desc #11188 = @call(11125,"description")
@action verbose = #11185 : nowhere @set #11189 = puzzle @field #11189 = varobj : 11185 @succe #11189 = @call(11126,"success") @desc #11189 = @call(11126,"description")
@action add;add * is * = #11185 : nowhere @set #11190 = puzzle @field #11190 = varobj : 11123 @succe #11190 = @call(10761,"success") @desc #11190 = @call(10761,"description")
@action delete;delete * = #11185 : nowhere @set #11191 = puzzle @field #11191 = varobj : 11123 @succe #11191 = @call(11182,"success") @desc #11191 = @call(11182,"description")
@action set;set * of * to *;set * of * is *;set * of * to;set * of * is = #11185 : nowhere @set #11192 = puzzle @field #11192 = varobj : 11123 @succe #11192 = @call(11183,"success") @desc #11192 = @call(11183,"description")
@action full;full * = #11185 : nowhere @set #920 = puzzle @field #920 = varobj : 11123 @succe #920 = @call(11907,"success") @desc #920 = @call(11907,"description")
@action full;full * = #11745 : nowhere @set #11906 = puzzle @field #11906 = varobj : 11123 @succe #11906 = @call(11907,"success") @desc #11906 = @call(11907,"description") @action full;full * = #11804 : nowhere @set #11908 = puzzle @field #11908 = varobj : 11123 @succe #11908 = @call(11907,"success") @desc #11908 = @call(11907,"description")
@create ifMud Fun Fact;fun fact;fact;brass plaque;plaque;iff @fail #11914 = Sorry, the fun fact can't be taken. It's actually a brass plaque mounted on the short wall behind the access stair, not just some slip of paper that someone scribbled up and dropped here. @lock #11914 = #8796 @desc #11914 = @print("ifMud Fun Fact! -- The Edifice Towers has three roofs!%cYes, it's true. This is one of them. Can you find the other two?%c(hint: One is reached from a 4th floor apt. The other is reached from an 8th floor apt.)");
@create roter @set #5194 = expert @link roter = #11717 @desc #5194 = A tool used to hold the rot13 action on.
@action rot13 * = roter : nowhere @set #5193 = puzzle @succe #5193 = @strloop("%4","x",@switch("%x", "a","n","b","o","c","p","d","q","e","r","f","s","g","t","h","u", "i","v","j","w","k","x","l","y","m","z", "n","a","o","b","p","c","q","d","r","e","s","f","t","g","u","h", "v","i","w","j","x","k","y","l","z","m", "A","N","B","O","C","P","D","Q","E","R","F","S","G","T","H","U", "I","V","J","W","K","X","L","Y","M","Z", "N","A","O","B","P","C","Q","D","R","E","S","F","T","G","U","H", "V","I","W","J","X","K","Y","L","Z","M", "%x"))
@create gloves @set #6360 = expert @desc #6360 = Bright fluorescent orange gloves of anti-theft. Tres chic!
@action take *;tak *;ta *;t *;get *;ge *;g * = gloves : nowhere @set #6361 = dark @set #6361 = puzzle @succe #6361 = Your gloves of anti-theft prevent you!
@action drop gloves;drop glove;drop glov;drop glo;drop gl;drop g; drop #6360;drop all;dro gloves;dro glove;dro glov;dro glo;dro gl; dro g;dro #6360;dro all;dr gloves;dr glove;dr glov;dr glo;dr gl; dr g;dr #6360;dr all;d gloves;d glove;d glov;d glo;d gl;d g;d #6360; d all;drop gloves;drop glove;drop glov;drop glo;drop gl;drop g; drop #6360;drop all;dro gloves;dro glove;dro glov;dro glo;dro gl; dro g;dro #6360;dro all;dr gloves;dr glove;dr glov;dr glo;dr gl; dr g;dr #6360;dr all;d gloves;d glove;d glov;d glo;d gl;d g; d #6360;d all = gloves : nowhere @set #6362 = dark @set #6362 = puzzle @succe #6362 = Your gloves of anti-theft prevent you!
@action give g*;give #6360*;giv g*;giv #6360*;gi g*;gi #6360*; give g*;give #6360*;giv g*;giv #6360*;gi g*;gi #6360* = gloves : nowhere @set #6367 = dark @set #6367 = puzzle @succe #6367 = Your gloves of anti-theft prevent you!
@create IOU @set #12688 = expert @desc #12688 = Strider,%c I didn't know when (or if) you'd be back, so I loaned your copy of the ifMud white pages to someone else. If you'd like it back, just wave this IOU.%c -- DavidW
@action wave iou = IOU : nowhere @set #12689 = dark @succ #12689 = @move(5875,"%#"); @move(12688,8796); @print("You wave the IOU, and it begins to glow bright red! Then it explodes in a technicolor burst, sending showers of sparks everywhere, glittering and bursting, whistling and hissing! In the center of the explosion, a copy of the ifMud white pages appears, and falls into your hands.%cThe sparks die down and disappear. They didn't seem to harm or burn anything, so I guess that all that light and sound was illusionary. But at least you got your white pages back."); @desc #12689 =
@create card catalogue;catalogue;cc @set #12807 = expert @succ cat = You hoist the heavy card catalogue up onto your back. @osucc cat = hoists the heavy card catalogue up onto %p back. @fail cat = You strain and grunt trying to pick up the card catalogue, but it's too heavy. @ofail cat = strains and grunts trying to pick up the card catalogue, but it's too heavy. @desc #12807 = The library's card catalogue is a time-worn piece of furniture, but still handsome with its stained and lacquered ash veneer. Find a book by looking up one or more words in the book's title, eg: "whereis parrot". %cLibrarian commands: swipe [book], remove [book], set shelf of [book] = [IF|Non|Hum], set keyword of [book] = [keywords], list [missing|nokeyword|noshelf|nobook|stats] %cUser commands: whereis [book], query #[booknum] -- @desc #12807 = The library's card catalogue is a time-worn piece of furniture, but still handsome with its stained and lacquered ash veneer. Find a book by looking up one or more words in the book's title, eg: "whereis parrot".%cLibrarian commands: swipe [book], remove [book], set shelf of [book] = [IF|Non|Hum], set keyword of [book] = [keywords], list [missing|nokeyword|noshelf|nobook|stats]%cUser commands: whereis [book], query #[booknum] ==
@action swipe *;register *;reg * = card catalogue : nowhere @set #12813 = puzzle @set #12813 = dark @field #12813 = varobj : 12807 @desc #12813 = Adds a swiped book to the card catalogue. The name of the book is parsed, so that a user may look it up by one or more words in the book's title. // Set k_tmpkey_tmpref to tmpref for each keyword. // Set bk_tmpref to tmpref for the book itself. @succ #12813 = @s("tmpref",@object("%#","%0")); @switch(tmpref,-1,@s("tmpref",@object(@location("%#"),"%0"))); @switch(tmpref,-1,"I don't see that book here.",@print( @s("tmpnam",@print(@shortname(tmpref),".")), @s("tmpkey",""), @strloop(tmpnam,"x",@switch("%x", {" ",".","!","?","/","(",")","[","]",":",";"}, @print( @switch(@gt(@strlen(tmpkey),0),1, @s(@print("k_",tmpkey,"_",tmpref),tmpref)), @s("tmpkey","") ), @s("tmpkey",@print(tmpkey,"%x")) )), @s(@print("bk_",tmpref),tmpref), @print(@shortname(tmpref),": swiped.") )); --- @succ #12813 = @s("tmpref",@object("%#","%0")); @switch(tmpref,-1,@s("tmpref",@object(@location("%#"),"%0"))); @switch(tmpref,-1,"I don't see that book here.",@print( @s("tmpnam",@print(@shortname(tmpref),".")), @s("tmpkey",""), @strloop(tmpnam,"x",@switch("%x", {" ",".","!","?","/","(",")","[","]",":",";"}, @print( @switch(@gt(@strlen(tmpkey),0),1, @s(@print("k_",tmpkey,"_",tmpref),tmpref)), @s("tmpkey","")), @s("tmpkey",@print(tmpkey,"%x")))), @s(@print("bk_",tmpref),tmpref), @print(@shortname(tmpref),": swiped."))); ===
@action remove *;unregister *;unreg * = card catalogue : nowhere @set #12814 = puzzle @set #12814 = dark @field #12814 = varobj : 12807 @desc #12814 = Removes the book from the card catalogue. @succ #12814 = @s("tmpref",@object("%#","%0")); @switch(tmpref,-1,@s("tmpref",@object(@location("%#"),"%0"))); @switch(@and(@eq(tmpref,-1),@eq(@substr("%0",0,1),"#")),1, @s("tmpref",@add(@substr("%0",1),0))); @switch(1, @eq(tmpref,-1),"I don't see that book here.", @eq(tmpref,0),"I don't see that book here.", @not(@eq(tmpref,@g(@print("bk_",tmpref)))), @print("But \"",@shortname(tmpref),"\" isn't in the catalogue."), @print( @fieldloop(12807,"k_",@switch("%v",tmpref,@s("%f",""))), @s(@print("rm_",tmpref),""), @s(@print("bk_",tmpref),""), @print(@shortname(tmpref),": removed from catalogue.") )); --- @succ #12814 = @s("tmpref",@object("%#","%0")); @switch(tmpref,-1,@s("tmpref",@object(@location("%#"),"%0"))); @switch(@and(@eq(tmpref,-1),@eq(@substr("%0",0,1),"#")),1, @s("tmpref",@add(@substr("%0",1),0))); @switch(1, @eq(tmpref,-1),"I don't see that book here.", @eq(tmpref,0),"I don't see that book here.", @not(@eq(tmpref,@g(@print("bk_",tmpref)))), @print("But \"",@shortname(tmpref),"\" isn't in the catalogue."), @print( @fieldloop(12807,"k_",@switch("%v",tmpref,@s("%f",""))), @s(@print("rm_",tmpref),""), @s(@print("bk_",tmpref),""), @print(@shortname(tmpref),": removed from catalogue."))); ===
@action set shelf of * = *;set shelf = card catalogue : nowhere @set #12808 = puzzle @set #12808 = dark @field #12808 = varobj : 12807 @desc #12808 = Assign a shelf/room for a book, eg: %c set shelf of Are You A Prude? = humour %cValid shelves: IF, Non/Nonfiction, Hum/Humor/Humour. -- @desc #12808 = Assign a shelf/room for a book, eg:%c set shelf of Are You A Prude? = humour%cValid shelves: IF, Non/Nonfiction, Hum/Humor/Humour. == @succ #12808 = @s("tmpref",@object("%#","%0")); @switch(tmpref,-1,@s("tmpref",@object(@location("%#"),"%0"))); @switch(@and(@eq(tmpref,-1),@eq(@substr("%0",0,1),"#")),1, @s("tmpref",@add(@substr("%0",1),0))); @s("tmprm",@switch("%1","if",12102,{"non","nonfic","nonfiction"},8487, {"hum","humor","humour"},8691,"here",@location("%#"),0)); @switch(@and(@eq(tmprm,0),@eq(@substr("%1",0,1),"#")),1, @s("tmprm",@add(@substr("%1",1),0))); @switch(1, @eq(tmpref,-1),"I don't see that book here.", @eq(tmprm,0),"%4: unknown shelf.", @not(@eq(@type(tmprm),1)),"%4: not a shelf/room.", @print( @s(@print("bk_",tmpref),tmpref), @s(@print("rm_",tmpref),tmprm), @print(@shortname(tmpref),": assigned to ", @shortname(@g(@print("rm_",tmpref))),".") )); --- @succ #12808 = @s("tmpref",@object("%#","%0")); @switch(tmpref,-1,@s("tmpref",@object(@location("%#"),"%0"))); @switch(@and(@eq(tmpref,-1),@eq(@substr("%0",0,1),"#")),1, @s("tmpref",@add(@substr("%0",1),0))); @s("tmprm",@switch("%1","if",12102,{"non","nonfic","nonfiction"},8487, {"hum","humor","humour"},8691,"here",@location("%#"),0)); @switch(@and(@eq(tmprm,0),@eq(@substr("%1",0,1),"#")),1, @s("tmprm",@add(@substr("%1",1),0))); @switch(1, @eq(tmpref,-1),"I don't see that book here.", @eq(tmprm,0),"%4: unknown shelf.", @not(@eq(@type(tmprm),1)),"%4: not a shelf/room.", @print( @s(@print("bk_",tmpref),tmpref), @s(@print("rm_",tmpref),tmprm), @print(@shortname(tmpref),": assigned to ", @shortname(@g(@print("rm_",tmpref))),"."))); ===
@action set keyword of * = *;set keyword = card catalogue : nowhere @set #12816 = puzzle @set #12816 = dark @field #12816 = varobj : 12807 @desc #12816 = Assign additional keyword(s) for a book, eg: %c set keyword of What's Your Underpants Name? = underwear pants %cTo remove a keyword, preface it with a hyphen, eg: %c set keyword of The IF Drinking Game = -drinkng --- @desc #12816 = Assign additional keyword(s) for a book, eg:%c set keyword of What's Your Underpants Name? = underwear pants%cTo remove a keyword, preface it with a hyphen, eg:%c set keyword of The IF Drinking Game = -drinkng === @succ #12816 = @s("tmpref",@object("%#","%0")); @switch(tmpref,-1,@s("tmpref",@object(@location("%#"),"%0"))); @switch(@and(@eq(tmpref,-1),@eq(@substr("%0",0,1),"#")),1, @s("tmpref",@add(@substr("%0",1),0))); @switch(tmpref,-1,"I don't see that book here.",@print( @s("tmpnam",@print("%1",".")), @s("tmpkey",""), @strloop(tmpnam,"x",@switch("%x", {" ",".","!","?"}, @print( @switch(@gt(@strlen(tmpkey),0),1, @switch( @substr(tmpkey,0,1),"-",@print( // clear the key @s("tmpkey",@substr(tmpkey,1)), @s(@print("k_",tmpkey,"_",tmpref),""), @print(@shortname(tmpref),": keyword \"",tmpkey,"\" cleared.%c") ),@print( // add the key @s(@print("k_",tmpkey,"_",tmpref),tmpref), @print(@shortname(tmpref),": keyword \"",tmpkey,"\" added.%c") ) )), @s("tmpkey","") ), @s("tmpkey",@print(tmpkey,"%x")) )), @s(@print("bk_",tmpref),tmpref) )); --- @succ #12816 = @s("tmpref",@object("%#","%0")); @switch(tmpref,-1,@s("tmpref",@object(@location("%#"),"%0"))); @switch(@and(@eq(tmpref,-1),@eq(@substr("%0",0,1),"#")),1, @s("tmpref",@add(@substr("%0",1),0))); @switch(tmpref,-1,"I don't see that book here.",@print( @s("tmpnam",@print("%1",".")), @s("tmpkey",""), @strloop(tmpnam,"x",@switch("%x", {" ",".","!","?"}, @print( @switch(@gt(@strlen(tmpkey),0),1, @switch( @substr(tmpkey,0,1),"-",@print( @s("tmpkey",@substr(tmpkey,1)), @s(@print("k_",tmpkey,"_",tmpref),""), @print(@shortname(tmpref),": keyword \"",tmpkey,"\" cleared.%c")),@print( @s(@print("k_",tmpkey,"_",tmpref),tmpref), @print(@shortname(tmpref),": keyword \"",tmpkey,"\" added.%c")))), @s("tmpkey","")), @s("tmpkey",@print(tmpkey,"%x")))), @s(@print("bk_",tmpref),tmpref))); ===
// missing|nokeyword|noshelf|nobook|stats @action list * = card catalogue : nowhere @set #12818 = puzzle @set #12818 = dark @field #12818 = varobj : 12807 @desc #12818 = Examine the catalogue for one of the following: %c missing = List books not on their assigned shelves. %c nokeyword = List books without keywords (never swiped). %c noshelf = List books not assigned to a shelf. %c nobook = List books that aren't set with the book flag. %c stats = Totals of books by assorted categories. --- @desc #12818 = Examine the catalogue for one of the following:%c missing = List books not on their assigned shelves.%c nokeyword = List books without keywords (never swiped).%c noshelf = List books not assigned to a shelf.%c nobook = List books that aren't set with the book flag.%c stats = Totals of books by assorted categories. === @succ #12818 = @switch("%0", "stats",@call(12818,"list_stats"), "missing",@call(12818,"list_missing"), "nokeyword",@call(12818,"list_nokeyword"), "noshelf",@call(12818,"list_noshelf"), "nobook",@call(12818,"list_nobook"), "list %4: I don't know how to list that."); --- @succ #12818 = @switch("%0", "stats",@call(12818,"list_stats"), "missing",@call(12818,"list_missing"), "nokeyword",@call(12818,"list_nokeyword"), "noshelf",@call(12818,"list_noshelf"), "nobook",@call(12818,"list_nobook"), "list %4: I don't know how to list that."); === @field #12818 = list_stats : @s("tmp_nmiss",0); @fieldloop(12807,"rm_",@let("k"=>@substr("%f",3), @switch(@location("%k"),"%v","", @s("tmp_nmiss",@add(tmp_nmiss,1))) )); @print("Total missing: ",tmp_nmiss,".%c"); // @s("tmp_nokey",0); @fieldloop(12807,"bk_",@s("ik_%v",0)); @fieldloop(12807,"k_",@s("ik_%v",1)); @fieldloop(12807,"ik_",@switch("%v",0,@s("tmp_nokey",@add(tmp_nokey,1)))); @fieldloop(12807,"ik_",@s("%f","")); @print("Total nokeyword: ",tmp_nokey,".%c"); // @s("tmp_nobook",0); @fieldloop(12807,"bk_",@switch(@testflag("%v","book"),0, @s("tmp_nobook",@add(tmp_nobook,1)))); @print("Total non-books: ",tmp_nobook,".%c"); // @s("tmp_noshelf",0); @fieldloop(12807,"bk_",@let("k"=>@substr("%f",3), @switch(@add(@g("rm_%k"),0),0,@s("tmp_noshelf",@add(tmp_noshelf,1))))); @print("Total noshelf: ",tmp_noshelf,".%c"); // @s("tmp_if",0); @s("tmp_non",0); @s("tmp_hum",0); @s("tmp_othrm",0); @fieldloop(12807,"rm_",@switch("%v", 12102,@s("tmp_if",@add(tmp_if,1)), 8487,@s("tmp_non",@add(tmp_non,1)), 8691,@s("tmp_hum",@add(tmp_hum,1)), @s("tmp_othrm",@add(tmp_othrm,1)) )); @print("Total IF-related: ",tmp_if,".%c"); @print("Total Nonfiction: ",tmp_non,".%c"); @print("Total Humour: ",tmp_hum,".%c"); @print("Total Other Room Assignments: ",tmp_othrm,".%c"); // @s("tmp_all",0); @fieldloop(12807,"bk_",@s("tmp_all",@add(tmp_all,1))); @print("Total items: ",tmp_all,"."); --- @field #12818 = list_stats : @s("tmp_nmiss",0); @fieldloop(12807,"rm_",@let("k"=>@substr("%f",3), @switch(@location("%k"),"%v","", @s("tmp_nmiss",@add(tmp_nmiss,1))))); @print("Total missing: ",tmp_nmiss,".%c"); @s("tmp_nokey",0); @fieldloop(12807,"bk_",@s("ik_%v",0)); @fieldloop(12807,"k_",@s("ik_%v",1)); @fieldloop(12807,"ik_",@switch("%v",0,@s("tmp_nokey",@add(tmp_nokey,1)))); @fieldloop(12807,"ik_",@s("%f","")); @print("Total nokeyword: ",tmp_nokey,".%c"); @s("tmp_nobook",0); @fieldloop(12807,"bk_",@switch(@testflag("%v","book"),0, @s("tmp_nobook",@add(tmp_nobook,1)))); @print("Total non-books: ",tmp_nobook,".%c"); @s("tmp_noshelf",0); @fieldloop(12807,"bk_",@let("k"=>@substr("%f",3), @switch(@add(@g("rm_%k"),0),0,@s("tmp_noshelf",@add(tmp_noshelf,1))))); @print("Total noshelf: ",tmp_noshelf,".%c"); @s("tmp_if",0); @s("tmp_non",0); @s("tmp_hum",0); @s("tmp_othrm",0); @fieldloop(12807,"rm_",@switch("%v", 12102,@s("tmp_if",@add(tmp_if,1)), 8487,@s("tmp_non",@add(tmp_non,1)), 8691,@s("tmp_hum",@add(tmp_hum,1)), @s("tmp_othrm",@add(tmp_othrm,1)))); @print("Total IF-related: ",tmp_if,".%c"); @print("Total Nonfiction: ",tmp_non,".%c"); @print("Total Humour: ",tmp_hum,".%c"); @print("Total Other Room Assignments: ",tmp_othrm,".%c"); @s("tmp_all",0); @fieldloop(12807,"bk_",@s("tmp_all",@add(tmp_all,1))); @print("Total items: ",tmp_all,"."); === @field #12818 = list_missing : @s("tmp_nmiss",0); @fieldloop(12807,"rm_",@let("k"=>@substr("%f",3),@print( @switch(@location("%k"),"%v","",@print( @s("tmp_nmiss",@add(tmp_nmiss,1)), "[#%k] ",@shortname("%k")," @ [#", @location("%k"),"] ",@shortname(@location("%k")),"%c" )) ))); @print("Total missing: ",tmp_nmiss,"."); --- @field #12818 = list_missing : @s("tmp_nmiss",0); @fieldloop(12807,"rm_",@let("k"=>@substr("%f",3),@print( @switch(@location("%k"),"%v","",@print( @s("tmp_nmiss",@add(tmp_nmiss,1)), "[#%k] ",@shortname("%k")," @ [#", @location("%k"),"] ",@shortname(@location("%k")),"%c"))))); @print("Total missing: ",tmp_nmiss,"."); === @field #12818 = list_nokeyword : @s("tmp_nokey",0); @fieldloop(12807,"bk_",@s("ik_%v",0)); @fieldloop(12807,"k_",@s("ik_%v",1)); @fieldloop(12807,"ik_",@let("k"=>@substr("%f",3), @switch("%v",0,@print( @s("tmp_nokey",@add(tmp_nokey,1)), "[#%k] ",@shortname("%k")," @ [#", @location("%k"),"] ",@shortname(@location("%k")),"%c" )) )); @fieldloop(12807,"ik_",@s("%f","")); @print("Total nokeyword: ",tmp_nokey,"."); --- @field #12818 = list_nokeyword : @s("tmp_nokey",0); @fieldloop(12807,"bk_",@s("ik_%v",0)); @fieldloop(12807,"k_",@s("ik_%v",1)); @fieldloop(12807,"ik_",@let("k"=>@substr("%f",3), @switch("%v",0,@print( @s("tmp_nokey",@add(tmp_nokey,1)), "[#%k] ",@shortname("%k")," @ [#", @location("%k"),"] ",@shortname(@location("%k")),"%c")))); @fieldloop(12807,"ik_",@s("%f","")); @print("Total nokeyword: ",tmp_nokey,"."); === @field #12818 = list_noshelf : @s("tmp_noshelf",0); @fieldloop(12807,"bk_",@let("k"=>@substr("%f",3),@print( @switch(@add(@g("rm_%k"),0),0,@print( @s("tmp_noshelf",@add(tmp_noshelf,1)), "[#%k] ",@shortname("%k")," @ [#", @location("%k"),"] ",@shortname(@location("%k")),"%c" )) ))); @print("Total noshelf: ",tmp_noshelf,"."); --- @field #12818 = list_noshelf : @s("tmp_noshelf",0); @fieldloop(12807,"bk_",@let("k"=>@substr("%f",3),@print( @switch(@add(@g("rm_%k"),0),0,@print( @s("tmp_noshelf",@add(tmp_noshelf,1)), "[#%k] ",@shortname("%k")," @ [#", @location("%k"),"] ",@shortname(@location("%k")),"%c"))))); @print("Total noshelf: ",tmp_noshelf,"."); === @field #12818 = list_nobook : @s("tmp_nobook",0); @fieldloop(12807,"bk_",@print( @switch(@testflag("%v","book"),0,@print( @s("tmp_nobook",@add(tmp_nobook,1)), "[#%v] ",@shortname("%v")," @ [#", @location("%v"),"] ",@shortname(@location("%v")),"%c" )) )); @print("Total non-books: ",tmp_nobook,"."); --- @field #12818 = list_nobook : @s("tmp_nobook",0); @fieldloop(12807,"bk_",@print( @switch(@testflag("%v","book"),0,@print( @s("tmp_nobook",@add(tmp_nobook,1)), "[#%v] ",@shortname("%v")," @ [#", @location("%v"),"] ",@shortname(@location("%v")),"%c")))); @print("Total non-books: ",tmp_nobook,"."); ===
@action whereis * = card catalogue : nowhere @set #12815 = puzzle @set #12815 = dark @field #12815 = varobj : 12807 @desc #12815 = Lists the titles and locations of library books whose titles contain the given keywords. If more than 15 titles are found, you may scroll through the current list with "next 15" and "prev 15". --- @desc #12815 = Lists the titles and locations of library books whose titles contain the given keywords. If more than 15 titles are found, you may scroll through the current list with "next 15" and "prev 15". === @succ #12815 = @fieldloop(12807,"bk_",@s("hit_%v",0)); @s("tmpkey",""); @s("tmphits",0); @strloop("%0.","x",@switch("%x", {" ",".","!","?","/","(",")","[","]",":",";"}, @print( @switch(@gt(@strlen(tmpkey),0),1,@print( @s("tmphits",@add(tmphits,1)), @fieldloop(12807,"bk_",@switch(@g(@print("k_",tmpkey,"_%v")),"%v", @s("hit_%v",@add(@g("hit_%v"),1)) )) )), @s("tmpkey","") ), @s("tmpkey",@print(tmpkey,"%x")) )); @s("tmp_matched",0); @fieldloop(12807,"hit_",@let("k"=>@substr("%f",4), @switch("%v",tmphits,@print( @s("tmp_matched",@add(tmp_matched,1)), "[#%k] ",@shortname("%k")," @ [#", @location("%k"),"] ",@shortname(@location("%k")),"%c" )) )); @fieldloop(12807,"hit_",@s("%f","")); @print("Total matches: ",tmp_matched,"."); --- @succ #12815 = @fieldloop(12807,"bk_",@s("hit_%v",0)); @s("tmpkey",""); @s("tmphits",0); @strloop("%0.","x",@switch("%x", {" ",".","!","?","/","(",")","[","]",":",";"}, @print( @switch(@gt(@strlen(tmpkey),0),1,@print( @s("tmphits",@add(tmphits,1)), @fieldloop(12807,"bk_",@switch(@g(@print("k_",tmpkey,"_%v")),"%v", @s("hit_%v",@add(@g("hit_%v"),1)))))), @s("tmpkey","")), @s("tmpkey",@print(tmpkey,"%x")))); @s("tmp_matched",0); @fieldloop(12807,"hit_",@let("k"=>@substr("%f",4), @switch("%v",tmphits,@print( @s("tmp_matched",@add(tmp_matched,1)), "[#%k] ",@shortname("%k")," @ [#", @location("%k"),"] ",@shortname(@location("%k")),"%c")))); @fieldloop(12807,"hit_",@s("%f","")); @print("Total matches: ",tmp_matched,"."); ===
@action query #*;query = card catalogue : nowhere @set #12819 = dark @set #12819 = puzzle @field #12819 = varobj : 12807 @desc #12819 = Lists the full entry for the book/item. For this command, please use the item's reference number, eg: query #12801 --- @desc #12819 = Lists the full entry for the book/item. For this command, please use the item's reference number, eg: query #12801 === @succ #12819 = @s("tmpref",@add("%0",0)); @switch(1, @eq(tmpref,0),"Please specify the item's reference number, eg: query #12801", @eq(@add(@g("bk_%0"),0),0),"Item #%0 is not in the catalogue.", @print("[#%0] ",@shortname("%0"), "%cCurrent Location: [#",@location("%0"),"] ",@shortname(@location("%0")), "%cAssigned Shelf: ",@switch(@add(@g("rm_%0"),0), 0,"(none)", @print("[#",@g("rm_%0"),"] ",@shortname(@g("rm_%0"))) ),"%cKeywords: ", @s("tmpx",@add(3,@strlen("%0"))), @fieldloop(12807,"k_",@switch("%v","%0",@print( " ",@substr("%f",2,@sub(@strlen("%f"),tmpx)) ))) )); --- @succ #12819 = @s("tmpref",@add("%0",0)); @switch(1, @eq(tmpref,0),"Please specify the item's reference number, eg: query #12801", @eq(@add(@g("bk_%0"),0),0),"Item #%0 is not in the catalogue.", @print("[#%0] ",@shortname("%0"), "%cCurrent Location: [#",@location("%0"),"] ",@shortname(@location("%0")), "%cAssigned Shelf: ",@switch(@add(@g("rm_%0"),0), 0,"(none)", @print("[#",@g("rm_%0"),"] ",@shortname(@g("rm_%0")))),"%cKeywords: ", @s("tmpx",@add(3,@strlen("%0"))), @fieldloop(12807,"k_",@switch("%v","%0",@print( " ",@substr("%f",2,@sub(@strlen("%f"),tmpx))))))); ===