- 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
Date2015/04/21 16:51:28 UTC-07:00
ByAnthony
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
10000

PerkPointSystem:
  type: world
  speed: 1t
  debug: false

  events:

    on pa command:
    - inject locally adminCommandHandler instantly

  adminCommandHandler:
    - if !<context.server> {
      - if !<player.has_permission[perkpoints.admin]> queue stop
      }
    - determine passively FULFILLED
    - define arg1 '<c.args.get[1].escaped||null>'
    - if <def[arg1].is[==].to[--reload]> {
      - inject locally simpleReloadYaml
      - queue stop
      }
    - if <def[arg1].is[==].to[--restart]> {
      - narrate "<&b>PerkPoints<&co> <&d>Restarting System!"
      - inject locally loadYaml
      - define yamlName 'PerkPoints'
      - define scriptName '<script.name>'
      - define db '<yaml[PerkPoints_config].read[config.MySQL.database]>'
      - run s@SQLManager p:restart def:%yamlName%|%scriptName%|%db%
      - queue stop
      }
    - if <def[arg1].is[==].to[--reset]> {
      - narrate "<&b>PerkPoints<&co> <&c>System Reset feature hasn<&sq>t been impelemented yet!"
      - narrate "<&b>PerkPoints<&co> <&f>Let<&sq>s RESTART the system instead..."
      - inject locally loadYaml
      - define yamlName 'PerkPoints'
      - define scriptName '<script.name>'
      - define db '<yaml[PerkPoints_config].read[config.MySQL.database]>'
      - run s@SQLManager p:restart def:%yamlName%|%scriptName%|%db%
      - queue stop
      }
    - if <def[arg1].is[==].to[service]>
      || <def[arg1].is[==].to[-s]> {
      - define arg2 '<c.args.get[2].escaped||null>'
      - if <def[arg2].is[==].to[register]>
        || <def[arg2].is[==].to[-r]> {
        - inject locally registerService
        }
        else {
        - if <def[arg2].is[==].to[unregister]>
          || <def[arg2].is[==].to[-ur]> {
          - inject locally unRegisterService
          }
        }
        else {
        - narrate format:CmdSynFormat "/perkadmin service <&lt>register/unregister<&gt> <&lt>service<&gt> <&lb>pointValue<&rb> <&lb>url<&rb>"
        }
      - queue stop
      }
    - if <def[arg1].is[==].to[pack]>
      || <def[arg1].is[==].to[-p]> {
      - inject locally packAdminCommandHelper
      - queue stop
      }
    - if <def[arg1].is[==].to[list]>
      || <def[arg1].is[==].to[-l]> {
      - define arg2 '<c.args.get[2].escaped||null>'
      - if <def[arg2].is[==].to[services]>
        || <def[arg2].is[==].to[-s]> {
        - define arg3 '<c.args.get[3].escaped||null>'
        - if <def[arg3].is[==].to[known]>
          || <def[arg3].is[==].to[seen]> {
          - inject locally listServicesSeen
          - queue stop
          }
        - if <def[arg3].is[==].to[registered]>
          || <def[arg3].is[==].to[reg]> {
          - inject locally listServicesRegistered
          - queue stop
          }
        - narrate format:CmdSynFormat "/perkadmin list services <&lt>known/registered<&gt>"
        - queue stop
        }
      - if <def[arg2].is[==].to[packages]>
        || <def[arg2].is[==].to[pack]>
        || <def[arg2].is[==].to[-pk]> {
        - define page '<c.args.get[3].abs.as_int||null>'
        - inject listPackagesPaged locally
        - queue stop
        }
      - narrate format:CmdSynFormat "/perkadmin list <&lt>services/players/packages<&gt>"
      - queue stop
      }
    - if <def[arg1].is[==].to[points]>
      || <def[arg1].is[==].to[-pt]> {
      - inject locally pointsCommandHelper
      - queue stop
      }
    - run locally adminCommandHelp instantly
    - queue stop



RawRaw



Pastes made: 57253