How to make a npc talk at a perent hp (scripting) menu

User Tag List

Results 1 to 10 of 10
  1. #1
    Despara's Avatar Member
    Reputation
    12
    Join Date
    Apr 2008
    Posts
    118
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to make a npc talk at a perent hp (scripting)

    Hello guys, Here is a guide showing you how to make your or an NPC speak at the percent of it's health. Ex: At 50% of it's health it will say something like "Argh..Your making me upset!"

    Alright, here is a template.

    Look and use the template below

    Code:

    Code:
    global Npc_Name_Health = function(mob)
    {
    if(.GetHealthPct() <= %_of_HP && Npc_Name == 0)
    {
    .SendChatMessage("What you want your Npc to say");
    global Npc_Name = 1;
    }
    if(.GetHealthPct() <= %_of_HP && Npc_Name == 1)
    {
    .CastSpell(5200);
    .SendChatMessage("What you want your Npc to say");
    global Npc_Name = 2;
    }
    if(.GetHealthPct() <= %_of_HP && Npc_Name == 2)
    {
    .SendChatMessage("What you want 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 want your Npc to say");
    };
    .RegisterUnitEvent(Npc ID, 1, Npc_Name_Combat);Step 1 : All the things in red is the things you need to put in your self. (Can't seem to make it red hehe)

    Step 2 : Open up NotePad or WordPad and copy and paste that template into it and then start modifying it with steps below.

    Step 3 : global Npc_Name_Health = function(mob) = This is the name of your or the NPC that will speak.

    Step 4 : if(.GetHealthPct() <= %_of_HP && Npc_Name == 0) = The % of where the NPC will say the message you chose at the % of Hp (Ex, 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 as Step 3 and the rest of the Naming ones.)

    Step 6 : .SendChatMessage("What you want your NPC to say"); = The message you want your NPC to say when it gets to the % of the Hp.

    Step 7 : global Npc_Name = 1; = The Name of your NPC (Remember, must be the same as every one where it says NPC_Name)

    Step 8 : .RegisterUnitEvent(Npc ID, 1, Npc_Name_Combat); = The NPC Entry Spawn ID of your Npc (Ex, .npc spawn 123456, 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)

    Code:

    Code:
    }
    if(.GetHealthPct() <= %_of_HP && Npc_Name == 2)
    {
    .SendChatMessage("What you want your Npc to say");
    global Npc_Name = 3;
    }Also, you can keep adding more to make the NPC talk more.

    -->And now naming it<--

    Naming - It's hard, but then again, it's easy. Now when your done modifying it, go to File > Save as > and select "All Files" and call it like, (If you are doing it for a NPC called Cyberous, I would call it Cyberous.gm). So like in "Step 3" The Name of your NPC, just name it that and put a .gm at the end of it so it ends up being Cyberous.gm

    Saving It : Save it to your Desktop or some were you will remember where it is.

    Step 10 : The place you will put this folder is in the scripts folder. So the location should be this:

    C:\AC Web Ultimate Repack\Ascent\scripts

    After that you can just restart your server.

    And that's about it, Enjoy!.

    How to make a npc talk at a perent hp (scripting)
  2. #2
    Roger Fang's Avatar Banned
    Reputation
    17
    Join Date
    Aug 2008
    Posts
    113
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nice, +Rep

  3. #3
    Shruik's Avatar Master Sergeant
    Reputation
    28
    Join Date
    Jul 2008
    Posts
    100
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    **********
    Last edited by Shruik; 03-05-2011 at 12:39 PM.

  4. #4
    Despara's Avatar Member
    Reputation
    12
    Join Date
    Apr 2008
    Posts
    118
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ty for the rep i hope it was usefull

  5. #5
    Despara's Avatar Member
    Reputation
    12
    Join Date
    Apr 2008
    Posts
    118
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Cmon some more response please was this guide any usefull?

  6. #6
    viKKmaN's Avatar Member
    Reputation
    1
    Join Date
    May 2007
    Posts
    32
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    usefull, thanks

  7. #7
    mager1794's Avatar Member
    Reputation
    356
    Join Date
    Feb 2008
    Posts
    703
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Game Monkey Scripting is out of date i believe??
    Lunar Gaming - Reaching For The Stars

  8. #8
    BlackEagle's Avatar Member
    Reputation
    15
    Join Date
    Dec 2008
    Posts
    126
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nice release.

  9. #9
    zorniza's Avatar Member
    Reputation
    8
    Join Date
    Jun 2007
    Posts
    52
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nice.Thanks.

  10. #10
    keeevin92's Avatar Member
    Reputation
    8
    Join Date
    Jul 2007
    Posts
    203
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    my npc doesnt say anything : ( what have i dont wrong? My npcs name is Joakim 'the betrayer'. Plz help

    global Joakim 'The Betrayer' = function(mob)
    {
    if(.GetHealthPct() <= 70%_of_HP && Joakim 'The Betrayer' == 0)
    {
    .SendChatMessage("So you think you can beat me!");
    global Joakim 'The Betrayer' = 1;
    }
    if(.GetHealthPct() <= 50%_of_HP && Joakim 'The Betrayer' == 1)
    {
    .CastSpell(5200);
    .SendChatMessage("Your starting to get on my nervs!");
    global Joakim 'The Betrayer' = 2;
    }
    if(.GetHealthPct() <= 30%_of_HP && Joakim 'The Betrayer' == 2)
    {
    .SendChatMessage("Now your making me angry!");
    global Joakim 'The Betrayer' = 3;
    }
    };
    global VanCleef_Combat = function(plr)
    {
    global VC_PHASE = 0;
    .RegisterTimer(Time in Miller Seconds, Joakim 'The Betrayer', 0);
    .SendChatMessage("Your.... lucky...");
    };
    .RegisterUnitEvent(1000001, 1, Joakim 'The Betrayer');Step
    Last edited by keeevin92; 02-01-2009 at 06:56 AM.

Similar Threads

  1. [Lua Script] How to make an NPC talk every 15 seconds
    By elitebot in forum WoW EMU Questions & Requests
    Replies: 2
    Last Post: 06-25-2011, 11:03 PM
  2. [Help] How to make an NPC Talk with Lua
    By Silentnvd in forum World of Warcraft Emulator Servers
    Replies: 4
    Last Post: 07-26-2008, 08:08 PM
  3. how do i make a npc talk
    By edded in forum World of Warcraft Emulator Servers
    Replies: 1
    Last Post: 07-01-2008, 10:44 PM
  4. how to make a npc talk/cast Mangos
    By hotandsekc in forum World of Warcraft Emulator Servers
    Replies: 1
    Last Post: 06-11-2008, 09:12 PM
  5. How to make an NPC walk around and talk
    By Immüñé in forum World of Warcraft Emulator Servers
    Replies: 3
    Last Post: 05-30-2008, 05:47 PM
All times are GMT -5. The time now is 06:07 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search