Do you think I could just leave this part blank and it'd be okay? We're just going to replace the whole thing with a header image anyway, right?
You are not logged in.
Pages: 1
Topic closed
How would you wait for a chat reply (or string return) by a player in ee?
like if a bot asked you "How many biscuits would you like?"
how would you wait for a player to answer?
Offline
Mark the user as answering a question, also assign a question ID; if you get a chat message from a user and they are marked as answering first check if the answer is valid and if it is unmark the player and then parse the answer to the question ID.
Edit: solution below v http://forums.everybodyedits.com/viewto … 62#p609857
Thank you eleizibeth ^
I stack my signatures rather than delete them so I don't lose them
Offline
^ Yeah. That sums it up.
You could also ask the user, but still have them respond in command format. That seems a lot easier for our beginner users who follow tutorials.
"How many biscuits?"
"!biscuits 20"
Probably should actually keep to a command format, or at least "!answer 20" / "!20" so you don't mistakenly grab the user's discussion with someone else.
Offline
Probably should actually keep to a command format, or at least "!answer 20" / "!20" so you don't mistakenly grab the user's discussion with someone else.
With natural language communication to the bot, not needing it in a command format (but accepting it) is nice to use; if you are asked "How many biscuits?" and you said "Haii" to someone - it's easy to see that that is not a number and would be ignored, checks will have to be made to see if the answer given comprises of just a number of a number with some form of "biscuits".
Google uses https://github.com/tensorflow/models/tr … /syntaxnet, which is available in Python and PlayerIO is available in Python; it seems that a natural language bot could appear here in an awful language.
Thank you eleizibeth ^
I stack my signatures rather than delete them so I don't lose them
Offline
I won't need to parse something that complicated. They'll all be "yes", "no", or number questions. My problem was that the answer was required for the game (bot) to progress. I used a while loop with an awaited task delay to pause the thread until a "yes" or "no" was received. I realized that wasn't a good solution so I divided my methods to prevent using these loops. The problem now is that I don't want having so many methods for different questions and I need a simple way of knowing which question I'm replying "yes" to.
Offline
Sorry, where can I find the python version of Player.IO?
Everybody edits, but some edit more than others
Offline
Sorry, where can I find the python version of Player.IO?
http://forums.everybodyedits.com/viewto … 01#p589201
I won't need to parse something that complicated. They'll all be "yes", "no", or number questions. My problem was that the answer was required for the game (bot) to progress. I used a while loop with an awaited task delay to pause the thread until a "yes" or "no" was received. I realized that wasn't a good solution so I divided my methods to prevent using these loops. The problem now is that I don't want having so many methods for different questions and I need a simple way of knowing which question I'm replying "yes" to.
*working on something for you*
Thank you eleizibeth ^
I stack my signatures rather than delete them so I don't lose them
Offline
It would probably be best to have the players answer to the bot using it's name, using the tab thing. Avoids possible misunderstandings.
One bot to rule them all, one bot to find them. One bot to bring them all... and with this cliché blind them.
Offline
so many methods for different questions
that reminds me. The one C# video I watched on youtube talked about predicates or something. Where you pass code-ish statements into the function so instead of 50 functions, you just have the predicate (delegate?)
Sadly I forgot everything useful to you now.
and it looks like koya's on the case so gl
Offline
it looks like koya's on the case so gl
It's done but just making it perfect and adaptable.
It's made completely separate to PlayerIO and player classes, it will be able to be used freely with whatever wrappers you have.
In which the answer could have been answered hours later.
Questions and answers loaded from a linked JSON file.
Working on permitting various variable types for answers.
I haven't forgotten to delete the question entry after being checked.
Thank you eleizibeth ^
I stack my signatures rather than delete them so I don't lose them
Offline
Sorted: https://github.com/koya-io/Everybody-Ed … on-Handler
Program.cs: https://github.com/koya-io/Everybody-Ed … Program.cs
qquestion.json: https://github.com/koya-io/Everybody-Ed … stion.json
If there's something I missed, please be sure to say - I'm not completely awake so I may have.
Note, this is still not entirely complete - I will need to sort out answer validation so that you can easily have error correction
if (pq.validate(username, ans)) {
pq.delete(username);
}
else
{
/*User did not give a valid answer - will allow user to answer again or you can pm the user to say that the answer is not valid*/
}
Thank you eleizibeth ^
I stack my signatures rather than delete them so I don't lose them
Offline
Very nice job Koya!
Offline
I won't need to parse something that complicated. They'll all be "yes", "no", or number questions. My problem was that the answer was required for the game (bot) to progress. I used a while loop with an awaited task delay to pause the thread until a "yes" or "no" was received. I realized that wasn't a good solution so I divided my methods to prevent using these loops. The problem now is that I don't want having so many methods for different questions and I need a simple way of knowing which question I'm replying "yes" to.
I think you mean that you're in EE, and with tons of players (lets assume) and each at a different question. This is what I draw from the text.
I would have a player class with all my stuff in it, then have the question ID they're on, and also have a " List<string> Answers " filled with their answers.
Then I'd have a Question class, which has the question " public string Text ", and what type of answer.
Then outside of those classes in the main class, I'd have a " Dictionary<int, Question> Questions " filled with all the questions.
Then when you recieve the "say" message, I'd find the player, use " Questions[player.QuestionOn] ", and run through the checks, which checks if the answer is in the proper format, then add their answer to their Answers " player.Answers.Add((string)m[1]); ", advance the question number " player.QuesitonOn++; ", and ask the next question " bot.Say("say", "/pm " + player.Username + " " + Questions[player.QuestionOn].Text); "
Is this what you mean SmittyW?
Offline
Yes, that's pretty much what Koya did.
Offline
Yes, that's pretty much what Koya did.
Not quite, I didn't make a player class as I wanted to completely separate it from any wrapper that anyone else is using vanilla, physics or another.
Questions stored in a list of Asked in playerQuestions, questions and answers loaded in from QAManager.
The questions can be set up, asked and answered completely separately.
@ninjasupeatsninja
Scroll up for my solution
Thank you eleizibeth ^
I stack my signatures rather than delete them so I don't lose them
Offline
SmittyW wrote:Yes, that's pretty much what Koya did.
Not quite, I didn't make a player class as I wanted to completely separate it from any wrapper that anyone else is using vanilla, physics or another.
Questions stored in a list of Asked in playerQuestions, questions and answers loaded in from QAManager.
The questions can be set up, asked and answered completely separately.
@ninjasupeatsninja
Scroll up for my solution
I saw your code, I just didn't see it interact with PlayerIO anywhere, so I figured that it was just a client-side question asker.
Now I realize it's kinda a dll
Offline
Now I realize it's kinda a dll
Literally opened up bots and programming to see you say "its a dll" in every freaking topic. stop with the dll talk bro, not everything is a dll
thanks zoey aaaaaaaaaaaand thanks latif for the avatar
Offline
ninjasupeatsninja wrote:Now I realize it's kinda a dll
Literally opened up bots and programming to see you say "its a dll" in every freaking topic. stop with the dll talk bro, not everything is a dll
Following is an assumption, sorry if people are offended by this:
Often when you learn something new (for example the term DLL) all by yourself you sometimes are a bit proud to know what it is, and try to apply that as often as possible, though sadly using it too much.
I know I do it myself at times, like when I learned this new Dutch (cus I'm Dutch) word, I just tried to manipulate conversations so I could use that word for whatever strange reason.
Long story short: The DLL stuff will pass in a week,
Offline
EE is a dll.
One bot to rule them all, one bot to find them. One bot to bring them all... and with this cliché blind them.
Offline
ninjasupeatsninja wrote:Now I realize it's kinda a dll
Literally opened up bots and programming to see you say "its a dll" in every freaking topic. stop with the dll talk bro, not everything is a dll
Xfrogman43 wrote:ninjasupeatsninja wrote:Now I realize it's kinda a dll
Literally opened up bots and programming to see you say "its a dll" in every freaking topic. stop with the dll talk bro, not everything is a dll
Following is an assumption, sorry if people are offended by this:
Often when you learn something new (for example the term DLL) all by yourself you sometimes are a bit proud to know what it is, and try to apply that as often as possible, though sadly using it too much.
I know I do it myself at times, like when I learned this new Dutch (cus I'm Dutch) word, I just tried to manipulate conversations so I could use that word for whatever strange reason.
Long story short: The DLL stuff will pass in a week,
I'm sorry, I've always associated something that does some stuff ( such as a class that makes your bot teleport everywhere randomly ) with a DLL, partly because since I like to compile all my code into DLLs for usage, that other people do, which is a stupid assumption to make, since people have different opinions. Now that I've actually googled them instead of go off of what I thought it was, I think I might be a little better off.
tl;dr: actually googled the terms instead of go based off of what I thought it was; I might be better off now.
Offline
Pages: 1
Topic closed
[ Started around 1732472094.9006 - Generated in 0.407 seconds, 14 queries executed - Memory usage: 1.75 MiB (Peak: 2.02 MiB) ]