Jump to content
  • 0

player invincible time


Question

Posted

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!

4 answers to this question

Recommended Posts

Posted

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

Posted

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

Posted


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?

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...