[LUA] Will Rep menu

User Tag List

Results 1 to 15 of 15
  1. #1
    Strupantwn's Avatar Contributor
    Reputation
    115
    Join Date
    Apr 2007
    Posts
    1,045
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [LUA] Will Rep

    Just want you guys to check this one out

    Code:
    function Mob_Cleave(pUnit)
    pUnit:CastSpell(25231)
    pUnit:SendChatMessage(12, 0, "Disgusting peasants!")
    end
    
    function Mob_OnEnterCombat(unit)
    pUnit:SendChatMessage(12, 0, "How'd you find us!")
    pUnit:RegisterEvent("Mob_Spell1",10000, 0)
    
    RegisterEvent(444005,1,Mob_OnEnterCombat)
    When it loads, it saids end is too close to function at line 6 but I don't get it, I tried making the end further no difference?

    Also check on this one if theres any errors
    Code:
    function Boss_Spire(pUnit, Event)
    pUnit:CastSpell(41377)
    pUnit:SendChatMessage(12, 0, "You go no further!")
    end
    
    function Boss_BlastNova(pUnit, Event)
    pUnit:CastSpell(30616)
    pUnit:SendChatMessage(12, 0, "I will give my life to Engar!")
    end
    
    function Boss_DeathCoil(pUnit, Event)
    local plr = pUnit:GetMainTank()
    if (plr ~= nil) then
    pUnit:CastSpellOnTarget(39661, plr)
    end
    end
    
    function Boss_Cleave(pUnit, Event)
    local plr = pUnit:GetMainTank()
    if (plr ~= nil) then
    pUnit:FullCastSpellOnTarget(25231, plr)
    end
    end
    
    function Boss_OnEnterCombat(pUnit, Event)
    pUnit:SendChatMessage(12, 0, "Hah, Peasants, how'd you manage to find our hideout?")
    pUnit:RegisterEvent("Boss_Spire",20000, 0)
    pUnit:RegisterEvent("Boss_BlastNova",20000, 0)
    pUnit:RegisterEvent("Boss_DeathCoil",25000, 0)
    pUnit:RegisterEvent("Boss_Cleave",15000, 0)
    end
    
    
    function Boss_OnLeaveCombat(pUnit, Event)
    pUnit:RemoveEvents()
    end
    
    function Boss_KilledTarget(pUnit, Event)
    pUnit:SendChatMessage(12, 0, "I've warned you . . .")
    pUnit:RemoveEvents()
    end
    
    function Boss_OnDied(pUnit, Event)
    pUnit:SendChatMessage(12, 0, "En . . gar . . .")
    pUnit:RemoveEvents()
    end
    
    
    
    RegisterUnitEvent(444004, 1, "Boss_OnEnterCombat")
    RegisterUnitEvent(444004, 2, "Boss_OnLeaveCombat")
    RegisterUnitEvent(444004, 3, "Boss_OnKilledTarget")
    RegisterUnitEvent(444004, 4, "Boss_onDied")
    cuz it didnt load for some reason?

    [LUA] Will Rep
  2. #2
    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)
    First one

    I suppose it's longer, else you need to change the function name, Mob_spell1 and Mob_Cleave isn't the same >.<
    Code:
    function Mob_Cleave(pUnit)
    pUnit:CastSpell(25231)
    pUnit:SendChatMessage(12, 0, "Disgusting peasants!")
    end
    
    function Mob_OnEnterCombat(unit)
    pUnit:SendChatMessage(12, 0, "How'd you find us!")
    pUnit:RegisterEvent("Mob_Cleave",10000, 0)
    end
    RegisterUnitEvent(444005,1,"Mob_OnEnterCombat")
    Also, I would recomend you to change the function names. You can't have 2x functions with the same name. And this is for ALL your lua files. Even if the functions isn't in the same file.
    Last edited by Power of Illuminati; 06-15-2008 at 08:14 PM.

  3. #3
    Strupantwn's Avatar Contributor
    Reputation
    115
    Join Date
    Apr 2007
    Posts
    1,045
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    now it saids

    Code:
    attempt to call global 'RegisterEvent' <a nil value>

  4. #4
    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)
    Updated the code in the post, couldn't you check soem errors by yourself?

  5. #5
    Strupantwn's Avatar Contributor
    Reputation
    115
    Join Date
    Apr 2007
    Posts
    1,045
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The script is currently like this
    Code:
    function Mob_Cleave(pUnit)
    pUnit:CastSpell(25231)
    pUnit:SendChatMessage(12, 0, "Disgusting peasants!")
    end
    
    function Mob_OnEnterCombat(unit)
    pUnit:SendChatMessage(12, 0, "How'd you find us!")
    pUnit:RegisterEvent("Mob_Spell1",10000, 0)
    end
    RegisterEvent(444005,1,Mob_OnEnterCombat)

    and I don't know much about lua I just follow the templates and thats why I ask mmowned members to check =]

  6. #6
    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)
    Edit Mob_spell1 (where it register the event) to Mob_Cleave

  7. #7
    Strupantwn's Avatar Contributor
    Reputation
    115
    Join Date
    Apr 2007
    Posts
    1,045
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeah, same error, saids
    Code:
    Failed. <could not run>
    scriptsEngarmobs1.lua:10: attempt to call global 'RegisterEvent' <a nil value>

  8. #8
    Juicyz's Avatar Active Member
    Reputation
    34
    Join Date
    Dec 2006
    Posts
    298
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    function Mob_Cleave(pUnit)
    pUnit:CastSpell(25231)
    pUnit:SendChatMessage(12, 0, "Disgusting peasants!")
    end

    function Mob_OnEnterCombat(pUnit)
    pUnit:SendChatMessage(12, 0, "How'd you find us!")
    pUnit:RegisterEvent("Mob_Spell1",10000, 0)

    RegisterUnitEvent(444005,1,"Mob_OnEnterCombat")
    U needed some " " around Mob _OnEnterCombat at the very end
    also U need RegisterUnitEvent
    OnEnterCombat(Unit), U need pUnit.
    Everything should be fine now.
    I fixed the script for you.

    Enjoy

    DA Gift From Mr. Blain

  9. #9
    Strupantwn's Avatar Contributor
    Reputation
    115
    Join Date
    Apr 2007
    Posts
    1,045
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hey nice it works, ill rep you when I spread around the reps lol but another question, this is
    a bit werid...
    I made two bosses with two different LUA script but whenever I go in game ad test the

    bosses out, they both use this script

    Code:
    function Boss_Spire(pUnit, Event)
    pUnit:CastSpell(41377)
    pUnit:SendChatMessage(12, 0, "Hmm, interesting . . .")
    end
    
    function Boss_BlastNova(pUnit, Event)
    pUnit:CastSpell(30616)
    pUnit:SendChatMessage(12, 0, "This is getting easy . . .")
    end
    
    function Boss_Cleave(pUnit, Event)
    local plr = pUnit:GetMainTank()
    if (plr ~= nil) then
    pUnit:FullCastSpellOnTarget(25231, plr)
    end
    end
    
    function Boss_OnEnterCombat(pUnit, Event)
    pUnit:SendChatMessage(12, 0, "You? Me? You have got to be ****ing kidding me . . .")
    pUnit:RegisterEvent("Boss_Spire",20000, 0)
    pUnit:RegisterEvent("Boss_BlastNova",20000, 0)
    pUnit:RegisterEvent("Boss_Cleave",15000, 0)
    end
    
    
    function Boss_OnLeaveCombat(pUnit, Event)
    pUnit:RemoveEvents()
    end
    
    function Boss_KilledTarget(pUnit, Event)
    pUnit:SendChatMessage(12, 0, "You heard . . .")
    pUnit:RemoveEvents()
    end
    
    function Boss_OnDied(pUnit, Event)
    pUnit:SendChatMessage(12, 0, "You won't hear from me . . .")
    pUnit:RemoveEvents()
    end
    
    
    
    RegisterUnitEvent(400406, 1, "Boss_OnEnterCombat")
    RegisterUnitEvent(400406, 2, "Boss_OnLeaveCombat")
    RegisterUnitEvent(400406, 3, "Boss_OnKilledTarget")
    RegisterUnitEvent(400406, 4, "Boss_onDied")
    when I took out that script, the boss with the entry id of 444004 uses this one
    Code:
    function Boss_ChaosBlast(pUnit, Event)
    pUnit:FullCastSpellOnTarget(37675, target)
    pUnit:SendChatMessage(12, 0, "Feel the Chaos!")
    end
    
    function Boss_ShadowBurst(pUnit, Event)
    pUnit:CastSpell(34436)
    pUnit:SendChatMessage(12, 0, "Hmm, I can feel the power!")
    end
    
    function Boss_Flamebreak(pUnit, Event)
    pUnit:CastSpell(16785)
    pUnit:SendChatMessage(12, 0, "Don't run away from me!")
    end
    
    function Boss_DarkBarrage(pUnit, Event)
    local plr = pUnit:GetMainTank()
    if (plr ~= nil) then
    pUnit:CastSpellOnTarget(40585, plr)
    end
    end
    
    function Boss_VileBeam(pUnit, Event)
    local plr = pUnit:GetMainTank()
    if (plr ~= nil) then
    pUnit:FullCastSpellOnTarget(40860, plr)
    end
    end
    
    function Boss_OnEnterCombat(pUnit, Event)
    pUnit:SendChatMessage(12, 0, "I am Legend's Top Offcier, you think you will have a chance?")
    pUnit:RegisterEvent("Boss_ChaosBlast",20000, 0)
    pUnit:RegisterEvent("Boss_VileBeam",20000, 0)
    pUnit:RegisterEvent("Boss_ShadowBurst",10000, 0)
    pUnit:RegisterEvent("Boss_Flamebreak",15000, 0)
    pUnit:RegisterEvent("Boss_DarkBarrage",15000, 0)
    end
    
    
    function Boss_OnLeaveCombat(pUnit, Event)
    pUnit:RemoveEvents()
    end
    
    function Boss_KilledTarget(pUnit, Event)
    pUnit:SendChatMessage(12, 0, "Hahaha, fools, Engar loses to no one!")
    pUnit:RemoveEvents()
    end
    
    function Boss_OnDied(pUnit, Event)
    pUnit:SendChatMessage(12, 0, "Legend . . . will . . . not be . . . defeated . . .")
    pUnit:RemoveEvents()
    end
    
    
    
    RegisterUnitEvent(444010, 1, "Boss_OnEnterCombat")
    RegisterUnitEvent(444010, 2, "Boss_OnLeaveCombat")
    RegisterUnitEvent(444010, 3, "Boss_OnKilledTarget")
    RegisterUnitEvent(444010, 4, "Boss_onDied")
    and the one with the 400406 doesn't use any scripts,

    hope someone can help

  10. #10
    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)
    They have same functions name. You need to customize them abit when you creates it.

  11. #11
    Strupantwn's Avatar Contributor
    Reputation
    115
    Join Date
    Apr 2007
    Posts
    1,045
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I don't see any same function names? I am kinda noob at this and I can't seem to find it =/ Sorry
    mind highlighting red for me?

  12. #12
    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)
    Code:
    function Boss_ChaosBlast(pUnit, Event)
    pUnit:FullCastSpellOnTarget(37675, target)
    pUnit:SendChatMessage(12, 0, "Feel the Chaos!")
    end
    
    function Boss_ShadowBurst(pUnit, Event)
    pUnit:CastSpell(34436)
    pUnit:SendChatMessage(12, 0, "Hmm, I can feel the power!")
    end
    
    function Boss_Flamebreak(pUnit, Event)
    pUnit:CastSpell(16785)
    pUnit:SendChatMessage(12, 0, "Don't run away from me!")
    end
    
    function Boss_DarkBarrage(pUnit, Event)
    local plr = pUnit:GetMainTank()
    if (plr ~= nil) then
    pUnit:CastSpellOnTarget(40585, plr)
    end
    end
    
    function Boss_VileBeam(pUnit, Event)
    local plr = pUnit:GetMainTank()
    if (plr ~= nil) then
    pUnit:FullCastSpellOnTarget(40860, plr)
    end
    end
    
    function Boss_OnEnterCombat(pUnit, Event)
    pUnit:SendChatMessage(12, 0, "I am Legend's Top Offcier, you think you will have a chance?")
    pUnit:RegisterEvent("Boss_ChaosBlast",20000, 0)
    pUnit:RegisterEvent("Boss_VileBeam",20000, 0)
    pUnit:RegisterEvent("Boss_ShadowBurst",10000, 0)
    pUnit:RegisterEvent("Boss_Flamebreak",15000, 0)
    pUnit:RegisterEvent("Boss_DarkBarrage",15000, 0)
    end
    
    
    function Boss_OnLeaveCombat(pUnit, Event)
    pUnit:RemoveEvents()
    end
    
    function Boss_KilledTarget(pUnit, Event)
    pUnit:SendChatMessage(12, 0, "Hahaha, fools, Engar loses to no one!")
    pUnit:RemoveEvents()
    end
    
    function Boss_OnDied(pUnit, Event)
    pUnit:SendChatMessage(12, 0, "Legend . . . will . . . not be . . . defeated . . .")
    pUnit:RemoveEvents()
    end
    
    
    
    RegisterUnitEvent(444010, 1, "Boss_OnEnterCombat")
    RegisterUnitEvent(444010, 2, "Boss_OnLeaveCombat")
    RegisterUnitEvent(444010, 3, "Boss_OnKilledTarget")
    RegisterUnitEvent(444010, 4, "Boss_onDied")
    Code:
    function Boss_Spire(pUnit, Event)
    pUnit:CastSpell(41377)
    pUnit:SendChatMessage(12, 0, "Hmm, interesting . . .")
    end
    
    function Boss_BlastNova(pUnit, Event)
    pUnit:CastSpell(30616)
    pUnit:SendChatMessage(12, 0, "This is getting easy . . .")
    end
    
    function Boss_Cleave(pUnit, Event)
    local plr = pUnit:GetMainTank()
    if (plr ~= nil) then
    pUnit:FullCastSpellOnTarget(25231, plr)
    end
    end
    
    function Boss_OnEnterCombat(pUnit, Event)
    pUnit:SendChatMessage(12, 0, "You? Me? You have got to be ****ing kidding me . . .")
    pUnit:RegisterEvent("Boss_Spire",20000, 0)
    pUnit:RegisterEvent("Boss_BlastNova",20000, 0)
    pUnit:RegisterEvent("Boss_Cleave",15000, 0)
    end
    
    
    function Boss_OnLeaveCombat(pUnit, Event)
    pUnit:RemoveEvents()
    end
    
    function Boss_KilledTarget(pUnit, Event)
    pUnit:SendChatMessage(12, 0, "You heard . . .")
    pUnit:RemoveEvents()
    end
    
    function Boss_OnDied(pUnit, Event)
    pUnit:SendChatMessage(12, 0, "You won't hear from me . . .")
    pUnit:RemoveEvents()
    end
    
    
    
    RegisterUnitEvent(400406, 1, "Boss_OnEnterCombat")
    RegisterUnitEvent(400406, 2, "Boss_OnLeaveCombat")
    RegisterUnitEvent(400406, 3, "Boss_OnKilledTarget")
    RegisterUnitEvent(400406, 4, "Boss_onDied")
    I hope you can see it

  13. #13
    Strupantwn's Avatar Contributor
    Reputation
    115
    Join Date
    Apr 2007
    Posts
    1,045
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    lol see it!

    but one more question. what am I suppose to change them to?

  14. #14
    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)
    Instead of Boss, you can take the name of the boss so you know that it's that mob

    For example

    Nefarian_OnEnterCombat

  15. #15
    Strupantwn's Avatar Contributor
    Reputation
    115
    Join Date
    Apr 2007
    Posts
    1,045
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ohh thanks man

Similar Threads

  1. [Lua][ArcEmu] Need help with Lua will Rep
    By Pedregon in forum WoW EMU Questions & Requests
    Replies: 5
    Last Post: 03-20-2010, 02:39 PM
  2. [LUA] will rep <-check real quick
    By Strupantwn in forum World of Warcraft Emulator Servers
    Replies: 4
    Last Post: 06-18-2008, 03:07 AM
  3. Continium Blade > Mericiless Gladiator Warstaff (will +REP)
    By Serose in forum WoW ME Questions and Requests
    Replies: 3
    Last Post: 07-10-2007, 12:15 AM
  4. Orc Female->Dwarf/Troll Male(will rep)and wep change!!
    By Jaske53211 in forum WoW ME Questions and Requests
    Replies: 0
    Last Post: 07-09-2007, 02:15 PM
  5. Lf Joanas Horde will +rep =P
    By unceenrogue in forum Community Chat
    Replies: 4
    Last Post: 04-10-2007, 03:17 PM
All times are GMT -5. The time now is 01:59 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