( EditObject v. 2.6 by Ginger@FurToonia ) ( Use 'editobject #help' for help. ) ( Format for additional special programs: ) ( @set =_progs/: ) ( Where is a one-word shorthand name for your program and ) ( program and is a short description of what it does. ) ( For example: ) ( @set =_progs/hand:Allows you to hand objects to others. ) ( Then: ) ( lsedit = ) ( example: lsedit =hand ) ( Enter the list in this format: ) ( Line 1: The header you want to see on the editor page. ) ( Line 2: The name of the first property to set ) ( Line 3: A desc of what the first property does/is for ) ( Line 4: The second property and so on.... ) ( For example: ) ( lsedit =hand ) ( HAND: Allows you to hand objects to others without first having to ) ( drop them. For help, @view $throw ) ( _hand_ok ) ( Allows the object to be handed back and forth. Set to yes or no ) ( _hand/succ ) ( What you see when you hand the object to someone. ) ( _hand/osucc ) ( What others see when you hand the object to someone. ) ( _hand/drop ) ( What you see when the object reaches the other furry. ) ( _hand/odrop ) ( What others see when the object reaches the other furry. ) $include $lib/lmgr lvar exitname lvar exitref lvar prop lvar propcount lvar progname lvar progcount lvar objref lvar objname : editdesc me @ "Editing: " objname @ strcat notify me @ "This object's current description is:" notify me @ "'" objref @ desc "'" strcat strcat notify me @ "Please enter the new description, or . for no change:" notify read dup "." stringcmp 0 = if pop me @ "Description unchanged." notify exit else objref @ swap setdesc me @ "Description set." notify exit then exit ; : edit_props me @ "Editing: " objname @ strcat notify me @ "This object's @succ prop (what you see when you pick it up) is:" notify objref @ succ me @ swap " '" swap strcat "'" strcat notify me @ "This object's @osucc prop (what others see when you pick it up) is:" notify objref @ osucc " '" swap strcat "'" strcat me @ swap notify me @ "This object's @drop prop (what you see when you drop it) is:" notify objref @ drop " '" swap "'" strcat strcat me @ swap notify me @ "This object's @odrop prop (what others see when you drop it) is:" notify objref @ odrop " '" swap "'" strcat strcat me @ swap notify me @ "This object's @fail prop (what you see when you can't lift it) is:" notify objref @ fail " '" swap "'" strcat strcat me @ swap notify me @ "This object's @ofail prop (what others see when you can't lift it) is:" notify objref @ ofail " '" swap "'" strcat strcat me @ swap notify me @ "Enter the name of the prop you'd like to change (@succ, @fail, etc)" notify me @ "or q to return to the main menu." notify read dup "@" stringpfx if 1 strcut swap pop then dup "succ" stringcmp 0 = if pop me @ "Enter new @succ message, or . for no change:" notify read dup "." stringcmp 0 = if pop me @ "@succ not changed." notify edit_props exit else objref @ swap setsucc me @ "Set." notify edit_props exit then then dup "osucc" stringcmp 0 = if pop me @ "Enter new @osucc message (your name is prepended) or . for no change:" notify read dup "." stringcmp 0 = if pop me @ "@osucc not changed." notify edit_props exit else objref @ swap setosucc me @ "Set." notify edit_props exit then then dup "drop" stringcmp 0 = if pop me @ "Enter new @drop message, or . for no change:" notify read dup "." stringcmp 0 = if pop me @ "@drop not changed." notify edit_props exit else objref @ swap setdrop me @ "Set." notify edit_props exit then then dup "odrop" stringcmp 0 = if pop me @ "Enter new @odrop message (your name is prepended) or . for no change:" notify read dup "." stringcmp 0 = if pop me @ "@odrop not changed." notify edit_props exit else objref @ swap setodrop me @ "Set." notify edit_props exit then then dup "fail" stringcmp 0 = if pop me @ "Enter new @fail message, or . for no change:" notify read dup "." stringcmp 0 = if pop me @ "@fail not changed." notify edit_props exit else objref @ swap setfail me @ "Set." notify edit_props exit then then dup "ofail" stringcmp 0 = if pop me @ "Enter new @ofail message (your name is prepended) or . for no change:" notify read dup "." stringcmp 0 = if pop me @ "@ofail not changed." notify edit_props exit else objref @ swap setofail me @ "Set." notify edit_props exit then then "q" stringpfx if exit else me @ "That isn't a valid message." notify edit_props exit then exit ; : switch_jump objref @ "jump_ok" flag? if objref @ "!jump_ok" set me @ "Object set !jump_ok." notify exit else objref @ "jump_ok" set me @ "Object set jump_ok." notify exit then exit ; : switch_chown objref @ "chown_ok" flag? if objref @ "!chown_ok" set me @ "Object set !chown_ok." notify exit else objref @ "chown_ok" set me @ "Object set chown_ok." notify exit then exit ; : switch_sticky objref @ "sticky" flag? if objref @ "!sticky" set me @ "Object set !sticky." notify exit else objref @ "sticky" set me @ "Object set sticky." notify exit then exit ; : change_prop atoi 2 * progname @ prog LMGR-getelem dup "" stringcmp 0 = if pop me @ "There is no property by that number." notify exit then dup prop ! objref @ swap getpropstr me @ "This object's " prop @ strcat " prop is set to:" strcat notify me @ "'" objref @ prop @ getpropstr strcat "'" strcat notify me @ "Please enter new value for this property, or . for no change:" notify read dup "." stringcmp 0 = if me @ prop @ " property unchanged." strcat notify exit then objref @ swap prop @ swap 1 addprop me @ prop @ " property set." strcat notify exit ; : edit_special 1 propcount ! progname @ prog LMGR-getlist dup 0 = if pop "Error: No list specified for " progname @ strcat "." strcat .tell "Please tell " prog owner name strcat "." strcat .tell exit then dup 1 + pick me @ swap notify 1 - begin dup 0 = not while dup 1 + pick propcount @ intostr ". " strcat swap strcat me @ swap notify dup pick dup string? not if break then me @ swap notify 2 - propcount @ 1 + propcount ! repeat me @ "Enter a number to edit that property, or q to return to the last menu." notify read dup "q" stringcmp 0 = if pop exit then dup number? not if me @ "That's not a number." notify edit_special exit else change_prop edit_special exit then exit ; : list_special me @ "Object Hammer V. 2.6 -- Listing of Object-Related Programs" notify me @ "Editing: " objname @ strcat notify prog "_progs/" nextprop begin dup "" stringcmp 0 = not while 7 strcut swap pop dup progname ! ": " strcat prog "_progs/" progname @ strcat getpropstr strcat me @ swap notify prog "_progs/" progname @ strcat nextprop repeat me @ "Enter a program name (i.e., 'hand') to edit properties for it," notify me @ "or 'q' to quit." notify read dup "q" stringpfx if exit then dup "_progs/" swap strcat prog swap getpropstr "" stringcmp 0 = if me @ "I don't recognise that program." notify list_special exit else progname ! edit_special list_special exit then exit ; : edit_link me @ "Editing: " objname @ strcat notify me @ "Currently linked to: " objref @ getlink unparseobj strcat notify me @ "Enter dbref of object to link to, or 'me' or 'here', or . for no change:" notify read dup "." stringcmp 0 = if pop me @ "Unchanged." notify exit then dup "me" stringcmp 0 = if pop objref @ me @ setlink me @ "Home set to you." notify exit then dup "here" stringcmp 0 = if pop objref @ me @ location setlink me @ "Home set to " me @ location unparseobj strcat notify exit then dup "#" stringpfx if pop 1 strcut swap pop then atoi dbref dup ok? not if pop me @ "That isn't a valid object." notify exit then dup "abode" flag? if dup objref @ swap setlink me @ swap "Home set to " swap unparseobj strcat "." strcat notify exit then dup "link_ok" flag? if dup objref @ swap setlink me @ swap "Home set to " swap unparseobj strcat "." strcat notify exit then dup owner me @ dbcmp if dup objref @ swap setlink me @ swap "Home set to " swap unparseobj strcat "." strcat notify exit then me @ "wizard" flag? if dup objref @ swap setlink me @ swap "Home set to " swap unparseobj strcat "." strcat notify exit else me @ "You can't link your object to that." notify exit then exit ; : edit_lock me @ "Editing: " objname @ strcat notify me @ "This object is currently locked to: " objref @ getlockstr "*UNLOCKED*" stringcmp 0 = if "*NOTHING*" else objref @ getlockstr parselock prettylock then strcat notify "Please enter new lock string, space and enter to reset, or . for no change:" .tell read dup "." stringcmp 0 = if pop me @ "@lock not changed." notify exit then objref @ swap setlockstr if me @ "Lock set." notify else me @ "I can't lock something to that." notify then exit ; : edit_chlock me @ " " notify "The @chown-lock tells the program which players may @chown, or" .tell "take ownership of, an object. Its format is just like that of" .tell "@lock (me&!me, etc.) To set this by hand, do @chlock =." .tell me @ "Editing: " objname @ strcat notify me @ "This object is currently @chown-locked to: " objref @ "_/chlk" getpropstr dup "" stringcmp 0 = swap "*UNLOCKED*" stringcmp 0 = or if "*NOTHING*" else objref @ "_/chlk" getpropstr then strcat notify "Please enter new @chlock string, space and enter to reset, or . for no change:" .tell read dup "." stringcmp 0 = if pop me @ "@chown-lock not changed." notify exit then me @ swap "@chlock " objname @ strcat "=" strcat swap strcat force exit ; : edit_flock me @ " " notify "The @force-lock (or @flock) controls which players an object may be" .tell "@forced by. It works just like @lock. To set the string by hand," .tell "type '@flock ='." .tell me @ "Editing: " objname @ strcat notify me @ "This object is currently @force-locked to: " objref @ "@/flk" getpropstr dup "" stringcmp 0 = swap "*UNLOCKED*" stringcmp 0 = or if "*NOTHING*" else objref @ "@/flk" getpropstr then strcat notify "Please enter a new @flock string, space and enter to reset, or . for no change:" .tell read dup "." stringcmp 0 = if pop me @ "@force-lock not changed." notify exit then me @ swap "@flock " objname @ strcat "=" strcat swap strcat force exit ; : recycle_obj me @ "Are you SURE you want to recycle " objref @ unparseobj strcat "? (y/n)" strcat notify read dup "y" stringpfx not if me @ "Object not @recycled." exit then objref @ owner me @ dbcmp not if me @ "Permission denied." notify exit else objref @ recycle me @ objname @ " @recycled." strcat notify exit then exit ; : make_zombie me @ "zombie" flag? if me @ "You aren't allowed to make zombies." notify me @ "Please talk to your local wizard to rectify this." notify exit then objref @ "z" set me @ "Object set Zombie." notify me @ "@set #" objref @ intostr strcat "=x" strcat force me @ "Object set Xforcible." notify me @ "@flock #" objref @ intostr strcat "=me" strcat force me @ "Object @Force-Locked to you." notify me @ "Please enter a name for the command action (whose name you will use" notify me @ "to @force the zombie to move around):" notify read strip me @ swap newexit dup exitref ! dup dup me @ setlink me @ swap "Exit created with db#" swap intostr strcat " and linked to you." strcat notify "me&!me" setlockstr if me @ "Exit locked." notify else me @ "Exit not locked for unknown reason." notify me @ "Please use '@lock " exitref @ name strcat "=me&!me'." strcat notify then exitref @ "{force:#" objref @ intostr strcat ",{&arg}}" strcat setfail exitref @ "haven" set me @ "Object zombified." notify objref @ location me @ dbcmp if me @ "You must drop it before it will begin to function." notify then me @ "Use " exitref @ name strcat " to make it work." strcat notify exit ; : handle_obj me @ " " notify me @ "Object Hammer V. 2.6 -- by Ginger Editing: " objname @ strcat notify objref @ desc me @ swap "1. This object's desc is '" swap strcat "'." strcat notify me @ "2. Edit object's @succ, @osucc, @drop, @odrop, @fail, @ofail messages." notify objref @ "jump_ok" flag? if me @ "3. This object IS set jump_ok." notify else me @ "3. This object is NOT set jump_ok." notify then objref @ "chown_ok" flag? if me @ "4. This object CAN be @chowned (taken) by others." notify else me @ "4. This object can NOT be @chowned (taken) by others." notify then objref @ "sticky" flag? if me @ "5. This object IS sticky (will go home when dropped.)" notify else me @ "5. This object is NOT sticky (will not go home when dropped.)" notify then objref @ getlink dup "6. This object is linked to " swap name strcat swap intostr "(#" swap strcat ")." strcat strcat me @ swap notify objref @ getlockstr "*UNLOCKED*" stringcmp 0 = if me @ "7. This object is NOT locked to anything." notify else objref @ getlockstr parselock prettylock me @ swap "7. This object is locked to " swap strcat "." strcat notify then objref @ "_/chlk" getpropstr dup "" stringcmp 0 = swap "*UNLOCKED*" stringcmp 0 = or if me @ "8. This object is NOT @chown-locked to anything." notify else objref @ "_/chlk" getpropstr me @ swap "8. This object is @chown-locked to " swap strcat "." strcat notify then objref @ "@/flk" getpropstr dup "" stringcmp 0 = swap "*UNLOCKED*" stringcmp 0 = or if me @ "9. This object is NOT @force-locked to anything." notify else objref @ "@/flk" getpropstr me @ swap "9. This object is @force-locked to " swap strcat "." strcat notify then me @ "10. Edit special program properties (hand, throw, etc)." notify objref @ "z" flag? not if me @ "11. Make this object a zombie." notify else me @ "11. This object is already a zombie." notify then me @ "12. @recycle this object." notify me @ "Enter a number to edit that property, or q to quit." notify read dup "1" stringcmp 0 = if pop editdesc handle_obj exit then dup "2" stringcmp 0 = if pop edit_props handle_obj exit then dup "3" stringcmp 0 = if pop switch_jump handle_obj exit then dup "4" stringcmp 0 = if pop switch_chown handle_obj exit then dup "5" stringcmp 0 = if pop switch_sticky handle_obj exit then dup "6" stringcmp 0 = if pop edit_link handle_obj exit then dup "7" stringcmp 0 = if pop edit_lock handle_obj exit then dup "8" stringcmp 0 = if pop edit_chlock handle_obj exit then dup "9" stringcmp 0 = if pop edit_flock handle_obj exit then dup "10" stringcmp 0 = if pop list_special handle_obj exit then dup "11" stringcmp 0 = if pop make_zombie handle_obj exit then dup "12" stringcmp 0 = if pop recycle_obj exit then "q" stringpfx if exit else handle_obj exit then exit ; : help me @ "Object Hammer Version 2.6 by Ginger@FurToonia" notify me @ " " notify me @ "Format: editobj " notify me @ " editobj " notify me @ " " notify me @ "Allows you to edit descs, @succs, etc., @links, and @locks on objects" notify me @ "you control. Through a 'plug-in' interface system it will also edit" notify me @ "properties that customise objects for use with other programs, such" notify me @ "as 'hand' or 'throw'." notify me @ "The object MUST be in your inventory or in the room with you." notify me @ " " notify me @ "Thanks go to:" notify me @ " Triggur--for inspiration as to format" notify me @ " Lori_Keet@BD II, for the idea" notify me @ " Myk@BD II, for the plug-in idea" notify me @ "For setup, please use '@view #" prog intostr strcat "'." strcat notify exit ; : get_object ( -- d ) strip dup "" stringcmp 0 = if me @ "What is the name of the object you'd like to create?" notify read objname ! me @ stats pop pop pop swap pop swap pop swap pop me @ "@quota/things" getpropstr dup "" stringcmp 0 = if pop 30 else atoi then <= me @ "Wizard" flag? or not if "You don't have enough @quota to create a new object." .tell "Please specify an object to match." .tell exit then me @ objname @ newobject objref ! me @ "Object " objname @ strcat " created with db# " strcat objref @ intostr strcat "." strcat notify handle_obj exit then dup "#h" stringpfx if pop help exit then dup objname ! match dup 0 1 - dbref dbcmp if me @ stats pop pop pop swap pop swap pop swap pop me @ "@quota/things" getpropstr dup "" stringcmp 0 = if pop 30 else atoi then <= me @ "wizard" flag? or not if "You don't have enough @quota to create a new object." .tell "Please specify an object to match." .tell exit then me @ objname @ newobject objref ! me @ "Object " objname @ strcat " created with db # " strcat objref @ intostr strcat "." strcat notify handle_obj exit then dup 0 2 - dbref dbcmp if me @ "I don't know which one you mean!" notify exit then dup owner me @ dbcmp me @ "Wizard" flag? or if else me @ "You don't control that." notify exit then dup name objname ! dup objref ! thing? not if me @ "That's not an object." notify exit then handle_obj exit ; : main get_object me @ "Done." notify exit ;