- 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
Date2019/09/17 16:30:20 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
4000
PatreonRoleSync:
    type: world
    debug: true
    events:
        on discord message received:
        - if <context.message> == "!rolesync":
            - discord id:sxr add_role user:<context.author_id> role:discordrole@191040935633616896,458328476248965120 group:191040935633616896
            - wait 1s
            - discord id:sxr remove_role user:<context.author_id> role:discordrole@191040935633616896,458328476248965120 group:191040935633616896
        - else if <context.message.split[<&sp>].get[1]> == "!linkminecraft":
            - if <server.match_offline_player[<context.message.split[<&sp>].get[2]>]||null> != null:
                - flag server discord-user_<context.author_id>.minecraft-player:<server.match_offline_player[<context.message.split[<&sp>].get[2]>]>
                - discord id:sxr add_role user:<context.author_id> role:discordrole@191040935633616896,458328476248965120 group:191040935633616896
                - wait 1s
                - discord id:sxr remove_role user:<context.author_id> role:discordrole@191040935633616896,458328476248965120 group:191040935633616896
                - discord id:sxr message channel:191040977652285450 "<&lt>@<context.author_id><&gt>, you linked your Discord account to the Minecraft player <server.match_offline_player[<context.message.split[<&sp>].get[2]>].name>! If this is in error, please feel free to try again, or contact Wahrheit."
            - else:
                - discord id:sxr message channel:191040977652285450 "<&lt>@<context.author_id><&gt>, something went wrong! Please feel free to try again, or contact Wahrheit."
        on discord user role changes:
        - if <server.has_flag[discord-user_<context.user_id>.minecraft-player]>:
            - if <context.new_role_ids.contains[458328498608799774]>:
                - group add Patron player:<server.flag[discord-user_<context.user_id>.minecraft-player]>
                - group add GenerousPatron player:<server.flag[discord-user_<context.user_id>.minecraft-player]>
                - group add EsteemedPatron player:<server.flag[discord-user_<context.user_id>.minecraft-player]>
            - else if <context.new_role_ids.contains[458328312054546432]>:
                - group add Patron player:<server.flag[discord-user_<context.user_id>.minecraft-player]>
                - group add GenerousPatron player:<server.flag[discord-user_<context.user_id>.minecraft-player]>
            - else if <context.new_role_ids.contains[387095048015314956]>:
                - group add Patron player:<server.flag[discord-user_<context.user_id>.minecraft-player]>
            - else:
                - group remove Patron player:<server.flag[discord-user_<context.user_id>.minecraft-player]>
                - group remove GenerousPatron player:<server.flag[discord-user_<context.user_id>.minecraft-player]>
                - group remove EsteemedPatron player:<server.flag[discord-user_<context.user_id>.minecraft-player]>
                - group remove Duke player:<server.flag[discord-user_<context.user_id>.minecraft-player]>
                - group remove GenerousDuke player:<server.flag[discord-user_<context.user_id>.minecraft-player]>
                - group remove EsteemedDuke player:<server.flag[discord-user_<context.user_id>.minecraft-player]>
                - group remove Duchess player:<server.flag[discord-user_<context.user_id>.minecraft-player]>
                - group remove GenerousDuchess player:<server.flag[discord-user_<context.user_id>.minecraft-player]>
                - group remove EsteemedDuchess player:<server.flag[discord-user_<context.user_id>.minecraft-player]>



RawRaw



Pastes made: 65491