Jump to content
  • 0

NPC Kill Players


sabuross

Question


  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  30
  • Reputation:   11
  • Joined:  02/20/13
  • Last Seen:  

Hi,

 

I'm currently making a script and was wondering how to make an NPC kill a player?

 

Like when the player is chatting with the NPC, then the NPC kills the player.

 

Tried searching already didn't see any other related ones unless I'm just suck at searching.

 

Thanks.

Link to comment
Share on other sites

4 answers to this question

Recommended Posts


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

A non-atcommand alternative is:

percentheal -100,0;
  • Upvote 4
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  49
  • Topics Per Day:  0.01
  • Content Count:  275
  • Reputation:   23
  • Joined:  01/06/13
  • Last Seen:  

prontera,152,184,5    script    Shobe    817,{
mes "[Shobe]";
mes "Hi! How do you like it here at ZeiyanRO?";
next;
switch(select("I like it here very much!:It sucks!")) {
case 1:
    mes "[Shobe]";
    mes "Wow thankyou if you have any suggestions questions or bugs to report just let the GM know!";
    close;
case 2:
    mes "[Shobe]";
    mes "Well we do not like you either!";
    next;
    mes "GET LOST!";
    atcommand "@nuke " + strcharinfo(0);
close;
end;
}
end;
}

 

Try this. :)

 

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  30
  • Reputation:   11
  • Joined:  02/20/13
  • Last Seen:  

prontera,152,184,5    script    Shobe    817,{
mes "[Shobe]";
mes "Hi! How do you like it here at ZeiyanRO?";
next;
switch(select("I like it here very much!:It sucks!")) {
case 1:
    mes "[Shobe]";
    mes "Wow thankyou if you have any suggestions questions or bugs to report just let the GM know!";
    close;
case 2:
    mes "[Shobe]";
    mes "Well we do not like you either!";
    next;
    mes "GET LOST!";
    atcommand "@nuke " + strcharinfo(0);
close;
end;
}
end;
}

 

Try this. :)

 

 

Got it thanks, I was using the wrong command.

Link to comment
Share on other sites


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

you can try

unitkill getcharid(3);

 

refer unitkill

  • Upvote 1
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...