LUA help menu

User Tag List

Thread: LUA help

Page 1 of 2 12 LastLast
Results 1 to 15 of 17
  1. #1
    stoneharry's Avatar Moderator Harry


    Reputation
    1618
    Join Date
    Sep 2007
    Posts
    4,564
    Thanks G/R
    151/150
    Trade Feedback
    0 (0%)
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)

    LUA help

    Hello all who are reading this :wave:

    I am planning to get out of leecher status by contributing a few LUA files along with the codes to put them into sql (Ascent) but first i need a bit of help with one of my scripts.

    I have finished a script for a boss but i really do not understand why it wont work! I have it in the scripts folder, i restarted my server, i tried several different things to fix it but it wont work. :confused:

    Please do not flame

    Code:
    --[[ PHAS E ONE]] --
    function ServerMaster_Phase1(Unit, event)
     if Unit:GetHealthPct() < 95 then
      Unit:RemoveEvents()
      Unit:SendChatMessage(12, 0, "I can not believe you are still alive, burn!")
      Unit:CastSpell(43648)
      Unit:RegisterEvent("ServerMaster_Strike",6000, 0)
      Unit:RegisterEvent("ServerMaster_Phase2",1000, 0)
     end
    end
    function ServerMaster_Strike(Unit)
     Unit:CastSpell(3130)
    end
    --[[ PHASE TWO]]--
    function ServerMaster_Phase2(Unit, event)
     if Unit:GetHealthPct() < 65 then
      Unit:RemoveEvents()
      Unit:SendChatMessage(12, 0, "Curse!")
      Unit:CastSpell(31715)
      Unit:RegisterEvent("ServerMaster_charge",8000, 0)
      Unit:RegisterEvent("ServerMaster_Phase3",1000, 0)
     end
    end
    function ServerMaster_charge(Unit)
     Unit:CastSpell(37433)
    end
    --[[ PHASE THREE ]]--
    function ServerMaster_Phase3(Unit, event)
     if Unit:GetHealthPct() < 75 then
      Unit:RemoveEvents()
      Unit:SendChatMessage(12, 0, "So you are stronger than i thought! Come my minions!")
      Unit:CastSpell(4937)
                    Unit:SetScale(2)
      Unit:RegisterEvent("ServerMaster_spin",10000, 0)
      Unit:RegisterEvent("ServerMaster_Phase4",1000, 0)
     end
    end
    function ServerMaster_spin(Unit)
     Unit:CastSpell(29963)
    end
    --[[ PHASE FOUR ]]--
    function ServerMaster_Phase4(Unit, event)
     if Unit:GetHealthPct() <= 50 then
      Unit:RemoveEvents()
      Unit:SetScale(1)
      Unit:CastSpell(30533)
      Unit:SendChatMessage(12, 0, "Now you shall die!")
      Unit:RegisterEvent("Venomclaw_shoop",7000, 0)
                    Unit:SetFaction(20)
     end
    end
    function ServerMaster_shoop(Unit, event)
     Unit:RemoveEvents()
     Unit:SetScale(2)
     Unit:CastSpell(35354)
            Unit:SetFaction(15)
            Unit:SetModel(18531)
     Unit:SendChatMessage(You just lost!")
     Unit:PlaySoundToSet(11803);
    end
    function ServerMaster_OnCombat(Unit, event)
     Unit:SendChatMessage(11, 0, "Who dares disturb the Server Master!")
     Unit:RegisterEvent("ServerMaster_Phase1",1000, 0)
     Unit:RegisterEvent("ServerMaster_Strike",6000, 0)
    end
    function ServerMaster_OnLeaveCombat(Unit)
     Unit:RemoveEvents()
            unit:SendChatMessage(11, 0, "To easy...")
    end
    function ServerMaster_OnKilledTarget(Unit)
     Unit:SendChatMessage(11, 0, "Your soul belongs to me now!")
     Unit:CastSpell(36981)
    end
    function ServerMaster_Death(Unit)
     Unit:SendChatMessage(12, 0, "You cheated! you get no reward!")
     Unit:RemoveEvents()
    end
    RegisterUnitEvent(72634, 1, "ServerMaster_OnCombat")
    RegisterUnitEvent(72634, 2, "ServerMaster_OnLeaveCombat")
    RegisterUnitEvent(72634, 3, "ServerMaster_OnKilledTarget")
    RegisterUnitEvent(72634, 4, "ServerMaster_Death")
    Thanks very much for your time and help!

    Edit: Some credit must go to Gastric as he is who i learned how to script things like this (Learning from his scripts).
    Edit2: My spelling sucks! Try and work around it
    Last edited by stoneharry; 02-25-2008 at 01:30 PM.

    LUA help
  2. #2
    Snailz's Avatar Contributor Authenticator enabled
    Reputation
    239
    Join Date
    Nov 2007
    Posts
    941
    Thanks G/R
    2/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Is there a error if so what?
    Cheese Cake?

  3. #3
    2dgreengiant's Avatar ★ Elder ★


    Reputation
    1192
    Join Date
    Feb 2007
    Posts
    7,129
    Thanks G/R
    1/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    what line do u get the error on?
    If you need me you have my skype, if you don't have my skype then you don't need me.

  4. #4
    stoneharry's Avatar Moderator Harry


    Reputation
    1618
    Join Date
    Sep 2007
    Posts
    4,564
    Thanks G/R
    151/150
    Trade Feedback
    0 (0%)
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Snailz View Post
    Is there a error if so what?
    The Monster just doesn't do anything apart from normal.

    I attack it, it attacks me, but nothing happens, it does not say anything, it does not cast anything, all it does is attack untill it is dead...

    I don't understand why it wont work.

    Edit: there is no error, as i said, NOTHING happens at all

  5. #5
    Snailz's Avatar Contributor Authenticator enabled
    Reputation
    239
    Join Date
    Nov 2007
    Posts
    941
    Thanks G/R
    2/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    In The Ascent.exe Log does it load Without error.

    Btw : Please tell me the Id of the boss is

    72634
    Cheese Cake?

  6. #6
    Snailz's Avatar Contributor Authenticator enabled
    Reputation
    239
    Join Date
    Nov 2007
    Posts
    941
    Thanks G/R
    2/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Also Try takeing out the
    --[[ PHASE ONE]] -- Etc...
    Cheese Cake?

  7. #7
    stoneharry's Avatar Moderator Harry


    Reputation
    1618
    Join Date
    Sep 2007
    Posts
    4,564
    Thanks G/R
    151/150
    Trade Feedback
    0 (0%)
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Snailz View Post
    In The Ascent.exe Log does it load Without error.

    Btw : Please tell me the Id of the boss is
    72634
    Lol of course it is XD I aint that much of a n00b.
    And in Ascent.exe the last message was:
    "18:43 N LogonCommClient: Logonserver Latency is 0ms."

    I'll try taking out that part then, give me a minute.

  8. #8
    2dgreengiant's Avatar ★ Elder ★


    Reputation
    1192
    Join Date
    Feb 2007
    Posts
    7,129
    Thanks G/R
    1/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    have u enabled LUA
    If you need me you have my skype, if you don't have my skype then you don't need me.

  9. #9
    stoneharry's Avatar Moderator Harry


    Reputation
    1618
    Join Date
    Sep 2007
    Posts
    4,564
    Thanks G/R
    151/150
    Trade Feedback
    0 (0%)
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by 2dgreengiant View Post
    have u enabled LUA
    Yes as all my other scripts work.

  10. #10
    Snailz's Avatar Contributor Authenticator enabled
    Reputation
    239
    Join Date
    Nov 2007
    Posts
    941
    Thanks G/R
    2/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ye Make the :


    <ScriptBackends LUA="0"
    AS="0">


    Look Like :


    <ScriptBackends LUA="1"
    AS="1">
    Cheese Cake?

  11. #11
    stoneharry's Avatar Moderator Harry


    Reputation
    1618
    Join Date
    Sep 2007
    Posts
    4,564
    Thanks G/R
    151/150
    Trade Feedback
    0 (0%)
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Snailz View Post
    Ye Make the :


    <ScriptBackends LUA="0"
    AS="0">


    Look Like :


    <ScriptBackends LUA="1"
    AS="1">
    Ok this is the part i become a big n00b... I don't even know where that is
    Also i took at the --PHASE 1--- parts and it still doesn't work

  12. #12
    Snailz's Avatar Contributor Authenticator enabled
    Reputation
    239
    Join Date
    Nov 2007
    Posts
    941
    Thanks G/R
    2/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Go In ascent.conf and sear for LUA and then go down abit
    Cheese Cake?

  13. #13
    stoneharry's Avatar Moderator Harry


    Reputation
    1618
    Join Date
    Sep 2007
    Posts
    4,564
    Thanks G/R
    151/150
    Trade Feedback
    0 (0%)
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Snailz View Post
    Go In ascent.conf and sear for LUA and then go down abit
    Lol
    I looked through, could not find it, so i did Ctrl F, searched LUA and could not find anything.

    Want me to link my ascent.conf?

  14. #14
    stoneharry's Avatar Moderator Harry


    Reputation
    1618
    Join Date
    Sep 2007
    Posts
    4,564
    Thanks G/R
    151/150
    Trade Feedback
    0 (0%)
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Doh, i just looked through my ascent.exe... there is an error, sorry

    failed. <could not load>
    scripts/Server Master <fix>.lua:62: '>' expected near 'just'

  15. #15
    Snailz's Avatar Contributor Authenticator enabled
    Reputation
    239
    Join Date
    Nov 2007
    Posts
    941
    Thanks G/R
    2/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Uhm i see no problem there beacuse theres only 1 Just ^^
    Cheese Cake?

Page 1 of 2 12 LastLast

Similar Threads

  1. [Help] Need LUA help? Post here!
    By EcHoEs in forum World of Warcraft Emulator Servers
    Replies: 20
    Last Post: 10-03-2010, 01:18 PM
  2. [Help] i need Lua help with this script...
    By Ellenor in forum World of Warcraft Emulator Servers
    Replies: 25
    Last Post: 03-03-2008, 03:45 PM
  3. i need some lua help please
    By runiker in forum World of Warcraft Emulator Servers
    Replies: 3
    Last Post: 02-29-2008, 07:49 AM
  4. Lua help
    By reconz in forum World of Warcraft Emulator Servers
    Replies: 12
    Last Post: 02-18-2008, 07:03 PM
  5. Lua help
    By Tom_2001 in forum World of Warcraft Emulator Servers
    Replies: 10
    Last Post: 02-04-2008, 12:17 PM
All times are GMT -5. The time now is 11:17 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