Jump to content

New game command , what ?


Recommended Posts

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

  • Premium

Judge by yourself. ^^

 

ACMD(do_costume)
{
    char buf[512];
    const size_t bufferSize = sizeof(buf);

    char arg1[256];
    one_argument(argument, arg1, sizeof(arg1));

    CItem* pBody = ch->GetWear(WEAR_COSTUME_BODY);
    CItem* pHair = ch->GetWear(WEAR_COSTUME_HAIR);

    ch->ChatPacket(CHAT_TYPE_INFO, "COSTUME status:");

    if (pHair)
    {
        const char* itemName = pHair->GetName();
        ch->ChatPacket(CHAT_TYPE_INFO, "  HAIR : %s", itemName);

        for (int i = 0; i < pHair->GetAttributeCount(); ++i)
        {
            const TPlayerItemAttribute& attr = pHair->GetAttribute(i);
            if (0 < attr.bType)
            {
                snprintf(buf, bufferSize, FN_point_string(attr.bType), attr.sValue);
                ch->ChatPacket(CHAT_TYPE_INFO, "     %s", buf);
            }
        }

        if (pHair->IsEquipped() && arg1[0] == 'h')
            ch->UnequipItem(pHair);
    }

    if (pBody)
    {
        const char* itemName = pBody->GetName();
        ch->ChatPacket(CHAT_TYPE_INFO, "  BODY : %s", itemName);

        if (pBody->IsEquipped() && arg1[0] == 'b')
            ch->UnequipItem(pBody);
    }
}
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.