CastSpellOnTarget - Root mob while casting? menu

Shout-Out

User Tag List

Results 1 to 13 of 13
  1. #1
    Iaccidentallytwink's Avatar Elite User
    Reputation
    591
    Join Date
    Aug 2007
    Posts
    1,020
    Thanks G/R
    1/16
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    CastSpellOnTarget - Root mob while casting?

    I'm scripting a mob using LUA, and I'm wondering if it's possible to root the mob during the event that makes him cast a spell, say, Chain Lightning. If I use something like Frost Nova he casts it normally, but otherwise he begins casting then stops to chase me.

    The code I have for the spell is:
    Code:
    function Thrall_Chain_Lightning(Unit, Event)
    Unit:FullCastSpellOnTarget(15117,Unit:GetClosestPlayer(0))
    end


    CastSpellOnTarget - Root mob while casting?
  2. #2
    TheZaronz's Avatar Active Member
    Reputation
    97
    Join Date
    Dec 2007
    Posts
    567
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can use this as an example:
    Code:
    function Thrall_Chain_Lightning(Unit, Event)
    Unit:Root()
    Unit:FullCastSpellOnTarget(15117,Unit:GetClosestPlayer(0))
    Unit:RegisterEvent("Thrall_Unroot", 1000, 1) -- Replace 1000 with the desired time to unroot in MS.
    end
    
    function Thrall_Unroot(Unit, Event)
    Unit:Unroot()
    end

  3. #3
    Iaccidentallytwink's Avatar Elite User
    Reputation
    591
    Join Date
    Aug 2007
    Posts
    1,020
    Thanks G/R
    1/16
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by TheZaronz View Post
    You can use this as an example:
    Code:
    function Thrall_Chain_Lightning(Unit, Event)
    Unit:Root()
    Unit:FullCastSpellOnTarget(15117,Unit:GetClosestPlayer(0))
    Unit:RegisterEvent("Thrall_Unroot", 1000, 1) -- Replace 1000 with the desired time to unroot in MS.
    end
    
    function Thrall_Unroot(Unit, Event)
    Unit:Unroot()
    end
    Thank you very much! Trying this out now.


  4. #4
    Iaccidentallytwink's Avatar Elite User
    Reputation
    591
    Join Date
    Aug 2007
    Posts
    1,020
    Thanks G/R
    1/16
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ah, I've tried it but if I manually root him (say, frost nove), during the root he unroots and follows me =S.


  5. #5
    Kaidos's Avatar Contributor
    Reputation
    148
    Join Date
    Jun 2008
    Posts
    324
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Other with Unit:StopMovement.

    Code:
    function Thrall_Chain_Lightning(Unit, Event)
    Unit:FullCastSpellOnTarget(15117,Unit:GetClosestPlayer(0))
    Unit:StopMovement(XXXX)  -- add casttime in milliseconds, 3seconds cast= 3000, make 3200, looks better^^
    end
    Last edited by Kaidos; 05-26-2009 at 10:43 AM.

  6. #6
    Canibanani's Avatar Member
    Reputation
    1
    Join Date
    May 2009
    Posts
    1
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    how can i open a thread?

  7. #7
    Iaccidentallytwink's Avatar Elite User
    Reputation
    591
    Join Date
    Aug 2007
    Posts
    1,020
    Thanks G/R
    1/16
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Xendro View Post
    Other with Unit:StopMovement.

    Code:
    function Thrall_Chain_Lightning(Unit, Event)
    Unit:Root()
    Unit:FullCastSpellOnTarget(15117,Unit:GetClosestPlayer(0))
    Unit:StopMovement(XXXX)  -- add casttime in milliseconds maybe 100ms + or something :P
    end
    What's the point of having Root in there?


  8. #8
    TheZaronz's Avatar Active Member
    Reputation
    97
    Join Date
    Dec 2007
    Posts
    567
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nothing in that case it will root him permanently.
    Just do as Xendro said - should work better.

    Code:
    Unit:StopMovement(X) -- for the amount of time in MS

  9. #9
    controlsx2's Avatar Member
    Reputation
    16
    Join Date
    Jun 2007
    Posts
    223
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by n4ru70h4x0r View Post
    I'm scripting a mob using LUA, and I'm wondering if it's possible to root the mob during the event that makes him cast a spell, say, Chain Lightning. If I use something like Frost Nova he casts it normally, but otherwise he begins casting then stops to chase me.

    The code I have for the spell is:
    Code:
    function Thrall_Chain_Lightning(Unit, Event)
    Unit:FullCastSpellOnTarget(15117,Unit:GetClosestPlayer(0))
    end
    You could have him cast a rooting spell on himself instantly (like the GM shackle) and after casting the spell to remove it

  10. #10
    stoneharry's Avatar Moderator Harry


    Reputation
    1618
    Join Date
    Sep 2007
    Posts
    4,564
    Thanks G/R
    151/150
    Trade Feedback
    0 (0%)
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    The only thing you need to do is:

    Code:
    function Threall_Chain_Lightning(Unit, Event)
    Unit:StopMovement(99999999)
    Unit:SetCombatMeleeCapable(1)
    Unit:FullCastSpellOnTarget(15117, Unit:GetRandomPlayer(0))
    Unit:RegisterEvent("End_Chain", 5000, 0)
    end
    
    function End_Chain(Unit, Event)
    Unit:RemoveEvents()
    Unit:SetCombatMeleeCapable(0)
    Unit:StopMovement(0)
    end
    I gurantee this will work. Need to change the 5000 on register event to how long you want it to stop moving.

  11. #11
    Iaccidentallytwink's Avatar Elite User
    Reputation
    591
    Join Date
    Aug 2007
    Posts
    1,020
    Thanks G/R
    1/16
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks, I'll try this!


  12. #12
    Iaccidentallytwink's Avatar Elite User
    Reputation
    591
    Join Date
    Aug 2007
    Posts
    1,020
    Thanks G/R
    1/16
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Stoneharry, that code ends up rooting the mob forever, and he just stands there =S.
    Here's the code I have for it.
    Code:
    function Thrall_Chain_Lightning(Unit, Event)
    Unit:StopMovement(9999)
    Unit:SetCombatMeleeCapable(1)
    Unit:FullCastSpellOnTarget(15117,Unit:GetRandomEnemy(0))
    Unit:RegisterEvent("End_Chain", 3000, 0)
    end
    
    function Varian_Whirlwind4(Unit, Event)
    Unit:StopMovement(9999)
    Unit:SetCombatMeleeCapable(1)
    Unit:FullCastSpell(8989)
    Unit:RegisterEvent("End_Chain", 3000, 0)
    end
    
    function End_Chain(Unit, Event)
    Unit:RemoveEvents()
    Unit:SetCombatMeleeCapable(0)
    Unit:StopMovement(0)
    end
    Last edited by Iaccidentallytwink; 05-25-2009 at 04:03 PM.


  13. #13
    stoneharry's Avatar Moderator Harry


    Reputation
    1618
    Join Date
    Sep 2007
    Posts
    4,564
    Thanks G/R
    151/150
    Trade Feedback
    0 (0%)
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    The Stop movement 0 should reset his movement, always worked for me in the past. Try setting the second stop movement to 1000. If that doesn't work change the first stop movement to the seconds you want it to stop moving (1000 = 1 second) then delete the 2nd one.
    Last edited by stoneharry; 05-26-2009 at 02:35 AM.

Similar Threads

  1. [POSSIBLY NEW]How to run while casting *ANY SPELL*?
    By Bareno in forum World of Warcraft Exploits
    Replies: 103
    Last Post: 01-29-2008, 07:13 PM
  2. [Question] hmm, how do i make a mob rapidly cast spells?
    By Creepfold in forum World of Warcraft Emulator Servers
    Replies: 9
    Last Post: 12-27-2007, 10:38 AM
  3. [GUIDE] - Scripting for Antrix, Making Mobs Talk, Cast Spells, etc
    By Greed in forum WoW EMU Guides & Tutorials
    Replies: 6
    Last Post: 12-10-2007, 07:51 PM
  4. Attack with melee while Casting a spell.
    By Itazuki in forum World of Warcraft Exploits
    Replies: 7
    Last Post: 12-16-2006, 12:17 PM
  5. Sheath while Casting/mounting etc.
    By Karakanz in forum World of Warcraft Exploits
    Replies: 22
    Last Post: 12-03-2006, 08:32 PM
All times are GMT -5. The time now is 12:19 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