[Help] How to make an NPC Talk with Lua menu

User Tag List

Results 1 to 5 of 5
  1. #1
    Silentnvd's Avatar Member
    Reputation
    49
    Join Date
    Jan 2008
    Posts
    295
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Help] How to make an NPC Talk with Lua

    hey all im trying to get an NPC to talk by using LUA but i dont know how to Script it
    if you could post the Script i Will +Rep. Please and thanks!

    [Help] How to make an NPC Talk with Lua
  2. #2
    Sonic Waffle's Avatar Contributor
    Reputation
    170
    Join Date
    Dec 2007
    Posts
    990
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try this guide, it might help you:
    http://www.mmowned.com/forums/ascent...lua-101-a.html


  3. #3
    BrantX's Avatar Contributor
    Reputation
    205
    Join Date
    Jul 2007
    Posts
    899
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Like how script it? Say something without entering combat or saying something when he enters combat yadadada.



  4. #4
    Exacute's Avatar Active Member
    Reputation
    67
    Join Date
    Mar 2008
    Posts
    337
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    think its something like this ur searching:

    -Credits to Maven @ arcEmu
    --Written by Maven. Enjoy!


    local timebetweenannounce = 45000 --Time between messeges the NPC sends
    local restarttime = 120000 --How long you want until it restarts all over again.
    local npcid = 99999 --The NPC's ID

    --Change the folowing text to whatever you want
    local message1 = "Hello! Welcome to our server!"
    local message2 = "Please don't PvP Here!"
    local message3 = "Have fun! Don't Forget to vote for us!"
    local message4 = "Visit our site at [Site URL]"
    local message5 = "This was made by Maven for ArcEmu!"


    function Announcer_Yell(pUnit, Event)
    pUnit:SendChatMessage(12, 0, message1)
    pUnit:RemoveEvents();
    pUnit:RegisterEvent("Announcer2_Yell", timebetweenannounce, 0)
    end

    function Announcer2_Yell(pUnit, Event)
    pUnit:SendChatMessage(12 ,0, message2)
    pUnit:RemoveEvents();
    pUnit:RegisterEvent("Announcer3_Yell", timebetweenannounce, 0)
    end

    function Announcer3_Yell(pUnit, Event)
    pUnit:SendChatMessage(12, 0, message3)
    pUnit:RemoveEvents();
    pUnit:RegisterEvent("Announcer4_Yell", timebetweenannounce, 0)
    end

    function Announcer4_Yell(pUnit, Event)
    pUnit:SendChatMessage(12, 0, message4)
    pUnit:RemoveEvents();
    pUnit:RegisterEvent("Announcer5_Yell", timebetweenannounce, 0)
    end

    function Announcer5_Yell(pUnit, Event)
    pUnit:SendChatMessage(12, 0, message5)
    pUnit:RemoveEvents();
    pUnit:RegisterEvent("Announcer2_Yell", restarttime, 0)
    end

    function Announcer_Start(pUnit, Event)
    pUnit:RegisterEvent("Announcer_Yell", 1000, 0)
    end
    RegisterUnitEvent(npcid, 6, "Announcer_Start")
    but if it wasnt a announcer, then u can do so he talk on combat, dead etc,
    function MOB_Combat(Unit, Event)
    Num1 = 0
    Unit:SendChatMessage(14, 0, "TXTXTXT?")
    Unit:RegisterEvent("MOB_Phase1", 13000, 0)
    end

    RegisterUnitEvent(NPC ID, 1, "MOB_Combat")
    And there is the last option to do when you right click them / speak to them, then you just cn add this SQL
    DELETE FROM `npc_text` WHERE (`entry` = 'X');

    INSERT INTO `npc_text` VALUES ('X', '1', 'Should Kil\'Jaeden rise up through the Sunwell our world will be thrown into a war the likes of which has not been seen for 10,000 years!', 'Should Kil\'Jaeden rise up through the Sunwell our world will be thrown into a war the likes of which has not been seen for 10,000 years!', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0');

    DELETE FROM `npc_gossip_textid` WHERE (`creatureid` = 'X');
    INSERT INTO `npc_gossip_textid` VALUES ('X', 'XX');
    Last edited by Exacute; 07-26-2008 at 07:07 PM.

  5. #5
    Silentnvd's Avatar Member
    Reputation
    49
    Join Date
    Jan 2008
    Posts
    295
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks Exacute That helped alot i needed an anouncer +Rep!!

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. How to make a npc talk at a perent hp (scripting)
    By Despara in forum WoW EMU Guides & Tutorials
    Replies: 9
    Last Post: 01-31-2009, 07:46 PM
  3. 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
  4. [HELP] How to make a tele npc +rep to helpers!
    By cooper101 in forum World of Warcraft Emulator Servers
    Replies: 1
    Last Post: 03-24-2008, 01:41 PM
  5. How to make game objects teleport with LUA!
    By Le Froid in forum WoW EMU Guides & Tutorials
    Replies: 4
    Last Post: 01-02-2008, 06:59 PM
All times are GMT -5. The time now is 08:00 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search