- 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


TitleSmelly's tutorial script is borked and the world is weeping
TypeDenizen Script
Date2018/04/23 18:20: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
5900
npc_judge_assignment:
    type: assignment
    actions:
        on assignment:
        - trigger name:click state:true
        - trigger name:chat state:true
        #- trigger name:proximity state:true
        #on move proximity:
        #- look <npc> <player.location>
    interact scripts:
    - 10 npc_judge_interact
    
paginate_command:
    type: command
    name: paginate
    description: For internal use only.
    usage: /paginate <&lt>title<&gt> <&lt>subtitle<&gt> <&lt>entries<&gt> <&lt>pagenumber<&gt>
    permission: smellycraft.paginate.manual
    permission message: Sorry, this command is run by NPC characters only.
    allowed help:
    - determine <player.is_op||<context.server>>
    tab complete:
    - if !<player.is_op||<context.server>> queue clear
    script:
    - define script 'smellycraft'
    - define title <context.args.get[1]>
    - define subtitle <context.args.get[2]>
    - define entries <context.args.get[3]>
    - define page <context.args.get[4]>
    - define command 'paginate %title% %subtitle% %entries%'
    - define pageWidth 44
    - define pageHeight 7
    - run s@msgBoxed 'def:%script%|%title%|%subTitle%|%command%|%page%|%pageWidth%|%pageHeight%|%entries%'
    
npc_judge_interact:
    type: interact
    steps:
        1:
            click trigger:
                script:
                #if player is rank default
                - if <player.in_group[default]> {
                  #Short, and runs properly:
                  - define entries '"short and works"'
                  
                  # Long, and breaks as a result:
                  #- define entries '"Welcome to Legitimus, <player.name>.  Everyone has been informed of your arrival, and we are glad to have you here.|We need you to agree to our most basic laws before you will be issued a Visa for travel beyond these city walls.|Are you ready to take your oaths?  We should need five minutes for this.|<proc[msgChat].context[<&e>Yes|take my oath|Proceed with oaths]>|<proc[msgChat].context[<&e>No|I would like to look around more.|Wait until later]>|<proc[msgHover].context[Explanation|A brief tutorial on our rules precedes access to the whole server.]>"'
                  
                #catoChat will track what has already been said to the player by Judge Cato and allow for more thoughtful interactions.
                  - flag player catoChat:->:intro
                }
                #if player has agreed to rules
                - if <player.in_group[default].not> {
                  - define entries 'Hello again <player.name>.  Is there something I can do for you?|<proc[msgChat].context[Nothing yet!|No, not yet!|TODO: Make Judge Cato more helpful.]>'
                }
                - execute as_player "paginate 'Cato the Younger' 'Provincial Judge' '%entries%' 1"

# Chat triggers have been removed from the paste as irrelevant



RawRaw



Pastes made: 59170