- D1 Meta Docs - Denizen Script -
Home Page / Pi to one million places / Contact mcmonkey / Donate / Paste Scripts / Denizen Help /
You are browsing as a guest.
Login | Register








The script repo is an archive of historical scripts. For modern scripts, or to post your own, please use the Scripts forum section.





Staff Pick: dTodo List


By Vellric
Created: 2016/09/16 14:21:57 UTC-07:00 (8 years and 98 days ago)
Edited: 2016/09/17 08:16:31 UTC-07:00 (8 years and 97 days ago)
Likes: 0

Staff pick as of: 2016/09/25 02:00:59 UTC-07:00 (8 years and 89 days ago)
Denizen Version: 0.9.8
Script Version: 1.0
Description:

An ingame to-do list to track all the tasks that have to be done in your server.

Usage:
- /dtodo add <task name> for adding a task to your list,
- /dtodo check <task number> for setting a task as done and delete it from the list.
- /dtodo for seeing your actual to-do list.

Don't hesitate to say if there's some English errors.

I'll probably add a translation option in a near future.

GitHub: https://github.com/Vellric/dscripts/blob/master/dTodo.yml

I want to take some more lines to thanks Noiknez for the idea. This script was made on his request. And I can't forget to mention all the help that the Denizen community on the IRC gave me from my Day 1 with Denizen, in particular thoses three persons: mcmonkey, |Anthony| and BlackCoyote.

Also, I want to thanks my friends for supporting me throught the dAdventures I've started in March, with my crazy project that will maybe see the day light... someday.


Download script | View raw script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
5900

dTodoList:
    type: command
    name: dtodo
    debug: false
    permission: dtodo
    permission message<&c>Sorry <player.name>, you don't have the permission to use this command.
    usage: /dtodo <&lt>add/check<&gt>
    description: A to-do list powered by Denizen.
    allowed help:
    - determine <player.has_permission[dtodo]>||<player.is_op>||<context.server>
    aliases:
    - todo
    - task
    script:
    - choose <c.args.get[1]||null>:
      - case add:
        - if <c.args.get[2].to[99999].trim.length||0> == 0 {
          - narrate "<&c>[dTO-DO] Please specify a name for the task you want to add."
          - queue clear
        }
        - flag player "dtodo:->:<c.args.as_list.get[2].to[9999].space_separated>"
        - narrate "<&d>[dTO-DO] The task has been added to your to-do list. You now have <player.flag[dtodo].as_list.size.round> to-do task listed."
      - case check:
        - if <c.args.get[2].trim.length||0> == 0 {
          - narrate "<&c>[dTO-DO] Please specify the number of the task you want to check."
          - queue clear
        }
        - if <player.has_flag[dtodo].not> {
          - narrat "<&c>[dTodo] You don't have any task in your dTodo list right now. You can add one with <context.alias> add."
          - queue clear
        }
        - if !<player.flag[dtodo].as_list.size> >= <c.args.get[2]> {
          - narrate "<&c>[dTodo] You don't have any task at the line number <c.args.get[2]>. You have <pl.flag[dtodo].as_list.size.round> task in your to-do list. You can add more with <context.alias> add."
          - queue clear
        }
        - flag player dtodo[<c.args.get[2]>]:<-:
        - if <pl.has_flag[dtodo].not> {
          - narrate "<&d>[dTO-DO] Great! Your to-do list is now empty. Create new task with '<context.alias> add'!"
          - queue clear
        }
        - narrate "<&d>[dTO-DO] The task has been checked. You still have <pl.flag[dtodo].as_list.size.round> tasks to-do. Get back to work!"
      - case null:
        - if <player.has_flag[dtodo].not> {
          - narrate "<&d>[dTO-DO] Your to-do list is empty right now. You can add tasks to it with <context.alias> add."
          - narrate "<&d>[dTO-DO] When you wish to remove a task, do <context.alias> check [task_number]."
          - queue clear
        }
        - narrate "<&a>###### YOUR dTO-DO LIST ######"
        - foreach <player.flag[dtodo].as_list> {
          - narrate "<yellow>[%loop_index%] %value%"
        }
dTodoList_Tracker:
    type: world
    debug: false
    events:
      on system time hourly:
      - webget "http://stats.denizenscript.com/tracker?script=112&version=1.0"






View History