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 waterpipe linkid=1
- sector watervalve linkid=2
- sector gearassembly linkid=3
- sector gearassembly2 linkid=4
- sector gearfind linkid=5
- sector ctrlrm linkid=6
- sector leverfind linkid=7
- sector drainhatch linkid=8
- sector valveconfig linkid=9
- sector valveconfig2 linkid=10
- sector gearfind2 linkid=11
- sector gearfind3 linkid=12
-
-
- 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
-
- message user1
-
- end
-
- code
- 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 (getsenderid() == 1)
- {
- if (show_once < 2)
- {
- dwplaycammyspeech(16021, "M3CA016.wav", 5, 2); //waterpipe
- 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(16022, "M3CA017.wav", 5, 2); //watervalve, it's closed
- 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(16023, "M3CA018.wav", 5, 2); //gearassembly
- 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(16023, "M3CA018.wav", 5, 2); //gearassembly2
- 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(16024, "M3CA019.wav", 5, 2); //gearfind
- 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(16039, "M3CA026.wav", 5, 2); // ctrlrm
- 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(16032, "M3CA028.wav", 5, 2); //lever
- 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(16033, "M3CA029.wav", 5, 2); //drainhatch
- print("message1"); //Debug Line16191s
- printint(messagenumber);
- if (show_once8 == 1 ) show_once8 = 2; //It's been shown.
- }
- }
-
- else if (getsenderid() == 9)
- {
- if (show_once9 < 2)
- {
- dwplaycammyspeech(16040, "M3CA033.wav", 5, 2); //the water valves will open and close...
- print("message1"); //Debug Line16191s
- printint(messagenumber);
- if (show_once9 == 1 ) show_once9 = 2; //It's been shown.
- }
- }
-
- else if (getsenderid() == 10)
- {
- if (show_once10 < 2)
- {
- dwplaycammyspeech(16040, "M3CA033.wav", 5, 2); //the water valves will open and close...
- print("message1"); //Debug Line16191s
- printint(messagenumber);
- if (show_once10 == 1 ) show_once10 = 2; //It's been shown.
- }
- }
-
- else if (getsenderid() == 11) //gearfind2
- {
- if (show_once5 < 2)
- {
- dwplaycammyspeech(16024, "M3CA019.wav", 5, 2); //gearfind
- print("message1"); //Debug Line16191s
- printint(messagenumber);
- if (show_once5 == 1 ) show_once5 = 2; //It's been shown.
- }
- }
-
- else if (getsenderid() == 12) //gearfind3
- {
- if (show_once5 < 2)
- {
- dwplaycammyspeech(16024, "M3CA019.wav", 5, 2); //gearfind
- print("message1"); //Debug Line16191s
- printint(messagenumber);
- if (show_once5 == 1 ) show_once5 = 2; //It's been shown.
- }
- }
-
- return;
-
- user1:
- show_once2 = 2;
- show_once9 =2;
- show_once10 =2;
- return;
-
- end
-
-
-
-
-