Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="iso-8859-1"?>
- <!DOCTYPE muclient [
- <!ENTITY afk_command "afk" >
- <!ENTITY timer_mins "4" >
- <!ENTITY timer_secs "30" >
- ]>
- <!-- Saved on Saturday, October 08, 2005, 10:37 AM -->
- <!-- MuClient version 3.66 -->
- <!-- Plugin "AFK_timer" generated by Plugin Wizard -->
- <muclient>
- <plugin
- name="AFK_timer"
- author="Nick Gammon"
- id="4d167d47cac26fb36e161e48"
- language="Lua"
- purpose="Sends AFK to the MUD when 5 minutes elapse"
- date_written="2005-10-08 10:32:50"
- requires="3.52"
- version="1.0"
- >
- <description trim="y">
- <![CDATA[
- After the specified interval (default 5 minutes) elapse, sends "afk" to the MUD.
- ]]>
- </description>
- </plugin>
- <!-- Timers -->
- <timers>
- <timer name="afk_timer"
- second="&timer_secs;"
- minute="&timer_mins;"
- send_to="12"
- enabled="y"
- >
- <send>
- ColourNote ("salmon", "", "You are now AFK.")
- WindowShow(GetPluginID (), true);
- EnableTimer ("afk_timer", 0)
- </send>
- </timer>
- </timers>
- <!-- Script -->
- <script>
- <![CDATA[
- -- when they type something, reset AFK status
- function OnPluginCommand (sText)
- FixTimer ()
- return true -- process the command
- end
- -- when you connect to the MUD, presumably you are not AFK
- function OnPluginConnect ()
- FixTimer ()
- end
- -- shared routine to handle turning AFK off
- function FixTimer ()
- WindowCreate(GetPluginID (), 0, 0, 500, 500, 12, 1, #000000);
- WindowFont(GetPluginID (), "font1", "Arial", 40, false, false, false, false, 1, 0);
- WindowText(GetPluginID (), "font1", "Idle", 0, 0, 0, 0, #FF9999, true);
- if GetTimerOption ("afk_timer", "enabled") == 0 then
- ColourNote ("salmon", "", "You are no longer idle.")
- end
- -- turn timer back on
- EnableTimer ("afk_timer", 1)
- -- make sure the full time interval elapses
- ResetTimer ("afk_timer")
- WindowShow(GetPluginID (), false);
- end
- ]]>
- </script>
- </muclient>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement