Jump to content
  • 0

@killable kill only who use @killable


char0

Question


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  13
  • Reputation:   0
  • Joined:  12/20/11
  • Last Seen:  

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.
Link to comment
Share on other sites

3 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  25
  • Topics Per Day:  0.01
  • Content Count:  509
  • Reputation:   80
  • Joined:  11/20/11
  • Last Seen:  

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

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  38
  • Reputation:   0
  • Joined:  03/26/16
  • Last Seen:  

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!

.image.png.6491bcd26e3a2d80be883c8a9628be54.png

 

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  13
  • Reputation:   0
  • Joined:  12/20/11
  • Last Seen:  

Thanks a lot, Kichi.

That's worked.  :D

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...