diff options
Diffstat (limited to 'demo.stage')
-rw-r--r-- | demo.stage | 36 |
1 files changed, 33 insertions, 3 deletions
@@ -2,6 +2,37 @@ | |||
2 | game | 2 | game |
3 | { | 3 | { |
4 | title = "Demo game"; | 4 | title = "Demo game"; |
5 | |||
6 | command: "take" item | ||
7 | { | ||
8 | if item in situation.items then | ||
9 | { | ||
10 | player.inventory += item; | ||
11 | situation.items -= item; | ||
12 | display('''You pickup the ''' + item + | ||
13 | ''' and put it in your pocket.'''); | ||
14 | } | ||
15 | else | ||
16 | { | ||
17 | display('''You don't see anything like that here.'''); | ||
18 | } | ||
19 | } | ||
20 | |||
21 | command: "use" item | ||
22 | { | ||
23 | if not item in player.inventory then | ||
24 | { | ||
25 | display('''You don't have anything like that in your pocket.'''); | ||
26 | } | ||
27 | else | ||
28 | { | ||
29 | } | ||
30 | } | ||
31 | } | ||
32 | |||
33 | situation <<main>> | ||
34 | { | ||
35 | player.inventory = []; | ||
5 | } | 36 | } |
6 | 37 | ||
7 | function hello() | 38 | function hello() |
@@ -10,9 +41,8 @@ function hello() | |||
10 | 41 | ||
11 | situation <<start>> | 42 | situation <<start>> |
12 | { | 43 | { |
13 | // set situation end; | 44 | display('''You are here, there is a wrench sitting on the table.'''); |
14 | // push situation somethingElse; | 45 | global.command("use", |
15 | |||
16 | } | 46 | } |
17 | 47 | ||
18 | situation <<end>> | 48 | situation <<end>> |