forked from elanthia-online/dr-scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbetter-book.lic
More file actions
26 lines (24 loc) · 763 Bytes
/
better-book.lic
File metadata and controls
26 lines (24 loc) · 763 Bytes
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
class BetterBook
def initialize
start_book
end
def start_book
pages = []
DRC.bput('turn register to content', 'You flip', 'But a ')
fput('read register')
loop do
case get
when /(\d+) --/
pages << Regexp.last_match(1)
when /Maximum/
_respond(pages.map { |d| "<d cmd='turn register to page #{d}'>#{d}</d>" }.join(' '))
pages = []
when /You flip your deed register to page (\d+)/, /You think the item/
_respond("<d cmd='read register'>Read</d> <d cmd='tap register'>Pull</d> <d cmd='turn register to content'>Contents</d>")
when /You flip your deed register to the contents page/, /But a deed register/
fput('read register')
end
end
end
end
BetterBook.new