Jump to content
  • 0
SuiDn

player invincible time

Question

Hello!

I have a pk server and how can i make "player_invincible_time" works only with mobs? and make the players normally attack...

emulator/conf/player.conf

// When teleporting, or spawning to a map, how long before a monster sees you if you don't move? (time is in milliseconds)

// That is, when you go to a map and don't move, how long before the monsters will notice you.

// If you attack a monster, it will attack you back regaurdless of this setting. (I think)

player_invincible_time: 5000

uppp!

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

The player is fully invincible for the time. But it is turned of when the player starts moving or attacking w/e.

You want to create a server and don't even know this...?

Link to comment
Share on other sites

i guess what he want is...only apply this "invincible" status toward monster...

mean there is no "invincible" status against players and players....

player can attack him anytime even he is in "invincible" status..

but monster cant attack him during the "invincible" status..

Link to comment
Share on other sites

Index: src/map/battle.c
===================================================================
--- src/map/battle.c (revision 15627)
+++ src/map/battle.c (working copy)
@@ -4285,7 +4285,7 @@
 switch( target->type )
 { // Checks on actual target
 case BL_PC:
- if (((TBL_PC*)target)->invincible_timer != INVALID_TIMER || pc_isinvisible((TBL_PC*)target) || ((TBL_PC*)target)->sc.data[sC__MANHOLE])
+ if ((((TBL_PC*)target)->invincible_timer != INVALID_TIMER && src->type == BL_MOB) || pc_isinvisible((TBL_PC*)target) || ((TBL_PC*)target)->sc.data[sC__MANHOLE])
 return -1; //Cannot be targeted yet.
 break;
 case BL_MOB:

Like this?

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

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.