- 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


Click here to create your own public paste ~ ~ click to duplicate and edit this paste


TitleUntitled Paste
TypeDenizen Script
Date2014/03/23 16:09:56 UTC-07:00
ByGuest
Other
Paste
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
5600
NPCcontrol:
    type: world
    
    events:
        on npctrl command:
            - define arg1 <c.args.get[1]>
            - define arg2 <c.args.get[2]>
            - define hasAdminPerm <player.has_permission[kosu.gamemaster]>
            
            - if <def[arg1].is[==].to[null]> {
                - run "FinishCommand"
                } else if <def[arg1].is[==].to[clearlist]> {
                - if !<def[hasAdminPerm]> {
                    - narrate targets:p@<player> "You have to be an Admin to do that."
                    - run "FinishCommand"
                    }
                - if <def[arg1].is[==].to[clearlist]> {
                    - ^narrate "Lists has been cleared."
                    - flag global defaultSleepNpcList:!
                    - flag global CountryWorker:!
                    - run "FinishCommand"
                    } else if <def[arg1].is[==].to[showList]> {
                    - run "NpcCtrlList"
                    - run "FinishCommand"
                    }
                } else {
                - run "FinishCommand"
                }
                
"NpcCtrlList":
    type: task
    script:
        - ^narrate ""
        - ^narrate "<&b>========== <&a>Listing NPC's in lists <&b>=========="
        - ^narrate ""
        - ^narrate "<&b>---------- <&a>default Sleepcycle<&b>----------"
        - ^define countera 0
        - foreach <global.flag[defaultSleepNpcList].as_list> {
            - define counter <math:%countera%+1>
            - narrate "<&b><el@value[%countera%].as_int><&co> <&a>%value%"
            }
        - ^narrate ""
        - ^narrate "<&b>---------- <&a>Countryman Workcycle<&b>----------"
        - ^define counterb 0
        - foreach <global.flag[CountryWorker].as_list> {
            - define counter <math:%counterb%+1>
            - narrate "<&b><el@value[%counterb%].as_int><&co> <&a>%value%"
            }
        - ^narrate ""
        
"FinishCommand":
    type: task
    script:
      - determine fulfilled
      - queue clear



RawRaw



Pastes made: 72180