Date: 2019/12/31 17:15:13 UTC-08: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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#GUI
skillGUI:
type: inventory
inventory: chest
title: Skill allocation
size: 45
slots:
- "[available_skill_points] [] [] [] [] [] [] [strength_skill_points] [1_strength]"
- "[] [] [] [] [] [] [] [resistance_skill_points] [1_resistance]"
- "[] [] [] [] [] [] [] [charisma_skill_points] [1_charisma]"
- "[] [] [] [] [] [] [] [intelligence_skill_points] [1_intelligence]"
- "[reset_skill_points] [] [] [] [] [] [] [] []"
#Items in GUI
available_skill_points:
type: item
material: lime_terracotta
display name: "Available skill points: <player.flag[skillpoints]>"
strength_skill_points:
type: item
material: white_terracotta
display name: "Strength points: <player.flag[strength]>"
resistance_skill_points:
type: item
material: white_terracotta
display name: "Resistance points: <player.flag[resistance]>"
charisma_skill_points:
type: item
material: white_terracotta
display name: "Charisma points: <player.flag[charisma]>"
intelligence_skill_points:
type: item
material: white_terracotta
display name: "Intelligence points: <player.flag[intelligence]>"
1_strength:
type: item
material: lime_concrete
display name: "Allocate a skill point to strength"
1_resistance:
type: item
material: lime_concrete
display name: "Allocate a skill point to resistence"
1_charisma:
type: item
material: lime_concrete
display name: "Allocate a skill point to charisma"
1_intelligence:
type: item
material: lime_concrete
display name: "Allocate a skill point to intelligence"
reset_skill_points:
type: item
material: light_blue_concrete
display name: "<blue>Reset skill points"
#GUI code
GUIcode:
type: world
events:
on player drags in skillGUI priority:100:
- determine cancelled
on player clicks in skillGUI priority:100:
- determine cancelled
on player clicks 1_strength in skillGUI:
- if <player.flag[skillpoints]> >= 0:
- if <player.flag[strength]> =< 10:
- narrate "<gree>You have aloocated a skill point to strength"
- flag player strength:++
- flag player skillpoints:-:1
- else:
- narrate "<red>You have reached the max level"
- stop
- else:
- narrate "<red>You have no skill points"
- stop
on player clicks 1_resistance in skillGUI:
- if <player.flag[skillpoints]> >= 0:
- if <player.flag[resistance]> =< 10:
- narrate "<gree>You have aloocated a skill point to resistance"
- flag player resistance:++
- flag player skillpoints:-:1
- else:
- narrate "<red>You have reached the max level"
- stop
- else:
- narrate "<red>You have no skill points"
- stop