• Hail, we're RedGuides. We want you to play six (yes, 6!) EverQuest characters at once. We have scripts and a friendly community to help, please join our playstyle and say hello! 👋
  • We've added LLM sections to our Terms & Rules and Resource Rules, for everyone's sanity & in-game safety.
    Read more
    a. Do not replace your voice with an LLM. This goes for your posts and your scripts. Drafting and editing with a tool is fine, but don't take you out of what you share.
    b. Do not replace your EQ character's voice with an LLM. We don't want scripts that speak over /ooc, /shout or other public channels. This has been an unwritten rule that's kept casino scripts off the site for decades, but we're now compelled to make it clear: keep automated communication private.

    Why Does RG Review Scripts?
    Nearly every LLM-written Lua script we see is making your character do impossible things, and rarely in a way that's beneficial to you. We've seen heavy server hammering, /target over impossible distances when /nav spawn would passively accomplish the same thing, a spawn search that fires 20+ times per second, and other pointless actions that are likely annoying GMs.

    You are welcome to use LLMs as a tool to structure, draft, and edit your work, but please read critically before hitting /lua run

MQ2Shutdown

Alatyami

NotAddicted.com Engineer (Retired)
I had to take a break from working on the buff plugin for TheZ ...

MQ2Shutdown, will do just as it implies ... it will shutdown your computer, by send Microsoft Windows the shutdown command. How is this helpful? There are a few times that I know that my macro is only going to run for a set time period and then my desktop is just going to sit there doing nothing, so now once my macro is completed, it shuts down my desktop.

This is a very simple plugin.

Edit: Updated Compiled Library to Version 1.2, that includes the /logout and /reboot

Usage:
Rich (BB code):
/shutdown    
/reboot
/logout

Source Code (VC++ 2003):
Rich (BB code):
// MQ2Shutdown.cpp 
// Author: Alatyami, Redguides.com, 2007
// 
// This plugin allows your to shutdown, reboot, or logout of MS Windows.
//
// MOD NOTES:
//  01/24/2007	Initial Release. - Alatyami
//                   Made the SystemRoot Dynamic - Alatyami
//  01/25/2007	Added /logout and /reboot - Alatyami
//
// USAGE:
//   /shutdown     ** Shutsdown and powers off Windows.
//   /logout          ** Closes out all running apps and logs out of Windows
//   /reboot        ** Closes out all running apps and reboots your machine.


#include "../MQ2Plugin.h"

#include <stdlib.h>

PreSetup("MQ2Shutdown"); PLUGIN_VERSION(1.2);

// PROTOTYPES
void shutdownCommand(PSPAWNINFO pChar, PCHAR szLine);
void rebootCommand(PSPAWNINFO pChar, PCHAR szLine);
void logoutCommand(PSPAWNINFO pChar, PCHAR szLine);


// FUNCTIONS
void shutdownCommand(PSPAWNINFO pChar, PCHAR szLine) {
	system("\%SystemRoot\%\\System32\\shutdown.exe -s -f -t 00");
}

void rebootCommand(PSPAWNINFO pChar, PCHAR szLine) {
	system("\%SystemRoot\%\\System32\\shutdown.exe -r -f -t 00");
}

void logoutCommand(PSPAWNINFO pChar, PCHAR szLine) {
	system("\%SystemRoot\%\\System32\\shutdown.exe -l -f -t 00");
}

PLUGIN_API VOID InitializePlugin(VOID) {
	DebugSpewAlways("Initializing MQ2Shutdown");
	AddCommand("/shutdown",shutdownCommand);
	AddCommand("/reboot",rebootCommand);
	AddCommand("/logout",logoutCommand);
}

PLUGIN_API VOID ShutdownPlugin(VOID) {
	DebugSpewAlways("Shutting down MQ2Shutdown");
	RemoveCommand("/shutdown");
	RemoveCommand("/reboot");
	RemoveCommand("/logout");
}
 
Last edited:
Very handy plugin-in here is the idea i had to make it a little better.
Use %SystemDrive% or a %SystemRoot% instead of just using C:. because not all of us have a c drive where windows resides.
 
Nice little toy, yami...I know that sometimes when I finish eq, this would be easier than /exit + blah + shutting down...
 
Pugs said:
Very handy plugin-in here is the idea i had to make it a little better.
Use %SystemDrive% or a %SystemRoot% instead of just using C:. because not all of us have a c drive where windows resides.

Doh ... can't believe I didn't think about that ... recompile coming up soon ...

Updated DLL posted ...
 
Would it be possible to incorporate a /restart also?.

I occasionally have connectivity probems with my router and also graphics problems when dual botting toons using wineq. Regularly have to reboot etc when i get the "Device Reset Failed" message.

a /restart would be excellent. ;)
 
sure thing .... I'll stick in restart and log out ....

EDIT: Updated w/ logout and reboot.
 
Last edited:
MQ2Shutdown

Users who are viewing this thread

Back
Top
Cart