function do_something(actor)
actor:sendText("hello there, was is your name?")
local name = actor:waitForLine()
actor:sendText("Oh, your name is " .. name .. ", right?")
local nameOk = actor:waitForBoolean()
if nameOk then
actor:sendText("yay")
else
actor:sendText("boo")
end
end
client.push('Enter name:', name_func)
client.push('Enter password:', password_func)
A good example is:
Of course, this is just one example. Do any of you use something like this?
I would like to build a system that can be as reusable as possible. Obviously the
descriptor state can be changed, but there seems to be more to it than that.