How do I make a new LUA work? menu

User Tag List

Results 1 to 13 of 13
  1. #1
    Akisunmaaji's Avatar Active Member
    Reputation
    61
    Join Date
    Sep 2007
    Posts
    400
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How do I make a new LUA work?

    I'm a complete noob with LUA and I can't for the life of me figure out how to get this LUA file to work for my server..I made a LUA file and put it in the scripts folder but I don't know how else to make it work..I've searched for like an hour now and I can't find anything. Any help is appreciated.

    How do I make a new LUA work?
  2. #2
    Kaidos's Avatar Contributor
    Reputation
    148
    Join Date
    Jun 2008
    Posts
    324
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    At first, what is this for a LUA file? Post it here

    Did you enable LUA in the arcemu-world.config?

    Is it in the right script folder? /ArcEmuXXXX/scripts ?

  3. #3
    Akisunmaaji's Avatar Active Member
    Reputation
    61
    Join Date
    Sep 2007
    Posts
    400
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Xendro View Post
    Hi,

    At first, what is this for a LUA file? Post it here

    Did you enable LUA in the arcemu-world.config?

    Is it in the right script folder? /ArcEmuXXXX/scripts ?
    Well it's kinda confusing the way it's written in the config file, but here is what mine says and maybe you can tell me what to change:

    Code:
    #-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
    # Scripting Engine Setup
    #
    #    ArcEmu can support multiple script backends via the means of loading .dll files for them.
    #    This section in the config can enable/disable those backends.
    #
    #    LUA
    #         If you would like to enable the LUA scripting backend, enable this.
    #         Default: 0
    #
    #-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
    
    <ScriptBackends LUA="1"
                    AS="1">
    And yes, I'm sure the lua file is in the right folder.

    And here's the link to the LUA script: http://www.mmowned.com/forums/emulat...-boss-lua.html

    :P

  4. #4
    TheZaronz's Avatar Active Member
    Reputation
    97
    Join Date
    Dec 2007
    Posts
    567
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It appears that you got Lua enabled, you should look for errors when starting up 'world' that's the only way for debugging Lua. And if you find some errors at start up post them here.

  5. #5
    Akisunmaaji's Avatar Active Member
    Reputation
    61
    Join Date
    Sep 2007
    Posts
    400
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by TheZaronz View Post
    It appears that you got Lua enabled, you should look for errors when starting up 'world' that's the only way for debugging Lua. And if you find some errors at start up post them here.
    Well is that all I have to do to make it work? Put it in the file and have LUA enabled? I thought I was supposed to use some kind of sql file to inject it into my world database, the only problem is I don't know how to do that.

  6. #6
    TheZaronz's Avatar Active Member
    Reputation
    97
    Join Date
    Dec 2007
    Posts
    567
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well it seems, if you want the 'RickAstley' script to work you must replace
    Code:
    RegisterUnitEvent(CreatureEntryIDHere, 1, "RickAstley_OnCombat")
    RegisterUnitEvent(CreatureEntryIDHere, 2, "RickAstley_OnLeaveCombat")
    RegisterUnitEvent(CreatureEntryIDHere, 4, "RickAstley_OnDied")
    the CreatureEntryIDHere, with the ID of the npc you want to use for it.

  7. #7
    Akisunmaaji's Avatar Active Member
    Reputation
    61
    Join Date
    Sep 2007
    Posts
    400
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by TheZaronz View Post
    Well it seems, if you want the 'RickAstley' script to work you must replace
    Code:
    RegisterUnitEvent(CreatureEntryIDHere, 1, "RickAstley_OnCombat")
    RegisterUnitEvent(CreatureEntryIDHere, 2, "RickAstley_OnLeaveCombat")
    RegisterUnitEvent(CreatureEntryIDHere, 4, "RickAstley_OnDied")
    the CreatureEntryIDHere, with the ID of the npc you want to use for it.
    Ah, thanks. However that just created a new bigger problem for me..

    So I tried to login after restarting my server with the modified script in there, and all of my characters are stripped of their clothes and "Login Failed" every single time. I took the LUA script out and it is still doing this..what could have caused this?

  8. #8
    TheZaronz's Avatar Active Member
    Reputation
    97
    Join Date
    Dec 2007
    Posts
    567
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This can't be causing that, it probably comes from an issue in the char DB, did you upgrade revision or anything?

  9. #9
    Akisunmaaji's Avatar Active Member
    Reputation
    61
    Join Date
    Sep 2007
    Posts
    400
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by TheZaronz View Post
    This can't be causing that, it probably comes from an issue in the char DB, did you upgrade revision or anything?
    No. I was literally just playing with a friend, modified the script, shut down my arcemu-world.exe, restarted it and the shit hit the fan.

  10. #10
    Kaidos's Avatar Contributor
    Reputation
    148
    Join Date
    Jun 2008
    Posts
    324
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Maybe you change some configs?

    And to locate your LUA error

    you can see can see it in the arcemu-world.exe like TheZaronz said.

    Rename the script and put a 'Z' infornt of the Filename, so when the server starts you can see the script when you scroll a little bit up.

  11. #11
    Found's Avatar Banned
    Reputation
    239
    Join Date
    Mar 2009
    Posts
    642
    Thanks G/R
    1/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    go to world.conf and change this

    Code:
    #-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
    # Scripting Engine Setup
    #
    #    ArcEmu can support multiple script backends via the means of loading .dll files for them.
    #    This section in the config can enable/disable those backends.
    #
    #    LUA
    #         If you would like to enable the LUA scripting backend, enable this.
    #         Default: 0
    #
    #-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
    
    <ScriptBackends LUA="0"
                    AS="0">
    to this

    Code:
    #-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
    # Scripting Engine Setup
    #
    #    ArcEmu can support multiple script backends via the means of loading .dll files for them.
    #    This section in the config can enable/disable those backends.
    #
    #    LUA
    #         If you would like to enable the LUA scripting backend, enable this.
    #         Default: 0
    #
    #-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
    
    <ScriptBackends LUA="1"
                    AS="1">
    And than put your LUA in the scripts folder. Now all you do is add the sql and restart the server

    Hope it helped

  12. #12
    Kaidos's Avatar Contributor
    Reputation
    148
    Join Date
    Jun 2008
    Posts
    324
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Mello1337 View Post
    go to world.conf and change this

    Code:
    #-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
    # Scripting Engine Setup
    #
    #    ArcEmu can support multiple script backends via the means of loading .dll files for them.
    #    This section in the config can enable/disable those backends.
    #
    #    LUA
    #         If you would like to enable the LUA scripting backend, enable this.
    #         Default: 0
    #
    #-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
    
    <ScriptBackends LUA="0"
                    AS="0">
    to this

    Code:
    #-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
    # Scripting Engine Setup
    #
    #    ArcEmu can support multiple script backends via the means of loading .dll files for them.
    #    This section in the config can enable/disable those backends.
    #
    #    LUA
    #         If you would like to enable the LUA scripting backend, enable this.
    #         Default: 0
    #
    #-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
    
    <ScriptBackends LUA="1"
                    AS="1">
    And than put your LUA in the scripts folder. Now all you do is add the sql and restart the server

    Hope it helped

    He did it already, look at his first post xD

  13. #13
    Gastricpenguin's Avatar Legendary
    Reputation
    980
    Join Date
    Feb 2007
    Posts
    2,236
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    LUA scripts have nothing to do with characters showing up naked or causing login errors. You must have edited the database. There is no other reason why that could have happened by just editing a lua script.
    Life Puzzler WoW - Website | Forums

Similar Threads

  1. [Lua]How does the kill command work ? or how can i make an npc do suicide.
    By Wheeze201 in forum WoW EMU Questions & Requests
    Replies: 6
    Last Post: 08-18-2009, 06:50 PM
  2. How do i make my registration page work? And Other stuff about it
    By whatshisface in forum WoW EMU Questions & Requests
    Replies: 14
    Last Post: 09-16-2008, 07:42 PM
  3. [Help] How do i make a new grave yard +Rep
    By jackdaripper in forum World of Warcraft Emulator Servers
    Replies: 3
    Last Post: 05-21-2008, 01:07 AM
  4. [QUESTION] How do you make isntances work in newer revisions?
    By geburha in forum World of Warcraft Emulator Servers
    Replies: 2
    Last Post: 09-01-2007, 03:15 PM
  5. How do I make "incompatible" mods work?
    By Sahdrani in forum WoW UI, Macros and Talent Specs
    Replies: 3
    Last Post: 08-18-2007, 03:56 PM
All times are GMT -5. The time now is 02:10 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