• 0

    posted a message on SetAttribute in combat probably?
    Quote from Dridzt
    Ok some snippets in the vein of what was described on previous page:
    Harvesting valid names from the combatlog and taking action after combat ends.

    Combatlog stuff
    local macroText = "/cleartarget\n/targetexact [help,exists,dead,btn:1] %s\n/cast [help,dead,btn:2]%s"
    local macros = {}
    -- create a frame to use for monitoring events
    local events = CreateFrame("Frame") 
    -- create an event dispatch function, store its reference on our frame
    events.OnEvent = function(self,event,...) 
        return self[event] and self[event](...) 
    end
    -- connect our event function with the built-in frame script handler
    events:SetScript("OnEvent",events.OnEvent) 
    -- register an event to monitor
    events:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED") 
    -- write our event handler, initialize some useful variables
    local bor,band = bit.bor, bit.band -- get a local reference to some bitlib functions for faster lookups
    local CL_OBJECT_FRIENDLY_PLAYER = bor(COMBATLOG_OBJECT_TYPE_PLAYER,COMBATLOG_OBJECT_REACTION_FRIENDLY) -- construct a friendly player bitmask
    local bookOfDead = {} -- initialize a table to store names of dead players
    events.COMBAT_LOG_EVENT_UNFILTERED = function(...)
        -- base parameters, rest change according to clEvent (type of combatlog event)
        local timestamp,clEvent,hideCaster,sourceGUID,sourceName,sourceFlags,sourceRaidFlags,destGUID,destName,destFlags,destRaidFlags 
        -- we only care about deaths, so if it's not a death event do no processing
        if not clEvent == "UNIT_DIED" then return end
        -- we only care about friendly player deaths so check the death event target (destination)
        if band(CL_OBJECT_FRIENDLY_PLAYER,destFlags)==CL_OBJECT_FRIENDLY_PLAYER then
            tinsert(bookOfDead,destName)
        end
    end
    events:RegisterEvent("PLAYER_REGEN_DISABLED") -- entering combat
    events:RegisterEvent("PLAYER_REGEN_ENABLED") -- leaving combat
    events.PLAYER_REGEN_DISABLED = function()
        -- entering combat clear our storage
        wipe(bookOfDead)
    end
    event.PLAYER_REGEN_ENABLED = function()
        -- leaving combat, get the names and do something with them
        -- eg. update a macro that targets and tries to cast ress on them and set it on the secure button.
        wipe(macros)
        for _,dead in ipairs(bookOfDead) do
            macroText:format(dead,myRessSpellName) -- myRessSpellName will need to hold an actual spellName.
            tinsert(macros,macroText)
        end
    end
    Secure macro button
    local secureBtn = CreateFrame("Button",nil,UIParent,"SecureActionButtonTemplate,UIPanelButtonTemplate")
    secureBtn.PreClick = function(self,mbutton,down)
        if next(macros) and mbutton=="LeftButton" then
            secureBtn:SetAttribute("macrotext",tremove(macros,1))
        end
    end
    secureBtn:SetSize(80,25)
    secureBtn:SetPoint("CENTER",0,0)
    secureBtn:SetText("test")
    secureBtn:SetMovable(true)
    secureBtn:RegisterForClicks("AnyUp")
    secureBtn:RegisterForDrag("LeftButton")
    secureBtn:SetScript("OnDragStart",secureBtn.StartMoving)
    secureBtn:SetScript("OnDragStop",secureBtn.StopMovingOrSizing)
    secureBtn:SetScript("PreClick",secureBtn.PreClick)
    secureBtn:SetAttribute("type","macro")
    These are not really tested and are not a complete addon, but should help you get started on the more tricky parts.

    It still needs some combat checks (InCombatLockdown() is a useful function for that) so you don't try to set secure attributes in combat etc.

    It needs to get the player resurrection spell (either from a table you'll provide yourself by class/spec or dynamically).

    It also monitors the combatlog unconditionally. You may want to limit that to only when you are in combat, or only when you are in BG/party/raid / whatever conditions.

    You can remove the UIPanelButtonTemplate part from the CreateFrame and instead style the button yourself.
    You can set keybinds to the left/right click (optionally not even show the button and let the user operate through a 'target dead' and 'ress dead' keybind).

    You get the idea.
    But it should give you something to play with / study and modify until it works like you want it.

    The purpose of these 2 snippets would be getting a button that you can left-click to try target the next valid target, then right-click to cast ress on them.
    (you could edit the macro template to remove the btn:x requirements and make it do the whole thing in one click, you could make it rotate among the stored names instead of removing one for each click etc)


    Foots in my mouth! You wrote a whole addon. To be honest, I am even ashamed, becouse, i'm asked about the only example of "COMBATLOG_OBJECT_TYPE" >:(

    In any case, you did for me quite a lot, for which I am very grateful to you.



    local bor,band = bit.bor, bit.band -- get a local reference to some bitlib functions for faster lookups

    Ahh that's why they write? To functions to work faster? And what a performance gain here?

    bor(COMBATLOG_OBJECT_TYPE_PLAYER,COMBATLOG_OBJECT_REACTION_FRIENDLY)
    band(CL_OBJECT_FRIENDLY_PLAYER,destFlags)==CL_OBJECT_FRIENDLY_PLAYER


    How it works, and how it faster than other methods? And where can i read some description about it, lest I took from you in time.? I've serached before, but not found.
    Posted in: Lua Code Discussion
  • 0

    posted a message on SetAttribute in combat probably?
    Quote from Dridzt
    Kinda swamped this week sorry, will try to have some examples for you as the weekend approaches.

    Nothing to apologize for. All right! I'll be waiting.
    Posted in: Lua Code Discussion
  • 0

    posted a message on SetAttribute in combat probably?
    Dridzt, can you say something?
    Posted in: Lua Code Discussion
  • 0

    posted a message on SetAttribute in combat probably?
    Quote from Dridzt
    COMBATLOG_OBJECT_* masks (look into Constants.lua for a list and ask for specific tips how to apply them to the flags related to C_L_E_U events).

    I looked Constants.lua. But I do not understand why and how these variables are used in the game. The only thing that came to mind is that these variables contain the code that is easy to pass through the server to save bandwidth. Also I read the information on the page http://www.wowpedia.org/UnitFlag, but I still do not understand the purpose for which these variables.
    Posted in: Lua Code Discussion
  • 0

    posted a message on SetAttribute in combat probably?
    Quote from Dridzt
    @b0s If you idea is to make an addon that will monitor for deaths during combat but help you find the dead
    (a) If you idea is to make an addon that will monitor for deaths during combat but help you find the dead and cast resurrection on them after combat, that is very much possible.
    You can make such a 'magic button'.

    Yes it is
    and cast resurrection

    But not quite. If certainly I understand you correctly. I do not write something that I would like a button that will take the dead and will use the spell. I only wished that I had the opportunity to take the dead in the target, until he took the form of spirit, for that would see the dot on the minimap, and know where to go. And since after going into the matter, the only thing that I thought the decision to use SecureActionButtonTemplate. Beyond that, I was trying to figure out whether the possible transfer of a player that would add it to the macro body. I was hoping that because Show, Hide and StartMoving commands work on mouse click even in combat, according to the same rules work SetAttribute. I realized that SetAttribute does not work under the same rules, and even in a protected environment, even by mouse click use this function in combat is not allowed.

    You'll have to monitor COMBAT_LOG_EVENT_UNFILTERED for deaths

    My addon is trigger reactor. It's just like DBM, but for chat output, not for middle of a screen. Of course, I use COMBAT_LOG_EVENT_UNFILTERED, and use it subevent, but not only this event.

    COMBATLOG_OBJECT_* masks (look into Constants.lua for a list and ask for specific tips how to apply them to the flags related to C_L_E_U events).

    I never heard about the COMBATLOG_OBJECT_* masks or C_L_E_U events. It's interesting, but I have doubts that it will be useful to me. I have to look at.

    Upon exiting combat you can construct a macro that will try to target those names, with conditionals and cast a resurrection spell.
    You can ask for help on macro syntax too if you can't make it.

    Thank you very much for being given the time and are ready to help!

    I have good one. Actually, not for frame macrotext attribute.
    #showtooltip
    /cast [btn:2,mod:shift] Nature's Swiftness;
    /cast [nocombat,btn:2] [mod:ctrl] Mass Resurrection; [nocombat,mod:shift] [combat] Rebirth; Revive


    For frame it's just
     macrotext = "'/canceltarget\\n/target ' .. event.target.name"


    (b) What I understood from your first posts was that you wanted a magic button to target and cast a combat-rez on an arbitrary player (possibly outside of your group) dying mid-fight.
    This is impossible.


    As for the off-topic side of the conversation.
    Phanx is very active and helpful with code tips / explanations and snippets in a couple developer communities.
    I think she's suffering from a mild case of 'customer support burnout' though :p
    I can sympathize as I've been in that position in the past in the work environment.
    You get to a point that you jump down the throat of 'innocent' users because you carry the baggage of 100s of small annoyances piling up.

    I do not work in customer support, and I do not understand Phanx as a member of the community answered the 7000 questions, but I still understand what it means to be a cashier at the end of the working day.

    rather than get aggravated (since you're neither my customer nor am I getting paid for this). ;)

    This part of your thought, I can not get translated. Could you write in other words?
    Posted in: Lua Code Discussion
  • 0

    posted a message on SetAttribute in combat probably?
    Quote from Phanx
    Yeah, there's not really any point in writing a whole addon for that

    This is my idea. For every idea there is always a reason. I'll decide what makes sense for me, and what not. The idea may not like someone. For example you or otherone. You are free to do what you wish. Think, speak, write, or whatever. But to make a decision about the usefulness of realizing my ideas will be me.

    when you can just write a simple macro:

    /cast [@mouseover] [] Resurrection


    ...or use Clique to bind a specific key/click to cast your res spell on your mouseover unit.

    I have better one.

    I am always happy to take note of any thoughts of people. People's minds the most precious thing in the world after humans. But I will not listen to a man who builds himself intelligent. Especially if it violates my boundaries, indicating to me that it is reasonable , what is not, or telling me where to go, what to write or how to eat or rashly judge me.
    Posted in: Lua Code Discussion
  • 0

    posted a message on SetAttribute in combat probably?
    Quote from Lombra
    No, I didn't mention SetAttribute. Merely that you can use the mouse to click a secure button, just like you can a unit frame.

    I get it. Thank you for your answers and your time that you have given me!

    Quote from Dridzt
    The reason what you're asking for cannot be done (technical explanations aside) is that it would allow automation.

    The secure system is designed specifically to prevent that from happening.
    If you could set secure attributes in combat you would be able to for example:
    (a) Get a unit name from the combatlog.
    (b) Create a /targetexact macro to target it.
    (c) Set an attribute to cast a spell / buff / debuff on it.
    (d) Get another unit, set your attributes, now your button does something else.

    This would bring us back to the old Decursive, and 1-button mashing 'smart' addons, which is exactly what Blizzard wants to prevent.

    I am very glad that the game developers are deprived of automation possible in the previous version of the client. And I will be glad to tell them thank you for that! And I am quite sincere. I also understand why the days when the X-Perl modification could not remove any buffs by mouse right-click on the X-Perl BuffFrame, after the introduction of secure frames. And I did not use old and I will not use the new Decursive. I love the standard interface, and the opportunities it provides the developer. I love the macro with mouseover. I have all the spells are very flexible and work without add-ons, with standard or modified frames in the group and outside the group (mouseover). In other words, even though I never needed to automate because I like to play by myself getting the game fun, of course when the game is collective, though, I understand well why measures have been taken.
    All I had to, to understand whether it is possible transfer of certain symbol, sign or direct transfer of the player's name, can I pray for this (joking), or inscribe a symbol on my druid, that even during the battle, the frame could help me identify the dead and I knew where after the fight I should come running.
    I know a lot, and programming in Lua is at least two years. I know something about, but I do not know as much as you or Phanx or other the great and well programmers. That's why I'm here.

    - Attaching a secure button to cast combat-rez to any unitframe you see (target, party, raid, focus and so on)

    It's a relly great idea! Thanx for that! But, my problem is in targeting the died, who's not in my group, and not targetted by me, only. "How can I target the died comfortable, easier and faster enough as it possible?" Actually, that's is my idea, that's my task, that's my problem and that's my question. But I can not think of another solution other than a frame that could help me take the dead in target, to see hims dot on the mini map, and then go up to him. Unless of course the character came out of the body. That's why frame. I agree, if you call me "enthusiast", "mad" or "brainless", or anythink like that.
    - You can create a secure button to cast combat-rez on your mouseover unit.

    Yes-yes, it can be a macro that binded on some key. "/ressurect [@mouseover]". It's really understood.
    - You can create a combat-rez button whose secure attributes are pre-populated before combat or after combat ends.

    That's, what I talk about and the subject is about.
    Specific units outside of your group don't have valid unitIDs until you target them, or focus them etc, and by that time you can use the target or focus unitframes to take action, it's pointless to have a duplicate unitbutton that's a target button that does 1 thing extra.

    I think so, too.


    Quote from Phanx
    for ignoring the answer

    Why do you think I'm ignoring someone's answer? How exactly do you define that I ignored the answer?
    responding to people who are saying "it's not possible"

    Where is the guarantee that other person fully understands me
    Where is the guarantee that I fully understands the other person?
    If you want to go do a lot of research and study to try to find a workaround, feel free, but -- since you want to talk about respect -- responding to people who are saying "it's not possible" by implying that we must be idiots who have no idea what we're talking about, and that we must be missing something really obvious that you can find in 5 minutes of skimming documentation, is pretty disrespectful.

    I do not think you or anyone else either an idiot or a fool. But, I know how to distinguish the wise from the foolish. The wise man believes, doubts and checks. Foolish man asserts.
    If for you misunderstanding or ignorance of the other person is disrespectf, it is meaning that you have a very big problem. It turns out that the first thing you come up with is disrespect. For that situation a good question is "Is the other person understands you?", but you chose the question of respect.

    You absolutely do not know me. You absolutely do not know what I think. Not only that, you do not mind that I do not know much English. It's really tough to me write in English without expirience. Pretty hard to try to convey a thought that rather hard to describe in another language. In a double harder when you're trying to convey thought of that you do not understand until the end.

    Why should I consider someone a fool?
    Why do you think that I think you a fool?
    Why do you think I'm ignoring someone's answer?
    Why do you think I'm don't like it, at all?

    Because I do not understand it all, I doubt and I specify?

    And why do you believe that you have stated in a clear answer for me a form for my ability to understand, to my mind? Not because I'm cranky, but because I do not understand until the end, what you have written. People ask the question, not in order to remember that the text that you have written, but in order to interpret the meaning of that which they are able to learn from the information. And it comes at as much as they are capable of at the moment of their live. And for this, the one who realizes that everything is not clear asks a question what would draw an idea that is misunderstood. In other words, I asked a question, not because I do not like someone else's answer, but because I will not see in the response of the information that I have made ??it clear that she is the answer to my question. When I saying: "Thank you, I'm all figured out!", I must to understand that with which I agree.


    If you can't find any documentation in your native language, just read the source code. The attribute system is written in pure Lua, and is freely available for anyone to look at.

    I have a copy on my hard drive and it gives me the code, but does not understand how I use the code. I can not understand everything being alone with yourself.
    People are different, one is easier to understand the code, apparently you are. Another easier to understand the meaning from the conversation with the person. I realized quickly when I conduct a conversation. I thought that the forums on one side to achieve understanding and awareness, in those matters in which they apparently do not understand. According to you it turns out, no.
    A unit frame won't tell you how someone died. It won't tell you whether they're on a quest, or whether you can help. You still have to talk to them to find that out.

    Nothing in life makes me more sad, like a doctor who kills a patient politsioner throwing innocent or assistant trying to insult you, trample, humiliate or hurt. This is the worst thing you could do on the forum instead of what would bind to and understand what the person is telling you. If you do not like people and do not give them a chance, why work with them? Take a punching bag, let it ricocheting in your face.
    Posted in: Lua Code Discussion
  • 0

    posted a message on SetAttribute in combat probably?
    Half-offtop:
    Quote from Phanx
    You should just listen to the many experienced WoW programmers in this thread who are telling you it's not possible, and accept that.

    In other worlds "Do not ask. Not interested. Just shutup, listen and do what I say!". Yes? I really hope, that i'm wrong, better if i will wrong...
    Let us respect each other? Let us remember that every person is moving his step? Let's say without aggression and without attempting to judge? Let's just help each other. Probably, I have nothing whatever I could to help you, since you probably all know and not in need of nothing, but you can help me, for which I shall be very grateful to you.
    Of course you are probably in a hurry, you do not have time not to hurry?
    Glancing at some documentation and then asking "but what about this?" when clearly you did not read or understand the whole documentation is just a waste of everyone's time -- both ours and yours

    I just thought that on this forum I can go for help, and as a result I feel that I am being judged.
    Please, be kind, show me the anterior specific quality documentation in Russian, which specifically and clearly full of very kind and sincere person with a fairly clear examples clearly describes the main idea? Something tells me that even if you and would be happy to spend time searching for the answer, you would not find it.
    I read the manual SecureHeadersGuide-4.0-r1.pdf written Iriel, but I do not understand it all, because the possession of knowledge does not have the experience to use this knowledge. And for the ability to use knowledge correctly, it takes time. That is why I ask the question hoping to help a living person, not a dead machine.
    waste of everyone's time -- both ours and yours

    Yes, it's a waste of time, this game, programming, people who today is, and tomorrow is not present. All can be called a waste of time. Although in fact you may not know where it leads. It may happen so that you will spend all your life on the right things and then decide that all in vain in the end. I'm where I should be, just like you. This is your time, and how to "wasting" up to you. But will the time spent in the empty or not, this is a very difficult and personal matter that should be decided by each individual.




    By topic:
    Really, I'm not sure what would even be the point of having a frame pop up to target some random dead player who isn't in your group. Why would you want that?

    What's the question? Help the players of course. With the death of someone's character, I can step up and resurrect him, I also can help to solve the problem, get the quest, and I can help defeat a champion and more. Most of the players are people who do not care for each other in life or in the game. On the other hand, there are some people who I helped and help lead acquaintance and friendship, which, in turn, continued outside of the game. That such small actions can sometimes change a person's life. That's why I'd like to have that opportunity, too.
    Quote from Phanx
    there's no way to securely hide and show frames based on the dead/alive state

    I've written about this before:
    Quote from b0s
    (Ahhhhh... Hide and Show frame in combat is a problem, and as I understand it is not solvable)


    Quote from Lombra
    As far as I know, yes. The only way that your clicking manually can be useful is if you have a few secure buttons for a few predetermined names.

    According to Lombra words, SetAttribute can be performed securely at the mouse click, but according to Phanx words, pass the name, of the player during combat in a secure environment is impossible?
    Posted in: Lua Code Discussion
  • 0

    posted a message on SetAttribute in combat probably?
    Quote from Lombra
    As far as I know, yes. The only way that your clicking manually can be useful is if you have a few secure buttons for a few predetermined names.


    Could you give an example? I don't get it right.
    Posted in: Lua Code Discussion
  • 0

    posted a message on SetAttribute in combat probably?
    Quote from Lombra
    The point of secure templates is to let you create code for targetting units and casting spells at all; not to allow you to create in combat "bots". Yes, you can use macrotext to make it work for players outside of your group, but you can never set an attribute in combat. (it doesn't matter if you know exactly what you want to set) It has to be set up before you enter combat.


    Even if the function (SetAttribute) is called by an event(OnMouseUp for example) that was caused by my hand (physical mouse click)?
    Posted in: Lua Code Discussion
  • 0

    posted a message on SetAttribute in combat probably?
    Quote from Phanx
    Also, if the player who died is not in your group, you could not do this anyway unless you were already targeting them, because a unit frame needs a unit token -- like player, target, focus, party2, raid13, or raidpet17target -- and random units outside of your group don't have unit tokens.


    But how about "macrotext" attribute with code "/target CharacterName"?
    Posted in: Lua Code Discussion
  • 0

    posted a message on SetAttribute in combat probably?
    Quote from Dridzt
    I'm sorry to say but you cannot :SetAttribute in combat and that is by design.


    Usually no, but what if in context SecureTemplates and not automatically, but by left click on the myAddonFrame? As far as I understand SecureTemplates main task is to prevent bots (on lua of course) work, but keep the user to use the frame. And I read somewhere that it is precisely this function, it is quite feasible in combat in the case if the frame is secured and but on condition that the cause of the reaction was user click.

    No it's not?
    Posted in: Lua Code Discussion
  • 0

    posted a message on SetAttribute in combat probably?
    Hello dear lua programmers!

    I Really sorry for my English is bad and yes, i used Google Translate, but not for all text.

    I have an idea!
    I wanna to have possibility to help died character. If he and i, in touch of course. And of course when this character not in my group.

    I see realisation in addon frame that becomes visible when UNIT_DIED is happends. (Ahhhhh... Hide and Show frame in combat is a problem, and as I understand it is not solvable)

    My problem is in use of SetAttribute in combat. (When not in combat, all works as expected!) Of course code is ugly, what can i say...

    SecureHandlers and SecureTemplates very complex topic. I read about them, but I don't understand much.
    So i have only one question. How can I may to take advantage of "SecureHandlers" and "SecureTemplates" so, that SetAttribute function, can be securely executed in combat, when I click on addon frame. I used "SetAttribute" function, to set "macrotext" parameter to frame, that will be contain character name? Than, i can click on frame and take in target some character. And, within minimap i can find him.

    So my code is thomesing like that (ohh my God, and who wote that? Oh, its me...):

    FrameOfTheDeadUnit = CreateFrame("Button", "FrameOfTheDeadUnit", UIParent, "SecureActionButtonTemplate,SecureHandlerMouseUpDownTemplate")
    local fd = FrameOfTheDeadUnit
    fd:SetHeight(20)
    fd:SetWidth(150)
    fd:SetPoint("TOPLEFT", UIParent, "TOPLEFT", 200, -400)
    fd:SetAttribute("type1", "macro")
    fd:EnableMouse(true)
    fd:RegisterForClicks("AnyUp")
    fd:SetBackdrop({
    	bgFile = "Interface/Tooltips/UI-Tooltip-Background", 
    	edgeFile = "", 
    	tile = true,
    	tileSize = 32,
    	edgeSize = 16, 
    	insets = {
    		left = 0,
    		right = 0,
    		top = 0,
    		bottom = 0
    	}
    })
    --fd:Hide();
    fd.txt1 = fd.txt1 or  fd:CreateFontString( fd:GetName() .. "_txtStr1", "OVERLAY", "GameFontNormal" ) --fd.txt1:SetPoint("CENTER", fd, "CENTER", 0, 10);
    fd.txt1:SetAllPoints(fd)
    
    fd:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED");
    
    SecureHandlerWrapScript(fd, "OnClick", fd,  [[
    	if ( button == "RightButton" )
    	then
    		self:Hide();
    		print(button)
    	else
    		self:SetAttribute("macrotext", macrotxt)
    		print(button, macrotxt)
    	end
    ]])
    --[[fd:SetScript("OnMouseUp",
    	function(self, button)
    		if ( button == "RightButton" )
    		then
    			self:Hide();
    		else
    			self:Execute( [ [
    				macrotxt = self.macrotext
    			] ] )
    			
    			SecureHandlerWrapScript(self, "OnClick", self, [ [
    					self:SetAttribute("macrotext", "macrotxt")
    			] ] )
    		end
    	end
    )]]
    fd:SetScript("OnEvent",
    	function(self, ...)
    		local _,timestamp,event,hideCaster,sGuid,sName,sourceFlags,sourceFlags2,dGuid,dName,destFlags,destFlags2,spellID,spellName,spellSchool, extraSpellID, extraSpellName = ...
    		
    		if event == "UNIT_DIED"
    		then
    			local dRealm
    	
    			local dDataByGuid =  (dGuid and #dGuid > 0) and f:getDataByGuid(dGuid) or nil
    
    			if (dName and dName:find("-") and getUnitTypeByWithInGUID(dGuid) == "player")
    			then
    				dName, realm = strsplit("-", dName)
    			end
    	
    			local event = {
    				time = timestamp,
    				name = event,
    
    				target = {
    					guid = dGuid,
    					name = dName,
    					fullname = dName and (dName .. (dRealm and "-"..dRealm or '')),
    					realm = dRealm,
    					dataByGuid = dDataByGuid
    				},
    				rawData = {...}
    			}
    
    			local isDestinationIsPlayer	=	( event.target.name == self.player )
    	
    			local type = getUnitTypeByWithInGUID(dGuid)
    			if type == "player"
    			then
    				--print(event.name, self[event.name], ...)
    	
    				local target = event.target
    				local targetName = (target.dataByGuid and target.dataByGuid.hyperlinkedColoredName) and target.dataByGuid.hyperlinkedColoredName or target.name
    	
    				local texture = ""
    				print(target.dataByGuid.race.filename, FACTION_BY_RACE[target.dataByGuid.race.filename:upper()])
    				if ( FACTION_BY_RACE[target.dataByGuid.race.filename:upper()] )
    				then
    					local path = "Interface\\TARGETINGFRAME\\UI-PVP-" .. FACTION_BY_RACE[target.dataByGuid.race.filename:upper()]
    					
    					local size1 = "13"
    					local size2 = "13"
    					local xoffset = "0"
    					local yoffset = "0"
    					local dimx = "110"
    					local dimy = "110"
    					local coordx1 = "4"
    					local coordx2 = "64"
    					local coordy1 = "4"
    					local coordy2 = "64"
    					local red = ""
    					local green = ""
    					local blue = ""
    					
    					--16:16:0:0:64:64:4:60:4:60
    					
    					texture = ( "\124T%s:" .. size1 .. ":" ..size2 .. ":" ..xoffset .. ":" ..yoffset .. ":" ..dimx .. ":" ..dimy .. ":" ..coordx1 .. ":" ..coordx2 .. ":" ..coordy1 .. ":" ..coordy2 .. ":" ..red .. ":" ..green .. ":" ..blue .. "\124t" ):format( path )
    				end
    
    				self.txt1:SetText(event.target.name .. "" .. texture)
    				
    				self.macrotext = '/target ' .. event.target.name
    				--self:SetAttribute("macrotext", macrotext)
    
    				self:Execute('macrotxt = "' .. self.macrotext .. '"')
    
    				local msg = ( "%s" .. texture .. "has died." ):format( targetName, sex )
    	
    				local chatInfo = ChatTypeInfo["SYSTEM"]
    				f:addInDefaultChatFrame( msg, chatInfo )
    
    				self:Show()
    			end
    		end
    	end
    )
    
    Posted in: Lua Code Discussion
  • 0

    posted a message on Joining menu to the BuffFrame and the TargetFrame rightly
    Quote from Seerah
    Ah, no. Dridzt meant here. :) But there may be other people here that can speak Russian.

    Next time you have a question, post it both in Russian and in English. People who speak Russian can help you, and those that don't can at least try.


    Oh. Sure! Thanx!
    Posted in: Need Help?
  • 0

    posted a message on Joining menu to the BuffFrame and the TargetFrame rightly
    Sometimes I get very tired from work, and I'm not careful in reading. And I thought you are talking about another forum in my own language. Dridzt, do you speak in Russian?
    Posted in: Need Help?
  • To post a comment, please or register a new account.