Jump to content
  • 0

bHPVanishRate


Norse

Question


  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  82
  • Reputation:   0
  • Joined:  11/30/12
  • Last Seen:  

How to make this item bonus works on all monsters(including MVPs) and players? currently,this item bonus only work on players.


Someone? /whisp

Link to comment
Share on other sites

11 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  82
  • Reputation:   0
  • Joined:  11/30/12
  • Last Seen:  

Really hope that someone could help me /sob

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  36
  • Reputation:   3
  • Joined:  08/23/12
  • Last Seen:  

I'm not sure you can do something like that. But you are able to add skills that do similar things. If you want a monster that hurts itself, self hurting skills like grand cross will injure the monster.

 

This adds really cool affects on the monsters. My custom monsters like to give themselves buffs as their health gets low.

 

Keep in mind the skills will only go off when the map has players on it.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  82
  • Reputation:   0
  • Joined:  11/30/12
  • Last Seen:  

What i mean here is bHPVanishRate and bSPVanishRate bonus only working if we hit players on pvp and gvg mapflags,i want it working on every mapflags & on every monster to(includiing MVPs).
 
bonus2 bSPVanishRate,n,x;    Add the (n/10)% chance of decreasing enemy's SP (player) amount by x% when attacking +bonus2 bHPVanishRate,n,x;    Add the (n/10)% chance of decreasing enemy's HP (player) amount by x% when attacking

 

which part do i have to edit?
 

/*===========================================
 * Perform battle drain effects (HP/SP loss)
 *-------------------------------------------*/
void battle_drain(TBL_PC *sd, struct block_list *tbl, int64 rdamage, int64 ldamage, int race, int boss)
{
    struct weapon_data *wd;
    int64 *damage;
    int type, thp = 0, tsp = 0, rhp = 0, rsp = 0, hp, sp, i;
    for (i = 0; i < 4; i++) {
        //First two iterations: Right hand
        if (i < 2) { wd = &sd->right_weapon; damage = &rdamage; }
        else { wd = &sd->left_weapon; damage = &ldamage; }
        if (*damage <= 0) continue;
        //First and Third iterations: race, other two boss/nonboss state
        if (i == 0 || i == 2)
            type = race;
        else
            type = boss?RC_BOSS:RC_NONBOSS;

        hp = wd->hp_drain[type].value;
        if (wd->hp_drain[type].rate)
            hp += battle_calc_drain(*damage, wd->hp_drain[type].rate, wd->hp_drain[type].per);

        sp = wd->sp_drain[type].value;
        if (wd->sp_drain[type].rate)
            sp += battle_calc_drain(*damage, wd->sp_drain[type].rate, wd->sp_drain[type].per);

        if (hp) {
            if (wd->hp_drain[type].type)
                rhp += hp;
            thp += hp;
        }
        if (sp) {
            if (wd->sp_drain[type].type)
                rsp += sp;
            tsp += sp;
        }
    }

    if (sd->bonus.sp_vanish_rate && rnd()%1000 < sd->bonus.sp_vanish_rate)
        status_percent_damage(&sd->bl, tbl, 0, (unsigned char)sd->bonus.sp_vanish_per, false);

    if (sd->bonus.hp_vanish_rate && rnd()%1000 < sd->bonus.hp_vanish_rate
        && tbl->type == BL_PC && (map[sd->bl.m].flag.pvp || map[sd->bl.m].flag.gvg))
        status_percent_damage(&sd->bl, tbl, (unsigned char)sd->bonus.hp_vanish_per, 0, false);
    

    if( sd->sp_gain_race_attack[race] )
        tsp += sd->sp_gain_race_attack[race];
    if( sd->hp_gain_race_attack[race] )
        thp += sd->hp_gain_race_attack[race];

    if (!thp && !tsp) return;

    status_heal(&sd->bl, thp, tsp, battle_config.show_hp_sp_drain?3:1);

    if (rhp || rsp)
        status_zap(tbl, rhp, rsp);
}
Edited by Norse
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  82
  • Reputation:   0
  • Joined:  11/30/12
  • Last Seen:  

Can anyone help me? All i want is make this item bonus working on all kind of maps flag,not only on pvp and gvg map. And make it works on monsters & MVP,not only players.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  82
  • Topics Per Day:  0.02
  • Content Count:  223
  • Reputation:   4
  • Joined:  02/23/12
  • Last Seen:  

like this..?

 

bonus3 bHPDrainRatio,n,x,y; y/10% chance to drain x% current HP of the enemy of race n, and absorb it as health

 

bonus3 bSPDrainRatio,n,x,y; y/10% chance to drain x% current SP of the enemy of race n, and absorb it as SP

 


n:  0=Formless, 1=Undead, 2=Brute, 3=Plant, 4=Insect,

5=Fish, 6=Demon, 7=Demi-Human, 8=Angel, 9=Dragon, 

10=Boss monster, 11=Other than (normal monster) boss monster

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  82
  • Reputation:   0
  • Joined:  11/30/12
  • Last Seen:  

 

like this..?
 
bonus3 bHPDrainRatio,n,x,y; y/10% chance to drain x% current HP of the enemy of race n, and absorb it as health
 
bonus3 bSPDrainRatio,n,x,y; y/10% chance to drain x% current SP of the enemy of race n, and absorb it as SP
 
n:  0=Formless, 1=Undead, 2=Brute, 3=Plant, 4=Insect,
5=Fish, 6=Demon, 7=Demi-Human, 8=Angel, 9=Dragon, 
10=Boss monster, 11=Other than (normal monster) boss monster

 

 

Yes,and can be use on any mapflags,not only the PVP and GVG maps.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  82
  • Reputation:   0
  • Joined:  11/30/12
  • Last Seen:  

Bump,someone please help me /whisp

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  82
  • Reputation:   0
  • Joined:  11/30/12
  • Last Seen:  

Bump

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  82
  • Reputation:   0
  • Joined:  11/30/12
  • Last Seen:  

Someone? Still need some help.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  82
  • Reputation:   0
  • Joined:  11/30/12
  • Last Seen:  

Still waiting~ /oops

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  25
  • Reputation:   2
  • Joined:  12/25/11
  • Last Seen:  

 

like this..?
 
bonus3 bHPDrainRatio,n,x,y; y/10% chance to drain x% current HP of the enemy of race n, and absorb it as health
 
bonus3 bSPDrainRatio,n,x,y; y/10% chance to drain x% current SP of the enemy of race n, and absorb it as SP
 
n:  0=Formless, 1=Undead, 2=Brute, 3=Plant, 4=Insect,
5=Fish, 6=Demon, 7=Demi-Human, 8=Angel, 9=Dragon, 
10=Boss monster, 11=Other than (normal monster) boss monster

 

 

RC_BOSS and RC_NONBOSS = all race monsters

bonus3 bSPDrainRatio,RC_BOSS,1,1000; bonus3 bSPDrainRatio,RC_NONBOSS,1,1000;
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...