Jump to content
  • 0

NPC Healer For The Killer


Chiaki

Question


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  72
  • Reputation:   11
  • Joined:  10/17/13
  • Last Seen:  

Some one can give me a script for an NPC that will automaticaly heal someone who kill someone in PVP map?

Link to comment
Share on other sites

8 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

Refer to Basic_Scripting

- <TAB> script <TAB> Sample <TAB> -1,{
    OnPCKillEvent:
        if ( strcharinfo(3) == "your map" ) {
            if ( attachrid( getcharid( 3, strcharinfo( 0 ) ) ) ) {
                if ( Hp && ( Hp != MaxHp ) )
                    percentheal 100,100;
            }
        }
}
  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

Try : 

-    script    Sample    -1,{
    OnPCKillEvent:
        if ( strcharinfo(3) == "your map" ) {
            if (attachrid(getcharid(3, strcharinfo(0)))) {
                if ( Hp && ( Hp != MaxHp ) )
                    percentheal 100,100;
            }
        }
}
  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  72
  • Reputation:   11
  • Joined:  10/17/13
  • Last Seen:  

I got error

* w1=-      script      Sample     -1,{

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

/swt

- <TAB> script <TAB> Sample <TAB> -1,{
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  72
  • Reputation:   11
  • Joined:  10/17/13
  • Last Seen:  

/swt

- <TAB> script <TAB> Sample <TAB> -1,{

 

aww, sorry, ehehehe /sorry I just copy and paste it

so, I need to change the space to tab right?

and this section too?

        if ( strcharinfo(3) == "prontera" ) {
            if (attachrid(getcharid(3, strcharinfo(0)))) {
                if ( Hp && ( Hp != MaxHp ) )
                    percentheal 100,100;
            }
    }
}

sorry, I;m new at this

Edited by Patskie
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  72
  • Reputation:   11
  • Joined:  10/17/13
  • Last Seen:  

AWESOME! it works! thanks Patskie!

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

if ( attachrid( getcharid( 3, strcharinfo( 0 ) ) ) ) {

why do you want to attach the player attached??

 

-    script    Sample    -1,{
OnPCKillEvent:
	if ( strcharinfo(3) == "your map" )
		percentheal 100,100;
	end;
}
  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

Lol. I thought of that too. /me me exaggerated on script /heh. It can be done with or without attachrid :P

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