- 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
Date2016/03/26 10:33:16 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
7700
FreezeCommand:
  type: command
  name: freeze
  usage: /freeze [player]
  description: freeze players for a duration of 60 minutes.
  permission: denizen.freezeplayer
  tab complete:
  - determine <server.list_players.parse[name].filter[starts_with[<context.args.last||>]]>
  script:
  - if <player.has_permission[denizen.freezeplayer].not> {
   - narrate "<&c>This command is for Staff Members only!"
   - Queue clear
  }
  - define player <server.match_player[<context.args.get[1]||null_>]||null>
  - if <def[player]> == null { 
    - narrate "<&c>Theres no player online by that name!"
    - queue clear
  }
  - flag <def[player]> isFrozen
  - flag <def[player]> freeze_location:<def[player].location>
  - narrate "<&a>Player <def[player].name> has been frozen by <player.name>!" targets:<server.list_online_players.filter[has_permission[denizen.freezeplayer]]>
  - adjust <def[player]> walk_speed:0
  - cast <def[player]> jump p:400 duration:60m
  - narrate "<&c>You have been frozen by a Staff Member!" targets:<def[player]>
  - narrate "<&c>Please wait for further instructions." targets:<def[player]>
  - narrate "<&6>TeamSpeak IP:<&7> ts.lonewolves.net" targets:<def[player]>

  
UnFreezeCommand:
  type: command
  name: unfreeze
  usage: /unfreeze [player]
  description: Unfreeze players
  permission: denizen.freezeplayer
  tab complete:
  - determine <server.list_players.parse[name].filter[starts_with[<context.args.last||>]]>
  script:
  - if <player.has_permission[denizen.freezeplayer].not> {
   - narrate "<&c>This command is for Staff Members only!"
   - Queue clear
  }
  - define player <server.match_player[<context.args.get[1]||null_>]||null>
  - if <def[player]> == null { 
    - narrate "<&c>Theres no player online by that name!"
    - queue clear
  }
  - narrate "<&a>Player <def[player].name> has been unfrozen by <player.name>!" targets:<server.list_online_players.filter[has_permission[denizen.freezeplayer]]>
  - flag <def[player]> isFrozen:!
  - adjust <def[player]> walk_speed:0.2
  - cast <def[player]> jump cancel
  - narrate "<&a>You are now unfrozen! You are now able to move again." targets:<def[player]>
  
Jumpcheck:
  type: world
  debug: false
  events:
    on player jumps:
    - if <player.has_flag[isFrozen]> {
      - if <player.location.distance[<player.flag[freeze_location]>].is[MORE].than[1]> {
        - teleport <def[player]> <player.flag[freeze_location]>
        - narrate "<&c>You have been frozen."
        - narrate "<&c>Please wait for a Staff member for further instructions."
        - narrate "<&c><&l>DO NOT LOG OFF"
        - narrate "<&6>Forums:<&7> www.lonewolvespvp.net"
        - narrate "<&6>TeamSpeak IP:<&7> ts.lonewolves.net"
      }
    }
    on player damaged:
    - if <player.has_flag[isFrozen]> {
      - narrate "<&c><context.entity.as_player.name> is currently frozen, you may not attack!" targets:<context.damager>
      - determine cancelled
    }
    on player quits:
    - if <player.has_flag[isFrozen]> {
      - narrate "<&c>ATTENTION: <player.name> logged out whilst being FROZEN" targets:<server.list_online_players.filter[has_permission[denizen.freezeplayer]]>
    }



RawRaw



Pastes made: 66917