Jump to content

Recommended Posts

M2 Download Center

This is the hidden content, please
( Internal )

Ayo,

here is my code for horse bonuses at x level.

char_horse.cpp 

in

bool CHARACTER::StartRiding()

after

    MountVnum(dwMountVnum);

add

    switch (GetHorseLevel())
    {
        case 22:
            AddAffect(AFFECT_MOUNT_BONUS, POINT_DEF_GRADE_BONUS, 50, 0, 2147415634, 0, false);
            break; 
        case 23: 
            AddAffect(AFFECT_MOUNT_BONUS, POINT_DEF_GRADE_BONUS, 75, 0, 2147415634, 0, false);
            break;
        case 24: 
            AddAffect(AFFECT_MOUNT_BONUS, POINT_DEF_GRADE_BONUS, 100, 0, 2147415634, 0, false);
            break; 
        case 25: 
            AddAffect(AFFECT_MOUNT_BONUS, POINT_DEF_GRADE_BONUS, 100, 0, 2147415634, 0, false);
            AddAffect(AFFECT_MOUNT_BONUS, POINT_MAX_HP, 750, 0, 2147415634, 0, false);
            break;
        case 26: 
            AddAffect(AFFECT_MOUNT_BONUS, POINT_DEF_GRADE_BONUS, 100, 0, 2147415634, 0, false);
            AddAffect(AFFECT_MOUNT_BONUS, POINT_MAX_HP, 1500, 0, 2147415634, 0, false);    
            break; 
        case 27: 
            AddAffect(AFFECT_MOUNT_BONUS, POINT_DEF_GRADE_BONUS, 100, 0, 2147415634, 0, false);
            AddAffect(AFFECT_MOUNT_BONUS, POINT_MAX_HP, 2000, 0, 2147415634, 0, false);                    
            AddAffect(AFFECT_MOUNT_BONUS, POINT_ATTBONUS_MONSTER, 5, 0, 2147415634, 0, false);
            break;
        case 28: 
            AddAffect(AFFECT_MOUNT_BONUS, POINT_DEF_GRADE_BONUS, 100, 0, 2147415634, 0, false);
            AddAffect(AFFECT_MOUNT_BONUS, POINT_MAX_HP, 4000, 0, 2147415634, 0, false);                    
            AddAffect(AFFECT_MOUNT_BONUS, POINT_ATTBONUS_MONSTER, 20, 0, 2147415634, 0, false);                
            break; 
        default:
            break; 
    }

case x - x is level of course.

in

::StopRiding

after

        PointChange(POINT_IQ, 0);

add

        if (FindAffect(AFFECT_MOUNT_BONUS)
            RemoveAffect(AFFECT_MOUNT_BONUS); 

Thats all. Nothing hard.

  • Metin2 Dev 18
  • kekw 1
  • Good 8
  • muscle 1
  • Love 1
  • Love 17
Link to comment
https://metin2.dev/topic/21583-horse-bonuses-level-system/
Share on other sites

Acum 55 minute, Lufbert a spus:

Oh my god, it's so bad.

You not even know how to use switch statement.

For example on horse level 22 you will get all of the bonuses from level 22 to 28 because you didnt break any of your case's.

maybe its design intent :))

 

image.jpeg.f8f650b92fbf2b92df22638da1100d97.jpeg

  • Love 1
Link to comment
https://metin2.dev/topic/21583-horse-bonuses-level-system/#findComment-117197
Share on other sites

18 godzin temu, Lufbert napisał:

Oh my god, it's so bad.

You not even know how to use switch statement.

For example on horse level 22 you will get all of the bonuses from level 22 to 28 because you didnt break any of your case's.

You are right.My bad, fixed.

Link to comment
https://metin2.dev/topic/21583-horse-bonuses-level-system/#findComment-117232
Share on other sites

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



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.