Make your own free website on Tripod.com

Merlin Live

Home | Merlin Help & Facts | Merlin SCRIPT | New Templates | X PAGE! NOTHING HERE | Texas Toads | Monitor | ExtWithBlkBg | 1 Temp 100 Banners | Car Audio Overstock | Knives | Baby Shoes | Blank Black Box | Doing | 2 Temps Needs Work | OpenOffice-Needs Work | Work on Temps | big one | Profit Pack N/W | BOOK LISTINGS | New N/W | 2 Temps Book | 2 temp N/W | John Temp 1 | Bars Temp N/W | Silver Temp N/W | John Temp 4 BKS | MY Temp Started | Temp 6 In | Temp 7 In | Temp 8 In | Temp 9 In | Temp 10 In | Temp in | New 2005!! | Pre-Text Add-Ons | New Temp In | McGuffey's Readers | Pro temp ok | Floating Boxes | Black Extreme Temp | Black Background | Black Background Box | Black Extreme 2 Temp | XXXXtreme
Merlin SCRIPT

Do NOT change or Alter the RED script!
 
Also, what ever you do change, DO NOT REMOVE THE EXPLAIMATIONS " XXXXX " ON BOTH ENDS! IT WON"T WORK IF YOU DO!
 
Look in the center of page, what I have highlighted in BLUE is what the Text Agent is saying. Follow along and see it done live!
 
<DIV><script language="VBScript" type="text/vbscript">
<!--
'_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
'_/ Portions generated by MASH - The Microsoft Agent Scripting Helper, version 7.0
'_/ by BellCraft Technologies,
http://www.bellcraft.com/mash
'_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
' * Character Objects
Dim Merlin
' * Variables
Dim UsedChars
Dim MerlinID
Dim MerlinACS
Dim MerlinLoaded
Dim HideReq
Dim Req
' * Initialize
UsedChars = "Merlin"
' * Merlin
MerlinID = "Merlin"
MerlinACS = "merlin.acs"
MerlinLoaded = False

' * Prevent Auto-Download of Microsoft Agent if not already installed
If IsAgentInstalled() Then
    Document.WriteLn "<object id=""AgentControl"" width=""0"" height=""0"""
    Document.WriteLn "  classid=""CLSID:D45FD31B-5C6E-11D1-9EC1-00C04FD7081F"""
    Document.WriteLn "  codebase=""#VERSION=2,0,0,0"">"
    Document.WriteLn "</object>"
    Document.WriteLn "<object id=""L&HTruVoice"" width=""0"" height=""0"""
    Document.WriteLn "  classid=""CLSID:B8F2846E-CE36-11D0-AC83-00C04FD97575"""
    Document.WriteLn "  codebase=""#VERSION=6,0,0,0"">"
    Document.WriteLn "</object>"
End If
Function IsAgentInstalled()
    ' Purpose:  Returns True if Agent 2.0 is installed, else False
    On Error Resume Next
    Dim AgentControl
    If ScriptEngineMajorVersion < 2 Then
        IsAgentInstalled = False
    Else
        Set AgentControl = CreateObject("Agent.Control.2")
        IsAgentInstalled = IsObject(AgentControl)
    End If
End Function
Sub Window_OnLoad()
    ' Purpose:  Runs automatically when page is loaded
    On Error Resume Next
    ' * INSERT ANY NON-AGENT RELATED SCRIPTING HERE
    Call AgentMain
End Sub
Sub AgentMain()
    On Error Resume Next
    If Not IsAgentInstalled() Then
        Exit Sub
    End If
    AgentControl.Connected = True
    MerlinLoaded = LoadLocalChar(MerlinID, MerlinACS)
    If Not MerlinLoaded Then
        ' Attempt to load default character
        MerlinLoaded = LoadLocalChar(MerlinID, "")
    End If
    If MerlinLoaded Then
        Call SetCharObj
    End If
    Call CheckLoadStatus
End Sub
Function LoadLocalChar(ByVal CharID, ByVal CharACS)
    ' Purpose:  Attempts to load the specified character
    ' Returns:  True if successful, False if not
    On Error Resume Next
    If CharACS = "" Then
     AgentControl.Characters.Load CharID
    Else
     AgentControl.Characters.Load CharID, CharACS
    End If
    If Err = 0 Then
        LoadLocalChar = True
        Exit Function
    End If
    LoadLocalChar = False
End Function
Sub SetCharObj()
    ' Purpose:  Sets the character reference and TTS Language ID
    On Error Resume Next
    Set Merlin = AgentControl.Characters(MerlinID)
    Merlin.LanguageID = &H409
End Sub
Sub CheckLoadStatus()
    ' Purpose:  Determines if required characters have been loaded.
    '           If not, issue request to load next character
    '           else run the AgentIntro routine
    If Not MerlinLoaded Then
        Call LoadError
        Exit Sub
    End If
    Window.Status = ""
    Call AgentIntro
End Sub
Sub AgentControl_RequestComplete(ByVal RequestObject)
    ' Purpose:  Take action on completion or failure of requests
    On Error Resume Next
End Sub
Sub LoadError()
    Dim strMsg
    Window.Status = ""
    strMsg = "Error Loading Character: " & MerlinID
    strMsg = strMsg & Chr(13) & Chr(13) & "This Microsoft Agent Script requires the character(s):"
    strMsg = strMsg & Chr(13) & UsedChars
    MsgBox strMsg, 48
