Jump to content

Question

Posted

Can an npc cast a skill on you? I want to make an npc that enables SC's/stalkers to copy skills through them.

I found a script for plagiarize but for reproduce, I don't know how to. So could someone point this out for me?

16 answers to this question

Recommended Posts

  • 0
Posted
On 8/26/2012 at 8:43 PM, Emistry said:

try this

 

 

 

 

 

prontera,155,181,5 script Sample 757,{
mes "Which skill you need me to cast on you ?";
set .@SkillID,select( implode( .SkillName$,":" ) ) - 1;
mes "Selected "+.Skillname$[.@SkillID];
close2;
unitskilluseid getnpcid(0),.SkillID[.@SkillID],.SkillLv[.@SkillID],getcharid(3);
sleep 3000;
movenpc strnpcinfo(0),155,181;
end;

OnInit:
setarray .SkillID[0],14,19,20,421;
setarray .SkillLv[0],3,5,10,5;
setarray .SkillName$[0],"Cold Bolt","Fire Bolt","Lightning Bolt","Fly Kick";
end;
}
 

 

i was trying to use this npc add trying to add triple attack, but dint work and after the npc show triple attack sprites the npc gone~ help

Posted

try this

prontera,155,181,5 script Sample 757,{
mes "Which skill you need me to cast on you ?";
set .@SkillID,select( implode( .SkillName$,":" ) ) - 1;
mes "Selected "+.Skillname$[.@SkillID];
close2;
unitskilluseid getnpcid(0),.SkillID[.@SkillID],10,getcharid(3);
end;

OnInit:
setarray .SkillID[0],14,19,20;
setarray .SkillName$[0],"Cold Bolt","Fire Bolt","Lightning Bolt";
end;
}

Posted

It works, thanks for the unitskilluseid command Emistry! but I have a simple problem, how can I let it use "Flying_Kick" without moving? and for the skill level parameter, it is always 10 right, what happens when I input a skill with less than 10 max level? will it cast the highest level of that skill? or does it fail? because in casting Flying kick, it always misses, so what I though is edit the script :)

Posted

try this



 

prontera,155,181,5 script Sample 757,{
mes "Which skill you need me to cast on you ?";
set .@SkillID,select( implode( .SkillName$,":" ) ) - 1;
mes "Selected "+.Skillname$[.@SkillID];
close2;
unitskilluseid getnpcid(0),.SkillID[.@SkillID],.SkillLv[.@SkillID],getcharid(3);
sleep 3000;
movenpc strnpcinfo(0),155,181;
end;

OnInit:
setarray .SkillID[0],14,19,20,421;
setarray .SkillLv[0],3,5,10,5;
setarray .SkillName$[0],"Cold Bolt","Fire Bolt","Lightning Bolt","Fly Kick";
end;
}
 

 

Posted

Wow that was quick :) thanks but it still misses can it be done such that skills will never miss? because that npc doesn't have stats right? so flee of the character is part of the computation

Posted (edited)

this is the script 

i already put an attacment below.. 

im using rAthena

im using SVN 17101 

And client date 2010 .. 

 

i tried all skill that u put inside like cold bolt and etc.. but the npc didnt cast anything to me,..

StalkerNpc.txt

Edited by nixrlz
Posted

brasilis,241,87,5	script	StalkerNpc	757,{

	mes "Which skill you need me to cast on you ?";
	set .@SkillID, select( implode( .SkillName$, ":" ) ) - 1;
	mes "Selected "+ .Skillname$[ .@SkillID ];
	close2;
	npcskill .SkillID[ .@SkillID ], .SkillLv[ .@SkillID ], 50, 99;
	if( .SkillID[ .@SkillID ] == 421 ) {
		getmapxy .@map$, .@x, .@y, 0;
		movenpc strnpcinfo(0), .@x, .@y;
		sleep 3000;
		movenpc strnpcinfo(0),241,87;
	}
	end;

OnInit:
	setarray .SkillID,14,19,20,421;
	setarray .SkillLv,3,5,10,5;
	setarray .SkillName$,"Cold Bolt","Fire Bolt","Lightning Bolt","Fly Kick";
	end;
}

 

Use npcskill

*npcskill <skill id>,<skill lvl>,<stat point>,<NPC level>;

*npcskill "<skill name>",<skill lvl>,<stat point>,<NPC level>;

This command causes the attached NPC object to cast a skill on the attached

player. The skill will have no cast time or cooldown. The player must be

within the default skill range or the command will fail silently.

The "stat point" parameter temporarily sets all NPC stats to the given value,

and "NPC level" is the temporary level of the NPC (used in some skills).

Neither value can be greater than the max level defined in config, and will

not work properly if the NPC has a mob sprite.

Posted (edited)

where do i find this npcskill?? i dont have those on my trunk...

 

EDIT: the npc manage to use magic on me.. but whenever he use Melle skill , like bowling bash , flying side kick,, it will shows up Miss.. how can we add the npc status so they wont miss?

Edited by nixrlz
Posted

For flying side I don't know

For other skills

The player must be

within the default skill range or the command will fail silently.

no , even if they were within range , the skill would be miss, because the npc dosent have status.. hmm can we put status on the npc?

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