[Home] [Downloads] [Search] [Help/forum]


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Plugins
. . -> [Subject]  AFK Trigger/Replier

AFK Trigger/Replier

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Posted by Calimun   (10 posts)  [Biography] bio
Date Wed 18 Jul 2007 12:16 AM (UTC)
Message
Heya,

I probably passed over it somewheres in the forum, and probably sticking out like a sore thumb. But I was wondering if anyone knew if there was a plugin/script trigger that allowed the client to go afk when I don't manually input anything for so long, then automatically reply to Tells while I'm set afk. When a manual input is made, it then snaps awake. Ya know what I mean?

Thanks to anyone who can point me in the right direction/create such a script for me. I just upgraded to MUSHclient 4.01.
[Go to top] top

Posted by Cage_fire_2000   USA  (119 posts)  [Biography] bio
Date Reply #1 on Thu 19 Jul 2007 12:26 AM (UTC)
Message
Well, I don't know if I'll write if for you, but I can tell you what you need, if you know how to script you could do it yourself(It's always good to know how something works in case you need to mod/fix it), otherwise maybe somebody else here would have the time to help you with it.


OK, the things you'd need are as follows:

* A reply trigger to reply to the tells. Initially disabled, it would be activated/deactivated by a script.
* An 'afk' alias to do all the script stuff required to enable the reply trigger, both by a timer, and if you type afk manually. This would also disable the timer if it wasn't already so(In case you typed afk manually).
* A one-shot timer(Meaning 'only fire once' not 'temporary', it needs to be reused but it only needs to send AFK once until you send another command.) set to whatever duration you want it to wait before sending the AFK, with the Send To box set to Execute so it'll run the afk alias.
* A script in the OnPluginCommandEntered/OnPluginSent callback to reset the timer so that it won't run for another <duration>, reenable it if it's already run, and disable the reply trigger. Hmm... this /might/ conflict with the AFK alias, so be careful.
* Optionally a script variable(Not world variable since you don't need to save across sessions) to record whether you are in AFK "mode" or not for use in the various script routines, this /should/ be identical to whether the reply trigger is enabled though, so you could just check the trigger's enabled status instead, although the variable would probably be easier to check.

I /think/ that is it, I could be wrong though.

Whew, that took me half-an-hour, maybe I should've just wrote the darn thing instead, it probably would've been faster, but then again, then you wouldn't learn anything.
[Go to top] top

Posted by David Haley   USA  (3,881 posts)  [Biography] bio
Date Reply #2 on Thu 19 Jul 2007 08:21 AM (UTC)
Message
It is almost always better to teach how to fish than to just give a fish. :-)

(If anything, because you usually field less questions yourself as time goes on! :P)

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
[Go to top] top

Posted by Calimun   (10 posts)  [Biography] bio
Date Reply #3 on Thu 19 Jul 2007 05:19 PM (UTC)
Message
Yeah, about that...

I tried scripting at many points in my life. I was acturally in a Information Technology college course. I used to be really good at it, but as years go by, it just frustrates the heck outta me when it comes to creating my own stuff from scratch. If I was to have a piece of script in front of me, I can usually pick it apart and find out how it ticks, but that's it.

I want to make my own, I would rather be self-sufficient, but I know it would be a couple months before I would ever produce it. I'd rather have it now, as my client has a anti-idle timer (which I need, because for some reason, my router cuts the connection after it idles for so long...and I haven't figured out why) So at times when I'm afk, my friends think I'm ignoring them.

I mean, if you guys have anything simpler already made, that's awesome. (instead of replying, I just need it to send 'page #away' and 'page #!away' when afk/back) If not, if you feel like making a script, that's cool too.

Thanks in advance.
[Go to top] top

Posted by Shaun Biggs   USA  (644 posts)  [Biography] bio
Date Reply #4 on Thu 19 Jul 2007 06:55 PM (UTC)
Message
Without knowing what mud/mush you play on, it's hard to create a script for that purpose. I'll start poking around with making one for myself, but I'm having some severe issues with scripting with Lua for some reason I can't figure out. Due to the large possibility of me randomly crashing my client, I can't promise to have anything working anytime soon.

It is much easier to fight for one's ideals than to live up to them.
[Go to top] top

Posted by Calimun   (10 posts)  [Biography] bio
Date Reply #5 on Thu 19 Jul 2007 07:13 PM (UTC)
Message
I didn't think the script would depend on the muck, as the script I had in mind would be mostly client-side. Anything that had to do with the muck, I could then just fill in myself.

Though, since I don't know much scripting myself, maybe you had a better idea.
[Go to top] top

Posted by Nick Gammon   Australia  (22,975 posts)  [Biography] bio   Forum Administrator
Date Reply #6 on Thu 19 Jul 2007 09:17 PM (UTC)
Message
There is something similar described here:

http://www.gammon.com.au/forum/?id=7488

That one actually disconnects after you are AFK for a while - but the general technique of detecting if you are AFK is there. It keeps track of when you last entered a command, and uses a timer.

Now rather than disconnecting, it could enable a trigger, and that trigger could auto-reply to people. Once you type something, it disables that trigger.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


22,106 views.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at HostDash]