jhylands

Genie

Jan 3rd, 2012
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <OBJECT ID="Rainbow" width="0" height="0"
  2.  CLASSID="CLSID:D45FD31B-5C6E-11D1-9EC1-00C04FD7081F"
  3.  CODEBASE="#VERSION=2,0,0,0">
  4. </OBJECT>
  5.  
  6. <OBJECT ID="TruVoice" width="0" height="0"
  7.  CLASSID="CLSID:B8F2846E-CE36-11D0-AC83-00C04FD97575"
  8.  CODEBASE="#VERSION=6,0,0,0">
  9. </OBJECT>
  10.  
  11. <script language="JavaScript" type="text/javascript">
  12. // http://rainbow.arch.scriptmania.com/merlin/
  13. <!--//
  14. var Char;
  15. var UsedChars;
  16. var CharID;
  17. var CharACS;
  18. var CharLoaded;
  19. var LoadReq;
  20. var HideReq;
  21.  
  22. UsedChars = "Char";
  23.  
  24. CharID = "Char";
  25. CharACS = "";
  26. CharLoaded = false;
  27.  
  28. Window_OnLoad();
  29.  
  30. function Window_OnLoad() {
  31.    Rainbow.Connected = true;
  32.  
  33.     CharLoaded = LoadLocalChar(CharID, CharACS);
  34.  
  35.     if (!CharLoaded) {
  36.     CharLoaded = LoadLocalChar(CharID, "");
  37.     }
  38.  
  39.     if (CharLoaded) {
  40.         SetCharObj();
  41.     }
  42.     CheckLoadStatus();
  43. }
  44.  
  45. function LoadLocalChar(CharID, CharACS) {
  46.     Rainbow.RaiseRequestErrors = false;
  47.     if (CharACS == "") {
  48.  
  49.         LoadReq = Rainbow.Characters.Load(CharID);
  50.     }
  51.     else {
  52.         LoadReq = Rainbow.Characters.Load(CharID, CharACS);
  53.     }
  54.     Rainbow.RaiseRequestErrors = true;
  55.  
  56.     if (LoadReq.Status != 1) {
  57.         return(true);
  58.     }
  59.     return(false);
  60. }
  61.  
  62. function SetCharObj() {
  63.     Char = Rainbow.Characters.Character(CharID);
  64.     Char.LanguageID = 0x409;
  65. }
  66.  
  67. function CheckLoadStatus() {
  68.        if (!CharLoaded) {
  69.         LoadError();
  70.         return(false);
  71.     }
  72.  
  73.     window.status = "";
  74.     AgentIntro();
  75.     return(true);
  76. }
  77.  
  78. function LoadError() {
  79.     var strMsg;
  80.     window.status = "";
  81.     strMsg = "Error Loading Character: " + CharID + "\n";
  82.     strMsg = strMsg + "This Microsoft Agent Script requires the character(s):\n";
  83.     strMsg = strMsg + UsedChars;
  84.     alert(strMsg);
  85. }
  86. function InitAgentCommands() {
  87.     Char.Commands.RemoveAll();
  88. }
  89.  
  90. function AgentIntro() {
  91.     InitAgentCommands();
  92.  
  93.     //    *** BEGIN CHARACTER SCRIPT ***
  94.  
  95. Char.MoveTo(0, 0);
  96.     Char.Show();
  97.     Char.MoveTo(900, 500);
  98.     Char.Play("Announce");
  99.     Char.Speak("Hello, I am your default Microsoft Agent. Welcome to this website!");
  100.     Char.Play("Greet");
  101.     Char.Speak("I can greet your visitor");
  102.     Char.Speak("I can get their attention");
  103.     Char.Play("GetAttention");
  104.     Char.Play("GetAttentionContinued");
  105.     Char.Play("GetAttentionReturn");
  106.     Char.Speak("I can tell them about your site");
  107.     Char.Play("GestureRight");
  108.     Char.Speak("PUT TEXT 1 HERE");
  109.     Char.MoveTo(10, 500);
  110.     Char.Play("GestureLeft");
  111.     Char.Speak("PUT TEXT 2 HERE");
  112.     Char.MoveTo(10, 200);
  113.     Char.Speak("PUT TEXT 3 HERE");
  114.     Char.MoveTo(600, 200);
  115.     Char.Play("DoMagic1");
  116.     Char.Play("DoMagic2");
  117.     Char.Play("GestureUp");
  118.     Char.Speak("PUT TEXT 4 HERE");
  119.     Char.Play("Pleased");
  120.     Char.MoveTo(0, 500);
  121.     Char.Play("Read");
  122.     Char.Play("WriteContinued");
  123.     Char.Speak("PUT TEXT 5 HERE");
  124.     Char.Play("WriteReturn");
  125.     Char.MoveTo(500, 500);
  126.     Char.Play("Think");
  127.     Char.Think("PUT TEXT 6 HERE");
  128.     Char.Think("I think I will tell them I have to go.");
  129.     Char.Play("Uncertain");
  130.     Char.Speak("\\Chr=\"Whisper\"\\See you again soon.");
  131.     Char.Play("Wave");
  132.     Char.Speak("Enjoy this site. Goodbye!");
  133.     Char.Play("Wave");
  134.     Char.Hide();
  135.  
  136.  
  137.     //    *** END CHARACTER SCRIPT ***
  138. }
  139. //-->
  140. </script>
  141.  
  142. <script language="JavaScript" type="text/javascript" for="Rainbow" event="Click(CharacterID, Button, Shift, X, Y)">
  143. <!--
  144.     // Purpose:  Stop character on single-click
  145.  
  146.     Char.StopAll();
  147.     Char.Play ("Alert");
  148.     Char.Speak ("Hey, watch it with that pointer!|Oh that tickles!|Hee hee hee!");
  149.     Char.Play ("Blink");
  150.     Char.Play ("RestPose");
  151.     // -->
  152. </script>
  153.  
  154. <script language="JavaScript" type="text/javascript" for="Rainbow" event="DblClick(CharacterID, Button, Shift, X, Y)">
  155. <!--
  156.     // Purpose:  Stop and Hide character on double-click
  157.  
  158.     Char.StopAll();
  159.     Char.Play ("Alert");
  160.     Char.Speak ("Hey, watch it with that pointer! OK i'll go.|Oh you double clicked me it tickles more. Goodbye!|OK Bye!");
  161.     Char.Hide();
  162. </script>
Advertisement
Add Comment
Please, Sign In to add comment