Please select by the first letter of the name or type in your search below:

- A - B - C - D - E - F - G - H - I - J - K - L - M - N - O - P - Q - R - S - T - U - V - W - X - Y - Z -
Other


.:. FORGETPERM








MOB MEMORY

An NPC can permanently remember things about a player: quest steps, lessons,
favors, anything that must survive logouts and reboots. Each memory belongs
to one NPC (by vnum) and one player.

A memory is a key, optionally with a value:

  mob rememberperm $n paid            - remember the key 'paid'
  mob rememberperm $n QUEST started   - set the key QUEST to 'started'
  mob rememberperm $n QUEST done      - replaces 'started' with 'done'

  if hasmemory $n QUEST               - QUEST is set, to any value
  if not hasmemory $n QUEST           - QUEST was never set
  if hasmemory $n QUEST done          - QUEST is set to 'done'

  mob forgetperm $n QUEST             - forget QUEST, whatever its value
  mob forgetperm $n QUEST done        - forget it only if it is 'done'
  mob forgetperm $n all               - forget everything about $n
  mob forgetperm all QUEST            - forget QUEST for every player

The key is the first word; the rest of the line is the value. Case does not
matter.

To take a player through several steps, keep the step in one key and write
the steps in the order the player meets them:

  if not hasmemory $n QUEST
    ...offer the quest...
    mob rememberperm $n QUEST started
  elseif hasmemory $n QUEST started
    ...check their progress...
    mob rememberperm $n QUEST done
  elseif hasmemory $n QUEST done
    ...thank them again...
  endif

'mob remember' and 'mob forget' are different commands: they set the mob's
target ($q), not a permanent memory.

Check how long ago this NPC last remembered a key about that player:

  if memoryage $n <KEY> <op> <number> [unit]

The age is whole seconds since the NPC last remembered the key on this
port, whatever its value. Remembering it again restarts its clock. If the
key has no memory, or the target is not a player, every comparison is false.

Operators: ==, !=, <, <=, >, >=. Use a literal whole number, not a $ code.
Without a unit, the number is seconds. Unit words ignore case; use singular
or plural (add s):

  second(s)   = 1 second       minute(s)   = 60 seconds
  hour(s)     = 3600 seconds   day(s)      = 86400 seconds
  mudhour(s)  = 75 seconds     mudday(s)   = 1800 seconds
  mudmonth(s) = 63000 seconds  mudyear(s)  = 1071000 seconds

Example: if memoryage $n GRASP >= 1 mudmonth

See also: MOB COMMANDS, MOB FUNCTIONS, MOB LOGIC, SEMANTIC





:: Beginning

 
 Copyright © 2003 A Moment in Tyme
 Web Design by: Tannil and Guy
.:. Top of Page