Date: 2018/08/21 21:29:57 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
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
###Upper Management###
###The Mines###
LFMCSupervisorasn:
type: assignment
actions:
on assignment:
- trigger name:click state:true
- trigger name:chat state:true radius:5
- trigger name:proximity state:true radius:5
on enter proximity:
- if <player.has_flag[LFMCMiner].not> {
- narrate "Supervisor: Hey man, what are you doin' down 'ere? You ain't supposed to be down here!"
- wait 3
- teleport <player> 139,70,11,map
}
- if <player.has_flag[LFMCMiner]> {
- narrate "Supervisor: 'Bout time! We got a lot of work to do down here! Come over here and we can get started!"
}
on click:
- narrate "Supervisor: Don't be lolly gaggin'! This ore ain't gonna mine itself!"
- wait 1
- inventory open d:in@LFMCMiningInv
LFMCMiningHandler:
type: world
events:
on player clicks in LFMCMiningInv:
- determine cancelled
on player drags in LFMCMiningInv:
- determine cancelled
on player clicks LFMCMiningIt in LFMCMiningInv:
- if <player.food_level> <= 15 {
- narrate "You're too fatigued to work. Eat some food first."
- queue clear
}
- if <player.has_flag[LFMCMinerShift].not> {
- flag player LFMCMinerShift
- flag player LFMCMinerShiftDay:<util.date>
- flag player LFMCMinerShiftHour:<util.date.time.hour>
- narrate "Supervisor: Man, they'll hire anyone these days... Well, pick up a pick-axe and get to it!"
- wait 2
- cast BLINDNESS <player> d:5s
- playsound <player> sound:BLOCK_ANVIL_USE
- wait 4
- teleport <player> 139,70,11,map
- adjust <player> food_level:5
- narrate "Exhausted by the end of it, you complete your first shift in the mines. For your work you receive: $150!"
- money give quantity:150
- flag player LFMCMiner:+:1
- queue clear
}
- if <player.flag[LFMCMinerShiftDay]> != <util.date> && <util.date.time.hour> >= <player.flag[LFMCMinerShiftHour]> {
- flag player LFMCMinerShiftDay:<util.date>
- flag player LFMCMinerShiftHour:<util.date.time.hour>
- narrate "Supervisor: Back for more 'eh! I like the enthusiasm...NOW GET TO WORK!"
- wait 2
- cast BLINDNESS <player> d:5s
- playsound <player> sound:BLOCK_ANVIL_USE
- wait 4
- teleport <player> 139,70,11,map
- adjust <player> food_level:5
- narrate "Though tired, your shift is finished. For your work you receive: $<player.flag[LFMCMiner].add[150]>!"
- money give quantity:<player.flag[LFMCMiner].add[150]>
- flag player LFMCMiner:+:1
- queue clear
} else {
- narrate "Supervisor: You've already worked your shift! No overtime!"
- if <util.date> == <player.flag[LFMCMinerShiftDay]> {
- define day 24
- narrate "Supervisor: Come back in <def[day].add[<player.flag[LFMCMinerShiftHour]>].min[<util.date.time.hour>]> hours."
- queue clear
} else {
- narrate "Supervisor: Come back in <util.date.time.hour.min[<player.flag[LFMCMinerShiftHour]>]> hours."
- queue clear
}
- queue clear
}
LFMCMiningIt:
type: item
material: writable_book
display name: Work The Mines
lore:
- "Time to put in a shift"
- "in the mines!"
- "Click here to start this"
- "job."
- "Can be done once per day."
- "Pay: $150"
LFMCMiningInv:
type: inventory
title: Time to get to work!
size: 9
slots:
- "[i@LFMCMiningIt] [] [] [] [] [] [] [] []"