sabuross Posted April 18, 2013 Posted April 18, 2013 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. Quote
Euphy Posted April 18, 2013 Posted April 18, 2013 A non-atcommand alternative is: percentheal -100,0; 4 Quote
0 zeusc137 Posted October 26, 2024 Posted October 26, 2024 On 4/18/2013 at 7:39 AM, Emistry said: you can try unitkill getcharid(3); refer unitkill Hi there! Any suggestion if I want to usekill "in front" of the npc current location? I wanted to use something like: OnTimer3000: npcskill STORM_GUST, 10, 130, <x,y positions?>; I don't think I have a way to make the NPC cast the skill without being attached to a player OnTouch event... Quote
0 Racaae Posted October 26, 2024 Posted October 26, 2024 18 hours ago, zeusc137 said: Hi there! Any suggestion if I want to usekill "in front" of the npc current location? I wanted to use something like: OnTimer3000: npcskill STORM_GUST, 10, 130, <x,y positions?>; I don't think I have a way to make the NPC cast the skill without being attached to a player OnTouch event... Hi. Use OnInit and initnpctimer to trigger the NPC without attached player. Then use unitskillusepos to cast the skill anywhere. Example: prontera,155,114,4 script StormGust Wizard 4_M_JOB_WIZARD,{ end; OnTimer3000: unitskillusepos getnpcid(0),"WZ_STORMGUST", 10, .x, .y-7, -6; stopnpctimer; initnpctimer; end; OnInit: getmapxy(.map$, .x, .y, BL_NPC); initnpctimer; end; } *unitskillusepos <GID>,<skill id>,<skill lvl>,<x>,<y>{,<casttime>,<cancel>,<Line_ID>,<ignore_range>}; 1 Quote
Zeiyan Posted April 18, 2013 Posted April 18, 2013 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. Quote
sabuross Posted April 18, 2013 Author Posted April 18, 2013 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. Quote
Emistry Posted April 18, 2013 Posted April 18, 2013 you can try unitkill getcharid(3); refer unitkill 1 Quote
Question
sabuross
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.
6 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.