Hello guys, Here is a guide I'm going to make for OMGPWN
Here it goes
Ok first here is a Template to use for it \/
Everything in red u need to change
How to use template look below
Code:
global Npc_Name_Health = function(mob)
{
if(.GetHealthPct() <= %_of_HP && Npc_Name == 0)
{
.SendChatMessage("What you wont your Npc to say");
global Npc_Name = 1;
}
if(.GetHealthPct() <= %_of_HP && Npc_Name == 1)
{
.CastSpell(5200);
.SendChatMessage("What you wont your Npc to say");
global Npc_Name = 2;
}
if(.GetHealthPct() <= %_of_HP && Npc_Name == 2)
{
.SendChatMessage("What you wont your Npc to say");
global Npc_Name = 3;
}
};
global VanCleef_Combat = function(plr)
{
global VC_PHASE = 0;
.RegisterTimer(Time in Miller Seconds, Npc_Name_Health, 0);
.SendChatMessage("What you wont your Npc to say");
};
.RegisterUnitEvent(Npc ID, 1, Npc_Name_Combat);
Step 1 : All the things in red is the things u need to put in your self
Step 2 : Open a note Pad or Txt Document and Copy and Paste that Template into it and then start modifyign it with Steps below
Step 3 : global Npc_Name_Health = function(mob) = The name of your Npc That you wont to talk
Step 4 : if(.GetHealthPct() <= %_of_HP && Npc_Name == 0) = the % of were the Npc will say the Message you chose at the % of Hp (Eg, 70 = 70%, 50 = 50%, Etc)
Step 5 : if(.GetHealthPct() <= %_of_HP && Npc_Name == 0) = The same as in "Step 3" The name of your Npc (Must be the Same os Step 3 and the rest of the Naming ones)
Step 6 : .SendChatMessage("What you wont your Npc to say"); = The Message you wont your Npc to say When it gets to the % of Hp
Step 7 : global Npc_Name = 1; = The Name of your Npc (Remember must be the Same as every one were it says Npc_Name)
Step 8 : .RegisterUnitEvent(Npc ID, 1, Npc_Name_Combat); = The npc Spawn id of your Npc (Eg, .npc spawn 67364, Etc)
Step 9 : .RegisterUnitEvent(Npc ID, 1, Npc_Name_Combat); = The Name of your Npc in all the other place you put it (Make sure it is the Same as all the other places)
Ok now If you wont you can keep Adding
Code:
}
if(.GetHealthPct() <= %_of_HP && Npc_Name == 2)
{
.SendChatMessage("What you wont your Npc to say");
global Npc_Name = 3;
}
To Make the npc talk more
And now Naming it
Nameing it is the hard part well kinda not really. Now when your done Modifyign it go to File > Save as > and put it as all Files and call it like (If you are doing it for a npc called Slayer i would call it KSlayer.gm) So like in "Step 3" The Name of your INpc just name it That and put a .gm at the end of it so it will be like " Slayer.gm "
Saveing It : save it to your Desktop or some were u know were it is
Step 10 : Now were u Have to put it u must put it in your Server's Ascent scripts Folder i am using Ac web so it would be in the folder \/
C:\AC Web Ultimate Repack\Ascent\scripts
If u dont have a scripts folder make 1 and just put that Notepad in that Folder and then in your Ascent cmd box type
reloadscripts or in game type .reloadscripts or restart your server
And then your Done
If you need any Scripts done, Just ask me, Hope this Helps you guys out there