Jump to content
  • 0

NPC Check SC


Luminos

Question


  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  3
  • Reputation:   0
  • Joined:  06/27/13
  • Last Seen:  

Hello.

 

I am making a very simple NPC to leave PvP Room, and I am having a problem.

 

What I want to know is the code to check if a player haves SC_BERSERK active and if that is the case dispell it and reduce their HP to 1%, or in any case make the NPC doesn't let you leave with BERSERK active.

 

I don't want to just use "sc_end SC_BERSERK" and "percentheal -99,-100" without checking if the user is on BERSERK or not, because this way it will reduce the HP of every player too, and I just want to reduce the HP on BERSERK players.

 

I just really need the code to check the BERSERK, tried looking on different NPCs to find a similar code but I didn't have luck.

 

Thanks.

Link to comment
Share on other sites

3 answers to this question

Recommended Posts


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

try this ?

if( getstatus( SC_BERSERK ) ){

sc_end SC_BERSERK;

percentheal -99,-100;

}

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  2997
  • Reputation:   1131
  • Joined:  05/27/12
  • Last Seen:  

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  3
  • Reputation:   0
  • Joined:  06/27/13
  • Last Seen:  

try this ?

if( getstatus( SC_BERSERK ) ){
	sc_end SC_BERSERK;
	percentheal -99,-100;
}

 

Damn I was sure I tried with getstatus, but I think I missed the (). Thanks alot works perfect!.

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