[Help] Lua Script Not Working menu

Shout-Out

User Tag List

Page 1 of 2 12 LastLast
Results 1 to 15 of 27
  1. #1
    Muruk's Avatar Member
    Reputation
    1
    Join Date
    Mar 2008
    Posts
    45
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Help] Lua Script Not Working

    I have been working with this script for a few hours now and i cant figure out why it wont work, I got the OnCombat to work at first but when i tweaked it to try and fix it, it all went screwy and now it doesnt work, no matter what i try so here is what i am on right now


    Code:
    function Phase_1(pUnit)
    if pUnit: GetHealthPct() < 76 then
    pUnit:Castspell(19953)
    pUnit:SendChatMessage(11,0,"ARRRG, You Shall Pay for your Incolence!!")
    pUnit:RegisterEvent("Phase_2",1000,0)
    end
    end
    
    function Phase_2(pUnit)
    if pUnit: GetHealthPct() < 51 then
    pUnit:Castspell(19953)
    pUnit:SendChatMessage(11,0,"I will crush you, all of you!")
    pUnit:RegisterEvent("Phase_3",1000,0)
    end
    end
    
    function Phase_3(pUnit)
    if pUnit: GetHealthPct() < 26 then
    pUnit:Castspell(19953)
    pUnit:SendChatMessage(11,0,"You are stronger than you appear, but can you face my rage one last time!?")
    pUnit:RegisterEvent("ZulRin_OnDied",1000,0)
    end
    end
    
    function ZulRin_OnCombat(pUnit, Event)
    pUnit:SendChatMessage(11,0,"Who dares intrude on Vash's Terrace, I shall make you regret comming here!")
    pUnit:RegisterEvent("Phase_1,1000,0)
    
    end
    
    RegisterUnitEvent (75000, 1 ,"ZulRin_OnCombat")
    I really am new to the Lua scripting, i understand some things about it but since the script isnt working, i must not know enough yet :lolwut

    [Help] Lua Script Not Working
  2. #2
    TheSpidey's Avatar Elite User
    Reputation
    365
    Join Date
    Jan 2008
    Posts
    2,200
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It's because you don't remove your events every phase, so it'll constantly switch from one phase to the others. Add pUnit:RemoveEvents() after the if pUnit:GetHealthPct().

  3. #3
    Muruk's Avatar Member
    Reputation
    1
    Join Date
    Mar 2008
    Posts
    45
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hmm, i added those in, but he still isnt doing anything, is it because i have something wrong with the ZulRin_OnCombat part??? because he isnt even doing that at the moment

  4. #4
    TheSpidey's Avatar Elite User
    Reputation
    365
    Join Date
    Jan 2008
    Posts
    2,200
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    function Phase_3(pUnit)
    VVV
    function Phase_3(pUnit, Event)

    on all phases.

    Make sure 75000 is actually the npc entry.

  5. #5
    Muruk's Avatar Member
    Reputation
    1
    Join Date
    Mar 2008
    Posts
    45
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ok i added it to all of the phases, but nothing the first OnCombat part isnt starting he doesnt say who dares intrude part.....and yes 75000 is the entry number.

  6. #6
    TheSpidey's Avatar Elite User
    Reputation
    365
    Join Date
    Jan 2008
    Posts
    2,200
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Post your full code again. Use pastebin (select LUA).

  7. #7
    Muruk's Avatar Member
    Reputation
    1
    Join Date
    Mar 2008
    Posts
    45
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    function Phase_1(pUnit,Event)
    if pUnit: GetHealthPct() < 76 then pUnit:RemoveEvent()
    pUnit:Castspell(19953)
    pUnit:SendChatMessage(11,0,"ARRRG, You Shall Pay for your Incolence!!")
    pUnit:RegisterEvent("Phase_2",1000,0)
    end
    end
    
    function Phase_2(pUnit,Event)
    if pUnit: GetHealthPct() < 51 thenpUnit:RemoveEvent()
    pUnit:Castspell(19953)
    pUnit:SendChatMessage(11,0,"I will crush you, all of you!")
    pUnit:RegisterEvent("Phase_3",1000,0)
    end
    end
    
    function Phase_3(pUnit,Event)
    if pUnit: GetHealthPct() < 26 then pUnit:RemoveEvent()
    pUnit:Castspell(19953)
    pUnit:SendChatMessage(11,0,"You are stronger than you appear, but can you face my rage one last time!?")
    end
    end
    
    function ZulRin_OnCombat(pUnit,Event)
    pUnit:SendChatMessage(11,0,"Who dares intrude on Vash's Terrace, I shall make you regret comming here!")
    pUnit:RegisterEvent("Phase_1",1000,0)
    
    end
    
    RegisterUnitEvent (75000,1,"ZulRin_OnCombat")

  8. #8
    TheSpidey's Avatar Elite User
    Reputation
    365
    Join Date
    Jan 2008
    Posts
    2,200
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hmm.. Any errors in the console when it loads it? Or when you start fighting?

  9. #9
    Muruk's Avatar Member
    Reputation
    1
    Join Date
    Mar 2008
    Posts
    45
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    only when i start fighting he just attacks doesnt initialize the OnCombat part....

    [Edit]: oh but no errors

  10. #10
    TheSpidey's Avatar Elite User
    Reputation
    365
    Join Date
    Jan 2008
    Posts
    2,200
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Is LUA enabled in ascent-world.conf?

  11. #11
    Muruk's Avatar Member
    Reputation
    1
    Join Date
    Mar 2008
    Posts
    45
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    not sure where that is but im pretty possitive that i have lua enabled because there are some scripts in lua that are working that were in the repack i am currently using.

  12. #12
    warxhead's Avatar Member
    Reputation
    13
    Join Date
    Jan 2007
    Posts
    76
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    function Phase_2(pUnit,Event)
    if pUnit: GetHealthPct() < 51 thenpUnit:RemoveEvent()
    pUnit:Castspell(19953)
    pUnit:SendChatMessage(11,0,"I will crush you, all of you!")
    pUnit:RegisterEvent("Phase_3",1000,0)
    end
    end
    to
    Code:
    function Phase_2(pUnit,Event)
    if pUnit: GetHealthPct() < 51 then pUnit:RemoveEvent()
    pUnit:Castspell(19953)
    pUnit:SendChatMessage(11,0,"I will crush you, all of you!")
    pUnit:RegisterEvent("Phase_3",1000,0)
    end
    end

  13. #13
    Muruk's Avatar Member
    Reputation
    1
    Join Date
    Mar 2008
    Posts
    45
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yea i saw that soon as i posted it so i changed and tried it but got nothing :confused:

    [Edit]: Actualy, apparently spacing that fixed the OnCombat part he does say the opening message, however he doesnt follow through with the rest of the "encounter"..
    Last edited by Muruk; 03-16-2008 at 12:44 PM.

  14. #14
    TheSpidey's Avatar Elite User
    Reputation
    365
    Join Date
    Jan 2008
    Posts
    2,200
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Line break after 'then'.
    Also, you do realize he'll cast each spell once, right?

  15. #15
    Muruk's Avatar Member
    Reputation
    1
    Join Date
    Mar 2008
    Posts
    45
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yea i am going to change the spell he casts once i can get the script to start,ill change it to enrage that lasts maby 10 mins or something along those lines.

Page 1 of 2 12 LastLast

Similar Threads

  1. [Lua Script] Lua Script Not Working
    By drpwnage77 in forum WoW EMU Questions & Requests
    Replies: 4
    Last Post: 06-23-2010, 05:50 PM
  2. Halp please lua script not working
    By thebigman in forum WoW EMU Questions & Requests
    Replies: 4
    Last Post: 09-29-2009, 06:06 PM
  3. LUA script not working
    By Dz The Rage in forum WoW EMU Questions & Requests
    Replies: 4
    Last Post: 04-04-2009, 09:26 PM
  4. LUA script not working
    By pedobear123 in forum World of Warcraft General
    Replies: 12
    Last Post: 09-01-2008, 09:38 AM
  5. Simple Lua Script , not working need help!
    By Arugos in forum World of Warcraft Emulator Servers
    Replies: 16
    Last Post: 12-30-2007, 02:06 PM
All times are GMT -5. The time now is 10:25 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