[WTH?] Funny bug about lua... yet i need help to fix it menu

User Tag List

Results 1 to 8 of 8
  1. #1
    Ellenor's Avatar Active Member
    Reputation
    18
    Join Date
    Jan 2008
    Posts
    281
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [WTH?] Funny bug about lua... yet i need help to fix it

    my promb is here...
    this is from gatric lua guide ...
    function phase_1(pUnit, Event)
    if pUnit:GetHealthPct() < 70 then
    pUnit:RemoveEvents();
    pUnit:FullCastSpell(16033)
    pUnit:RegisterEvent("phase_2",1000, 0)
    end
    end

    function phase_2(pUnit, Event)
    if pUnit:GetHealthPct() < 50 then
    pUnit:RemoveEvents();
    pUnit:FullCastSpell(33452)
    pUnit:RegisterEvent("phase_3",1000, 0)
    end
    end

    function phase_3(pUnit, Event)
    if pUnit:GetHealthPct() < 30 then
    pUnit:RemoveEvents();
    pUnit:FullCastSpell(34807)
    end
    end

    function boss_start(pUnit, Event)
    pUnit:RegisterEvent("phase_1",1000, 0)
    end
    RegisterUnitEvent(77, 1, "boss_start")


    The funny thing is after i donwload Illidans scarlet instance all lua (boss i create got nuts?)

    I try to register the test lua of gastric to a mob with entry id 77 and that mob use the same spell as illidans scarlet monk...

    here is its lua...
    function phase_1(pUnit, Event)
    if pUnit:GetHealthPct() < 70 then
    pUnit:RemoveEvents();
    pUnit:SendChatMessage (11, 0, "Holy Heals will save me!")
    pUnit:FullCastSpell(27136)
    pUnit:RegisterEvent("phase_2",1000, 0)
    end
    end

    function phase_2(pUnit, Event)
    if pUnit:GetHealthPct() < 50 then
    pUnit:RemoveEvents();
    pUnit:SendChatMessage (11, 0, "Holy Heals will save me!")
    pUnit:FullCastSpell(27136)
    pUnit:RegisterEvent("phase_3",1000, 0)
    end
    end

    function phase_3(pUnit, Event)
    if pUnit:GetHealthPct() < 30 then
    pUnit:RemoveEvents();
    pUnit:SendChatMessage (11, 0, "Holy Heals will save me!")
    pUnit:FullCastSpell(27136)
    pUnit:RegisterEvent("phase_4",1000, 0)
    end
    end

    function phase_4(pUnit, Event)
    if pUnit:GetHealthPct() < 10 then
    pUnit:RemoveEvents();
    pUnit:SendChatMessage (11, 0, "Holy Heals will save me!")
    pUnit:FullCastSpell(27136)
    end
    end

    function boss_start(pUnit, Event)
    pUnit:RegisterEvent("phase_1",1000, 0)
    pUnit:SendChatMessage (11, 0, "Feel the wrath of the Scarlets Hand!")
    end
    RegisterUnitEvent(400000, 1, "boss_start")


    And the other promb is that my mob cast all the spells of the scarlet monk at once... it didnt go even to phase 1 or 2 or3.... i really need help with that...

    [WTH?] Funny bug about lua... yet i need help to fix it
  2. #2
    doublehex's Avatar Member
    Reputation
    34
    Join Date
    Mar 2007
    Posts
    385
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    well i think that these register events are setting the function to be run all at 1000ms " pUnit:RegisterEvent("phase_4",1000, 0)" as you see all the registerevents have same timing so thats why they run at the same time.

  3. #3
    Lilltimmy's Avatar Member
    Reputation
    20
    Join Date
    Jun 2007
    Posts
    275
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try make it:
    function Bossname_phase_1(pUnit, Event)
    And all the way down i got this Bug to :P But i figured it out...
    And use different Bossnames on every Script and remember to register the phases as "Bossname_Phase..."

  4. #4
    Illidan1's Avatar Banned
    Reputation
    244
    Join Date
    Jul 2007
    Posts
    2,251
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    as you can see, both .lua use phase_1
    Means that they will both activate
    Just make one like
    phase_9
    phase_10

    And keep going

  5. #5
    Lilltimmy's Avatar Member
    Reputation
    20
    Join Date
    Jun 2007
    Posts
    275
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeah thats what i ment :P Name it Phase_9 like Ilidan1 Said or Bossname_Phase1
    Ex. Onyxia_Phase3 ;P

  6. #6
    Ellenor's Avatar Active Member
    Reputation
    18
    Join Date
    Jan 2008
    Posts
    281
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    oki cool guyes when i come back from my work i will try it!! Illidan i need some rep to spread before i can rep u soz...


    Edit-------------------
    I rep u now :P

  7. #7
    Lilltimmy's Avatar Member
    Reputation
    20
    Join Date
    Jun 2007
    Posts
    275
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks :P (Filler)
    Last edited by Lilltimmy; 06-25-2008 at 12:08 PM.

  8. #8
    Ellenor's Avatar Active Member
    Reputation
    18
    Join Date
    Jan 2008
    Posts
    281
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    U got rep lolz

Similar Threads

  1. Bug in Necrobot? [Newest version] [Need help]
    By LeDerps in forum Pokemon GO Hacks|Cheats
    Replies: 2
    Last Post: 08-18-2016, 07:04 PM
  2. A question about conquest cap increase! need Help fast!
    By Billg4tes in forum WoW PvP & Battlegrounds
    Replies: 2
    Last Post: 11-14-2012, 09:43 PM
  3. About Item's attributes (need help)
    By noctum in forum Diablo 3 Memory Editing
    Replies: 6
    Last Post: 05-22-2012, 06:16 PM
  4. [LUA/macro] Another "need help" thread, easy rep.
    By Ssateneth in forum WoW UI, Macros and Talent Specs
    Replies: 15
    Last Post: 11-26-2010, 06:04 AM
  5. Need help on fixing this chainquest thing! (+Rep if you tell it!)
    By Creepfold in forum World of Warcraft Emulator Servers
    Replies: 6
    Last Post: 12-25-2007, 05:57 PM
All times are GMT -5. The time now is 01:04 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search