Jump to content
  • 0

New game command , what ?


Speachless

Question

  • Answers 3
  • Created
  • Last Reply

Top Posters For This Question

Top Posters For This Question

3 answers to this question

Recommended Posts

  • 0
  • VIP

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • 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.