LuA Scripting Help menu

User Tag List

Page 1 of 2 12 LastLast
Results 1 to 15 of 16
  1. #1
    Jlp's Avatar Member
    Reputation
    1
    Join Date
    Oct 2007
    Posts
    11
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    LuA Scripting Help

    Hey guys I was wondering why this Script isn't working for my custom mob High Inquisitor Fairbanks and maybe you guys could tell me whats wrong?

    Code:
     
    function Boss_HolySmite(pUnit,Event)
    local plr = pUnit:GetRandomPlayer(0)
    if (plr ~= nil) then
    pUnit:FullCastSpellOnTarget(20696,plr) 
    pUnit:SendChatMessage(12,0,"Feel the power of The Light!")
    end
    end
    function Boss_HolyLight(pUnit,Event) 
    pUnit:FullCastSpell(29562)
    pUnit:SendChatMessage(12,0,"Hmm, I can feel the power!")
    end 
    function Boss_ManaBurn(pUnit,Event) 
    local plr = pUnit:GetRandomPlayer(4)
    if (plr ~= nil) then
    pUnit:FullCastSpellOnTarget(25380,plr) 
    end
    end 
    function HighInquisitorFairbanks_OnEnterCombat(pUnit,Event)
    pUnit:SendChatMessage(12,0,"Who dares to disturb my dailey prayer?") 
    pUnit:RegisterEvent("Boss_HolySmite",15000,0) 
    pUnit:RegisterEvent("Boss_HolyLight",20000,0) 
    pUnit:RegisterEvent("Boss_ManaBurn",25000,0) 
    end 
    function HighInquisitorFairbanks_OnLeaveCombat(pUnit,Event) 
    pUnit:RemoveEvents() 
    end 
    function HighInquisitorFairbanks_KilledTarget(pUnit,Event) 
    pUnit:SendChatMessage(12,0,"Haha, fools, The Light is on my side!")
    pUnit:RemoveEvents() 
    end 
    function HighInquisitorFairbanks_OnDied(pUnit,Event) 
    pUnit:SendChatMessage(12,0,"I guess...The Light was in your favor...this time")
    pUnit:RemoveEvents() 
    end 
    RegisterUnitEvent(65139, 1, "HighInquisitorFairbanks_OnEnterCombat") 
    RegisterUnitEvent(65139, 2, "HighInquisitorFairbanks_OnLeaveCombat") 
    RegisterUnitEvent(65139, 3, "HighInquisitorFairbanks_OnKilledTarget") 
    RegisterUnitEvent(65139, 4, "HighInquisitorFairbanks_onDied")
    I appreciate the help and I hope you guys find the problem!

    LuA Scripting Help
  2. #2
    b!atch's Avatar Member
    Reputation
    118
    Join Date
    Oct 2007
    Posts
    726
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What error r u getting?
    Spectrum-X is win! Rep People That Help You and Candybones Wont Eat Your Brain:>

  3. #3
    Jlp's Avatar Member
    Reputation
    1
    Join Date
    Oct 2007
    Posts
    11
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Im not getting an error its just when I put it in the scripts folder and restart the server he doesn't do anything just stands there and hits like normal

  4. #4
    b!atch's Avatar Member
    Reputation
    118
    Join Date
    Oct 2007
    Posts
    726
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    So it loads in the ascent-world window? and doesnt make any errors when u attack the mob?

    is

    65139 the id of the mob?
    Spectrum-X is win! Rep People That Help You and Candybones Wont Eat Your Brain:>

  5. #5
    Jlp's Avatar Member
    Reputation
    1
    Join Date
    Oct 2007
    Posts
    11
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeah 65139 is the spawn ID for the mob and nope no errors he just hits like an unscripted mob

  6. #6
    SectorSeven's Avatar Banned
    Reputation
    444
    Join Date
    Oct 2007
    Posts
    1,948
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Did you enabled Lua in the config file?

  7. #7
    Jlp's Avatar Member
    Reputation
    1
    Join Date
    Oct 2007
    Posts
    11
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeah Sector Seven I have other mobs scripted but this guy doesn't want to work for some reason

  8. #8
    McRaider's Avatar Member
    Reputation
    1
    Join Date
    Jun 2008
    Posts
    4
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have a same kind of problem. I have a script this simple:
    function NPCname_Phaseorfunction (pUnit, Event)
    pUnit:SendChatMessage(0, 0, "working")
    end
    RegisterUnitEvent (700700, 1, "NPCname_Phaseorfunction")
    It's not working. As far as I know, when I attack the mob, it sould say "Working", but it doesn't

  9. #9
    Power of Illuminati's Avatar Contributor
    Reputation
    179
    Join Date
    May 2008
    Posts
    1,410
    Thanks G/R
    6/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You have the same functionnames on your other lua script?

  10. #10
    Jlp's Avatar Member
    Reputation
    1
    Join Date
    Oct 2007
    Posts
    11
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That is a direct copy from the .LUA file

  11. #11
    Power of Illuminati's Avatar Contributor
    Reputation
    179
    Join Date
    May 2008
    Posts
    1,410
    Thanks G/R
    6/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I ment like

    You said you had another mob that worked

    Does the function in THAT lua file has the same names? If it has, it won't work for sure. All function names must be unique, even if they are in different files

  12. #12
    Jlp's Avatar Member
    Reputation
    1
    Join Date
    Oct 2007
    Posts
    11
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This is the script thats working

    Code:
     
    function Boss_Consecration(pUnit,Event)
    pUnit:CastSpell(37428)
    pUnit:SendChatMessage(12,0,"Do you feel the ground burn beneath your feet?... thats the feeling of defeat!")
    end
    function Boss_Hellfire(pUnit,Event)
    pUnit:CastSpell(37428)
    end
    function Boss_SealOfVengeance(pUnit,Event)
    pUnit:CastSpell(31801)
    end
    function Boss_Heal(pUnit,Event)
    pUnit:FullCastSpell(29383)
    end
    function Boss_Bubble(pUnit,Event)
    pUnit:CastSpell(1020)
    end
    function Boss_Knockback(pUnit,Event)
    pUnit:CastSpell(43418)
    end
    function Boss_Silence(pUnit,Event)
    pUnit:CastSpell(37160)
    end
    function ScarletCommanderMograine_OnEnterCombat(pUnit,Event)
    pUnit:SendChatMessage(12,0,"I am the leader of the Scarlet Crusade, you have no chance!")
    pUnit:CastSpell(31801)
    pUnit:CastSpell(32773)
    pUnit:RegisterEvent("Boss_Consecration",60000,0)
    pUnit:RegisterEvent("Boss_SealOfVengeance",30000,0)
    pUnit:RegisterEvent("Boss_Hellfire",25000,0)
    pUnit:RegisterEvent("Boss_Heal",51000,0)
    pUnit:RegisterEvent("Boss_Bubble",50000,0)
    pUnit:RegisterEvent("Boss_Knockback",24000,0)
    pUnit:RegisterEvent("Boss_Silence",43000,0)
    end
    function ScarletCommanderMograine_OnLeaveCombat(pUnit,Event)
    pUnit:RemoveEvents()
    end
    function ScarletCommanderMograine_OnKilledTarget(pUnit,Event)
    pUnit:SendChatMessage(12,0,"Hahaha, you fools no one can defeat me!")
    pUnit:RemoveEvents()
    end
    function ScarletCommanderMograine_OnDied(pUnit,Event)
    pUnit:SendChatMessage(12,0,"I am sorry.... Scarlet Companions.... I have failed")
    pUnit:RemoveEvents()
    end
    RegisterUnitEvent(14124, 1, "ScarletCommanderMograine_OnEnterCombat")
    RegisterUnitEvent(14124, 2, "ScarletCommanderMograine_OnLeaveCombat")
    RegisterUnitEvent(14124, 3, "ScarletCommanderMograine_OnKilledTarget")
    RegisterUnitEvent(14124, 4, "ScarletCommanderMograine_OnDied")

  13. #13
    McRaider's Avatar Member
    Reputation
    1
    Join Date
    Jun 2008
    Posts
    4
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I only have that small script in it. That's the whole LUA file. There's nothing else. So there can't be a fuction, that has the same name. So what can be wrong :confused:

  14. #14
    Jlp's Avatar Member
    Reputation
    1
    Join Date
    Oct 2007
    Posts
    11
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I don't know whats wrong lol thats why I posted here

  15. #15
    mager1794's Avatar Member
    Reputation
    356
    Join Date
    Feb 2008
    Posts
    703
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try this

    Code:
    function Boss_HolySmite(pUnit,Event)
    local plr = pUnit:GetRandomPlayer(0)
    if (plr ~= nil) then
    pUnit:FullCastSpellOnTarget(20696, plr) 
    pUnit:SendChatMessage(12,0,"Feel the power of The Light!")
    end
    end
    
    function Boss_HolyLight(pUnit,Event) 
    pUnit:FullCastSpell(29562)
    pUnit:SendChatMessage(12,0,"Hmm, I can feel the power!")
    end 
    
    function Boss_ManaBurn(pUnit,Event) 
    local plr = pUnit:GetRandomPlayer(4)
    if (plr ~= nil) then
    pUnit:FullCastSpellOnTarget(25380, plr) 
    end
    end 
    
    function HighInquisitorFairbanks_OnEnterCombat(pUnit,Event)
    pUnit:SendChatMessage(12,0,"Who dares to disturb my dailey prayer?") 
    pUnit:RegisterEvent("Boss_HolySmite",15000,0) 
    pUnit:RegisterEvent("Boss_HolyLight",20000,0) 
    pUnit:RegisterEvent("Boss_ManaBurn",25000,0) 
    end 
    
    function HighInquisitorFairbanks_OnLeaveCombat(pUnit,Event) 
    pUnit:RemoveEvents() 
    end 
    
    function HighInquisitorFairbanks_KilledTarget(pUnit,Event) 
    pUnit:SendChatMessage(12,0,"Haha, fools, The Light is on my side!")
    pUnit:RemoveEvents() 
    end 
    
    function HighInquisitorFairbanks_OnDied(pUnit,Event) 
    pUnit:SendChatMessage(12,0,"I guess...The Light was in your favor...this time")
    pUnit:RemoveEvents() 
    end 
    
    RegisterUnitEvent(65139, 1, "HighInquisitorFairbanks_OnEnterCombat") 
    RegisterUnitEvent(65139, 2, "HighInquisitorFairbanks_OnLeaveCombat") 
    RegisterUnitEvent(65139, 3, "HighInquisitorFairbanks_OnKilledTarget") 
    RegisterUnitEvent(65139, 4, "HighInquisitorFairbanks_onDied")
    Lunar Gaming - Reaching For The Stars

Page 1 of 2 12 LastLast

Similar Threads

  1. LUA Script help
    By silentghost in forum WoW EMU Questions & Requests
    Replies: 17
    Last Post: 11-03-2008, 07:51 AM
  2. Simple LUA Script Help
    By Wolfly in forum WoW EMU Questions & Requests
    Replies: 7
    Last Post: 09-02-2008, 04:22 PM
  3. LUA Script Help Thread
    By mager1794 in forum World of Warcraft Emulator Servers
    Replies: 0
    Last Post: 07-04-2008, 12:46 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 02:41 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