Skip to content
This repository has been archived by the owner on Jul 30, 2024. It is now read-only.

Commit

Permalink
Add test function and write sample code.
Browse files Browse the repository at this point in the history
  • Loading branch information
R3nzTheCodeGOD committed Nov 18, 2022
1 parent 3a49202 commit ef3972c
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions R3nzSkin/Hooks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,26 @@

LRESULT ImGui_ImplWin32_WndProcHandler(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);

static inline void testFunc() noexcept
{
// The codes you write here are executed when you press the F7 key in the game.

// Example Func
const auto minions{ cheatManager.memory->minionList };
for (auto i{ 0u }; i < minions->length; ++i) {
const auto minion{ minions->list[i] };
const auto owner{ minion->getGoldRedirectTarget() };
cheatManager.logger->addLog("Minion: %s\n\tModelName: %s\n\t", minion->get_name()->c_str(), minion->get_character_data_stack()->base_skin.model.str);
if (owner)
cheatManager.logger->addLog("OwnerName: %s\n\t\tModelName: %s\n\t", owner->get_name()->c_str(), owner->get_character_data_stack()->base_skin.model.str);
cheatManager.logger->addLog("IsLaneMinion: %d\n\t", minion->isLaneMinion());
cheatManager.logger->addLog("IsEliteMinion: %d\n\t", minion->isEliteMinion());
cheatManager.logger->addLog("IsEpicMinion: %d\n\t", minion->isEpicMinion());
cheatManager.logger->addLog("IsMinion: %d\n\t", minion->isMinion());
cheatManager.logger->addLog("IsJungle: %d\n\n", minion->isJungle());
}
}

static LRESULT WINAPI wndProc(HWND window, UINT msg, WPARAM wParam, LPARAM lParam) noexcept
{
if (ImGui_ImplWin32_WndProcHandler(window, msg, wParam, lParam))
Expand Down Expand Up @@ -69,6 +89,8 @@ static LRESULT WINAPI wndProc(HWND window, UINT msg, WPARAM wParam, LPARAM lPara
cheatManager.config->current_combo_skin_index = 1;
cheatManager.config->save();
}
} else if (wParam == VK_F7) {
testFunc();
}
}

Expand Down

0 comments on commit ef3972c

Please sign in to comment.