if(id == static_cast<int>(this->server->world->config["Magic_Scroll_Item_ID"]))
{
if(this->player->character->intl < static_cast<int>(this->server->world->config["Magic_Scroll_Min_Int"]) || this->player->character->wis < static_cast<int>(this->server->world->config["Magic_Scroll_Min_wis"]))
{
this->player->character->ServerMsg("You do not have enough intelegance and wisdom!");
break;
}
if(this->player->character->AddSpell((static_cast<int>(this->server->world->config["Magic_Scroll_Spell_ID"])),(static_cast<int>(this->server->world->config["Magic_Scroll_Spell_Level"])))); //put the spell and level in here
{
PacketBuilder builder(PACKET_STATSKILL, PACKET_TAKE);
builder.SetID(PACKET_STATSKILL, PACKET_TAKE);
builder.AddShort(static_cast<int>(this->server->world->config["Magic_Scroll_Spell_ID"])); //put the spell id in here
this->player->client->SendBuilder(builder);
CLIENT_SEND(builder);
this->player->character->Refresh();
this->player->character->Save();
}
}