End Sub
Sub AgentControl_Click(ByVal CharacterID, ByVal Button, ByVal Shift, ByVal X, ByVal Y)
End Sub
Sub AgentControl_DblClick(ByVal CharacterID, ByVal Button, ByVal Shift, ByVal X, ByVal Y)
    ' Purpose:  Stop and Hide all characters on double-click
    On Error Resume Next
    Merlin.StopAll
    If Not MerlinID.HasOtherClients Then
        If Merlin.Visible Then
            Set HideReq = Merlin.Hide()
        Else
            AgentControl.Characters.Unload MerlinID
        End If
    End If
End Sub
Sub InitAgentCommands()
    ' Purpose:  Initialize the Commands menu
    On Error Resume Next
    Merlin.Commands.RemoveAll
    Merlin.Commands.Caption = "MASH Menu"
    Merlin.Commands.Add "ACO", "Advanced Character Options", "Advanced Character Options"
End Sub
Sub AgentControl_Command(ByVal UserInput)
    ' Purpose:  Determine Command that was selected either by menu or voice
    '           and run the applicable Command Script
    On Error Resume Next
    Dim BadConfidence
    BadConfidence = 10
    If (UserInput.Confidence <= -40) Then
        ' Bad Recognition
        Exit Sub
    ElseIf (UserInput.Alt1Name <> "") And Abs(Abs(UserInput.Alt1Confidence) - Abs(UserInput.Confidence)) < BadConfidence Then
        ' Bad Confidence - too close to another command
        Exit Sub
    ElseIf (UserInput.Alt2Name <> "") And Abs(Abs(UserInput.Alt2Confidence) - Abs(UserInput.Confidence)) < BadConfidence Then
        ' Bad Confidence - too close to another command
        Exit Sub
    Else ' High Confidence
        ' *** BEGIN MASH USER COMMANDS ***
        Select Case UserInput.Name
        Case "ACO"
            AgentControl.PropertySheet.Visible = True
        End Select
        ' *** END MASH USER COMMANDS ***
    End If
End Sub
Sub AgentControl_Bookmark(ByVal BookmarkID)
    On Error Resume Next
End Sub
Sub AgentIntro()
    On Error Resume Next
    Call InitAgentCommands
    ' *** BEGIN MASH USER SCRIPT ***
    Merlin.MoveTo 858, 36
    Merlin.Show
    Merlin.Speak "Welcome to the Microsoft Agent Scripting Helper!"
    Merlin.Play "DoMagic2"
    Merlin.Speak "I'm Merlin.. Also known as a sellers assistant."
    Merlin.MoveTo 20, 230
    Merlin.Play "Explain"
    Merlin.Speak "I will show you around and tell you what I can do."
    Merlin.MoveTo 1, 548
    Merlin.Play "GestureLeft"

    Merlin.Speak "First off.. I can show various information about your page or listing layout."
    Merlin.MoveTo 57, 643
    Merlin.Play "GestureDown"
    Merlin.Speak "I can explain your auction and price."
    Merlin.Speak "I can tell your visitor all about your shipping and payment details."
    Merlin.MoveTo 49, -7
    Merlin.Play "GestureDown"

    Merlin.Speak "I can also tell them about your bid options."
    Merlin.MoveTo 433, 367
    Merlin.Play "Pleased"
    Merlin.Speak "I can be very helpful and draw attention to various parts of your page."
    Merlin.MoveTo 682, 640
    Merlin.Play "Suggest"
    Merlin.Speak "Do you have some bonuses to give away?"
    Merlin.Play "Surprised"
    Merlin.Speak "I'll help explain what you have."
    Merlin.MoveTo 43, 623
    Merlin.Play "Explain"

    Merlin.Speak "I can really add something to draw attention."
    Merlin.MoveTo 830, 340
    Merlin.Play "Congratulate"
    Merlin.Speak
"We can offer anything you choose."
    Merlin.Play "Congratulate_2"
    Merlin.Speak "We can do lots to help your sales."
    Merlin.MoveTo 837, 25
    Merlin.Play "Announce"

    Merlin.Speak "I also can draw a great amount of attention.."
    Merlin.Play "Confused"
    Merlin.Speak "I really am very highly programable also."
    Merlin.MoveTo 606, 649
    Merlin.Play "GestureRight"
    Merlin.Speak "This is all you need."
    Merlin.MoveTo 184, 650
    Merlin.Play "GestureLeft"
    Merlin.Speak "Simply enter my commands and the text."
    Merlin.MoveTo 386, 602
    Merlin.Play "GestureDown"
    Merlin.Speak "Once you have finished, I'm ready yo be entered on your page."
    Merlin.Play "GetAttention"
    Merlin.Speak "It's really easy to do."
    Merlin.MoveTo 798, 379
    Merlin.Play "GestureRight"
    Merlin.Speak "You can find lots of information by clicking on that Parrots Head on the front page."
    Merlin.Speak "You will be taken to a great page of help."
    Merlin.Play "GestureUp"
    Merlin.Speak "Before you do that, I'm getting out of here."
    Merlin.Speak "That dumb bird has a bad temper."
    Merlin.MoveTo 796, 21
    Merlin.Play "GestureLeft"

    Merlin.Speak "I will just make my exit this way."
    Merlin.Speak "The arrow points to the next page."
    Merlin.Play "Think"
    Merlin.Speak "I think that's what it means."
    Merlin.Play "Surprised"
    Merlin.Speak "Well, it says go so I shall go."
    Merlin.MoveTo 907, 41
    Merlin.Play "Wave"

    Merlin.Speak "I hope to see you on the next page."
    Merlin.Play "Wave"
    Merlin.Speak "By.. See you soon."
    Merlin.Hide
    Merlin.Show

    Merlin.Play "Write"
    Merlin.Speak "I forgot to check out."
    Merlin.Play "Wave"
    Merlin.Speak "See ya."
   
Merlin.Hide

    ' *** END MASH USER SCRIPT ***
End Sub
'_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
-->
</script></DIV>