- 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


TitleRepo Script Brunos Gamemode version 2
TypeDenizen Script
Date2016/01/19 20:23:53 UTC-08:00
ByBruno
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
12600
gmcreative:
  type: command
  name: gamemode
  usage"/gmc [playername]"
  description: Creative Gamemode command
  debug: true
  aliases:
  - /gm1
  permission: bruno.gamemode
  permission message<&6>Quartermaster <&7>Talk to the boss, you can't use this command.
  script:
  - narrate '<&6>Quartermaster <&7>Saving inventory and swapping inventory. It may be a good idea clear your inventory before swapping gamemodes.'
  - define target <c.args.get[1]||<player.name>>
  - choose <c.args.get[1]>:
    - case <server.list_online_players.match[%target%]>
      - note <player.inventory> as:<player.name>_<player.gamemode>
      - wait 1t
      - flag <player> e_<player.gamemode>:<player.equipment>
      - wait 1t
      - inventory clear d:<player.inventory>
      - wait 1t
      - inventory set d:<player.inventory> o:in@<player.name>_creative
      - wait 1t
      - adjust <player> 'equipment:<player.flag[e_creative]>'
      - wait 1t
      - narrate '<&6>Quartermaster <&7>Inventory saved and switched.'
      - adjust %target% 'gamemode:creative'
    - case help:
      - narrate "<script.yaml_key[usage]>"    
    - case default:
      - narrate '<&6>Quartermaster <&7>Nah. Try again mate. <script.yaml_key[usage]>'
gmsurvival:
  type: command
  name: gamemode
  usage"/gms [playername]"
  description: Survival Gamemode command
  aliases: 
  - /gm0
  debug: true
  permission: bruno.gms
  permission message<&6>Quartermaster <&7>Talk to the boss, you can't use this command.
  script:
  - narrate '<&6>Quartermaster <&7>Saving inventory and swapping inventory. It may be a good idea clear your inventory before swapping gamemodes.'
  - define target <c.args.get[1]||<player.name>>
  - choose <c.args.get[1]>:
    - case <server.list_online_players.match[%target%]>
      - note <player.inventory> as:<player.name>_<player.gamemode>
      - wait 1t
      - flag <player> e_<player.gamemode>:<player.equipment>
      - wait 1t
      - inventory clear d:<player.inventory>
      - wait 1t
      - inventory set d:<player.inventory> o:in@<player.name>_survival
      - wait 1t
      - adjust <player> 'equipment:<player.flag[e_survival]>'
      - wait 1t
      - narrate '<&6>Quartermaster <&7>Inventory saved and switched.'
      - adjust %target% 'gamemode:survival'
    - case help:
      - narrate "<script.yaml_key[usage]>"    
    - case default:
      - narrate '<&6>Quartermaster <&7>Nah. Try again mate. <script.yaml_key[usage]>'
gmadventure:
  type: command
  name: gamemode
  usage"/gma [playername]"
  description: Adventure Gamemode command
  debug: true
  aliases: 
  - /gm3
  permission: bruno.gamemode
  permission message<&6>Quartermaster <&7>Talk to the boss, you can't use this command.
  script:
  - narrate '<&6>Quartermaster <&7>Saving inventory and swapping inventory. It may be a good idea clear your inventory before swapping gamemodes.'
  - define target <c.args.get[1]||<player.name>>
  - choose <c.args.get[1]>:
    - case <server.list_online_players.match[%target%]>
      - note <player.inventory> as:<player.name>_<player.gamemode>
      - wait 1t
      - flag <player> e_<player.gamemode>:<player.equipment>
      - wait 1t
      - inventory clear d:<player.inventory>
      - wait 1t
      - inventory set d:<player.inventory> o:in@<player.name>_adventure
      - wait 1t
      - adjust <player> 'equipment:<player.flag[e_adventure]>'
      - wait 1t
      - narrate '<&6>Quartermaster <&7>Inventory saved and switched.'
      - adjust %target% 'gamemode:adventure'
    - case help:
      - narrate "<script.yaml_key[usage]>"    
    - case default:
      - narrate '<&6>Quartermaster <&7>Nah. Try again mate. <script.yaml_key[usage]>'
gmspectator:
  type: command
  name: gm4
  usage"/gm4 [playername]"
  description: Spectator Gamemode command
  aliases:
  - /v
  - /vanish
  debug: true
  permission: bruno.gamemode
  permission message<&6>Quartermaster <&7>Talk to the boss, you can't use this command.
  script:
  - narrate '<&6>Quartermaster <&7>Saving inventory and swapping inventory. It may be a good idea clear your inventory before swapping gamemodes.'
  - define target <c.args.get[1]||<player.name>>
  - choose <c.args.get[1]>:
    - case <server.list_online_players.match[%target%]>
      - note <player.inventory> as:<player.name>_<player.gamemode>
      - wait 1t
      - flag <player> e_<player.gamemode>:<player.equipment>
      - wait 1t
      - inventory clear d:<player.inventory>
      - wait 1t
      - inventory set d:<player.inventory> o:in@<player.name>_spectator
      - wait 1t
      - adjust <player> 'equipment:<player.flag[e_spectator]>'
      - wait 1t
      - narrate '<&6>Quartermaster <&7>Inventory saved and switched.'
      - adjust %target% 'gamemode:spectator'
    - case help:
      - narrate "<script.yaml_key[usage]>"    
    - case default:
      - narrate '<&6>Quartermaster <&7>Nah. Try again mate. <script.yaml_key[usage]>'



RawRaw



Pastes made: 55651