View/Edit #12:^*

Switch to edit mode.

Name(s): ^*
1:  "Syntax: ^ retypes the last command you entered."
2:  "        ^<text> adds <text> to the last command and re-enters it."
3:  "        ^<oldtext>^<newtext> retypes the last command, replacing <oldtext> with <newtext>."
4:  if (player != this)
5:    return $msg:mtell("huh")
6:  endif
7:  tlc = ""
8:  for x in ($list_utils:reverse(this.last_commands))
9:    if (`x[1] != "^" && x[1..5] != "@more" ! E_RANGE => 1')
10:     tlc = x
11:     break
12:   endif
13: endfor
14: set_task_perms(this)
15: try
16:   argstr = verb[2..$] + (argstr && " " + argstr)
17: except (E_RANGE)
18:   player:tell("> " + tlc)
19:   return force_input(this, tlc)
20: endtry
21: if (q = index(argstr, "^"))
22:   bit1 = argstr[1..q - 1]
23: else
24:   player:tell("> " + tlc + argstr[1..$])
25:   return force_input(this, tlc + argstr[1..$])
26: endif
27: if (!(r = index(argstr[q + 1..$], "^")))
28:   r = length(argstr) - 1
29: else
30:   r = r + q - 1
31: endif
32: bit2 = argstr[q + 1..r]
33: player:tell("> " + strsub(tlc, bit1, bit2))
34: force_input(this, strsub(tlc, bit1, bit2))
35: "Last modified by manta (#7165) on Sat Aug  1 12:26:40 1998 EDT."
36: "This verb previously owned by whiz (#3135), and chowned to $slacker upon dewizarding (Sat Aug 17 14:48:43 2002 MDT)."
37: "Last modified by Dax (#789) on Sat Aug 17 14:48:43 2002 MDT."

Verb arguments: this none this
Verb perms: Readable NOT-Debug
Verb owned by: Slacker (#55)

You are not logged in.

[home | help | who | search | setup | code]