Date: 2019/01/31 10:59:19 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
Normal Experience Drop Cancelation:
type: world
debug: false
events:
on entity death:
- determine NO_XP
Skills Check:
type: command
debug: false
name: skills
usage: /skills
description: Gain access to your skills through this chat-menu.
aliases:
- skill
- sk
script:
- if <player.flag[race]> == human:
- if <player.flag[level]> < 3:
- narrate "<&6><&l>[<&e>TDPO Levels<&6><&l>] <&7>You currently have <&c>no skills<&7> unlocked! You must reach level 3 to unlock your first skill."
- if <player.flag[level]> >= 3:
- narrate "<&7><&m>-----------------------------------------------"
- narrate "<&7> Hover over the skill name to read more about it!"
- narrate "<&7><>> <&b>Level 3 Skill: <proc[msgHover].context[<&3>Mana Blast!|<&3>Mana Blast: <&f>Send a bolt of mana outwards at your enemies, dealing damage and slowing them for a few moments!]><&7> <<> <&b>/c bind <&dq>Mana Bolt<&dq>"
- if <player.flag[level]> >= 12:
- narrate "<&7><>> <&b>Level 12 Skill: <proc[msgHover].context[<&c>N/A|<&c>This ability is unavailable.]> <&7><<>"
- if <player.flag[level]> >= 25:
- narrate "<&7><>> <&b>Level 25 Skill: <proc[msgHover].context[<&c>N/A|<&c>This ability is unavailable.]> <&7><<>"
- if <player.flag[level]> >= 40:
- narrate "<&7><>> <&b>Level 40 Skill: <proc[msgHover].context[<&c>N/A|<&c>This ability is unavailable.]> <&7><<>"
- if <player.flag[level]> >= 65:
- narrate "<&7><>> <&b>Level 65 Skill: <proc[msgHover].context[<&c>N/A|<&c>This ability is unavailable.]> <&7><<>"
- if <player.flag[level]> >= 90:
- narrate "<&7><>> <&b>Level 90 Skill: <proc[msgHover].context[<&c>N/A|<&c>This ability is unavailable.]> <&7><<>"
- narrate "<&7><&m>-----------------------------------------------"
Level Check:
type: command
debug: false
name: level
aliases:
- lvl
script:
- narrate "<&b>Level: <&a><pl.flag[level]>"
- narrate "<&a>Experience: <&b><pl.flag[experience].round_up>/<pl.flag[experience_needed].round_up>"
Set Experience:
type: world
debug: false
events:
on player joins:
- if "<pl.has_flag[level]>":
- queue clear
- flag "<pl>" "level:1"
- flag "<pl>" "experience:0"
- flag "<pl>" "experience_needed:100"
Gain:
type: task
debug: false
definitions: gain_value
script:
- flag player experience:+:<def[gain_value]>
- while "<pl.flag[experience]>" >= "<pl.flag[experience_needed]>":
- flag "<pl>" "experience:<pl.flag[experience].sub[<pl.flag[experience_needed]>]>"
- flag "<pl>" "level:++"
- if <list[3|12|25|40|65|90]> contains <player.flag[level]>:
- execute as_server "c forcecast <player.name> Level-Unlock_MSG"
- if <player.has_flag[human]>:
- execute as_server "c forcecast <player.name> Level-Unlock_MSG"
- queue clear
- if <player.has_flag[moonshadow]>:
- execute as_server "c forcecast <player.name> Level-Unlock_MSG"
- queue clear
- if <player.has_flag[sunfire]>:
- execute as_server "c forcecast <player.name> Level-Unlock_MSG"
- queue clear
- if <player.has_flag[starshine]>:
- execute as_server "c forcecast <player.name> Level-Unlock_MSG"
- queue clear
- if <player.has_flag[skywing]>:
- execute as_server "c forcecast <player.name> Level-Unlock_MSG"
- queue clear
- if <player.has_flag[oceanwave]>:
- execute as_server "c forcecast <player.name> Level-Unlock_MSG"
- queue clear
- if <player.has_flag[earthland]>:
- execute as_server "c forcecast <player.name> Level-Unlock_MSG"
- queue clear
- if <player.has_flag[dragonoid]>:
- execute as_server "c forcecast <player.name> Level-Unlock_MSG"
- queue clear
- if <player.has_flag[vampire]>:
- execute as_server "c forcecast <player.name> Level-Unlock_MSG"
- queue clear
- if <player.has_flag[lycan]>:
- execute as_server "c forcecast <player.name> Level-Unlock_MSG"
- queue clear
- flag player experience_needed:<player.flag[experience_needed].mul[1.25].round_up>
- playsound "<pl>" "sound:ENTITY_PLAYER_LEVELUP"
- actionbar "<&a>Experience: <&b><pl.flag[experience].round_up><&a>/<&b><pl.flag[experience_needed].round_up> <&b>| <&a>LVL: <&b><pl.flag[level]>"
Lose25:
type: task
debug: false
script:
- flag player experience:-:25
- actionbar "<&a>Experience: <&b><pl.flag[experience].round_up><&a>/<&b> <pl.flag[experience_needed].round_up> <&b>| <&a>LVL: <&b><pl.flag[level]>"
Gain XP:
type: world
debug: false
events:
on player kills entity:
- choose <context.entity.entity_type>:
- case SHEEP PIG COW CHICKEN:
- run Gain def:3 instantly
- case HORSE COW OCELOT LLAMA:
- run Gain def:5 instantly
- case BLAZE ZOMBIE SKELETON SPIDER CREEPER WITCH:
- run Gain def:10 instantly
on player dies:
- inject Lose25