Do you think this is possible?
Oh I see.no.1, my 1st impression is run status_calc_pc everytime player receive hits or healing, which will be server resources heavy
OnPCStatCalcEvent already deem very resource heavy, and you want to make this heavier LOL
no.2, even I want to write this for fun, also impossible
when player login, sd->battle_status.max_hp is 0, and can cause server crash
when I changed to sd->status.max_hp, that is the player's base hp, if the player have bMaxHP bonus then it will calculate wrongly
#include "common/hercules.h"
#include "map/pc.h"
#include "common/utils.h"
#include "plugins/HPMHooking.h"
#include "common/HPMDataCheck.h"
HPExport struct hplugin_info pinfo = {
"bAtkBaseonHPRate",
SERVER_TYPE_MAP,
"0.1",
HPM_VERSION,
};
struct player_data {
int atk_baseon_hprate;
};
int ATK_BASEON_HP_RATE = 0;
int pc_bonus_pre( struct map_session_data **sd, int *type, int *val ) {
if ( *sd == NULL )
return 0;
ShowDebug( "%d %d %d %d\n", (*sd)->base_status.lhw.atk, (*sd)->battle_status.hp, (*sd)->status.max_hp, (*sd)->battle_status.max_hp );
if ( *type == ATK_BASEON_HP_RATE ) {
if ( (*sd)->state.lr_flag != 2 ) {
int bonus = (*sd)->base_status.lhw.atk + ( (*sd)->battle_status.hp *100 / (*sd)->status.max_hp ) * *val;
(*sd)->base_status.lhw.atk = cap_value(bonus, 0, USHRT_MAX);
}
ShowDebug( "%d\n", (*sd)->base_status.lhw.atk );
hookStop();
}
return 0;
}
void pc_damage_post( struct map_session_data *sd, struct block_list *src, unsigned int hp, unsigned int sp ) {
if ( sd == NULL )
return;
status_calc_pc(sd, SCO_FORCE);
return;
}
void pc_heal_post( struct map_session_data *sd, unsigned int hp, unsigned int sp, int type ) {
if ( sd == NULL )
return;
status_calc_pc(sd, SCO_FORCE);
return;
}
HPExport void plugin_init (void) {
ATK_BASEON_HP_RATE = map->get_new_bonus_id();
script->set_constant( "bAtkBaseonHPRate", ATK_BASEON_HP_RATE, false, false );
addHookPre( pc, bonus, pc_bonus_pre );
addHookPost( pc, damage, pc_damage_post );
addHookPost( pc, heal, pc_heal_post );
}
no
interesting o/The server I GM for uses empty autobonuses to refresh condition checks. 100% autobonus when attacking or being hit works rather well for red-health builds. However! There is a limit of 10 autobonuses one player can have at a time, so unless you can increase it and recompile, I suggest to use it sparingly and on slots where card granted autobonuses already happen. Also, I am not really sure how server resource heavy these are. ;o
autobonus "{ }",1000,1000,BF_WEAPON|BF_MAGIC|BF_MISC|BF_NORMAL|BF_SKILL,"{ }";
autobonus2 "{ }",1000,1000,BF_WEAPON|BF_MAGIC|BF_MISC|BF_NORMAL|BF_SKILL,"{ }";
if(Hp < MaxHp/4) {
bonus bAtkRate,3;
bonus bMatkRate,3;
}
um very interesting I will follow your tips and try to make a letter with this passive effect![]()
can be done easily enough
just by switching
in status.c
ctrl + f , find SC_AUTOBESERK
look for these
st->max_hp>>2
change them to this
st->max_hp*0.75
now autobeserk applies at 75% hp
ok to remove the toggle, im not sure off the top of my head but i dont see why not
so using this you need to:
make a new SC_CARDEFFECT
just copy impositio manus for straight ATK
or keep is like provoke but without the defense reduction
now you just gotta figure out how to make it a passive instead of toggled
test withThe server I GM for uses empty autobonuses to refresh condition checks. 100% autobonus when attacking or being hit works rather well for red-health builds. However! There is a limit of 10 autobonuses one player can have at a time, so unless you can increase it and recompile, I suggest to use it sparingly and on slots where card granted autobonuses already happen. Also, I am not really sure how server resource heavy these are. ;o
autobonus "{ }",1000,1000,BF_WEAPON|BF_MAGIC|BF_MISC|BF_NORMAL|BF_SKILL,"{ }";
autobonus2 "{ }",1000,1000,BF_WEAPON|BF_MAGIC|BF_MISC|BF_NORMAL|BF_SKILL,"{ }";
if(Hp < MaxHp/4) {
bonus bAtkRate,3;
bonus bMatkRate,3;
}
its not really difficult and i see what you guys are talking about, you can pm me if you wantOh I see.
Thanks for the explanation Annie
It's really sad. It would be a very interesting mechanic.
interesting o/
um very interesting I will follow your tips and try to make a letter with this passive effect
LOL
We use essential cookies to make this site work, and optional cookies to enhance your experience.