Sign in to follow this  
Followers 0
AutoitFaN1000

A triviabot for a game mod called garry's mod

1 post in this topic

So, in this game, there is chat. chat is triggered by pressing y and typing. i have made a hard-coded program to say stuff (just Send("ystuff here{ENTER}") but i want it to become a kind of triviabot. Also in the game, there is a console. in the console it prints out all the chat. I don't know how to get it to get that chat, and get responses out of it (like, i would do:

Send("yWhat is the answer to: 1+1{ENTER}") and it would check the console for 2, and the first player who said 2 would get a prize (in a server you can do /give <player> <money>). The only think i need is to actually GET the answers from the players. the console has this format:

Player: Text

So it would check the Text field, and if it is the answer, then /give Player 10 or something. The only way i can think of is having it automaticly coppy the text into a GUI textbox, but i'm sure there are other ways to get text off of a window. So, if anyone can help, it would be appreceated. Also, here's a screenshot of the console. The website is www.garrysmod.com and the forums are www.facepunch.com, and the wiki is wiki.garrysmod.com

post-30442-1251048109284_thumb.jpg

post-30442-12510481498821_thumb.jpg

post-30442-12510481856076_thumb.jpg

Share this post


Link to post
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
Sign in to follow this  
Followers 0