Lua problems menu

User Tag List

Thread: Lua problems

Results 1 to 6 of 6
  1. #1
    jay77's Avatar Member
    Reputation
    1
    Join Date
    Jan 2009
    Posts
    55
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Lua problems

    This person is supposed to spam frostbolt, without interuppting itself, or meleeing, it's also supposed to start casting right when you combat it (hence the loop) it only casts the spell once, and it then sits there, but won't melee you (good) bad is that it doesn't keep casting, why? Help +Rep!

    Code:
    function ScarApp_OnEnterCombat(pUnit,Event)
        pUnit:RegisterEvent("Fireball", 1, 1)
        pUnit:SetCombatMeleeCapable(1)
    end
    
    function Fireball(pUnit, Event)
        local plr = pUnit:GetRandomPlayer(0)
        if plr == nil then
        pUnit:FullCastSpellOnTarget(44202, plr)
        pUnit:RegisterEvent("Fireball_Two", 2002, 1)
        else
        end
    end
    
    function Fireball_Two(pUnit, Event)
        local plr = pUnit:GetRandomPlayer(0)
        if plr == nil then
        pUnit:FullCastSpellOnTarget(44202, plr)
        pUnit:RegisterEvent("Fireball", 2002, 1)
        else
        end
    end
    
    function ScarApp_OnLeaveCombat(pUnit, event)
        pUnit:RemoveEvents()
    end
    
    function ScarApp_Death(pUnit)
        pUnit:RemoveEvents()
    end
    
    RegisterUnitEvent(80004, 1, "ScarApp_OnEnterCombat")
    RegisterUnitEvent(80004, 2, "ScarApp_OnLeaveCombat")
    RegisterUnitEvent(80004, 4, "ScarApp_Death")

    Lua problems
  2. #2
    Gastricpenguin's Avatar Legendary
    Reputation
    980
    Join Date
    Feb 2007
    Posts
    2,236
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Are you receiving any errors in world.exe?

  3. #3
    jay77's Avatar Member
    Reputation
    1
    Join Date
    Jan 2009
    Posts
    55
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nope, but I did fix it, where it was
    if plr == nil then
    I changed it to
    if plr ~= nil then
    and it worked perfectly....

    Buttttt, you did create the GUA engine, could you explain to me a little bit how that works, if you don't mind of course.
    Some silly questions off the top of my head...

    Do I have to save things as .gua?
    Did any of the old lua functions get changed, or were just some added?
    +Rep for replying as well =]!

  4. #4
    Gastricpenguin's Avatar Legendary
    Reputation
    980
    Join Date
    Feb 2007
    Posts
    2,236
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The GuaEngine is an enhanced version of the normal LuaEngine provided by the core developers, I like to create new functions that will benefit the users, making it easier to do more things with lua scripts. You don't have to change the extensions or anything.

  5. #5
    jay77's Avatar Member
    Reputation
    1
    Join Date
    Jan 2009
    Posts
    55
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If I followed a compiling guide for it, I would replace my LuaEngine with my GuaEngine? =]
    Thanks again for the replying, I appreciate it

  6. #6
    Gastricpenguin's Avatar Legendary
    Reputation
    980
    Join Date
    Feb 2007
    Posts
    2,236
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yup, that's all you have to do. If you are using the 3.1.x branch, you need to apply the .patch file first.

Similar Threads

  1. Lua problem
    By Minichili in forum World of Warcraft Emulator Servers
    Replies: 3
    Last Post: 04-14-2008, 09:45 AM
  2. [Help] Lua problem
    By Lich King in forum World of Warcraft Emulator Servers
    Replies: 10
    Last Post: 03-23-2008, 04:34 AM
  3. lua problem
    By *Alexz* in forum World of Warcraft Emulator Servers
    Replies: 9
    Last Post: 02-14-2008, 10:41 PM
  4. [Question]-Lua Problem
    By Peter1337 in forum World of Warcraft Emulator Servers
    Replies: 0
    Last Post: 02-07-2008, 07:59 AM
  5. [Question] LUA problem
    By Peter1337 in forum World of Warcraft Emulator Servers
    Replies: 0
    Last Post: 02-01-2008, 09:21 AM
All times are GMT -5. The time now is 04:56 AM. 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