Lua Script help menu

Shout-Out

User Tag List

Results 1 to 10 of 10
  1. #1
    adrion's Avatar Private
    Reputation
    1
    Join Date
    May 2010
    Posts
    7
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Lua Script help

    I run an private server using ArcEmu so the scripts i write are in Lua.I wanted to script a Death Knight (16146 ID) so he can do my spells:

    Code:

    function DeathKnight_OnCombat(Unit, Event)
    Unit:SendChatMessage(12, 7, "We will destroy Stormwind and everyone that stand in our way!")
    Unit:RegisterEvent("DeathKnight_Spell1", 5000, 1)
    end

    function DeathKnight_Spell1(Unit, Event)
    Unit:FullCastSpellOnTarget(51425, Unit:GetRandomPlayer(0))
    end

    function DeathKnight_OnLeaveCombat(Unit, Event)
    Unit:RemoveEvents()
    end

    function DeathKnight_OnKilledTarget(Unit, Event)
    Unit:SendChat Message(12, 7, "Another win for the Scourge!")
    end

    function DeathKnight_OnDied(Unit, Event)
    Unit:RemoveEvents()
    end


    RegisterUnitEvent(16146, 1, "DeathKnight_OnCombat")
    RegisterUnitEvent(16146, 2, "DeathKnight_Spell1")
    RegisterUnitEvent(16146, 3, "DeathKnight_OnLeaveCombat")
    RegisterUnitEvent(16146, 4, "DeathKnight_OnKilledTarget")
    RegisterUnitEvent(16146, 5, "DeathKnight_OnDied")

    i think i scripted them very good. Isaved the DeathKnight.lua (using notepad++) in scripts folder. But when i try to fight them to test the script their are using the old naxx scripting spells(blood aura death coil and all those kind of stuffs instead of my spell(s).What can i do to make them cast my spell? Please help.

    Lua Script help
  2. #2
    Breakdawn's Avatar Active Member
    Reputation
    39
    Join Date
    Jun 2009
    Posts
    266
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It's because you need to make a new NPC or remove the old scripts, and I think the old scripts are compiled into the core

  3. #3
    adrion's Avatar Private
    Reputation
    1
    Join Date
    May 2010
    Posts
    7
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    How can i decompile the old script and compile the new one?

  4. #4
    thebigman's Avatar Contributor Reliable Trader
    CoreCoins Purchaser
    Reputation
    89
    Join Date
    Dec 2008
    Posts
    605
    Thanks G/R
    2/0
    Trade Feedback
    26 (96%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    just use a different npc with the same display

  5. #5
    Pedregon's Avatar Contributor
    Reputation
    221
    Join Date
    Aug 2007
    Posts
    705
    Thanks G/R
    0/2
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Either remove them from the scripts in the core, or just create a new NPC/MOB with that ID or change the ID and spawn it wherever. Should work.
    Leecher - 08-30-2007 - Contributor - 07-23-2008
    Donator - 06-19-2009
    My website



  6. #6
    adrion's Avatar Private
    Reputation
    1
    Join Date
    May 2010
    Posts
    7
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have a question: how can i add a new line in my NaviCat editor? Beacuse i use Navicat and i need to add 2 lines in Creature_Proto and Creature_Name.Can someone help me?

  7. #7
    covert_cat's Avatar Member
    Reputation
    55
    Join Date
    Sep 2009
    Posts
    96
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just open the .sql file you download from the WoW-V mob creator with Navicat. It should just give you the option to run the query..

  8. #8
    Nitrominator's Avatar Private
    Reputation
    5
    Join Date
    Jan 2010
    Posts
    8
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by adrion View Post
    I have a question: how can i add a new line in my NaviCat editor? Beacuse i use Navicat and i need to add 2 lines in Creature_Proto and Creature_Name.Can someone help me?
    Open the tables, and look at the bottom middle-left of the table window. There you'll see a "+". Hit that one, add the info/stats or w/e you'd want added. Hit Enter or anything that makes you finish off that line and save. Save = Exit the table and hit the Save when it asks you. Simple.

  9. #9
    rikkycurtis's Avatar Member
    Reputation
    1
    Join Date
    Apr 2009
    Posts
    15
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i believe "RegisterUnitEvent(16146, 2, "DeathKnight_Spell1")" was useless...

  10. #10
    SupernovaHH's Avatar Member
    Reputation
    12
    Join Date
    May 2008
    Posts
    113
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Register at wow-v.com, make an NPC with an ID of 100000 with the display ID of a Death Knight and set your scripts NPC id to 100000, then spawn it, that should work without a problem

Similar Threads

  1. Simple LUA Script Help
    By Wolfly in forum WoW EMU Questions & Requests
    Replies: 7
    Last Post: 09-02-2008, 04:22 PM
  2. LUA Script Help Thread
    By mager1794 in forum World of Warcraft Emulator Servers
    Replies: 0
    Last Post: 07-04-2008, 12:46 AM
  3. LuA Scripting Help
    By Jlp in forum World of Warcraft Emulator Servers
    Replies: 15
    Last Post: 06-27-2008, 03:33 AM
  4. Lua script help and general questions from beginner
    By WinKIller0 in forum World of Warcraft Emulator Servers
    Replies: 1
    Last Post: 02-23-2008, 04:38 AM
  5. Need LUA Scripting Help ?
    By Snailz in forum World of Warcraft Emulator Servers
    Replies: 2
    Last Post: 02-04-2008, 12:36 PM
All times are GMT -5. The time now is 04:29 PM. 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