View/Edit #2385:@todo

Switch to edit mode.

Name(s): @todo
1:  "This verb was made by #9780"
2:  options = "add, remove, random, done"
3:  what = ""
4:  while (what != "done")
5:    bar = $su:space(player:linelength(), "-")
6:    player:tell({"The Following things need to be done:", bar})
7:    for x in (player.to_do)
8:      player:Tell("[", tostr(x in player.to_do), "]: ", x)
9:    endfor
10:   player:tell({bar, "Options: " + options})
11:   what = $command_utils:read()
12:   player:tell("You chose the option: " + what)
13:   if (what == "add")
14:     player:Tell("What is it you have to do?")
15:     do = $command_utils:read()
16:     player.to_do = setadd(player.to_do, do)
17:     player:Tell("TODO item added.")
18:   elseif (what == "remove")
19:     player:tell("Wich item do you wish to remove? the number between the [].")
20:     do = $command_utils:read()
21:     player.to_do = setremove(player.to_do, player.to_do[toint(do)])
22:     player:Tell("TODO Item removed.")
23:   elseif (what == "random")
24:     x = player.to_do[random(length(player.to_do))]
25:     player:tell("Random item result:")
26:     player:tell(">[", tostr(x in player.to_do), "]: ", x)
27:   endif
28: endwhile
29: player:Tell("-- done --")
30: "Last modified by Dax (#789) on Tue May  3 14:12:30 2005 MDT."

Verb arguments: any any any
Verb perms: Readable NOT-Debug
Verb owned by: NiceGuy (#2385)

You are not logged in.

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