Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <OBJECT ID="Rainbow" width="0" height="0"
- CLASSID="CLSID:D45FD31B-5C6E-11D1-9EC1-00C04FD7081F"
- CODEBASE="#VERSION=2,0,0,0">
- </OBJECT>
- <OBJECT ID="TruVoice" width="0" height="0"
- CLASSID="CLSID:B8F2846E-CE36-11D0-AC83-00C04FD97575"
- CODEBASE="#VERSION=6,0,0,0">
- </OBJECT>
- <script language="JavaScript" type="text/javascript">
- // http://rainbow.arch.scriptmania.com/merlin/
- <!--//
- var Char;
- var UsedChars;
- var CharID;
- var CharACS;
- var CharLoaded;
- var LoadReq;
- var HideReq;
- UsedChars = "Char";
- CharID = "Char";
- CharACS = "";
- CharLoaded = false;
- Window_OnLoad();
- function Window_OnLoad() {
- Rainbow.Connected = true;
- CharLoaded = LoadLocalChar(CharID, CharACS);
- if (!CharLoaded) {
- CharLoaded = LoadLocalChar(CharID, "");
- }
- if (CharLoaded) {
- SetCharObj();
- }
- CheckLoadStatus();
- }
- function LoadLocalChar(CharID, CharACS) {
- Rainbow.RaiseRequestErrors = false;
- if (CharACS == "") {
- LoadReq = Rainbow.Characters.Load(CharID);
- }
- else {
- LoadReq = Rainbow.Characters.Load(CharID, CharACS);
- }
- Rainbow.RaiseRequestErrors = true;
- if (LoadReq.Status != 1) {
- return(true);
- }
- return(false);
- }
- function SetCharObj() {
- Char = Rainbow.Characters.Character(CharID);
- Char.LanguageID = 0x409;
- }
- function CheckLoadStatus() {
- if (!CharLoaded) {
- LoadError();
- return(false);
- }
- window.status = "";
- AgentIntro();
- return(true);
- }
- function LoadError() {
- var strMsg;
- window.status = "";
- strMsg = "Error Loading Character: " + CharID + "\n";
- strMsg = strMsg + "This Microsoft Agent Script requires the character(s):\n";
- strMsg = strMsg + UsedChars;
- alert(strMsg);
- }
- function InitAgentCommands() {
- Char.Commands.RemoveAll();
- }
- function AgentIntro() {
- InitAgentCommands();
- // *** BEGIN CHARACTER SCRIPT ***
- Char.MoveTo(0, 0);
- Char.Show();
- Char.MoveTo(900, 500);
- Char.Play("Announce");
- Char.Speak("Hello, I am your default Microsoft Agent. Welcome to this website!");
- Char.Play("Greet");
- Char.Speak("I can greet your visitor");
- Char.Speak("I can get their attention");
- Char.Play("GetAttention");
- Char.Play("GetAttentionContinued");
- Char.Play("GetAttentionReturn");
- Char.Speak("I can tell them about your site");
- Char.Play("GestureRight");
- Char.Speak("PUT TEXT 1 HERE");
- Char.MoveTo(10, 500);
- Char.Play("GestureLeft");
- Char.Speak("PUT TEXT 2 HERE");
- Char.MoveTo(10, 200);
- Char.Speak("PUT TEXT 3 HERE");
- Char.MoveTo(600, 200);
- Char.Play("DoMagic1");
- Char.Play("DoMagic2");
- Char.Play("GestureUp");
- Char.Speak("PUT TEXT 4 HERE");
- Char.Play("Pleased");
- Char.MoveTo(0, 500);
- Char.Play("Read");
- Char.Play("WriteContinued");
- Char.Speak("PUT TEXT 5 HERE");
- Char.Play("WriteReturn");
- Char.MoveTo(500, 500);
- Char.Play("Think");
- Char.Think("PUT TEXT 6 HERE");
- Char.Think("I think I will tell them I have to go.");
- Char.Play("Uncertain");
- Char.Speak("\\Chr=\"Whisper\"\\See you again soon.");
- Char.Play("Wave");
- Char.Speak("Enjoy this site. Goodbye!");
- Char.Play("Wave");
- Char.Hide();
- // *** END CHARACTER SCRIPT ***
- }
- //-->
- </script>
- <script language="JavaScript" type="text/javascript" for="Rainbow" event="Click(CharacterID, Button, Shift, X, Y)">
- <!--
- // Purpose: Stop character on single-click
- Char.StopAll();
- Char.Play ("Alert");
- Char.Speak ("Hey, watch it with that pointer!|Oh that tickles!|Hee hee hee!");
- Char.Play ("Blink");
- Char.Play ("RestPose");
- // -->
- </script>
- <script language="JavaScript" type="text/javascript" for="Rainbow" event="DblClick(CharacterID, Button, Shift, X, Y)">
- <!--
- // Purpose: Stop and Hide character on double-click
- Char.StopAll();
- Char.Play ("Alert");
- Char.Speak ("Hey, watch it with that pointer! OK i'll go.|Oh you double clicked me it tickles more. Goodbye!|OK Bye!");
- Char.Hide();
- </script>
Advertisement
Add Comment
Please, Sign In to add comment