[DiscordArchive] Is it under module?
[DiscordArchive] Is it under module?
Archived author: Michael Crilly • Posted: 2022-11-13T00:09:04.821000+00:00
Original source
It's working in-game.
Archived author: M'Dic • Posted: 2022-11-13T00:09:22.046000+00:00
Original source
Ah
Archived author: M'Dic • Posted: 2022-11-13T00:09:42.430000+00:00
Original source
Hmm... is it up in a git somewhere for me to look at?
Archived author: M'Dic • Posted: 2022-11-13T00:10:07.464000+00:00
Original source
If not. U can always look at the anticheat. That always seems to have a little bit of everything for a example
Archived author: M'Dic • Posted: 2022-11-13T00:11:04.880000+00:00
Original source
https://github.com/azerothcore/mod-anticheat
[Embed: GitHub - azerothcore/mod-anticheat: Port of PassiveAnticheat to Aze...]
Port of PassiveAnticheat to Azerothcore. Contribute to azerothcore/mod-anticheat development by creating an account on GitHub.
https://github.com/azerothcore/mod-anticheat
Archived author: Michael Crilly • Posted: 2022-11-13T00:11:06.092000+00:00
Original source
I'm replicating this: ```
class LearnSpellsData : public WorldScript
{
public:
LearnSpellsData() : WorldScript("LearnSpellsData") { }
void OnAfterConfigLoad(bool reload) override
{
lsEnableGamemasters = sConfigMgr->GetOption<bool>("LearnSpells.Gamemasters", 0);
lsEnableClassSpells = sConfigMgr->GetOption<bool>("LearnSpells.ClassSpells", 1);
lsEnableTalentRanks = sConfigMgr->GetOption<bool>("LearnSpells.TalentRanks", 1);
lsEnableProficiencies = sConfigMgr->GetOption<bool>("LearnSpells.Proficiencies", 1);
lsEnableFromQuests = sConfigMgr->GetOption<bool>("LearnSpells.SpellsFromQuests", 1);
lsEnableApprenticeRiding = sConfigMgr->GetOption<bool>("LearnSpells.Riding.Apprentice", 0);
lsEnableJourneymanRiding = sConfigMgr->GetOption<bool>("LearnSpells.Riding.Journeyman", 0);
lsEnableExpertRiding = sConfigMgr->GetOption<bool>("LearnSpells.Riding.Expert", 0);
lsEnableArtisanRiding = sConfigMgr->GetOption<bool>("LearnSpells.Riding.Artisan", 0);
lsEnableColdWeatherFlying = sConfigMgr->GetOption<bool>("LearnSpells.Riding.ColdWeatherFlying", 0);
if (reload)
LoadSpells();
}
void OnStartup() override
{
LoadSpells();
}
}
```
Like this: ```
class LevelTokensConfiguration : public WorldScript
{
public:
LevelTokensConfiguration() : WorldScript("LevelTokensConfiguration") {}
void OnStartup() override
{
LOG_INFO("server.loading", "Initialize Level Tokens...");
}
void OnAfterConfigLoad(bool reload) override
{
// Meta
cModuleEnabled = sConfigMgr->GetOption<bool>("LevelTokens.Enable", 1);
if (cModuleEnabled) {
LOG_ERROR("module", "Level Tokens (DEBUGGING): cModuleEnabled: {}", cModuleEnabled);
}
else {
return;
}
// Quest types
cDailyQuestsEnabled = sConfigMgr->GetOption<bool>("LevelTokens.Daily.Enabled", 1);
cWeeklyQuestsEnabled = sConfigMgr->GetOption<bool>("LevelTokens.Weekly.Enabled", 1);
// Dungeon difficulties
cDungeonDifficultyNormalEnabled = sConfigMgr->GetOption<bool>("LevelTokens.Dungeon.Difficulty.Normal.Enabled", 1);
cDungeonDifficultyHeroicEnabled = sConfigMgr->GetOption<bool>("LevelTokens.Dungeon.Difficulty.Heroic.Enabled", 1);
cDungeonDifficultyEpicEnabled = sConfigMgr->GetOption<bool>("LevelTokens.Dungeon.Difficulty.Epic.Enabled", 1);
// Chance
cChanceForCreatureKill = sConfigMgr->GetOption<uint32>("LevelTokens.Chance.CreatureKill", 1);
if (cDebugging) {
// Report to admin our configuration
LOG_INFO("module", "Level Tokens (DEBUGGING): cDailyQuestsEnabled: {}", cDailyQuestsEnabled);
LOG_INFO("module", "Level Tokens (DEBUGGING): cWeeklyQuestsEnabled: {}", cWeeklyQuestsEnabled);
LOG_INFO("module", "Level Tokens (DEBUGGING): cDungeonDifficultyNormalEnabled: {}", cDungeonDifficultyNormalEnabled);
LOG_INFO("module", "Level Tokens (DEBUGGING): cDungeonDifficultyHeroicEnabled: {}", cWeeklyQuestsEnabled);
LOG_INFO("module", "Level Tokens (DEBUGGING): cDungeonDifficultyEpicEnabled: {}", cDungeonDifficultyEpicEnabled);
LOG_INFO("module", "Level Tokens (DEBUGGING): cChanceForCreatureKill: {}", cChanceForCreatureKill);
}
}
};
```
And replicating this: ```
void AddLearnSpellsScripts()
{
new LearnSpells();
new LearnSpellsData();
}
```
Like this: ```
void AddLevelTokensScripts()
{
new LevelTokensConfiguration();
new LevelTokens();
}
```
Archived author: Michael Crilly • Posted: 2022-11-13T00:12:01.939000+00:00
Original source
`cDebugging` is `true` and hard coded.
Archived author: Michael Crilly • Posted: 2022-11-13T00:12:34.049000+00:00
Original source
If I play the game, I get `LOG_ERROR()` messages to the console with my "dice rolls" in game: ```
Level Tokens (DEBUGGING): A player killed a creature: Nature vs. Forest Spider
Level Tokens (DEBUGGING): Chance: 10 vs. Roll: 98
Level Tokens (DEBUGGING): A player killed a creature: Nature vs. Forest Spider
Level Tokens (DEBUGGING): Chance: 10 vs. Roll: 28
```
Archived author: Michael Crilly • Posted: 2022-11-13T00:12:56.741000+00:00
Original source
But that that "Chance" of `10` is not reflecting the `90` I've defined in the config.
Archived author: Michael Crilly • Posted: 2022-11-13T00:16:15.301000+00:00
Original source
https://github.com/mrcrilly/mod-level-tokens
[Embed: GitHub - mrcrilly/mod-level-tokens: Level token system to speed up ...]
Level token system to speed up levelling, if desired. - GitHub - mrcrilly/mod-level-tokens: Level token system to speed up levelling, if desired.
https://github.com/mrcrilly/mod-level-tokens