User Control Panel
Advertisements

HELP US, HELP YOU!

trivia

 
Post new topic   Reply to topic    Bot Depot Forum Index -> Code Help
View unanswered posts
Author Message
JTW
God Like
God Like


Joined: 07 Mar 2004
Posts: 582
Location: Maidstone
Reputation: 73.3
votes: 4

PostPosted: Sun Apr 04, 2004 1:03 pm    Post subject: Reply with quote

can some 1 make me a triva kind of thing for anderomeda
where it takes you to a "trivia" room and asks *lazy* questions i can make the room thing just not get it to ask questions

_________________
"Help us, Help you" - BotDepot
Back to top
zander
God Like
God Like


Joined: 14 Jan 2004
Posts: 540
Location: england
Reputation: 66.6

PostPosted: Sun Apr 04, 2004 3:21 pm    Post subject: Reply with quote

well i cant be that hard all *lazy* would realy have to do is write a document with 100's of questions with the answer to them dont know how *lazy* could get it to say them tho and for the room change the chatroom command to trivia
Back to top
sumnerx
Newbie
Newbie


Joined: 08 Feb 2004
Posts: 3

Reputation: 27.4Reputation: 27.4Reputation: 27.4

PostPosted: Sun Apr 04, 2004 4:48 pm    Post subject: Reply with quote

QUOTE(zander @ Apr 4 2004, 07:21 AM)
well i cant be that hard all *lazy* would realy have to do is write a document with 100's of questions with the answer to them dont know how *lazy* could get it to say them tho and for the room change the chatroom command to trivia

Well then, Why say it cant be too hard?

Put The Quotes command reader, and learn how to make it read for the answer.
Back to top
JTW
God Like
God Like


Joined: 07 Mar 2004
Posts: 582
Location: Maidstone
Reputation: 73.3
votes: 4

PostPosted: Mon Apr 05, 2004 1:09 am    Post subject: Reply with quote

hmm i must b dumb cant even get it to say the stuff from a text file
_________________
"Help us, Help you" - BotDepot
Back to top
JoeX
Agent
Agent


Joined: 02 Jan 2004
Posts: 2153

Reputation: 72.7

PostPosted: Mon Apr 05, 2004 6:13 pm    Post subject: Reply with quote

QUOTE(JTW @ Apr 4 2004, 05:09 PM)
hmm i must b dumb cant even get it to say the stuff from a text file

lol keep trying

_________________
Heroes NBC
Back to top
Trebe
Young One
Young One


Joined: 23 Mar 2004
Posts: 58
Location: Computer Desk, My House, Alberta, Canada
Reputation: 27Reputation: 27Reputation: 27

PostPosted: Mon Apr 05, 2004 6:46 pm    Post subject: Reply with quote

Seems to me like you could modify the number guessing game to do it.
Back to top
JTW
God Like
God Like


Joined: 07 Mar 2004
Posts: 582
Location: Maidstone
Reputation: 73.3
votes: 4

PostPosted: Tue Apr 06, 2004 12:51 pm    Post subject: Reply with quote

good i dea il try that next
_________________
"Help us, Help you" - BotDepot
Back to top
jonphamta
Senior Member
Senior Member


Joined: 20 Jan 2004
Posts: 247

Reputation: 32.9Reputation: 32.9Reputation: 32.9

PostPosted: Sun Apr 11, 2004 3:06 am    Post subject: Reply with quote

why dont you:
*Make a new account
*download the SDBA trivia bot
*use the 'Call' command to invite the bot

And there you have it Laughing
Back to top
JTW
God Like
God Like


Joined: 07 Mar 2004
Posts: 582
Location: Maidstone
Reputation: 73.3
votes: 4

PostPosted: Sun Apr 11, 2004 5:53 am    Post subject: Reply with quote

good idea Very Happy
Thanks

_________________
"Help us, Help you" - BotDepot
Back to top
Stephen
Senior Member
Senior Member


Joined: 03 Dec 2003
Posts: 159

Reputation: 32.8Reputation: 32.8Reputation: 32.8

PostPosted: Sun Apr 11, 2004 6:08 am    Post subject: Reply with quote

Code:
sub trivia<br />{<br />   my ($bot, $self, $user, $msg) = @_;<br /><br />   if ($msg eq '')<br />   {<br />      if (!exists $self->{callback})<br />      {<br />         $self->{callback} = 'trivia';<br />         $self->{trivia} = {};<br />         my $trivia = $self->{trivia};<br />         $trivia->{part} = 'one';<br />         &question();<br />      }<br />   }<br />    else<br />   {<br />      my $trivia = $self->{trivia};<br />      if ($trivia->{part} eq 'one')<br />      {<br />         if ($msg eq "stop")<br />         {<br />            $self->{callback} = '';<br />            delete $self->{trivia};<br />            return "You have left the trivia.";<br />         }<br />         if ($msg eq $trivia->{answer}) <br />         {<br />             return "You have guessed the correct answer!";<br />             &question();<br />         }<br />          else<br />         {<br />             return "You guessed wrong!";<br />         }<br />      }<br />   }<br /><br />}<br /><br />sub question<br />{<br />   my ($bot, $self, $user, $msg) = @_;<br />   my $trivia = $self->{trivia};<br /><br />   open (FILE, "./trivia.txt");<br />   my @trivia = <FILE>;<br />   close FILE;<br />   chomp @trivia;<br /><br />   $full = $trivia[int(rand(scalar(@trivia)))];<br /><br />   my ($trivia->{question},$trivia->{answer}) = split (/==/,$full,2);<br />   return $trivia->{question};<br />}<br /><br />{<br />};


Format:

==

Save the questions and answers to a txt file called trivia in the bots directory.

Sorry this code is untested Smile
Back to top
Stephen
Senior Member
Senior Member


Joined: 03 Dec 2003
Posts: 159

Reputation: 32.8Reputation: 32.8Reputation: 32.8

PostPosted: Thu Apr 15, 2004 3:48 am    Post subject: Reply with quote

Why do people keep taking points off me for this command.

1stly I cant use andromeda because it doesnt work for me.
That means i cant test andromeda commands so why take points from
someone who posted a command that will proberly work.
Also no one has said it doesnt work!
Back to top
eric256
The Keymaker
The Keymaker


Joined: 03 May 2006
Posts: 2292
Location: Colorado
Reputation: 47Reputation: 47Reputation: 47Reputation: 47Reputation: 47

PostPosted: Thu Apr 15, 2004 2:18 pm    Post subject: Reply with quote

Don't post commands that you can't test. Oh and only 1 person downvoted you for it so get over it.
_________________
Eric256
Proud previous owner and current admin of Bot-depot.com
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Bot Depot Forum Index -> Code Help All times are GMT
Page 1 of 1

 



Protected by phpBB Security phpBB-TweakS
phpBB Security Has Blocked 9 Exploit Attempts.
Antispam Captcha Mod by phpbb-security.com
Powered by phpBB © 2001, 2005 phpBB Group