Manual:DIL Manual/editing

From DikuMUD Wiki
Jump to navigation Jump to search

editing

Field (integer, read-only; units: all, meaningful for PC).

pc.editing : integer

TRUE while the player is writing in the text editor (a board post, a letter, a beginedit() text), FALSE otherwise. It also works for a player who has switched into an NPC.

Notes

  • For an NPC, an object, a room or a link-dead player it is FALSE.
  • On null it fails.
  • It can't be assigned (vmc: "Illegal lvalue").

Example

dilbegin tell_check(vict : unitptr);
code
{
   if (vict.editing)
   {
      act("$3n is busy writing a message, $3e can't hear you!",
          A_ALWAYS, self, null, vict, TO_CHAR);
      return;
   }
   act("$3n is listening.", A_ALWAYS, self, null, vict, TO_CHAR);
}
dilend

Doesn't bother a player who is writing, as the tell command in comm.zon does.

See also