forked from rpherbig/dr-scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
journal.lic
34 lines (27 loc) · 909 Bytes
/
journal.lic
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
=begin
Documentation: https://elanthipedia.play.net/Lich_script_repository#journal
=end
custom_require.call(%w[common])
class WriteJournal
include DRC
def initialize
settings = get_settings
@journal_noun = settings.journal_noun
UserVars.journal_last_use ||= Time.now - 86_400
write_journal
end
def write_journal
return if Time.now - UserVars.journal_last_use < 86_400
case bput("remove my #{@journal_noun}", 'You remove', 'You detach', 'What were', 'Remove what')
when 'Remove what', 'What were'
echo 'No journal, exiting.'
exit
end
case bput("write my #{@journal_noun}", 'You write', 'Flipping to a blank page', 'Having recently written', 'As you open your', "You can't do that")
when 'You write'
UserVars.journal_last_use = Time.now
end
bput("wear my #{@journal_noun}", 'You attach', 'Wear what')
end
end
WriteJournal.new