[DiscordArchive] So what made you say that this issue is still bugged?
[DiscordArchive] So what made you say that this issue is still bugged?
Archived author: cyberpro98 • Posted: 2024-12-08T11:59:16.759000+00:00
Original source
I added it in a module
Archived author: cyberpro98 • Posted: 2024-12-08T12:00:16.157000+00:00
Original source
```js
std::vector<uint32>player_auras = { 23735, 23735, 23737, 23738, 23769, 23766, 23768, 23767, 23736 };
class cs_playerCommands : public CommandScript
{
public:
cs_playerCommands() : CommandScript("cs_playercommands") {}
ChatCommandTable GetCommands() const override
{
// Define the sub-commands under the "player" command
static ChatCommandTable playerCommandTableSub =
{
{ "buff", HandleplayerbuffCoommand, SEC_PLAYER, Console::Yes},
};
static ChatCommandTable playerCommand =
{
{ "player", playerCommandTableSub }
};
return playerCommand;
}
static bool HandleplayerbuffCoommand(ChatHandler* handler, const char* args)
{
Player* player = handler->getSelectedPlayer();
if (!player)
player = handler->GetSession()->GetPlayer();
// Check if the player has enough gold
if (player->GetMoney() < 1000000)
{
handler->PSendSysMessage("You don't have enough money to buff yourself");
return false;
}
else
{
player->ModifyMoney(-1000000);
}
player->RemoveAurasByType(SPELL_AURA_MOUNTED);
for (int i = 0; i < player_auras.size(); i++)
player->AddAura(player_auras[i], player);
handler->PSendSysMessage("You're buffed now!");
return true;
}
};
```
Archived author: sudlud • Posted: 2024-12-08T12:08:08.591000+00:00
Original source
Maybe move this to <#1247452612077420544>
Archived author: cyberpro98 • Posted: 2024-12-08T12:12:22.309000+00:00
Original source
Sure thanks!