Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

My new SubMenuScripts isn't working…


Squiddle
 Share

Recommended Posts

Hi everyone =). I was changing my Sub MenuScripts, but for some reason it doesn not appear to be working. All of the custom menus open, but the clickable buttons don't work. Here's my Sub MenuScripts:

```
' Executes when something on a custom menu is clicked.
Sub MenuScripts(Index, Clicked_Index, Menu_Type)
Dim MenuTitle
Dim FieldMessage

MenuTitle = getplayermenuclicktitle(Index)
FieldMessage = getplayermenuclickmsg(Index)

Select Case Menu_Type
Case 1
    Select Case Menu_Title                                   
        Case "Awards 1"
        If Clicked_Index = 0 Then
            Call PlayerMsg(Index, "Newbie: Worth 5 Squiddle Points", GREEN)
            End If
            If Clicked_Index = 1 Then
            Call PlayerMsg(Index, "Beginner: Worth 10 Squiddle Points", GREEN)
            End If
            If Clicked_Index = 2 Then
            Call PlayerMsg(Index, "Novice: Worth 15 Squiddle Points", GREEN)
            End If
        If Clicked_Index = 3 Then
            Call PlayerMsg(Index, "Intermediate: Worth 20 Squiddle Points", GREEN)
            End If
        If Clicked_Index = 4 Then
            Call PlayerMsg(Index, "Fighter: Worth 25 Squiddle Points", GREEN)
            End If
        If Clicked_Index = 5 Then
            Call PlayerMsg(Index, "Warrior: Worth 30 Squiddle Points", GREEN)
            End If
        If Clicked_Index = 6 Then
            Call PlayerMsg(Index, "Knight: Worth 35 Squiddle Points", GREEN)
            End If
        Case "Quest Log"
        If Clicked_Index = 0 Then
            If GetVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "Flag1") = 0 Then
            Call PlayerMsg(Index, "Talk to Sedsew in Tavelin to begin this quest.", GREEN)
            ElseIf GetVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "Flag1") = 1 Then
            Call PlayerMsg(Index, "Sedsew needs an apple. I know some monsters drop them.", GREEN)
            ElseIf GetVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "Flag1") = 2 Then
            Call PlayerMsg(Index, "Sedsew was very gratefull for that apple.", GREEN)
            End If
        End If
        If Clicked_Index = 1 Then
            If GetVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "Flag2") = 0 Then
            Call PlayerMsg(Index, "Talk to Mary in Seldien to begin this quest.", GREEN)
            ElseIf GetVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "Flag2") = 1 Then
            Call PlayerMsg(Index, "Mary needs Slyme Vials for her sick kitten. Most slymes drop slyme vials.", GREEN)
        ElseIf GetVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "Flag2") = 2 Then
            Call PlayerMsg(Index, "I gave Mary the Slyme Vial, she told me to talk to her again.", GREEN)
            ElseIf GetVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "Flag2") = 3 Then
            Call PlayerMsg(Index, "Mary's kitten is all better now.", GREEN)
            End If
        End If         
            End Select
Case 2
Call PlayerMsg(Index, "Clicked field number " & Clicked_Index & " on the menu named " & MenuTitle & ". The field text was " & FieldMessage, YELLOW)
Case 3
Select Case Menu_Title
    Case "Profile"
        If Clicked_Index = 0 Then
                    Call PlayerMsg(Index, "Your Name", GREEN)
            End If
            If Clicked_Index = 1 Then
                Call PlayerMsg(Index, "Your Squiddle Points", GREEN)
            End If
            If Clicked_Index = 2 Then
                Call PlayerMsg(Index, "Your amount of NPC Kills", GREEN)
            End If
            If Clicked_Index = 3 Then
                Call PlayerMsg(Index, "Your amount of Peace Offerings", GREEN)
                End If
            End Select
End Select
End Sub
```
And I am absolutely sure that all of the names are right.
Link to comment
Share on other sites

  • 2 weeks later...
here:

```
' Executes when something on a custom menu is clicked.
Sub MenuScripts(Index, Clicked_Index, Menu_Type)
Dim MenuTitle
Dim FieldMessage

MenuTitle = getplayermenuclicktitle(Index)
FieldMessage = getplayermenuclickmsg(Index)

Select Case Menu_Type
Case 1
    Select Case Menu_Title                                   
        Case "Awards 1"
    Select Case Clicked_Index
Case 0
                Call PlayerMsg(Index, "Newbie: Worth 5 Squiddle Points", GREEN)
                Case 1
                Call PlayerMsg(Index, "Beginner: Worth 10 Squiddle Points", GREEN)
                Case 2
                Call PlayerMsg(Index, "Novice: Worth 15 Squiddle Points", GREEN)
                Case 3
                Call PlayerMsg(Index, "Intermediate: Worth 20 Squiddle Points", GREEN)
                Case 4
                Call PlayerMsg(Index, "Fighter: Worth 25 Squiddle Points", GREEN)
                Case 5
                Call PlayerMsg(Index, "Warrior: Worth 30 Squiddle Points", GREEN)
                Case 6
                Call PlayerMsg(Index, "Knight: Worth 35 Squiddle Points", GREEN)
            End Select
        Case "Quest Log"
    Select Case Clicked_Index
Case 0
            Select Case GetVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "Flag1")
        Case "1"
            Call PlayerMsg(Index, "Sedsew needs an apple. I know some monsters drop them.", GREEN)
                Case "2"
            Call PlayerMsg(Index, "Sedsew was very gratefull for that apple.", GREEN)
                Case Else
    Call PlayerMsg(Index, "Talk to Sedsew in Tavelin to begin this quest.", GREEN)
    End Select
        Case 1
            Select Case GetVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "Flag2")
        Case "1"
            Call PlayerMsg(Index, "Mary needs Slyme Vials for her sick kitten. Most slymes drop slyme vials.", GREEN)
        Case "2"
            Call PlayerMsg(Index, "I gave Mary the Slyme Vial, she told me to talk to her again.", GREEN)
                Case "3"
            Call PlayerMsg(Index, "Mary's kitten is all better now.", GREEN)
Case Else
    Call PlayerMsg(Index, "Talk to Mary in Seldien to begin this quest.", GREEN)
    End Select
    End Select         
                  End Select
Case 2
Call PlayerMsg(Index, "Clicked field number " & Clicked_Index & " on the menu named " & MenuTitle & ". The field text was " & FieldMessage, YELLOW)
Case 3
Select Case Menu_Title
    Case "Profile"
        If Clicked_Index = 0 Then
                    Call PlayerMsg(Index, "Your Name", GREEN)
            End If
            If Clicked_Index = 1 Then
                Call PlayerMsg(Index, "Your Squiddle Points", GREEN)
            End If
            If Clicked_Index = 2 Then
                Call PlayerMsg(Index, "Your amount of NPC Kills", GREEN)
            End If
            If Clicked_Index = 3 Then
                Call PlayerMsg(Index, "Your amount of Peace Offerings", GREEN)
                End If
            End Select
End Select
End Sub

```
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...