Open GoogleCodeExporter opened 8 years ago
Can you give more detail about what you are looking for? Are you suggesting an
option that will exit the RO client after a period of inactivity in the owner?
Original comment by faithful...@gmail.com
on 2 Dec 2010 at 5:46
Yes, it.
Original comment by rid.lin....@gmail.com
on 8 Dec 2010 at 12:50
Impossible with LUA/AI.
Original comment by landstei...@gmail.com
on 8 Dec 2010 at 3:02
Actually, it is quite possible with Lua. A call to os.exit() will act the same
as if the user had clicked the X button on the Ragnarok window.
That said, I'm not sure how exactly I want to implement this. Based on HP would
not be beneficial because the client would close but the server would keep the
character around for about 10 seconds. Based on certain actor types being on
the screen is similarly unhelpful. The only real option is based on inactivity,
but that's prone to error AND the AI has no way of knowing if the owner is just
chatting up a storm.... Of course, the default would be disabled. But I
wouldn't want a user activating it on accident and then blaming my script for
repeatedly closing RO when he's just trying to sit and chat.
Any ideas are welcome.
Original comment by faithful...@gmail.com
on 8 Dec 2010 at 7:57
Very interesting; the client closes? I would assume it'd just terminate
execution of the LUA script instead of halting the client.
I suspect the reason this is requested is to afk for the duration of the time
the homunculus can remain fed. A user will fill their homunculus hunger bar up
to '100', then have it disconnect when it is finished for easy leveling.
And technically, it'd be 100% legal to do this since its entirely in LUA.
Original comment by landstei...@gmail.com
on 8 Dec 2010 at 8:15
Yes, the client closes. The call os.exit() calls the C function exit() which
terminates the running process with the specified exit code. (It's also
interesting to note that the homu/merc AIs run inside the graphic thread. If
the game already runs at low frames-per-second, then the AI will be called less
frequently; similarly, if the AI takes a long time to complete, it will
adversely affect the frames-per-second. I suspect this is also the root cause
for GetV(V_MOTION,id) never being quite accurate for the homunculus.)
Clicking feed if the hunger bar is 76+ will result in overfeeding the
homunculus. Since 1 point of hunger is worth 1 minute, the time between safe
values is 75-10 = 65 minutes. Should I make that the maximum time?
I think instead of exiting RO, though, I'll have RAIL send up an error message
after the owner has been idle for longer than specified. This way, if the user
really is AFK, then the graphic thread (which is also the AI and the network
thread) will be stuck until the user clicks "OK" on the Lua error message. I'll
also be able to to control the message it has, and it won't just close RO. If
the user is just chatting, then they can just click "OK" and continue. If they
are AFK, the message will sit there until they come back--at which point, the
connection between RO and the server would have timed out causing them to
disconnect....
Original comment by faithful...@gmail.com
on 8 Dec 2010 at 11:46
Original issue reported on code.google.com by
rid.lin....@gmail.com
on 22 Nov 2010 at 7:09