Event Recognition Lua script help menu

User Tag List

Results 1 to 6 of 6
  1. #1
    Diavol's Avatar Member
    Reputation
    13
    Join Date
    Jun 2007
    Posts
    62
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Event Recognition Lua script help

    So I'm fine tuning all my lua macros and scripts, and I am noticing that at certain times, such as bg's, my healing script on my paladin will try to spam heal someone who is in range, but is line of sighted...
    So my question would be, is there a way to track certain events and turn them into variables within a macro or script? I'm assuming there is considering there was a script for recognizing when you are behind someone, though I never dl'd in time before NA blew up...
    Any ideas or help on this would be greatly appreciated.

    Event Recognition Lua script help
  2. #2
    Ultraviolence's Avatar Active Member
    Reputation
    15
    Join Date
    Aug 2008
    Posts
    102
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I wrote the behind target check script. This should work the same way, but I haven't tested it:

    Code:
    if not LoSCheck then
        LoSCheck = CreateFrame("Frame")
    end
    
    local frame = LoSCheck
    frame:RegisterEvent("UI_ERROR_MESSAGE")
    frame:SetScript("OnEvent", function(self, event, ...)
    	local msg = select(1, ...)
    	if (msg:find("sight") ~= nil) then
    		LoS=1
    	else
    		LoS=0
    	end
    end)
    This creates a frame that monitors error message and once it captures the error "You must be in line of sight" or whatever it says, it will return true, so you call it using LoS==1 if your target is not in line of sight. I think. And I believe you need to add a GetTime function as well. Like I said, haven't tested but this should get the ball rolling.
    Last edited by Ultraviolence; 04-15-2012 at 09:05 AM.

  3. #3
    Diavol's Avatar Member
    Reputation
    13
    Join Date
    Jun 2007
    Posts
    62
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I love your face. I will test this out when I get home

  4. #4
    Diavol's Avatar Member
    Reputation
    13
    Join Date
    Jun 2007
    Posts
    62
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hmmm I'm having a hell of a time trying to call it from sdm. I can't seem to get the syntax right for adding it as a check before my main healing section...

  5. #5
    Ultraviolence's Avatar Active Member
    Reputation
    15
    Join Date
    Aug 2008
    Posts
    102
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm guessing something like this, but integrating it into your entire script will be a bit challenging and I don't have any time these days:
    Code:
    if not LoSCheck then
        LoSCheck = CreateFrame("Frame")
    end
    
    local frame = LoSCheck
    frame:RegisterEvent("UI_ERROR_MESSAGE")
    frame:SetScript("OnEvent", function(self, event, ...)
    	local msg = select(1, ...)
    	if (msg:find("sight") ~= nil) and cd("Holy Shock")==0 then
    		c("Holy Shock",p)
    	else
    		c("Flash of Light",t)
    	end
    end)
    
    c("Flash of Light",t);

  6. #6
    Diavol's Avatar Member
    Reputation
    13
    Join Date
    Jun 2007
    Posts
    62
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well I have been trying a lot of different ways to get this to work, but its just not for me. All samples I have run check syntax fine but produce no results. Do you by chance have the behind target check script you could send me? I want to make sure Im not missing something...

Similar Threads

  1. Simple LUA Script Help
    By Wolfly in forum WoW EMU Questions & Requests
    Replies: 7
    Last Post: 09-02-2008, 04:22 PM
  2. LUA Script Help Thread
    By mager1794 in forum World of Warcraft Emulator Servers
    Replies: 0
    Last Post: 07-04-2008, 12:46 AM
  3. LuA Scripting Help
    By Jlp in forum World of Warcraft Emulator Servers
    Replies: 15
    Last Post: 06-27-2008, 03:33 AM
  4. Lua script help and general questions from beginner
    By WinKIller0 in forum World of Warcraft Emulator Servers
    Replies: 1
    Last Post: 02-23-2008, 04:38 AM
  5. Need LUA Scripting Help ?
    By Snailz in forum World of Warcraft Emulator Servers
    Replies: 2
    Last Post: 02-04-2008, 12:36 PM
All times are GMT -5. The time now is 12:59 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