char0 Posted May 22, 2014 Share Posted May 22, 2014 Hello, How to alter @killable to only players with the command active can kill themselves? In src/map/battle.c: if( sd->state.killable ) { state |= BCT_ENEMY; // Everything can kill it strip_enemy = 0; } What needs to change to work? Grateful, char0. Quote Link to comment Share on other sites More sharing options...
Kichi Posted May 29, 2014 Share Posted May 29, 2014 change to: case BL_PC: { struct map_session_data *sd; struct map_session_data *sds; if( t_bl == s_bl ) break; sd = BL_CAST(BL_PC, t_bl); sds = BL_CAST(BL_PC, s_bl); if( sd->state.monster_ignore && flag&BCT_ENEMY ) return 0; // Global inminuty only to Attacks if( sd->status.karma && s_bl->type == BL_PC && ((TBL_PC*)s_bl)->status.karma ) state |= BCT_ENEMY; // Characters with bad karma may fight amongst them if( sds->state.killable && sd->state.killable ) { state |= BCT_ENEMY; // Everything can kill it strip_enemy = 0; } break; } untested 1 Quote Link to comment Share on other sites More sharing options...
0 agamanaros Posted August 18, 2020 Share Posted August 18, 2020 On 5/29/2014 at 3:49 PM, Kichi said: change to: case BL_PC: { struct map_session_data *sd; struct map_session_data *sds; if( t_bl == s_bl ) break; sd = BL_CAST(BL_PC, t_bl); sds = BL_CAST(BL_PC, s_bl); if( sd->state.monster_ignore && flag&BCT_ENEMY ) return 0; // Global inminuty only to Attacks if( sd->status.karma && s_bl->type == BL_PC && ((TBL_PC*)s_bl)->status.karma ) state |= BCT_ENEMY; // Characters with bad karma may fight amongst them if( sds->state.killable && sd->state.killable ) { state |= BCT_ENEMY; // Everything can kill it strip_enemy = 0; } break; } untested Hi sir I would like to know if its possible to convert this mod to the latest git. I tried using your mod however it doesn't work in the latest git. Thank you and more power! . Quote Link to comment Share on other sites More sharing options...
char0 Posted June 8, 2014 Author Share Posted June 8, 2014 Thanks a lot, Kichi. That's worked. Quote Link to comment Share on other sites More sharing options...
if( sd->state.killable ) { state |= BCT_ENEMY; // Everything can kill it strip_enemy = 0; }What needs to change to work?
Link to comment
Share on other sites