Jump to content
  • 0

Costume Weapon bonus


DisLoyal

Question

Hi all!

 

I have a question ...

 

How can I set costume weapons  to receive a random bonus like other costumes?

 

i try this but its no solution:

void CItem::AlterToMagicItem()
{
    int idx = GetAttributeSetIndex();

    if (idx < 0)
        return;

    //      Appeariance Second Third
    // Weapon 50        20     5
    // Armor  30        10     2
    // Acc    20        10     1

    int iSecondPct;
    int iThirdPct;

    if (g_iUseLocale)
    {
        switch (GetType())
        {
            case ITEM_WEAPON:
                iSecondPct = 20;
                iThirdPct = 5;
                break;

            case ITEM_ARMOR:
            case ITEM_COSTUME:
                if (GetSubType() == ARMOR_BODY)
                {
                    iSecondPct = 10;
                    iThirdPct = 2;
                }
                else if (GetType() == ITEM_COSTUME && (GetSubType() == COSTUME_WEAPON_SWORD || GetSubType() == COSTUME_WEAPON_DAGGER || GetSubType() == COSTUME_WEAPON_BOW || GetSubType() == COSTUME_WEAPON_TWO_HANDED || GetSubType() == COSTUME_WEAPON_BELL || GetSubType() == COSTUME_WEAPON_FAN))
                {
                    iSecondPct = 8;
                    iThirdPct = 1;
                }
                else
                {
                    iSecondPct = 10;
                    iThirdPct = 1;
                }
                break;

            default:
                return;
        }
    }
    else
    {
        switch (GetType())
        {
            case ITEM_WEAPON:
                iSecondPct = 30;
                iThirdPct = 15;
                break;

            case ITEM_ARMOR:
            case ITEM_COSTUME:
                if (GetSubType() == ARMOR_BODY)
                {
                    iSecondPct = 20;
                    iThirdPct = 10;
                }
                else if (GetType() == ITEM_COSTUME && (GetSubType() == COSTUME_WEAPON_SWORD || GetSubType() == COSTUME_WEAPON_DAGGER || GetSubType() == COSTUME_WEAPON_BOW || GetSubType() == COSTUME_WEAPON_TWO_HANDED || GetSubType() == COSTUME_WEAPON_BELL || GetSubType() == COSTUME_WEAPON_FAN))
                {
                    iSecondPct = 8;
                    iThirdPct = 1;
                }
                else
                {
                    iSecondPct = 10;
                    iThirdPct = 5;
                }
                break;

            default:
                return;
        }
    }

    // 100% Č®·ü·Î ÁÁŔş ĽÓĽş ÇĎłŞ
    PutAttribute(aiItemMagicAttributePercentHigh);

    if (number(1, 100) <= iSecondPct)
        PutAttribute(aiItemMagicAttributePercentLow);

    if (number(1, 100) <= iThirdPct)
        PutAttribute(aiItemMagicAttributePercentLow);
}

sry my bad eng

Link to comment
Share on other sites

  • Answers 1
  • Created
  • Last Reply

Top Posters For This Question

Top Posters For This Question

1 answer to this question

Recommended Posts

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


  • Activity

    1. 3

      Once upon a time...

    2. 1183

      [40250] Reference Serverfile + Client + Src [15 Available Languages]

    3. 3

      Once upon a time...

    4. 3

      Once upon a time...

    5. 0

      problem ability

    6. 0

      Transmutation system error "unknow command server"

    7. 39

      Official Transmutation / Change Look

  • Recently Browsing

    • No registered users viewing this page.
×
×
  • 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.