Date: 2018/04/23 18:20:16 UTC-07:00
Type: Denizen Script
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
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 <<>title<>> <<>subtitle<>> <<>entries<>> <<>pagenumber<>>
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