// Called once, when the plugin is to initialize PLUGIN_API VOID InitializePlugin(VOID) { bzsrchhandle = CreateMutex(NULL, FALSE, NULL); DebugSpewAlways("Initializing MQ2Bzsrch"); LoadMQ2Plugin("MQ2ItemDisplay"); HMODULE h = LoadLibrary("MQ2ItemDisplay.dll"); if (!h) { pg_Item = NULL; } else { pg_Item = (ITEMINFO *)GetProcAddress(h, "g_Item"); } FreeLibrary(h); // Add commands, macro parameters, hooks, etc. AddCommand("/bzsrch",BzSrchMe); AddCommand("/breset",BzSrchMe); AddCommand("/mq2bzsrch",MQ2BzSrch); //AddCommand("/pricecheck",bzpc); AddMQ2Data("Bazaar",dataBazaar); // cc - added, but not using TLO yet EzDetour(CBazaarSearchWnd__HandleBazaarMsg,&BzSrchHook::BzDetour,&BzSrchHook::BzTrampoline); pBazaarType = new MQ2BazaarType; pBazaarItemType = new MQ2BazaarItemType; }
// Called once, when the plugin is to initialize PLUGIN_API VOID InitializePlugin(VOID) { #ifdef __MQ2QUEUETYPE__ pQueueType = new MQ2QueueType; AddMQ2Data("Queue", DataQueue); #endif AddCommand("/while", CommandWhile); AddCommand("/endwhile", CommandEndWhile); AddCommand("/do", CommandDo); AddCommand("/until", CommandUntil); AddCommand("/break", CommandBreak); AddCommand("/continue", CommandContinue); }
void MQ2NavigationPlugin::Plugin_Initialize() { if (m_initialized) return; HookStatus status = InitializeHooks(); if (status != HookStatus::Success) { m_retryHooks = (status == HookStatus::MissingDevice); return; } mq2nav::LoadSettings(); InitializeRenderer(); AddModule<KeybindHandler>(); AddModule<NavMeshLoader>(); AddModule<ModelLoader>(); AddModule<NavMeshRenderer>(); AddModule<UiController>(); for (const auto& m : m_modules) { m.second->Initialize(); } // get the keybind handler and connect it to our keypress handler auto keybindHandler = Get<KeybindHandler>(); m_keypressConn = keybindHandler->OnMovementKeyPressed.Connect( [this]() { OnMovementKeyPressed(); }); // initialize mesh loader's settings auto meshLoader = Get<NavMeshLoader>(); meshLoader->SetAutoReload(mq2nav::GetSettings().autoreload); m_initialized = true; Plugin_SetGameState(gGameState); AddCommand("/navigate", NavigateCommand); AddMQ2Data("Navigation", NavigateData); auto ui = Get<UiController>(); m_updateTabConn = ui->OnTabUpdate.Connect([=](TabPage page) { OnUpdateTab(page); }); }
// Called once, when the plugin is to initialize PLUGIN_API VOID InitializePlugin(VOID) { CHAR szBuffer[MAX_STRING] = {0}; // check for eqw running, and steal its function to check the foreground window if available if (EQWhMod=GetModuleHandle("eqw.dll")) { EQW_GetDisplayWindow=(fEQW_GetDisplayWindow)GetProcAddress(EQWhMod,"EQW_GetDisplayWindow"); } DebugSpewAlways("Initializing MQ2HUD"); GetPrivateProfileString(HUDSection,"Last","Elements",HUDNames,MAX_STRING,INIFileName); HandleINI(); AddCommand("/defaulthud",DefaultHUD); AddCommand("/loadhud",LoadHUD); AddCommand("/unloadhud",UnLoadHUD); AddCommand("/backgroundhud",BackgroundHUD); AddCommand("/classhud",ClassHUD); AddCommand("/zonehud",ZoneHUD); AddMQ2Data("HUD",dataHUD); }
void InitializeMQ2Data() { AddMQ2Data("Spawn", dataSpawn); AddMQ2Data("Target", dataTarget); AddMQ2Data("Me", dataCharacter); AddMQ2Data("Spell", dataSpell); AddMQ2Data("Switch", dataSwitch); AddMQ2Data("Ground", dataGroundItem); AddMQ2Data("Merchant", dataMerchant); AddMQ2Data("Mercenary", dataMercenary); AddMQ2Data("Pet", dataPet); AddMQ2Data("Window", dataWindow); AddMQ2Data("Macro", dataMacro); AddMQ2Data("EverQuest", dataEverQuest); AddMQ2Data("MacroQuest", dataMacroQuest); AddMQ2Data("Math", dataMath); AddMQ2Data("Zone", dataZone); AddMQ2Data("Group", dataGroup); AddMQ2Data("String", dataString); AddMQ2Data("Int", dataInt); AddMQ2Data("Bool", dataBool); AddMQ2Data("Float", dataFloat); AddMQ2Data("Corpse", dataCorpse); AddMQ2Data("If", dataIf); AddMQ2Data("Cursor", dataCursor); AddMQ2Data("NearestSpawn", dataNearestSpawn); AddMQ2Data("Type", dataType); AddMQ2Data("Time", dataTime); AddMQ2Data("GameTime", dataGameTime); AddMQ2Data("Ini", dataIni); AddMQ2Data("Heading", dataHeading); AddMQ2Data("Defined", dataDefined); AddMQ2Data("LastSpawn", dataLastSpawn); AddMQ2Data("FindItem", dataFindItem); AddMQ2Data("FindItemBank", dataFindItemBank); AddMQ2Data("InvSlot", dataInvSlot); AddMQ2Data("SelectedItem", dataSelectedItem); AddMQ2Data("FindItemCount", dataFindItemCount); AddMQ2Data("FindItemBankCount", dataFindItemBankCount); //AddMQ2Data("GroupLeader",dataGroupLeader); //AddMQ2Data("GroupLeaderName",dataGroupLeaderName); AddMQ2Data("Skill", dataSkill); AddMQ2Data("AltAbility", dataAltAbility); AddMQ2Data("Raid", dataRaid); AddMQ2Data("NamingSpawn", dataNamingSpawn); AddMQ2Data("SpawnCount", dataSpawnCount); AddMQ2Data("LineOfSight", dataLineOfSight); AddMQ2Data("Plugin", dataPlugin); AddMQ2Data("Select", dataSelect); AddMQ2Data("DoorTarget", dataDoorTarget); AddMQ2Data("ItemTarget", dataItemTarget); AddMQ2Data("DynamicZone", dataDynamicZone); AddMQ2Data("Friends", dataFriends); AddMQ2Data("Task", dataTask); AddMQ2Data("Mount", dataMount); AddMQ2Data("Illusion", dataIllusion); AddMQ2Data("Alias", dataAlias); #ifndef EMU AddMQ2Data("AdvLoot", dataAdvLoot); #endif AddMQ2Data("Alert", dataAlert); }