home *** CD-ROM | disk | FTP | other *** search
- # Droids COG Script
- #
- # 00_HelptextTimer.cog
- #
- # Displays Help messages with optional timeouts
- #
- # Desc (original):
- # Two sectors, startsector and startsecotr2 will trigger the message number
- # specified by messagenumber. The stopsectors display message 0, effectively
- # turning it off.
- #
- # Desc (Timer version):
- # There are now two new variables, displaytime and show_once.
- # Displaytime, if set to a number larger than 0, will only
- # display the message for the number of seconds it's set to.
- # Show_once, if set to 1, will display the message only once then never
- # display it again.
- #
- # [MT] Created
- # 11/03/97 [DGS] Added Printtext commands for debugging
- # 11/04/97 [DGS] Added two more start and stop sectors
- # 12/03/97 [DGS] Modified "Helptext" to add timeouts and one-offs (see desc. above).
- # 03/10/98 [JP] Modified to add 2nd message.
- # 04/28/98 [JP] This is it, with the voice files and such
- # ========================================================================================
-
- symbols
- message entered
- message timer
-
- cog m2 #companion message by cammy
-
- sector inclines linkid=1
- sector darkroom linkid=2
- sector batteryroom linkid=3
- sector Lookroom linkid=4
- sector Magnetics linkid=5
- sector Jumps linkid=6
- sector Repairroom linkid=7
- sector dancing linkid=8
-
- surface door linkid=9
- surface jawa linkid=10
-
- int messagenumber
- int displaytime=0
- int show_once=1 local
- int show_once2=1 local
- int show_once3=1 local
- int show_once4=1 local
- int show_once5=1 local
- int show_once6=1 local
- int show_once7=1 local
- int show_once8=1 local
- int show_once9=1 local
- int show_once10=1 local
- int show_once11=1 local
- int show_once12=1 local
- int show_once13=1 local
- int show_once14=1 local
- int show_once15=1 local
- int show_once16=1 local
- int show_once17=1 local
-
- message touched
-
- sector push linkid=11
- sector tug linkid=12
- sector question linkid=13
- sector tube linkid=14
- sector battery linkid=15
- sector sideways linkid=16
- sector l_r_keys linkid=17
-
- message user1
- message startup
-
- end
-
- code
-
- startup:
- # player=getlocalplayerthing();
- # if (!GetInv(GetLocalPlayerThing(), 21))
- # {
- # SetInv(GetLocalplayerthing(), 21, 1);
- # sleep(30);
- # print("blah");
- # }
-
- // else
- // {
- // print("buya");
- // }
- return;
-
- user1:
-
- csectorstart=1;
- return;
-
- entered:
- // show_once is set to 0 if it's off, 1 if it's only going to show once, and 2 if it's been shown.
- if (csectorstart == 0)
- {
- print("yay");
- }
-
- else if (csectorstart == 1)
- {
- if (getsenderid() == 1)
- {
- if (show_once < 2)
- {
- dwplaycammyspeech(16180, "TGCA039.wav", 5, 2); //inclines
- print("message1"); //Debug Lines
- printint(messagenumber);
- if (show_once == 1 ) show_once = 2; //It's been shown.
- }
- }
-
- else if (getsenderid() == 2)
- {
- if (show_once2 < 2)
- {
- dwplaycammyspeech(16012, "TGCA015.wav", 5, 2); //darkroom
- print("message1"); //Debug Lines
- printint(messagenumber);
- if (show_once2 == 1 ) show_once2 = 2; //It's been shown.
- }
- }
-
- else if (getsenderid() == 3)
- {
- if (show_once3 < 2)
- {
- dwplaycammyspeech(16014, "TGCA017.wav", 5, 2); //batteryroom
- print("message1"); //Debug Lines
- printint(messagenumber);
- if (show_once3 == 1 ) show_once3 = 2; //It's been shown.
- }
- }
-
- else if (getsenderid() == 4)
- {
- if (show_once4 < 2)
- {
- dwplaycammyspeech(16191, "TGCA043l.wav", 5, 2); // look area
- print("message1"); //Debug Line16191s
- printint(messagenumber);
- if (show_once4 == 1 ) show_once4 = 2; //It's been shown.
- }
- }
-
- else if (getsenderid() == 5)
- {
- if (show_once5 < 2)
- {
- dwplaycammyspeech(16400, "TGCA053.wav", 5, 2); // magnetics
- print("message1"); //Debug Line16191s
- printint(messagenumber);
- if (show_once5 == 1 ) show_once5 = 2; //It's been shown.
- }
- }
-
- else if (getsenderid() == 6)
- {
- if (show_once6 < 2)
- {
- dwplaycammyspeech(16190, "TGCA042.wav", 5, 2); // jumps
- print("message1"); //Debug Line16191s
- printint(messagenumber);
- if (show_once6 == 1 ) show_once6 = 2; //It's been shown.
- }
- }
-
- else if (getsenderid() == 7)
- {
- if (show_once7 < 2)
- {
- dwplaycammyspeech(16200, "TGCA046.wav", 5, 2); // repair
- print("message1"); //Debug Line16191s
- printint(messagenumber);
- if (show_once7 == 1 ) show_once7 = 2; //It's been shown.
- }
- }
-
- else if (getsenderid() == 8)
- {
- if (show_once8 < 2)
- {
- dwplaycammyspeech(16500, "TGCA056.wav", 5, 2); // dance
- print("message1"); //Debug Line16191s
- printint(messagenumber);
- if (show_once8 == 1 ) show_once8 = 2; //It's been shown.
- }
- }
-
- else if (getsenderid() == 11)
- {
- if (show_once11 < 2)
- {
- dwplaycammyspeech(16170, "TGCA038.wav", 5, 2); //pushcrates
- print("message1");
- printint(messagenumber);
- if (show_once11 = 1) show_once11 = 2;
- }
- }
-
- else if (getsenderid() == 12)
- {
- if (show_once12 < 2)
- {
- dwplaycammyspeech(16300, "TGCA052.wav", 5, 2); //tug
- if (show_once12 = 1) show_once12 =2;
- }
- }
-
- else if (getsenderid() == 13)
- {
- if (show_once13 < 2)
- {
- dwplaycammyspeech(16001, "TGCA004.wav", 5, 2); //question
- if (show_once13 = 1) show_once13 =2;
- }
- }
-
- else if (getsenderid() == 14)
- {
- if (show_once14 < 2)
- {
- dwplaycammyspeech(16008, "TGCA011.wav", 5, 2); //tube
- if (show_once14 = 1) show_once14 =2;
- }
- }
-
- else if (getsenderid() == 15)
- {
- if (show_once15 < 2)
- {
- dwplaycammyspeech(16014, "TGCA017.wav", 5, 2); //battery
- if (show_once15 = 1) show_once15 =2;
- }
- }
-
- else if (getsenderid() == 16)
- {
- if (show_once16 < 2)
- {
- //!!!!FOR MAC VERSION, USE 16102!!! AND USE TGCA023.WAV!!!
- dwplaycammyspeech(16101, "TGCA022.wav", 5, 2); //sideways walk for PC version
- if (show_once16 = 1) show_once16 =2;
- }
- }
-
- else if (getsenderid() == 17)
- {
- if (show_once17 < 2)
- {
- dwplaycammyspeech(16130, "TGCA044.wav", 5, 2); //l or r keys line
- //LINE .WAV NOT DELIVERED YET UNTIL AFTER BETA
- if (show_once17 = 1) show_once17 =2;
- }
- }
- csectorstart=1;
- }
- return;
-
- touched:
- if (getsenderid() == 9)
- {
- if (show_once9 < 2)
- {
- dwplaycammyspeech(16013, "TGCA016.wav", 3, 2);
- if (show_once9 == 1) show_once9 = 2;
- }
-
- }
-
- else if (getsenderid() == 10)
- {
- if (show_once10 < 2)
- {
- dwplaycammyspeech(16120, "TGCA024.wav", 3, 2);
- if (show_once10 == 1) show_once10 = 2;
- }
-
- }
-
- return;
- end
-
-
-
-
-