Jump to content

A triviabot for a game mod called garry's mod


Recommended Posts

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

Link to comment
Share on other sites

  • Jos locked this topic
Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...