~technomancy/tremendous-quest-iv

ref: d55ff0ad828cf954ea1b818e533edb214f4defb5 tremendous-quest-iv/sandbox/intro.fnl -rw-r--r-- 1.2 KiB
d55ff0adPhil Hagelberg Allow (wget :octo) without extension. 1 year, 1 month ago
                                                                                
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
(local play (require :play))

(local intro (lume.split "Welcome to the Tremendous Quest IV team!
We are excited to have you join this
dynamic and exciting team as you help
us deliver the fun experience that has
made TQIV the #2 fantasy MMORPG in
the world!

Unfortunately no software is perfect,
and players do from time to time come
across problems which make their TQIV
experience less enjoyable. Your job
is to help those players out and ensure
that everyone is having a great time!

Walk around with the arrows and when
you want to talk to a player hit space.

Press space to continue." "\n"))

(var offset 0)

(fn full-draw []
  (play.draw)
  (graphics.setColor 0.3 0.3 0.6)
  (graphics.rectangle :fill 10 10 330 200)
  (graphics.setColor 0.1 0.1 0.1)
  (graphics.rectangle :line 13 13 324 194)
  (graphics.setColor 0.9 0.9 0.9)
  (let [text (editor.get-prop :text [])]
    (for [i 1 13]
      (graphics.print (or (. text (+ i offset)) "") 17 (+ (* i 14) 2)))))

(fn play [] (editor.activate-mode "play"))

{:name "intro"
 :parent "base"
 :map {"space" play
       "return" play
       "escape" play
       "up" #(set offset (- offset 1))
       "down" #(set offset (+ offset 1))}
 :props {: full-draw :text intro
         :read-only true}}