Creature wont cast his spells [Lua Script] menu

User Tag List

Results 1 to 14 of 14
  1. #1
    bill45's Avatar Member
    Reputation
    5
    Join Date
    Jan 2008
    Posts
    104
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Creature wont cast his spells [Lua Script]

    What is wrong with this script? He wont cast his Icebolt and and when he goes to cast Ice Tomb he starts to cast it then stops. Everything else works.


    Code:
    function Iceguardiancorrupt_Icebolt1(unit, Event)
    unit:FullCastSpellOnTarget(31249, unit:GetRandomPlayer(0))
    unit:SendChatMessage(12, 0, "You die now!")
    unit:PlaySoundToSet (8877)
    end
    
    function Iceguardiancorrupt_Blizzard1(unit, Event)
    unit:CastSpell(37262)
    unit:SendChatMessage(12, 0, "Now you feel pain!")
    unit:PlaySoundToSet (8871)
    end
    
    
    function Iceguardiancorrupt_Frostbreath1(unit, Event)
    local plr = unit:GetRandomPlayer(0) 
    if (plr ~= nil) then
    unit:FullCastSpellOnTarget(31688, unit:GetRandomPlayer(0))
    unit:SendChatMessage(12, 0, "KILL!")
    unit:PlaySoundToSet (8867)
    end
    end
    
    function Iceguardiancorrupt_Icetomb1(unit, Event)
    unit:FullCastSpellOnTarget(29670, unit:GetRandomPlayer(0))
    end
    
    
    function Iceguardiancorrupt_OnEnterCombat(unit, Event)
    unit:SendChatMessage(12, 0, "You are too late... I... must... OBEY!")
    unit:PlaySoundToSet (8872)
    unit:PlaySoundToSet (11700)
    unit:RegisterEvent("Iceguardiancorrupt_Icebolt1",25000, 25)
    unit:RegisterEvent("Iceguardiancorrupt_Icetomb1",40000, 25)
    unit:RegisterEvent("Iceguardiancorrupt_Blizzard1",30000, 25)
    unit:RegisterEvent("Iceguardiancorrupt_Frostbreath1",27000, 10)
    end
    
    function Iceguardiancorrupt_OnLeaveCombat(unit)
    unit:RemoveEvents()
    end
    
    
    
    function Iceguardiancorrupt_Death(unit)
    unit:SendChatMessage(12, 0, "Thank..you..")
    unit:PlaySoundToSet (8870)
    unit:RemoveEvents()
    end
    
    
    
    RegisterUnitEvent(65039, 1, "Iceguardiancorrupt_OnEnterCombat")
    RegisterUnitEvent(65039, 2, "Iceguardiancorrupt_OnLeaveCombat")
    RegisterUnitEvent(65039, 4, "Iceguardiancorrupt_Death")

    Creature wont cast his spells [Lua Script]
  2. #2
    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)
    Try this

    function Iceguardiancorrupt_Icebolt1(unit, Event)
    local plr = unit:GetRandomPlayer(0)
    if (plr ~= nil) then
    unit:FullCastSpellOnTarget(31249, plr)
    unit:SendChatMessage(12, 0, "You die now!")
    unit:PlaySoundToSet (8877)
    end
    end


    function Iceguardiancorrupt_Blizzard1(unit, Event)
    unit:CastSpell(37262)
    unit:SendChatMessage(12, 0, "Now you feel pain!")
    unit:PlaySoundToSet (8871)
    end


    function Iceguardiancorrupt_Frostbreath1(unit, Event)
    local plr = unit:GetRandomPlayer(0)
    if (plr ~= nil) then
    unit:FullCastSpellOnTarget(31688, unit:GetRandomPlayer(0))
    unit:SendChatMessage(12, 0, "KILL!")
    unit:PlaySoundToSet (8867)
    end
    end

    function Iceguardiancorrupt_Icetomb1(unit, Event)
    unit:FullCastSpellOnTarget(29670, unit:GetRandomPlayer(0))
    end


    function Iceguardiancorrupt_OnEnterCombat(unit, Event)
    unit:SendChatMessage(12, 0, "You are too late... I... must... OBEY!")
    unit:PlaySoundToSet (8872)
    unit:PlaySoundToSet (11700)
    unit:RegisterEvent("Iceguardiancorrupt_Icebolt1",25000, 25)
    unit:RegisterEvent("Iceguardiancorrupt_Icetomb1",40000, 25)
    unit:RegisterEvent("Iceguardiancorrupt_Blizzard1",30000, 25)
    unit:RegisterEvent("Iceguardiancorrupt_Frostbreath1",27000, 10)
    end

    function Iceguardiancorrupt_OnLeaveCombat(unit)
    unit:RemoveEvents()
    end



    function Iceguardiancorrupt_Death(unit)
    unit:SendChatMessage(12, 0, "Thank..you..")
    unit:PlaySoundToSet (8870)
    unit:RemoveEvents()
    end



    RegisterUnitEvent(65039, 1, "Iceguardiancorrupt_OnEnterCombat")
    RegisterUnitEvent(65039, 2, "Iceguardiancorrupt_OnLeaveCombat")
    RegisterUnitEvent(65039, 4, "Iceguardiancorrupt_Death")
    **Filling 10 Chars**

  3. #3
    bill45's Avatar Member
    Reputation
    5
    Join Date
    Jan 2008
    Posts
    104
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nope he still doesn't seem to cast icebolt and he still only begins casting icetomb, without actually using icetomb

  4. #4
    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)
    Try using cast spell instead of full cast spell. see if he casts then i know he wont have cast times but just see if it works

  5. #5
    bill45's Avatar Member
    Reputation
    5
    Join Date
    Jan 2008
    Posts
    104
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    now he just casts both spells on himself.

  6. #6
    bill45's Avatar Member
    Reputation
    5
    Join Date
    Jan 2008
    Posts
    104
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    bump for help still being needed.

  7. #7
    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)
    Code:
    function Iceguardiancorrupt_Icebolt1(unit, Event)
    unit:FullCastSpellOnTarget(31249, unit:GetMainTank())
    unit:SendChatMessage(12, 0, "You die now!")
    unit:PlaySoundToSet (8877)
    end
    end
     
     
    function Iceguardiancorrupt_Blizzard1(unit, Event)
    unit:CastSpell(37262)
    unit:SendChatMessage(12, 0, "Now you feel pain!")
    unit:PlaySoundToSet (8871)
    end
     
     
    function Iceguardiancorrupt_Frostbreath1(unit, Event)
    local plr = unit:GetRandomPlayer(0) 
    if (plr ~= nil) then
    unit:FullCastSpellOnTarget(31688, unit:GetRandomPlayer(0))
    unit:SendChatMessage(12, 0, "KILL!")
    unit:PlaySoundToSet (8867)
    end
    end
     
    function Iceguardiancorrupt_Icetomb1(unit, Event)
    unit:FullCastSpellOnTarget(29670, unit:GetMainTank()) unit:GetRandomPlayer(0))
    end
     
     
    function Iceguardiancorrupt_OnEnterCombat(unit, Event)
    unit:SendChatMessage(12, 0, "You are too late... I... must... OBEY!")
    unit:PlaySoundToSet (8872)
    unit:PlaySoundToSet (11700)
    unit:RegisterEvent("Iceguardiancorrupt_Icebolt1",25000, 25)
    unit:RegisterEvent("Iceguardiancorrupt_Icetomb1",40000, 25)
    unit:RegisterEvent("Iceguardiancorrupt_Blizzard1",30000, 25)
    unit:RegisterEvent("Iceguardiancorrupt_Frostbreath1",27000, 10)
    end
     
    function Iceguardiancorrupt_OnLeaveCombat(unit)
    unit:RemoveEvents()
    end
     
     
     
    function Iceguardiancorrupt_Death(unit)
    unit:SendChatMessage(12, 0, "Thank..you..")
    unit:PlaySoundToSet (8870)
    unit:RemoveEvents()
    end
     
     
     
    RegisterUnitEvent(65039, 1, "Iceguardiancorrupt_OnEnterCombat")
    RegisterUnitEvent(65039, 2, "Iceguardiancorrupt_OnLeaveCombat")
    RegisterUnitEvent(65039, 4, "Iceguardiancorrupt_Death")
    I know it sux that its maintank and not randomplr but sometimes randomplr just doesnt work >.<.. But try that if you want
    Spectrum-X is win! Rep People That Help You and Candybones Wont Eat Your Brain:>

  8. #8
    bill45's Avatar Member
    Reputation
    5
    Join Date
    Jan 2008
    Posts
    104
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Doesn't work he still doesn't wanna cast ice tomb all the way and he doesn't cast ice bolt.

  9. #9
    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)
    Ok. ima check it l8r
    Spectrum-X is win! Rep People That Help You and Candybones Wont Eat Your Brain:>

  10. #10
    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)
    I chose not to rewrite the whole script for you becouse of several reason

    1. It might not even work if i rewrite it.
    2. you have 41 posts but never tried to help another member.



    xE
    Spectrum-X is win! Rep People That Help You and Candybones Wont Eat Your Brain:>

  11. #11
    bill45's Avatar Member
    Reputation
    5
    Join Date
    Jan 2008
    Posts
    104
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    So, not helping someone else denies me of of getting help from others? Also how do you know I have never tried to help someone but I was wrong partially or didn't get rep?

  12. #12
    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)
    1. yes
    2. i can check your posts..
    i wont check back on this thread
    Spectrum-X is win! Rep People That Help You and Candybones Wont Eat Your Brain:>

  13. #13
    thpthpthp's Avatar Contributor
    Reputation
    101
    Join Date
    Feb 2007
    Posts
    496
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    pwned XD
    (filler)

  14. #14
    bill45's Avatar Member
    Reputation
    5
    Join Date
    Jan 2008
    Posts
    104
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hey I tried to help other people by releasing some custom objects but then that thread got deleted. Also I fixed the problem so this thread isn't really needed anymore.

Similar Threads

  1. [C++ Script] Need help with (Only leader of a group may cast that spell) c++ script
    By Pieterkii in forum WoW EMU Questions & Requests
    Replies: 2
    Last Post: 06-16-2013, 11:05 AM
  2. Learn All spells LUA Script??
    By KaMakaZe in forum WoW EMU Questions & Requests
    Replies: 8
    Last Post: 10-18-2008, 10:53 AM
  3. LUA scripting -- Making game objects cast spells.
    By Jotox in forum World of Warcraft Emulator Servers
    Replies: 6
    Last Post: 05-08-2008, 03:44 PM
  4. Whats wrong with creature loot and my LUA Scripts
    By controlsx2 in forum World of Warcraft Emulator Servers
    Replies: 12
    Last Post: 05-06-2008, 01:48 PM
  5. LUA help, how to make npc cast a spell at a certain HP???
    By pioneer1337 in forum World of Warcraft Emulator Servers
    Replies: 3
    Last Post: 03-30-2008, 06:27 PM
All times are GMT -5. The time now is 04:49 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