Jump to content
  • 0

player invincible time


SuiDn

Question


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  11
  • Reputation:   0
  • Joined:  01/28/12
  • Last Seen:  

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


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  149
  • Reputation:   33
  • Joined:  12/24/11
  • Last Seen:  

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


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

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


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  149
  • Reputation:   33
  • Joined:  12/24/11
  • Last Seen:  


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


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  11
  • Reputation:   0
  • Joined:  01/28/12
  • Last Seen:  

not working

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