Repository navigation
Expand file tree
/
Copy pathScripts.cpp
More file actions
6580 lines (5549 loc) · 178 KB
/
Copy pathScripts.cpp
File metadata and controls
6580 lines (5549 loc) · 178 KB
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#ifndef SCRIPTS_H
#define SCRIPTS_H
#include "Script.h"
#include <algorithm>
extern scriptclass script;
void scriptclass::load(std::string t)
{
//loads script name t into the array
position = 0;
scriptlength=0;
running = true;
int maxlength = (std::min(int(t.length()),7));
std::string customstring="";
for(int i=0; i<maxlength; i++){
customstring+=t[i];
}
if (customstring == "custom_"){
//this magic function breaks down the custom script and turns into real scripting!
std::string cscriptname="";
for(size_t i=0; i<t.length(); i++){
if(i>=7) cscriptname+=t[i];
}
int scriptstart=-1;
int scriptend=-1;
std::string tstring;
for(size_t i=0; i<customscript.size(); i++){
if(scriptstart==-1){
//Find start of the script
if(script.customscript[i]==cscriptname+":"){
scriptstart=i+1;
}
}else if(scriptend==-1){
//Find the end
tstring=script.customscript[i];
tstring=tstring[tstring.size()-1];
if(tstring==":"){
scriptend=i;
}
}
}
if(scriptstart>-1){
if(scriptend==-1){
scriptend=customscript.size();
}
//Ok, we've got the relavent script segment, we do a pass to assess it, then run it!
int customcutscenemode=0;
for(int i=scriptstart; i<scriptend; i++){
tokenize(script.customscript[i]);
if(words[0] == "say"){
customcutscenemode=1;
}else if(words[0] == "reply"){
customcutscenemode=1;
}
}
if(customcutscenemode==1){
add("cutscene()");
add("untilbars()");
}
int customtextmode=0;
int speakermode=0; //0, terminal, numbers for crew
int squeakmode=0;//default on
//Now run the script
for(int i=scriptstart; i<scriptend; i++){
words[0]="nothing"; //Default!
words[1]="1"; //Default!
tokenize(script.customscript[i]);
std::transform(words[0].begin(), words[0].end(), words[0].begin(), ::tolower);
if(words[0] == "music"){
if(customtextmode==1){ add("endtext"); customtextmode=0;}
if(words[1]=="0"){
tstring="stopmusic()";
}else{
if(words[1]=="11"){ tstring="play(14)";
}else if(words[1]=="10"){ tstring="play(13)";
}else if(words[1]=="9"){ tstring="play(12)";
}else if(words[1]=="8"){ tstring="play(11)";
}else if(words[1]=="7"){ tstring="play(10)";
}else if(words[1]=="6"){ tstring="play(8)";
}else if(words[1]=="5"){ tstring="play(6)";
}else { tstring="play("+words[1]+")"; }
}
add(tstring);
}else if(words[0] == "playremix"){
add("play(15)");
}else if(words[0] == "flash"){
if(customtextmode==1){ add("endtext"); customtextmode=0;}
add("flash(5)");
add("shake(20)");
add("playef(9,10)");
}else if(words[0] == "sad" || words[0] == "cry"){
if(customtextmode==1){ add("endtext"); customtextmode=0;}
if(words[1]=="player"){
add("changemood(player,1)");
}else if(words[1]=="cyan" || words[1]=="viridian" || words[1]=="1"){
add("changecustommood(customcyan,1)");
}else if(words[1]=="purple" || words[1]=="violet" || words[1]=="pink" || words[1]=="2"){
add("changecustommood(purple,1)");
}else if(words[1]=="yellow" || words[1]=="vitellary" || words[1]=="3"){
add("changecustommood(yellow,1)");
}else if(words[1]=="red" || words[1]=="vermilion" || words[1]=="4"){
add("changecustommood(red,1)");
}else if(words[1]=="green" || words[1]=="verdigris" || words[1]=="5"){
add("changecustommood(green,1)");
}else if(words[1]=="blue" || words[1]=="victoria" || words[1]=="6"){
add("changecustommood(blue,1)");
}else if(words[1]=="all" || words[1]=="everybody" || words[1]=="everyone"){
add("changemood(player,1)");
add("changecustommood(customcyan,1)");
add("changecustommood(purple,1)");
add("changecustommood(yellow,1)");
add("changecustommood(red,1)");
add("changecustommood(green,1)");
add("changecustommood(blue,1)");
}else{
add("changemood(player,1)");
}
if(squeakmode==0) add("squeak(cry)");
}else if(words[0] == "happy"){
if(customtextmode==1){ add("endtext"); customtextmode=0;}
if(words[1]=="player"){
add("changemood(player,0)");
if(squeakmode==0) add("squeak(player)");
}else if(words[1]=="cyan" || words[1]=="viridian" || words[1]=="1"){
add("changecustommood(customcyan,0)");
if(squeakmode==0) add("squeak(player)");
}else if(words[1]=="purple" || words[1]=="violet" || words[1]=="pink" || words[1]=="2"){
add("changecustommood(purple,0)");
if(squeakmode==0) add("squeak(purple)");
}else if(words[1]=="yellow" || words[1]=="vitellary" || words[1]=="3"){
add("changecustommood(yellow,0)");
if(squeakmode==0) add("squeak(yellow)");
}else if(words[1]=="red" || words[1]=="vermilion" || words[1]=="4"){
add("changecustommood(red,0)");
if(squeakmode==0) add("squeak(red)");
}else if(words[1]=="green" || words[1]=="verdigris" || words[1]=="5"){
add("changecustommood(green,0)");
if(squeakmode==0) add("squeak(green)");
}else if(words[1]=="blue" || words[1]=="victoria" || words[1]=="6"){
add("changecustommood(blue,0)");
if(squeakmode==0) add("squeak(blue)");
}else if(words[1]=="all" || words[1]=="everybody" || words[1]=="everyone"){
add("changemood(player,0)");
add("changecustommood(customcyan,0)");
add("changecustommood(purple,0)");
add("changecustommood(yellow,0)");
add("changecustommood(red,0)");
add("changecustommood(green,0)");
add("changecustommood(blue,0)");
}else{
add("changemood(player,0)");
if(squeakmode==0) add("squeak(player)");
}
}else if(words[0] == "squeak"){
if(customtextmode==1){ add("endtext"); customtextmode=0;}
if(words[1]=="player"){
add("squeak(player)");
}else if(words[1]=="cyan" || words[1]=="viridian" || words[1]=="1"){
add("squeak(player)");
}else if(words[1]=="purple" || words[1]=="violet" || words[1]=="pink" || words[1]=="2"){
add("squeak(purple)");
}else if(words[1]=="yellow" || words[1]=="vitellary" || words[1]=="3"){
add("squeak(yellow)");
}else if(words[1]=="red" || words[1]=="vermilion" || words[1]=="4"){
add("squeak(red)");
}else if(words[1]=="green" || words[1]=="verdigris" || words[1]=="5"){
add("squeak(green)");
}else if(words[1]=="blue" || words[1]=="victoria" || words[1]=="6"){
add("squeak(blue)");
}else if(words[1]=="cry" || words[1]=="sad"){
add("squeak(cry)");
}else if(words[1]=="on"){
squeakmode=0;
}else if(words[1]=="off"){
squeakmode=1;
}
}else if(words[0] == "delay"){
if(customtextmode==1){ add("endtext"); customtextmode=0;}
add(script.customscript[i]);
}else if(words[0] == "flag"){
if(customtextmode==1){ add("endtext"); customtextmode=0;}
add(script.customscript[i]);
}else if(words[0] == "map"){
if(customtextmode==1){ add("endtext"); customtextmode=0;}
add("custom"+script.customscript[i]);
}else if(words[0] == "warpdir"){
if(customtextmode==1){ add("endtext"); customtextmode=0;}
add(script.customscript[i]);
}else if(words[0] == "ifwarp"){
if(customtextmode==1){ add("endtext"); customtextmode=0;}
add(script.customscript[i]);
}else if(words[0] == "iftrinkets"){
if(customtextmode==1){ add("endtext"); customtextmode=0;}
add("custom"+script.customscript[i]);
}else if(words[0] == "ifflag"){
if(customtextmode==1){ add("endtext"); customtextmode=0;}
add("custom"+script.customscript[i]);
}else if(words[0] == "iftrinketsless"){
if(customtextmode==1){ add("endtext"); customtextmode=0;}
add("custom"+script.customscript[i]);
}else if(words[0] == "destroy"){
if(customtextmode==1){ add("endtext"); customtextmode=0;}
if(words[1]=="gravitylines"){
add("destroy(gravitylines)");
}else if(words[1]=="warptokens"){
add("destroy(warptokens)");
}else if(words[1]=="platforms"){
add("destroy(platforms)");
}
}else if(words[0] == "speaker"){
speakermode=0;
if(words[1]=="gray" || words[1]=="grey" || words[1]=="terminal" || words[1]=="0") speakermode=0;
if(words[1]=="cyan" || words[1]=="viridian" || words[1]=="player" || words[1]=="1") speakermode=1;
if(words[1]=="purple" || words[1]=="violet" || words[1]=="pink" || words[1]=="2") speakermode=2;
if(words[1]=="yellow" || words[1]=="vitellary" || words[1]=="3") speakermode=3;
if(words[1]=="red" || words[1]=="vermilion" || words[1]=="4") speakermode=4;
if(words[1]=="green" || words[1]=="verdigris" || words[1]=="5") speakermode=5;
if(words[1]=="blue" || words[1]=="victoria" || words[1]=="6") speakermode=6;
}else if(words[0] == "say"){
//Speakers!
if(words[2]=="terminal" || words[2]=="gray" || words[2]=="grey" || words[2]=="0") speakermode=0;
if(words[2]=="cyan" || words[2]=="viridian" || words[2]=="player" || words[2]=="1") speakermode=1;
if(words[2]=="purple" || words[2]=="violet" || words[2]=="pink" || words[2]=="2") speakermode=2;
if(words[2]=="yellow" || words[2]=="vitellary" || words[2]=="3") speakermode=3;
if(words[2]=="red" || words[2]=="vermilion" || words[2]=="4") speakermode=4;
if(words[2]=="green" || words[2]=="verdigris" || words[2]=="5") speakermode=5;
if(words[2]=="blue" || words[2]=="victoria" || words[2]=="6") speakermode=6;
switch(speakermode){
case 0:
if(squeakmode==0) add("squeak(terminal)");
add("text(gray,0,114,"+words[1]+")");
break;
case 1: //NOT THE PLAYER
if(squeakmode==0) add("squeak(cyan)");
add("text(cyan,0,0,"+words[1]+")");
break;
case 2:
if(squeakmode==0) add("squeak(purple)");
add("text(purple,0,0,"+words[1]+")");
break;
case 3:
if(squeakmode==0) add("squeak(yellow)");
add("text(yellow,0,0,"+words[1]+")");
break;
case 4:
if(squeakmode==0) add("squeak(red)");
add("text(red,0,0,"+words[1]+")");
break;
case 5:
if(squeakmode==0) add("squeak(green)");
add("text(green,0,0,"+words[1]+")");
break;
case 6:
if(squeakmode==0) add("squeak(blue)");
add("text(blue,0,0,"+words[1]+")");
break;
}
int ti=atoi(words[1].c_str());
if(ti>=0 && ti<=50){
for(int ti2=0; ti2<ti; ti2++){
i++; add(script.customscript[i]);
}
}else{
i++; add(script.customscript[i]);
}
switch(speakermode){
case 0: add("customposition(center)"); break;
case 1: add("customposition(cyan,above)"); break;
case 2: add("customposition(purple,above)"); break;
case 3: add("customposition(yellow,above)"); break;
case 4: add("customposition(red,above)"); break;
case 5: add("customposition(green,above)"); break;
case 6: add("customposition(blue,above)"); break;
}
add("speak_active");
customtextmode=1;
}else if(words[0] == "reply"){
//For this version, terminal only
if(squeakmode==0) add("squeak(player)");
add("text(cyan,0,0,"+words[1]+")");
int ti=atoi(words[1].c_str());
if(ti>=0 && ti<=50){
for(int ti2=0; ti2<ti; ti2++){
i++; add(script.customscript[i]);
}
}else{
i++; add(script.customscript[i]);
}
add("position(player,above)");
add("speak_active");
customtextmode=1;
}
}
if(customtextmode==1){ add("endtext"); customtextmode=0;}
if(customcutscenemode==1){
add("endcutscene()");
add("untilbars()");
}
}
}
else if (t == "intro")
{
add("ifskip(quickstart)");
//add("createcrewman(232,113,cyan,0,faceright)");
add("createcrewman(96,177,green,0,faceright)");
add("createcrewman(122,177,purple,0,faceleft)");
add("fadein()");
add("untilfade()");
add("delay(90)");
add("flash(5)");
add("shake(20)");
add("playef(9,10)");
add("musicfadeout()");
add("changemood(player,1)");
add("delay(15)");
add("squeak(player)");
add("text(cyan,0,0,1)");
add("Uh oh...");
add("position(player,above)");
//add("backgroundtext");
add("speak_active");
add("squeak(purple)");
add("changeai(purple,followposition,175)");
add("text(purple,145,150,1)");
add("Is everything ok?");
//add("position(purple,above)");
//add("backgroundtext");
add("speak_active");
add("squeak(player)");
add("walk(left,2)");
add("text(cyan,0,0,2)");
add("No! We've hit some");
add("kind of interference...");
add("position(player,above)");
//add("backgroundtext");
add("speak_active");
//add("delay(30)");
add("endtext");
add("flash(5)");
add("shake(50)");
add("playef(9,10)");
add("changemood(green,1)");
add("changemood(purple,1)");
add("alarmon");
add("changedir(player,1)");
add("delay(30)");
add("endtext");
add("squeak(player)");
add("text(cyan,0,0,2)");
add("Something's wrong! We're");
add("going to crash!");
add("position(player,above)");
//add("backgroundtext");
add("speak_active");
//add("delay(100)");
add("endtext");
add("flash(5)");
add("shake(50)");
add("playef(9,10)");
add("changeai(green,followposition,-60)");
add("changeai(purple,followposition,-60)");
add("squeak(player)");
add("text(cyan,70,140,1)");
add("Evacuate!");
add("backgroundtext");
add("speak_active");
add("walk(left,35)");
add("endtextfast");
//Ok, next room!
add("flash(5)");
add("shake(50)");
add("playef(9,10)");
add("gotoroom(3,10)");
add("gotoposition(310,177,0)");
add("createcrewman(208,177,green,1,followposition,120)");
add("createcrewman(240,177,purple,1,followposition,120)");
add("createcrewman(10,177,blue,1,followposition,180)");
add("squeak(blue)");
add("text(blue,80,150,1)");
add("Oh no!");
add("backgroundtext");
add("speak_active");
add("walk(left,20)");
add("endtextfast");
//and the next!
add("flash(5)");
add("shake(50)");
add("playef(9,10)");
add("gotoroom(3,11)");
add("gotoposition(140,0,0)");
add("createcrewman(90,105,green,1,followblue)");
add("createcrewman(125,105,purple,1,followgreen)");
add("createcrewman(55,105,blue,1,followposition,-200)");
add("createcrewman(120,177,yellow,1,followposition,-200)");
add("createcrewman(240,177,red,1,faceleft)");
add("delay(5)");
add("changeai(red,followposition,-200)");
add("squeak(red)");
add("text(red,100,150,1)");
add("Everyone off the ship!");
add("backgroundtext");
add("speak_active");
add("walk(left,25)");
add("endtextfast");
//final room:
add("flash(5)");
add("shake(80)");
add("playef(9,10)");
add("gotoroom(2,11)");
add("gotoposition(265,153,0)");
add("createcrewman(130,153,blue,1,faceleft)");
add("createcrewman(155,153,green,1,faceleft)");
add("createcrewman(180,153,purple,1,faceleft)");
add("createcrewman(205,153,yellow,1,faceleft)");
add("createcrewman(230,153,red,1,faceleft)");
add("squeak(yellow)");
add("text(yellow,0,0,1)");
add("This shouldn't be happening!");
add("position(yellow,below)");
add("backgroundtext");
add("speak_active");
add("activateteleporter()");
add("delay(10)");
add("changecolour(blue,teleporter)");
add("delay(10)");
add("changecolour(green,teleporter)");
add("delay(10)");
add("changecolour(purple,teleporter)");
add("delay(10)");
add("changecolour(yellow,teleporter)");
add("delay(10)");
add("changecolour(red,teleporter)");
add("delay(10)");
//and teleport!
add("endtext");
add("alarmoff");
add("flash(5)");
add("shake(20)");
add("playef(10,10)");
add("blackout()");
add("changemood(player,0)");
add("changedir(player,1)");
add("delay(100)");
add("blackon()");
add("shake(20)");
add("playef(10,10)");
//Finally, appear at the start of the game:
add("gotoroom(13,5)");
add("gotoposition(80,96,0)");
add("walk(right,20)");
//add("delay(45)");
add("squeak(player)");
add("text(cyan,0,0,1)");
add("Phew! That was scary!");
add("position(player,above)");
add("speak_active");
add("squeak(player)");
add("text(cyan,0,0,2)");
add("At least we all");
add("escaped, right guys?");
add("position(player,above)");
add("speak_active");
add("endtext");
add("delay(45)");
add("walk(left,3)");
add("delay(45)");
add("setcheckpoint()");
add("squeak(player)");
add("text(cyan,0,0,1)");
add("...guys?");
add("position(player,above)");
add("speak_active");
add("endtext");
add("delay(25)");
add("changemood(player,1)");
add("squeak(cry)");
add("delay(25)");
add("play(1)");
add("endcutscene()");
add("untilbars()");
add("hideship()");
add("gamestate(4)");
}
else if (t == "quickstart")
{
//Finally, appear at the start of the game:
add("gotoroom(13,5)");
add("gotoposition(80,96,0)");
add("walk(right,17)");
add("fadein()");
add("setcheckpoint()");
add("play(1)");
add("endcutscene()");
add("untilbars()");
add("hideship()");
}
else if (t == "firststeps")
{
add("cutscene()");
add("untilbars()");
add("squeak(player)");
add("text(cyan,0,0,2)");
add("I wonder why the ship");
add("teleported me here alone?");
add("position(player,above)");
add("speak_active");
add("squeak(cry)");
add("text(cyan,0,0,2)");
add("I hope everyone else");
add("got out ok...");
add("position(player,above)");
add("speak_active");
add("endtext");
add("endcutscene()");
add("untilbars()");
}
else if (t == "trenchwarfare")
{
add("cutscene()");
add("untilbars()");
add("iftrinkets(1,newtrenchwarfare)");
add("squeak(player)");
add("text(cyan,0,0,1)");
add("Ohh! I wonder what that is?");
add("position(player,above)");
add("speak_active");
add("squeak(player)");
add("text(cyan,0,0,3)");
add("I probably don't really need it,");
add("but it might be nice to take it");
add("back to the ship to study...");
add("position(player,above)");
add("speak_active");
add("endtext");
add("endcutscene()");
add("untilbars()");
}
else if (t == "newtrenchwarfare")
{
add("squeak(player)");
add("text(cyan,0,0,2)");
add("Oh! It's another one of");
add("those shiny things!");
add("position(player,above)");
add("speak_active");
add("squeak(player)");
add("text(cyan,0,0,3)");
add("I probably don't really need it,");
add("but it might be nice to take it");
add("back to the ship to study...");
add("position(player,above)");
add("speak_active");
add("endtext");
add("endcutscene()");
add("untilbars()");
}
else if (t == "trinketcollector")
{
add("cutscene()");
add("untilbars()");
add("iftrinkets(1,newtrinketcollector)");
add("squeak(player)");
add("text(cyan,0,0,3)");
add("This seems like a good");
add("place to store anything");
add("I find out there...");
add("position(player,above)");
add("speak_active");
add("squeak(player)");
add("text(cyan,0,0,3)");
add("Victoria loves to study the");
add("interesting things we find");
add("on our adventures!");
add("position(player,above)");
add("speak_active");
add("ifcrewlost(5,new2trinketcollector)");
add("endtext");
add("endcutscene()");
add("untilbars()");
}
else if (t == "newtrinketcollector")
{
add("squeak(player)");
add("text(cyan,0,0,3)");
add("This seems like a good");
add("place to store those");
add("shiny things.");
add("position(player,above)");
add("speak_active");
add("squeak(player)");
add("text(cyan,0,0,3)");
add("Victoria loves to study the");
add("interesting things we find");
add("on our adventures!");
add("position(player,above)");
add("speak_active");
add("ifcrewlost(5,new2trinketcollector)");
add("endtext");
add("endcutscene()");
add("untilbars()");
}
else if (t == "new2trinketcollector")
{
add("squeak(cry)");
add("changemood(player,1)");
add("text(cyan,0,0,1)");
add("I hope she's ok...");
add("position(player,above)");
add("speak_active");
add("endtext");
add("changemood(player,0)");
add("endcutscene()");
add("untilbars()");
return;
}
if (t == "communicationstation")
{
add("ifskip(communicationstationskip)");
add("cutscene()");
add("untilbars()");
add("changemood(player,0)");
add("tofloor");
add("play(5)");
add("delay(10)");
add("squeak(player)");
add("text(cyan,0,0,1)");
add("Violet! Is that you?");
add("position(player,above)");
add("speak_active");
add("endtext");
add("squeak(purple)");
add("text(purple,45,18,1)");
add("Captain! You're ok!");
add("speak_active");
add("squeak(cry)");
add("text(purple,20,16,3)");
add("Something has gone");
add("horribly wrong with the");
add("ship's teleporter!");
add("speak_active");
add("squeak(purple)");
add("text(purple,8,14,3)");
add("I think everyone has been");
add("teleported away randomly!");
add("They could be anywhere!");
add("speak_active");
add("squeak(cry)");
add("changemood(player,1)");
add("text(cyan,0,0,1)");
add("Oh no!");
add("position(player,above)");
add("speak_active");
add("squeak(purple)");
add("text(purple,10,19,2)");
add("I'm on the ship - it's damaged");
add("badly, but it's still intact!");
add("speak_active");
add("squeak(purple)");
add("text(purple,10,15,1)");
add("Where are you, Captain?");
add("speak_active");
add("squeak(player)");
add("changemood(player,0)");
add("text(cyan,0,0,3)");
add("I'm on some sort of");
add("space station... It");
add("seems pretty modern...");
add("position(player,above)");
add("speak_active");
add("squeak(purple)");
add("text(purple,15,16,2)");
add("There seems to be some sort of");
add("interference in this dimension...");
add("speak_active");
add("hideteleporters()");
add("endtextfast");
add("delay(10)");
//add map mode here and wrap up...
add("gamemode(teleporter)");
add("delay(20)");
add("squeak(purple)");
add("text(purple,25,205,2)");
add("I'm broadcasting the coordinates");
add("of the ship to you now.");
add("speak_active");
add("endtext");
add("squeak(terminal)");
add("showship()");
add("delay(10)");
add("hideship()");
add("delay(10)");
add("showship()");
add("delay(10)");
add("hideship()");
add("delay(10)");
add("showship()");
add("delay(20)");
add("squeak(purple)");
add("text(purple,10,200,1)");
add("I can't teleport you back, but...");
add("speak_active");
add("squeak(purple)");
add("text(purple,25,195,3)");
add("If YOU can find a teleporter");
add("anywhere nearby, you should be");
add("able to teleport back to me!");
add("speak_active");
add("endtext");
add("squeak(terminal)");
add("delay(20)");
add("showteleporters()");
add("delay(10)");
add("hideteleporters()");
add("delay(10)");
add("showteleporters()");
add("delay(10)");
add("hideteleporters()");
add("delay(10)");
add("showteleporters()");
add("delay(20)");
add("squeak(player)");
add("text(cyan,20,190,1)");
add("Ok! I'll try to find one!");
add("speak_active");
add("endtext");
add("delay(20)");
add("gamemode(game)");
add("delay(20)");
add("squeak(purple)");
add("text(purple,40,22,1)");
add("Good luck, Captain!");
add("speak_active");
add("endtext");
add("squeak(purple)");
add("text(purple,10,19,2)");
add("I'll keep trying to find");
add("the rest of the crew...");
add("speak_active");
add("endtext");
add("endcutscene()");
add("untilbars()");
add("play(1)");
}
else if (t == "communicationstationskip")
{
add("changemood(player,0)");
add("delay(10)");
add("endtext");
//add map mode here and wrap up...
add("gamemode(teleporter)");
add("delay(5)");
add("squeak(terminal)");
add("showship()");
add("showteleporters()");
add("delay(10)");
add("hideship()");
add("hideteleporters()");
add("delay(10)");
add("showship()");
add("showteleporters()");
add("delay(10)");
add("hideship()");
add("hideteleporters()");
add("delay(10)");
add("showship()");
add("showteleporters()");
add("delay(20)");
add("gamemode(game)");
}
else if (t == "teleporterback")
{
add("cutscene()");
add("untilbars()");
add("squeak(player)");
add("text(cyan,0,0,1)");
add("A teleporter!");
add("position(player,above)");
add("speak_active");
add("squeak(player)");
add("text(cyan,0,0,2)");
add("I can get back to the");
add("ship with this!");
add("position(player,above)");
add("speak_active");
add("endtext");
add("teleportscript(levelonecomplete)");
add("endcutscene()");
add("untilbars()");
}
else if (t == "levelonecomplete")
{
add("nocontrol()");
add("createcrewman(230,153,purple,0,faceleft)");
add("cutscene()");
add("untilbars()");
add("delay(30)");
add("rescued(purple)");
add("delay(10)");
add("gamestate(4090)");
}
else if (t == "levelonecomplete_ending")
{
add("squeak(purple)");
add("text(purple,0,0,1)");
add("Captain!");
add("position(purple,above)");
add("speak_active");
add("endtext");
add("nocontrol()");
add("endcutscene()");
add("untilbars()");
add("gamestate(3050)");
}
else if (t == "levelonecompleteskip")
{
add("nocontrol()");
add("gamestate(3050)");
}
else if (t == "bigopenworld")
{
add("play(5)");
add("cutscene()");
add("untilbars()");
add("gotoroom(4,10)");
add("gotoposition(100,177,0)");
add("createcrewman(150,177,purple,0,faceleft)");
//set all the crew as rescued to avoid companion issues!
add("rescued(red)");
add("rescued(green)");
add("rescued(blue)");
add("rescued(yellow)");
add("fadein()");
add("untilfade()");
add("delay(15)");
add("squeak(player)");
add("text(player,0,0,2)");
add("So, Doctor - have you any");
add("idea what caused the crash?");
add("position(player,above)");
add("speak_active");
add("squeak(purple)");
add("text(purple,0,0,3)");
add("There's some sort of bizarre");
add("signal here that's interfering");
add("with our equipment...");
add("position(purple,above)");
add("speak_active");
add("squeak(purple)");
add("text(purple,0,0,3)");
add("It caused the ship to lose");
add("its quantum position, collapsing");
add("us into this dimension!");
add("position(purple,above)");
add("speak_active");
add("squeak(cry)");
add("changemood(player,1)");
add("text(player,0,0,1)");
add("Oh no!");
add("position(player,above)");
add("speak_active");
add("squeak(purple)");
add("text(purple,0,0,2)");
add("But I think we should be able to fix");
add("the ship and get out of here...");
add("position(purple,above)");
add("speak_active");
add("squeak(purple)");
add("text(purple,0,0,2)");
add("... as long as we can");
add("find the rest of the crew.");
add("position(purple,above)");
add("speak_active");
add("endtext");
//Cut to Red