Need Script Verified menu

User Tag List

Results 1 to 10 of 10
  1. #1
    methos0072001's Avatar Member
    Reputation
    3
    Join Date
    Dec 2007
    Posts
    57
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Need Script Verified

    Hello, I just edited the Kij'jaeden script, but it's saying the RegisterUnitEvent is a nil value. Here's the script. What did I do wrong?

    Code:
    function phase_1(pUnit, Event)
     if pUnit:GetHealthPct() < 99 then
      pUnit:RemoveEvents();
      pUnit:SendChatMessage(12, 0, "Chaos!")
      pUnit:CastSpellOnTarget(47248)
      pUnit:PlaySoundToSet(12505)
      pUnit:RegisterUnitEvent (25315, 0, "phase_2")
     end
    end
    
    function phase_2(pUnit, Event)
     if pUnit:GetHealthPct() < 98 then
      pUnit:RemoveEvents();
      pUnit:SendChatMessage(12, 0, "Destruction!")
      pUnit:CastSpell(39023)
      pUnit:PlaySoundToSet(12506)
      pUnit:RegisterUnitEvent (25315, 0, "phase_3")
     end
    end
     
    function phase_3(pUnit, Event)
     if pUnit:GetHealthPct() < 97 then
      pUnit:RemoveEvents();
      pUnit:SendChatMessage(12, 0, "Oblivion!")
      pUnit:PlaySoundToSet(12507)
      pUnit:CastSpell(38627)
      pUnit:CastSpell(38533)
      pUnit:CastSpell(38533)
      pUnit:CastSpell(38533)
      pUnit:RegisterUnitEvent (25315, 0, "phase_4")
     end
    end
     
    function phase_4(pUnit, Event)
     if pUnit:GetHealthPct() < 50 then
      pUnit:RemoveEvents();
      pUnit:SendChatMessage(14, 0, "I will not be denied! This world shall fall!")
      pUnit:PlaySoundToSet(12508)
      pUnit:CastSpell(45664)
      pUnit:RegisterUnitEvent (25315, 0, "phase_5")
     end
    end
     
    function phase_5(pUnit, Event)
     if pUnit:GetHealthPct() < 20 then
      pUnit:RemoveEvents();
      pUnit:SendChatMessage(14, 0, "Do not harbor false hope. You cannot win!")
      pUnit:PlaySoundToSet(12509)
      pUnit:CastSpell(40343)
      pUnit:CastSpell(38441)
      pUnit:CastSpell(512)
      pUnit:CastSpell(25442)
      pUnit:CastSpell(17668)
      pUnit:CastSpell(40876)
      pUnit:RegisterUnitEvent (25315, 0, "phase_6")
     end
    end
    
    
    function phase_6(pUnit, Event)
     if pUnit:GetHealthPct() < 01 then
      pUnit:RemoveEvents();
      pUnit:SendChatMessage(14, 0, "Ragh! The powers of the Sunwell turn against me! What have you done? What have you done?!")
      pUnit:PlaySoundToSet(12510)
      pUnit:CastSpell(44998)
      pUnit:RegisterUnitEvent (25315, 0, "phase_7")
     end
    end
    
    function phase_7(pUnit, Event)
     if pUnit:GetHealthPct() < 100 then
      pUnit:RemoveEvents();        
      pUnit:CastSpell(46474)
     end
    end
    
    function boss_start(pUnit, Event)
     pUnit:RegisterUnitEvent ("phase_1",25315, 1)
     end
    
    function boss_OnKill(pUnit, Event)
      pUnit:SendChatMessage(14, 0, "Another step towards destruction!")
    pUnit:PlaySoundToSet(12501)
      pUnit:CastSpell(31972)
     end
    
    
    RegisterUnitEvent (25315, 1, "boss_start")
    RegisterUnitEvent (25315, 3, "boss_OnKill")
    EDIT: Here's the error

    Last edited by methos0072001; 08-01-2008 at 10:54 PM. Reason: Added Picture

    Need Script Verified
  2. #2
    Mr.Ice.Cold's Avatar Active Member
    Reputation
    26
    Join Date
    Apr 2007
    Posts
    166
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If my memory serves me correct, On death is not 3 but 4, try this.

    RegisterUnitEvent (25315, 4, "boss_OnKill")

  3. #3
    methos0072001's Avatar Member
    Reputation
    3
    Join Date
    Dec 2007
    Posts
    57
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    According to the guide I was reading, death is 3. But thanks for trying to help


    He's completely unscripted, so theres a fatal error in the script somewhere...

  4. #4
    Mr.Ice.Cold's Avatar Active Member
    Reputation
    26
    Join Date
    Apr 2007
    Posts
    166
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try using Unit, Event other than pUnit.

    Edit:
    Last edited by Mr.Ice.Cold; 08-01-2008 at 11:03 PM.

  5. #5
    methos0072001's Avatar Member
    Reputation
    3
    Join Date
    Dec 2007
    Posts
    57
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Now it's saying expected value, got string.

  6. #6
    Battle Chicken's Avatar Member
    Reputation
    12
    Join Date
    Oct 2006
    Posts
    94
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The problem is you're using RegisterUnitEvent (stuffhere) when you're meant to be using RegisterEvent(stuffhere). Also, don't use spaces after the RegisterUnitEvents, and your phases are messy, the way you've added the spells, the boss will fire all of them off once, instantly. Use functions for each spell, that way you can add a timer for them.
    The way RegisterEvent works is this;
    Code:
    pUnit:RegisterEvent(How often you want this event to happen, Amount of times you want this event to happen, "name of event")
    It's too early for me to go fixing all of your spells, so I just fixed the other stuff, you can do the rest
    Code:
    function phase_1(pUnit, Event)
    if pUnit:GetHealthPct() < 99 then
    pUnit:RemoveEvents();
    pUnit:SendChatMessage(12, 0, "Chaos!")
    pUnit:CastSpellOnTarget(47248)
    pUnit:PlaySoundToSet(12505)
    pUnit:RegisterEvent(1000, 0, "phase_2")
    end
    end
    
    function phase_2(pUnit, Event)
    if pUnit:GetHealthPct() < 98 then
    pUnit:RemoveEvents();
    pUnit:SendChatMessage(12, 0, "Destruction!")
    pUnit:CastSpell(39023)
    pUnit:PlaySoundToSet(12506)
    pUnit:RegisterEvent(1000, 0, "phase_3")
    end
    end
     
    function phase_3(pUnit, Event)
    if pUnit:GetHealthPct() < 97 then
    pUnit:RemoveEvents();
    pUnit:SendChatMessage(12, 0, "Oblivion!")
    pUnit:PlaySoundToSet(12507)
    pUnit:CastSpell(38627)
    pUnit:CastSpell(38533)
    pUnit:CastSpell(38533)
    pUnit:CastSpell(38533)
    pUnit:RegisterEvent(1000, 0, "phase_4")
    end
    end
     
    function phase_4(pUnit, Event)
    if pUnit:GetHealthPct() < 50 then
    pUnit:RemoveEvents();
    pUnit:SendChatMessage(14, 0, "I will not be denied! This world shall fall!")
    pUnit:PlaySoundToSet(12508)
    pUnit:CastSpell(45664)
    pUnit:RegisterEvent(1000, 0, "phase_5")
    end
    end
     
    function phase_5(pUnit, Event)
    if pUnit:GetHealthPct() < 20 then
    pUnit:RemoveEvents();
    pUnit:SendChatMessage(14, 0, "Do not harbor false hope. You cannot win!")
    pUnit:PlaySoundToSet(12509)
    pUnit:CastSpell(40343)
    pUnit:CastSpell(38441)
    pUnit:CastSpell(512)
    pUnit:CastSpell(25442)
    pUnit:CastSpell(17668)
    pUnit:CastSpell(40876)
    pUnit:RegisterEvent (1000, 0, "phase_6")
    end
    end
    
    
    function phase_6(pUnit, Event)
    if pUnit:GetHealthPct() < 01 then
    pUnit:RemoveEvents();
    pUnit:SendChatMessage(14, 0, "Ragh! The powers of the Sunwell turn against me! What have you done? What have you done?!")
    pUnit:PlaySoundToSet(12510)
    pUnit:CastSpell(44998)
    pUnit:RegisterEvent(1000, 0, "phase_7")
     end
    end
    
    function phase_7(pUnit, Event)
    if pUnit:GetHealthPct() < 100 then
    pUnit:RemoveEvents();        
    pUnit:CastSpell(46474)
    end
    end
    
    function boss_start(pUnit, Event)
    pUnit:RegisterEvent("phase_1",1000, 1)
    end
    
    function boss_OnKill(pUnit, Event)
    pUnit:SendChatMessage(14, 0, "Another step towards destruction!")
    pUnit:PlaySoundToSet(12501)
    pUnit:CastSpell(31972)
    end
    
    
    RegisterUnitEvent(25315, 1, "boss_start")
    RegisterUnitEvent(25315, 3, "boss_OnKill")
    boss_OnKill will happen when the boss kills someone, if you want it to happen when the boss dies, it's RegisterUnitEvent(25315, 4, "boss_OnKill").

  7. #7
    methos0072001's Avatar Member
    Reputation
    3
    Join Date
    Dec 2007
    Posts
    57
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks very much. I'm new to LUA.

    Also, if I wanted to make him stop moving, could I write:


    Unit:StopMovement()


    Not really sure how I do it, I've looked on the Arcemu forums, but didnt find anything.

  8. #8
    methos0072001's Avatar Member
    Reputation
    3
    Join Date
    Dec 2007
    Posts
    57
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have another script I could use assistance on. Once I learn what I'm doing wrong it wont happen again :P

    Code:
    function LtMondera_OnCombat(pUnit, Event)
    pUnit:SendChatMessage(14, 0, "You dare challenge a Lieutenant of Illidan?")
    pUnit:RegisterEvent("LtMondera_VileBeam", 60000, 0)
    pUnit:RegisterEvent("LtMondera_EternalAffection", 30000, 0)
    pUnit:RegisterEvent("LtMondera_HowlofTerror", 120000, 0)
    end
    
    function LtMondera_VileBeam(pUnit, Event)
    if pUnit:GetHealthPct() < 95 then
    pUnit:CastSpellOnTarget(40860, pUnit:GetRandomPlayer(0))
    end
    
    function LtMondera_EternalAffection(pUnit, Event)
    if pUnit:GetHealthPct() < 30 then
    pUnit:FullCastSpell(30878)
    end
    
    function LtMondera_HowlofTerror(pUnit, Event)
    if pUnit:GetHealthPct() < 50 then
    pUnit:FullCastSpell(17928)
    end
    end
    
    function LtMondera_OnDied(pUnit, Event)
    pUnit:SendChatMessage(14, 0, "You were simply cannon fodder...how could you beat me?  Well done...")
    pUnit:RemoveEvents()
    end
    
    function LtMondera_OnKilledTarget(pUnit, Event)
    pUnit:SendChatMessage(14, 0, "You think your pain is over? Your pain is NEVER over!")
    end
    
    RegisterUnitEvent(9999999, 1, "LtMondera_OnCombat")
    RegisterUnitEvent(9999999, 3, "LtMondera_OnKilledTarget")
    RegisterUnitEvent(9999999, 4, "LtMondera_OnDied")
    It was working before, but when I added in the GetHealthPct() commands, the script would not load. I added the commands because she was basically spamming her spells ;/.

  9. #9
    Battle Chicken's Avatar Member
    Reputation
    12
    Join Date
    Oct 2006
    Posts
    94
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    function LtMondera_OnCombat(pUnit, Event)
    pUnit:SendChatMessage(14, 0, "You dare challenge a Lieutenant of Illidan?")
    pUnit:RegisterEvent("LtMondera_VileBeam", 60000, 0)
    pUnit:RegisterEvent("LtMondera_EternalAffection", 30000, 0)
    pUnit:RegisterEvent("LtMondera_HowlofTerror", 120000, 0)
    end
    
    function LtMondera_VileBeam(pUnit, Event)
    if pUnit:GetHealthPct() < 95 then
    pUnit:CastSpellOnTarget(40860, pUnit:GetRandomPlayer(0))
    end
    end
    
    function LtMondera_EternalAffection(pUnit, Event)
    if pUnit:GetHealthPct() < 30 then
    pUnit:FullCastSpell(30878)
    end
    end
    
    function LtMondera_HowlofTerror(pUnit, Event)
    if pUnit:GetHealthPct() < 50 then
    pUnit:FullCastSpell(17928)
    end
    end
    
    function LtMondera_OnDied(pUnit, Event)
    pUnit:SendChatMessage(14, 0, "You were simply cannon fodder...how could you beat me?  Well done...")
    pUnit:RemoveEvents()
    end
    
    function LtMondera_OnKilledTarget(pUnit, Event)
    pUnit:SendChatMessage(14, 0, "You think your pain is over? Your pain is NEVER over!")
    end
    
    RegisterUnitEvent(9999999, 1, "LtMondera_OnCombat")
    RegisterUnitEvent(9999999, 3, "LtMondera_OnKilledTarget")
    RegisterUnitEvent(9999999, 4, "LtMondera_OnDied")
    Should be fixed. Remember you need to end all if's aswell as ending the function

  10. #10
    methos0072001's Avatar Member
    Reputation
    3
    Join Date
    Dec 2007
    Posts
    57
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ahh i gotcha! Thanks, she's working 100% now.

    +Rep

Similar Threads

  1. Need Scripting help!
    By Arthis456 in forum WoW EMU Questions & Requests
    Replies: 3
    Last Post: 01-11-2009, 02:35 PM
  2. PvPToken System! (Need Script Edited)
    By Performer in forum World of Warcraft Emulator Servers
    Replies: 3
    Last Post: 02-03-2008, 06:10 PM
  3. Need Scripts
    By pytos in forum World of Warcraft Emulator Servers
    Replies: 1
    Last Post: 12-13-2007, 12:39 AM
All times are GMT -5. The time now is 10:15 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