Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AutoShutDown #46

Open
GoogleCodeExporter opened this issue Mar 14, 2015 · 6 comments
Open

AutoShutDown #46

GoogleCodeExporter opened this issue Mar 14, 2015 · 6 comments

Comments

@GoogleCodeExporter
Copy link

What feature would enhance usability or efficiency?
AutoShutDown

What steps would demonstrate the improvement granted by the recommended
feature?
1.It is not necessary to worry for attachment if has forgotten about Hom's
2.
3.

What is the current behavior in the above situation?
not implemented yet

What revision of the product are you using?
174

What type of homunculus/mercenary are you using?
Vanilmirth

Please provide any additional information below.

Original issue reported on code.google.com by [email protected] on 22 Nov 2010 at 7:09

@GoogleCodeExporter
Copy link
Author

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 [email protected] on 2 Dec 2010 at 5:46

  • Changed state: Pending

@GoogleCodeExporter
Copy link
Author

Yes, it.

Original comment by [email protected] on 8 Dec 2010 at 12:50

@GoogleCodeExporter
Copy link
Author

Impossible with LUA/AI.

Original comment by [email protected] on 8 Dec 2010 at 3:02

@GoogleCodeExporter
Copy link
Author

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 [email protected] on 8 Dec 2010 at 7:57

@GoogleCodeExporter
Copy link
Author

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 [email protected] on 8 Dec 2010 at 8:15

@GoogleCodeExporter
Copy link
Author

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 [email protected] on 8 Dec 2010 at 11:46

  • Changed state: Accepted

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant