• You've discovered RedGuides 📕 an EverQuest multi-boxing community 🛡️🧙🗡️. We want you to play several EQ characters at once, come join us and say hello! 👋
  • IS THIS SITE UGLY? Click "RG3" at the very bottom-left of this page to change it. To dismiss this notice, click the X --->

Plugin - MQ2LanguageTrainer (1 Viewer)

Joined
Sep 19, 2010
RedCents
79¢
plugin version of the language macro... because i was bored...

C++:
#include "../MQ2Plugin.h"
#include <ctime>

PreSetup("MQ2LanguageTrainer");

bool TrainingEnabled;
clock_t WaitTime;
CHAR pBuffer[256];
std::vector <std::string> colour;

void ToggleTraining(PSPAWNINFO pChar, PCHAR szLine)
{
    TrainingEnabled = !TrainingEnabled;
}

PLUGIN_API VOID InitializePlugin(VOID)
{
    colour.push_back("Blue");
    colour.push_back("Red");
    colour.push_back("Orange");
    colour.push_back("Yellow");
    WaitTime = clock();
    TrainingEnabled = false;
    AddCommand("/LanguageTrain",ToggleTraining);
}

PLUGIN_API VOID ShutdownPlugin(VOID)
{
    RemoveCommand("/LanguageTrain");
}

PLUGIN_API VOID OnPulse(VOID)
{
    if (TrainingEnabled && WaitTime <= clock()) {
        auto i = rand() % colour.size();
        sprintf(pBuffer, "/g %s", colour[i].c_str());
        DoCommandCmd((PSPAWNINFO)pLocalPlayer, pBuffer);
        WaitTime = clock() + 150;
    }
}
 

Sic

Nihil
Moderator
Joined
May 5, 2016
RedCents
4,557¢
plugin version of the language macro... because i was bored...

C++:
#include "../MQ2Plugin.h"
#include <ctime>

PreSetup("MQ2LanguageTrainer");

bool TrainingEnabled;
clock_t WaitTime;
CHAR pBuffer[256];
std::vector <std::string> colour;

void ToggleTraining(PSPAWNINFO pChar, PCHAR szLine)
{
    TrainingEnabled = !TrainingEnabled;
}

PLUGIN_API VOID InitializePlugin(VOID)
{
    colour.push_back("Blue");
    colour.push_back("Red");
    colour.push_back("Orange");
    colour.push_back("Yellow");
    WaitTime = clock();
    TrainingEnabled = false;
    AddCommand("/LanguageTrain",ToggleTraining);
}

PLUGIN_API VOID ShutdownPlugin(VOID)
{
    RemoveCommand("/mycommand");
}

PLUGIN_API VOID OnPulse(VOID)
{
    if (TrainingEnabled && WaitTime <= clock()) {
        auto i = rand() % colour.size();
        sprintf(pBuffer, "/g %s", colour[i].c_str());
        DoCommandCmd((PSPAWNINFO)pLocalPlayer, pBuffer);
        WaitTime = clock() + 150;
    }
}
Should the removeCommand be RemoveCommand("LanguageTrain"); ?
 

Knightly

Moderator
Joined
Jun 28, 2014
RedCents
8,603¢
If also recommend not using /languagetrain as the command since /language is already a command and there is no demarc. /langtrain would be better.
 

BlankStare

Well-known member
Joined
Oct 18, 2013
RedCents
513¢
I had a very simple one a few years ago that basically maxes languages in 2-3 minutes. Here it is for reference, I modified one I found due to an invalid language number.:

lang.mac
INI:
| Edited by BlankStare. Modified to skip Common (1) and Alaran (26). The original had 1-27 languages, unsure what 27 is/was.

#turbo

Sub Main
   /echo Language Macro Starting

   /declare lang int local

   :Langloop
 
   /for lang 2 to 25

    /language ${lang}
        
        /g .

  /next lang

  /goto :Langloop

/return
You run this on the character that has at least 1 skill in every language, and obviously to learn languages you need to be grouped in the same zone. Characters with some skill in a language will also skill-up to 100 while teaching it in a group. Characters with low INT/WIS will take 30-60 seconds longer than high INT/WIS stats.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top