Trivia bot v26
Moderator: Moderators
Trivia bot v26
Hello i am really new to this scripting and wanted to know about the trivia bot script i can get it working but I would like it not to play in pm and also have it so that you didnt have to login to play it. Is there any way of doing this. Any Help would be much appreciated.
thanks
thanks
-
- Posts: 53
- Joined: 2003-08-09 10:00
- Location: Wilmington, NC
- Contact:
thanks for the reply ( i told you I was very new to this ) is this what is needed
*** TrivaBot: LurkerScript (c)2002 _-=[PhoenixRising]=-_
' *** This script originated at _-=P-[LukersLair]-R=-_ lurkerslair.no-ip.com
' *** Written by Damion NightHawk, aka Lurker
Dim sBotName ' TriviA-Bot
Dim sBotQuickTrig ' Bot Quick PM Trigger
Dim sBotVers ' Bot Version
Dim response ' response to trigger message
Dim wasPM ' boolean - was message a PM to the bot?
Dim sFrom ' who trigger message was from
Dim sTo ' mail to
Dim superOp(10) ' superOps are protected from some commands (max 20)
Dim sPath ' Path to Text Files
Dim sFile ' File to read
Dim sWelcomeMsg ' Welcome Message
Dim oFileSys ' File System Object
Dim sBotTrig ' Trigger String, like !pr
Dim sHelp ' Help Message
Dim sHelpOp ' Help for Ops
Dim Questions ' Questions Dictionary
Dim Answers ' Answers Dictionary
Dim Scores() ' Scores by Place
Dim iNumScores ' Number of people in array
Dim iQuestID ' Qustion Number
Dim iLastQuestID ' last question number
Dim iQuestCount ' How many questions total
Dim sLastWinner ' Last peron who answered correctly
Dim iTotalWon ' Questions answered in a row
Dim sQuest, sAns ' Question and answer strings
Dim sHint ' Reveiled answer
Dim iHint ' Hint count
Dim sCategory ' Question Category
Dim bQuestFlag ' okay to ask a new question
Dim bAnsFlag ' Answer Flag
Dim iScore ' Score
Dim iPlace ' Placement
Dim sFirstPlace ' First Place
Dim sBehind ' Who Behind
Dim iBehind ' Points Behind
Dim iUsers ' Number of users logged in
Dim Users ' User Dictionary
Dim iInactiveCount ' Max inactivity count
Dim bContinous ' Run Continously
Dim bChat ' Chat in PM?
Dim bMain ' Run in PM or Main chat
Dim bPMNewUsers ' Switch to PM newly connected users
Dim bFirstIn ' First person logged in
Dim iTimeTook ' Time it took to answer
Dim iDelay ' Delay between hints
Dim iDelayNorm ' Normal delay
Dim iDelayBreak ' Break Delay
Dim iAsked ' Questions Asked
Dim iToAsk ' Questions to ask before break
Dim iSaveCount ' Timer Counter to autosave scores
sub Main()
'set object to get path from Registry
Dim wshShell
Set wshShell = CreateObject("WScript.Shell")
sPath = wshShell.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\NeoModus\Hub\PhoenixRisingScripts\AppPath") & "\Scripts"
'Setup Scripting Dictionaries for Questions and Users
Set Questions = CreateObject("Scripting.Dictionary")
Set Answers = CreateObject("Scripting.Dictionary")
Set Users = CreateObject("Scripting.Dictionary")
'Name of the Bot and set other bot variables
sBotName = "TriviA-BoT"
sBotQuickTrig = "trivia-bot"
sBotVers = "v2.3"
sBotTrig = "!tb "
'Setup File System Object
Set oFileSys = CreateObject("Scripting.FileSystemObject")
'Path to text files ' not used, to use this rem the get from registry.
'sPath = "C:\Program Files\Direct Connect Hub\Scripts"
'Default Settings in case Config file not found
iDelayNorm = 4 ' Delay between hints * tmrScriptTimer.Interval
iDelayBreak = 1200 ' Default Break time * tmrScriptTimer.Interval
iToAsk = 40 ' Questions to ask before break
iInactiveCount = 10 ' Questions asked before user is logged out
bContinous = False ' Bot takes breaks
bChat = False ' Chat in bot while playing in PM
bMain = True ' Bot runs in main
bPMNewUsers = False ' PM new user on connect?
iSaveCount = 0 ' Init autosave counter
'Static Settings needed before bot is started
tmrScriptTimer.Interval = 5000 ' Timer Interval is 5 Seconds, best not to change
tmrScriptTimer.Enabled = False ' Timer Off before bot is started
iAsked = 0 ' Questions Asked
iUsers = 0 ' Users Logged in
'Load SuperOps and Config Settings from File
frmHub.DoEventsForMe
Call SetConfig("trivops.txt")
frmHub.DoEventsForMe
Call SetConfig("trivbot.txt")
frmHub.DoEventsForMe
iDelay = iDelayNorm
If Not bMain Then
bFirstIn = True
Else
bFirstIn = False
End If
'Set Scoring Array
ReDim Scores(1,0)
Scores(0,0) = "Triva-Bot"
Scores(1,0) = 10000
'Set Ops Help and User Help
sHelp = "Hello %USER%"
sHelp = sHelp & sBotName & " Help:" & vbCrlf
sHelp = sHelp & "The following commands are available to you %USER%." & vbCRLF
sHelp = sHelp & sBotTrig & "Help - Read the help for " & sBotName & "!" & vbCRLF
sHelp = sHelp & sBotTrig & "AskMe - Show a question." & vbCRLF
sHelp = sHelp & sBotTrig & "HintMe - Show part of answer." & vbCRLF
sHelp = sHelp & sBotTrig & "SkipMe - Skip the question." & vbCRLF
sHelp = sHelp & sBotTrig & "TopTen - Show the top ten scorers." & vbCRLF
sHelp = sHelp & sBotTrig & "Scores - Show the all the scorers in PM." & vbCRLF
sHelp = sHelp & sBotTrig & "MyScore - View your score and place in main." & vbCRLF
sHelp = sHelp & sBotTrig & "LogIn - Login to play Trivia." & vbCRLF
sHelp = sHelp & sBotTrig & "LogOut - Logout and stop playing Trivia." & vbCRLF
sHelp = sHelp & sBotTrig & "ListUsers - show people playing." & vbCRLF
sHelp = sHelp & sBotTrig & "StartMe - Start The Bot!" & vbCRLF
sHelp = sHelp & sBotTrig & "StopMe - Stop the bot." & vbCRLF
sHelp = sHelp & sBotTrig & "SaveScores - Save the scores." & vbCRLF
sHelp = sHelp & sBotTrig & "LoadScores - Load the scores." & vbCRLF
sHelp = sHelp & sBotTrig & "ClearScores NoW! - Clear the scores." & vbCRLF
sHelp = sHelp & sBotTrig & "SetNonStop On/Off- Set trivia to run nonstop." & vbCRLF
sHelp = sHelp & sBotTrig & "SetChat On/Off- Set trivia so can Chat in pm." & vbCRLF
sHelp = sHelp & sBotTrig & "SetMain On/Off- Set trivia so plays in Main or PM." & vbCRLF
sHelp = sHelp & sBotTrig & "PMNewUsers On/Off- Set trivia PMs User on Connect." & vbCRLF
sHelp = sHelp & sBotTrig & "SetHintDelay # - Set hint delay # of 5 sec intervals." & vbCRLF
sHelp = sHelp & sBotTrig & "SetBreakDelay # - Set Break in Minutes." & vbCRLF
sHelp = sHelp & sBotTrig & "SetQToAsk # - Set number questions to ask between breaks." & vbCRLF
sHelp = sHelp & sBotTrig & "SetQToLogOut # - Set number questions to ask before LogOut." & vbCRLF
sHelp = sHelp & sBotTrig & "SaveConfig - Save Bot Settings." & vbCRLF
sHelp = sHelp & sBotTrig & "ResetConfig - Load Bot Settings." & vbCRLF
sHelp = sHelp & sBotTrig & "BotStatus - View Bot Settings." & vbCRLF & vbCRLF
sHelp = sHelp & sBotTrig & "ListTrivOps - List Trivia Ops." & vbCRLF
sHelp = sHelp & sBotTrig & "AddTrivOps - Add a Trivia Op." & vbCRLF
sHelp = sHelp & sBotTrig & "DelTrivOps - Delete a Trivia Op." & vbCRLF
sHelp = sHelp & vbCRLF & "Scoring is 1 - 4 points, depending on number of hints shown." & vbCRLF
sHelp = sHelp & vbCrlf & sBotName & " is an Phoenix Rising Script (" & sBotVers & ") ¬2002 _-=P-[Lurker's Lair]-R=-_"
sHelpOp = sHelp
sHelp = "Hello %USER%"
sHelp = sHelp & sBotName & " Help:" & vbCrlf
sHelp = sHelp & "The following commands are available to you %USER%." & vbCRLF
sHelp = sHelp & sBotTrig & "Help - Read the help for " & sBotName & "!" & vbCRLF
sHelp = sHelp & sBotTrig & "TopTen - Show the top ten scorers." & vbCRLF
sHelp = sHelp & sBotTrig & "Scores - Show the all the scorers in PM." & vbCRLF
sHelp = sHelp & sBotTrig & "MyScore - View your score and place in main." & vbCRLF
sHelp = sHelp & sBotTrig & "LogIn - Login to play Trivia." & vbCRLF
sHelp = sHelp & sBotTrig & "LogOut - Logout and stop playing Trivia." & vbCRLF
sHelp = sHelp & sBotTrig & "ListUsers - show people playing." & vbCRLF
sHelp = sHelp & vbCRLF & "Scoring is 1 - 4 points, depending on number of hints shown." & vbCRLF
sHelp = sHelp & vbCrlf & sBotName & " is an Phoenix Rising Script (" & sBotVers & ") ¬2002 _-=P-[Lurker's Lair]-R=-_"
'Register bot to Hub, do not change
frmHub.RegisterBotName(sBotName)
end sub
if so i want to be able to keep a record of the scores, stop having to login every time and keep the trivia in main.
thanks for any help
*** TrivaBot: LurkerScript (c)2002 _-=[PhoenixRising]=-_
' *** This script originated at _-=P-[LukersLair]-R=-_ lurkerslair.no-ip.com
' *** Written by Damion NightHawk, aka Lurker
Dim sBotName ' TriviA-Bot
Dim sBotQuickTrig ' Bot Quick PM Trigger
Dim sBotVers ' Bot Version
Dim response ' response to trigger message
Dim wasPM ' boolean - was message a PM to the bot?
Dim sFrom ' who trigger message was from
Dim sTo ' mail to
Dim superOp(10) ' superOps are protected from some commands (max 20)
Dim sPath ' Path to Text Files
Dim sFile ' File to read
Dim sWelcomeMsg ' Welcome Message
Dim oFileSys ' File System Object
Dim sBotTrig ' Trigger String, like !pr
Dim sHelp ' Help Message
Dim sHelpOp ' Help for Ops
Dim Questions ' Questions Dictionary
Dim Answers ' Answers Dictionary
Dim Scores() ' Scores by Place
Dim iNumScores ' Number of people in array
Dim iQuestID ' Qustion Number
Dim iLastQuestID ' last question number
Dim iQuestCount ' How many questions total
Dim sLastWinner ' Last peron who answered correctly
Dim iTotalWon ' Questions answered in a row
Dim sQuest, sAns ' Question and answer strings
Dim sHint ' Reveiled answer
Dim iHint ' Hint count
Dim sCategory ' Question Category
Dim bQuestFlag ' okay to ask a new question
Dim bAnsFlag ' Answer Flag
Dim iScore ' Score
Dim iPlace ' Placement
Dim sFirstPlace ' First Place
Dim sBehind ' Who Behind
Dim iBehind ' Points Behind
Dim iUsers ' Number of users logged in
Dim Users ' User Dictionary
Dim iInactiveCount ' Max inactivity count
Dim bContinous ' Run Continously
Dim bChat ' Chat in PM?
Dim bMain ' Run in PM or Main chat
Dim bPMNewUsers ' Switch to PM newly connected users
Dim bFirstIn ' First person logged in
Dim iTimeTook ' Time it took to answer
Dim iDelay ' Delay between hints
Dim iDelayNorm ' Normal delay
Dim iDelayBreak ' Break Delay
Dim iAsked ' Questions Asked
Dim iToAsk ' Questions to ask before break
Dim iSaveCount ' Timer Counter to autosave scores
sub Main()
'set object to get path from Registry
Dim wshShell
Set wshShell = CreateObject("WScript.Shell")
sPath = wshShell.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\NeoModus\Hub\PhoenixRisingScripts\AppPath") & "\Scripts"
'Setup Scripting Dictionaries for Questions and Users
Set Questions = CreateObject("Scripting.Dictionary")
Set Answers = CreateObject("Scripting.Dictionary")
Set Users = CreateObject("Scripting.Dictionary")
'Name of the Bot and set other bot variables
sBotName = "TriviA-BoT"
sBotQuickTrig = "trivia-bot"
sBotVers = "v2.3"
sBotTrig = "!tb "
'Setup File System Object
Set oFileSys = CreateObject("Scripting.FileSystemObject")
'Path to text files ' not used, to use this rem the get from registry.
'sPath = "C:\Program Files\Direct Connect Hub\Scripts"
'Default Settings in case Config file not found
iDelayNorm = 4 ' Delay between hints * tmrScriptTimer.Interval
iDelayBreak = 1200 ' Default Break time * tmrScriptTimer.Interval
iToAsk = 40 ' Questions to ask before break
iInactiveCount = 10 ' Questions asked before user is logged out
bContinous = False ' Bot takes breaks
bChat = False ' Chat in bot while playing in PM
bMain = True ' Bot runs in main
bPMNewUsers = False ' PM new user on connect?
iSaveCount = 0 ' Init autosave counter
'Static Settings needed before bot is started
tmrScriptTimer.Interval = 5000 ' Timer Interval is 5 Seconds, best not to change
tmrScriptTimer.Enabled = False ' Timer Off before bot is started
iAsked = 0 ' Questions Asked
iUsers = 0 ' Users Logged in
'Load SuperOps and Config Settings from File
frmHub.DoEventsForMe
Call SetConfig("trivops.txt")
frmHub.DoEventsForMe
Call SetConfig("trivbot.txt")
frmHub.DoEventsForMe
iDelay = iDelayNorm
If Not bMain Then
bFirstIn = True
Else
bFirstIn = False
End If
'Set Scoring Array
ReDim Scores(1,0)
Scores(0,0) = "Triva-Bot"
Scores(1,0) = 10000
'Set Ops Help and User Help
sHelp = "Hello %USER%"
sHelp = sHelp & sBotName & " Help:" & vbCrlf
sHelp = sHelp & "The following commands are available to you %USER%." & vbCRLF
sHelp = sHelp & sBotTrig & "Help - Read the help for " & sBotName & "!" & vbCRLF
sHelp = sHelp & sBotTrig & "AskMe - Show a question." & vbCRLF
sHelp = sHelp & sBotTrig & "HintMe - Show part of answer." & vbCRLF
sHelp = sHelp & sBotTrig & "SkipMe - Skip the question." & vbCRLF
sHelp = sHelp & sBotTrig & "TopTen - Show the top ten scorers." & vbCRLF
sHelp = sHelp & sBotTrig & "Scores - Show the all the scorers in PM." & vbCRLF
sHelp = sHelp & sBotTrig & "MyScore - View your score and place in main." & vbCRLF
sHelp = sHelp & sBotTrig & "LogIn - Login to play Trivia." & vbCRLF
sHelp = sHelp & sBotTrig & "LogOut - Logout and stop playing Trivia." & vbCRLF
sHelp = sHelp & sBotTrig & "ListUsers - show people playing." & vbCRLF
sHelp = sHelp & sBotTrig & "StartMe - Start The Bot!" & vbCRLF
sHelp = sHelp & sBotTrig & "StopMe - Stop the bot." & vbCRLF
sHelp = sHelp & sBotTrig & "SaveScores - Save the scores." & vbCRLF
sHelp = sHelp & sBotTrig & "LoadScores - Load the scores." & vbCRLF
sHelp = sHelp & sBotTrig & "ClearScores NoW! - Clear the scores." & vbCRLF
sHelp = sHelp & sBotTrig & "SetNonStop On/Off- Set trivia to run nonstop." & vbCRLF
sHelp = sHelp & sBotTrig & "SetChat On/Off- Set trivia so can Chat in pm." & vbCRLF
sHelp = sHelp & sBotTrig & "SetMain On/Off- Set trivia so plays in Main or PM." & vbCRLF
sHelp = sHelp & sBotTrig & "PMNewUsers On/Off- Set trivia PMs User on Connect." & vbCRLF
sHelp = sHelp & sBotTrig & "SetHintDelay # - Set hint delay # of 5 sec intervals." & vbCRLF
sHelp = sHelp & sBotTrig & "SetBreakDelay # - Set Break in Minutes." & vbCRLF
sHelp = sHelp & sBotTrig & "SetQToAsk # - Set number questions to ask between breaks." & vbCRLF
sHelp = sHelp & sBotTrig & "SetQToLogOut # - Set number questions to ask before LogOut." & vbCRLF
sHelp = sHelp & sBotTrig & "SaveConfig - Save Bot Settings." & vbCRLF
sHelp = sHelp & sBotTrig & "ResetConfig - Load Bot Settings." & vbCRLF
sHelp = sHelp & sBotTrig & "BotStatus - View Bot Settings." & vbCRLF & vbCRLF
sHelp = sHelp & sBotTrig & "ListTrivOps - List Trivia Ops." & vbCRLF
sHelp = sHelp & sBotTrig & "AddTrivOps - Add a Trivia Op." & vbCRLF
sHelp = sHelp & sBotTrig & "DelTrivOps - Delete a Trivia Op." & vbCRLF
sHelp = sHelp & vbCRLF & "Scoring is 1 - 4 points, depending on number of hints shown." & vbCRLF
sHelp = sHelp & vbCrlf & sBotName & " is an Phoenix Rising Script (" & sBotVers & ") ¬2002 _-=P-[Lurker's Lair]-R=-_"
sHelpOp = sHelp
sHelp = "Hello %USER%"
sHelp = sHelp & sBotName & " Help:" & vbCrlf
sHelp = sHelp & "The following commands are available to you %USER%." & vbCRLF
sHelp = sHelp & sBotTrig & "Help - Read the help for " & sBotName & "!" & vbCRLF
sHelp = sHelp & sBotTrig & "TopTen - Show the top ten scorers." & vbCRLF
sHelp = sHelp & sBotTrig & "Scores - Show the all the scorers in PM." & vbCRLF
sHelp = sHelp & sBotTrig & "MyScore - View your score and place in main." & vbCRLF
sHelp = sHelp & sBotTrig & "LogIn - Login to play Trivia." & vbCRLF
sHelp = sHelp & sBotTrig & "LogOut - Logout and stop playing Trivia." & vbCRLF
sHelp = sHelp & sBotTrig & "ListUsers - show people playing." & vbCRLF
sHelp = sHelp & vbCRLF & "Scoring is 1 - 4 points, depending on number of hints shown." & vbCRLF
sHelp = sHelp & vbCrlf & sBotName & " is an Phoenix Rising Script (" & sBotVers & ") ¬2002 _-=P-[Lurker's Lair]-R=-_"
'Register bot to Hub, do not change
frmHub.RegisterBotName(sBotName)
end sub
if so i want to be able to keep a record of the scores, stop having to login every time and keep the trivia in main.
thanks for any help
-
- Posts: 53
- Joined: 2003-08-09 10:00
- Location: Wilmington, NC
- Contact:
I am not the best scripter in the world, but it seems that it is set to run the chat in main:
As to the other thing, what do you mean not having to log in? Do you want to access the script without being in your hub?
Code: Select all
bMain = True ' Bot runs in main
-
- Posts: 53
- Joined: 2003-08-09 10:00
- Location: Wilmington, NC
- Contact:
-
- Posts: 53
- Joined: 2003-08-09 10:00
- Location: Wilmington, NC
- Contact:
-
- Posts: 1
- Joined: 2003-12-08 17:35
- Location: St. Cloud State Unv. MN
- Contact: