You are browsing as a guest.
Login | Register
~ mcmonkey's simpler pastebin ~ Inspired by Hastebin ~ home page ~ Denizen help ~
click to use the normal pastebin instead ~ Click to make your own paste ~ click to duplicate and edit this paste


Title:
Type:
Date:
By:
Raw:
Other:
...
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
5200

Script Queues Control v1
Denizen Script
2019/11/03 15:30:54 UTC-08:00
Guest
Click here to view this paste as a raw text file | Or download the script


### Script Queues Control
# Updated by Mwthorn (Discord: Mwthorn#2843) (Mail: mwthorn@gmail.com)
# Ask for help at any time on the Official Denizen Script Discord: https://discord.gg/Q6pZGSR
# A simple script for clearing or listing queues currently running. Useful for debugging or analyzing your scripts.
# For more info about a queue, visit https://one.denizenscript.com/denizen/lngs/QueueTag or https://one.denizenscript.com/denizen/lngs/Script%20Syntax
# It has the following commands included:
# /listq - Lists all queues
# /killq - Removes all queues

## Instructions:
# - Place the script in your script folder.
# - Restart server or reload scripts
# - Done! Now you can use /listq or /killq

Clear_All_Queues:
    type: command
    name: killq
    description: Removes all queues from Denizen
    usage: /killq
    debug: false
    script:
    - if !<context.server>:
        - if !<player.is_op>:
            - stop
    - define allq:0
    - foreach <queue.list.exclude[<queue>]>:
        - narrate "<&7>clearing queue<&co> <[value]>"
        - queue <[value]> clear
        - define allq:++
        - if <[loop_index].mod[50]> == 1:
            - wait 2t
    - narrate "<&7>Finished... Total<&co><&e> <[allq]>"

List_All_Queues:
    type: command
    name: listq
    description: Lists all queues from Denizen
    usage: /listq
    debug: false
    script:
    - if !<context.server>:
        - if !<player.is_op>:
            - stop
    - narrate "<&a>Listing all queues<&co>"
    - define allq:0
    - foreach <queue.list.exclude[<queue>]>:
        - narrate "<[value]>"
        - define allq:++
        - if <[loop_index].mod[50]> == 1:
            - wait 2t
    - narrate "<&a>Finished... Total<&co><&e> <[allq]>"