• 0

    posted a message on Determine item was crafted.

    Atalanya --- If you want to take a look at the whole code of my AddOn as mentioned 2 posts above, I finally updated it to version 1.3!

     

    I added tons of comments to the code to make it easier for you to understand what's going on. Here's the link to nehFragger. Maybe that helps you a bit...

    Posted in: Lua Code Discussion
  • 0

    posted a message on nehFragger - A VERY simple kill counter

    Hi there!

     

    nehFragger is a very simple kill counter.

    It keeps track of all your kills and reputation gained from killing enemies. It then displays either your total kills, or the yet-to-be killed enemies until a faction standing increases within a small little box on the screen. It is very simple to grasp and easy to use.

     

    I'm looking forward to all your feedback and suggestions!

     

    Links to nehFragger: Curse Project Page | Known BugsLocalization

    Posted in: General AddOns
  • 0

    posted a message on Determine item was crafted.

    Hehe ... that's exactly the same situation I am struggling with for some time now with my AddOn.

     

    See my thread regarding this: Collecting related data from different WoW events

     

    But I think you could still try the same approach I took and try to use a temporary table to link these events! It might not be the best solution, but it works quite well in most situations and might even be enough in your case. Especially the second code part in my thread describes how to make sure, both events fire within a certain timeframe, just as you have asked for.

     

     

    Btw.: I refined this approach for my AddOn and added even a third event to really make sure everything works as intended. It still has one small downside regarding AoE damage, but that's just for very rare occasions and therefore is acceptable for now. I just finished it yesterday and had some good testing. Will upload the new version 1.3 today evening if another test works well ... then you can download it from curse and look through the whole code and copy what you need. Maybe that helps as well! ;)

    Posted in: Lua Code Discussion
  • 0

    posted a message on Addon settings

    I'm glad I could help you. Good luck!

    Posted in: AddOn HELP!
  • 0

    posted a message on Addon settings

    Myrroddin described in his code quite well what I meant with "In my addons I always directly alter these variables whenever they are changed." in my first post!

     

    Just use the ##SavedVariables-table directly. There's no need to first extract everything on ADDON_LOADED and then copy everything (if changed or not) back later on. Just change your "customOptions.tankCheckButton" to "ServerHopSettings.tankCheckButton" and so on. This way, whenever ServerHopSettings.tankCheckButton changes, it's already saved to the ##SavedVariables.

    Posted in: AddOn HELP!
  • 0

    posted a message on Addon settings

    If these 5 are the only variables you save on PLAYER_LOGOUT, why don't just save them every time one of them changes? Just create a function and add it to the settings themselves. That won't hurt the performance too much and you don't have to bother about the PLAYER_LOGOUT event anymore. ;)

    function updateSettings()
    	ServerHopSettings = {}
    	ServerHopSettings[1] = customOptions.tankCheckButton:GetChecked()
    	ServerHopSettings[2] = customOptions.dpsCheckButton:GetChecked()
    	ServerHopSettings[3] = customOptions.healCheckButton:GetChecked()
    	ServerHopSettings[4] = customOptions.soundCheckButton:GetChecked()
    	ServerHopSettings[5] = customOptions.endlessCheckBox:GetChecked()
    end
    Posted in: AddOn HELP!
  • 0

    posted a message on Dynamic tooltip while key pressed

    If anybody is interested in the solution I finally implemented:

     

       http://stackoverflow.com/q/40423367/7114852   

     

    Posted in: AddOn HELP!
  • 0

    posted a message on Addon settings

    I guess if the game crashes, the event "PLAYER_LOGOUT" won't fire and your variables won't get saved. But I'm not sure if that's really the case. But you could ask your users what they did or what happened just before the settings were reset.

     

    But either way, I don't think you really need events to save your data. As long as you save these variables in the .toc file (just as you do) everything is fine.

    ## SavedVariables: ServerHopFavouritesList, ServerHopSettingsGlobal
    ## SavedVariablesPerCharacter: ServerHopPosition, ServerHopSettings

     

    In my addons I always directly alter these variables whenever they are changed. That way everything gets saved on the fly without needing to take care about the ifs and whens. Maybe you give that a try?

    Posted in: AddOn HELP!
  • 0

    posted a message on What development stack do you use for creating an addon?

    Hehe, we will see how long it takes for the community to be gathered. I will stick around and see what happens. ;P

     

    I am already using as many of the native art files as possible, but to get the right graphics file paths and the like always was a PITA. I never extract the interface files till now, but will give it a try. Will definitely make things easier in many cases. Thanks for the tip!

    Posted in: Lua Code Discussion
  • 0

    posted a message on What development stack do you use for creating an addon?
    Quote from Aredna >>

    Seems there just isn't much addon discussion these days like there was in the past, unless I've just missed out on the sites. 

    I've got the same problem. I guess most questions aren't too hard to answer for someone how already did something similar, but unfortunately there aren't too many active people around here.
    ...so when you find a helpful WoW addon development related site or forum, please let me know! ;)
    Posted in: Lua Code Discussion
  • 0

    posted a message on What development stack do you use for creating an addon?

    Just as Myrroddin says: Nothing special needed here.

    Maybe something that hepls a bit with Lua, but that's it. Even the basic text editor of your OS is totally sufficient!

    Posted in: Lua Code Discussion
  • 0

    posted a message on Collecting related data from different WoW events

    I refined the above mentioned approach and even added a third event just to make it working as intended. There are still some downsides to this approach, but overall it works.

    All of this is now implemented in version 1.3 of nehFragger and can be downloaded on Curse.com.

     

    But like I said, there are still a few hickups with this. I described them as the two 'MINOR' known problems in the nehFragger Thread. Therefore I would still be glad if someone could check my initial post above. The main problem is still to accurately link these two events or somehow get all needed information within one single event to make the core of this feature work properly: "Gather gained reputation points from killing creatures only!"

     

    Posted in: AddOn HELP!
  • 0

    posted a message on Simple addon causing Fatal Error on /reload

    Hi there,

     

    maybe you give this a try:

    http://wowwiki.wikia.com/wiki/AddOn_programming_tutorial/Introduction

     

    Right now, you don't tell WoW when to say "Hello World" and where to print it. Just read the article in the link above, it'll help you with this.

    Oh, and if you want to print "Hello World" within the chat frame, use this instead:

    ChatFrame1:AddMessage("Hello World")

     

    Good luck! :)

    Posted in: AddOn HELP!
  • 0

    posted a message on Some things that could be improved in these forums...

    Thanks!

    Didn't know this forum is one of these "WoW Beta Sites". There's no 'BETA'-tag anywhere to be seen.

    Posted in: WoW Sites Feedback
  • 0

    posted a message on Dynamic tooltip while key pressed

    Hi there!

     

    I've got a tooltip and I want it to show more detailed information if the SHIFT key is pressed/held. The following code works so far:

     

    function nehFraggerFrame_OnEnter(self)
    	nehFragger_GenerateTooltip(self)
    end
    
    function nehFraggerFrame_OnLeave(self)
    	GameTooltip:Hide()
    end
    
    function nehFragger_GenerateTooltip(self)
    	GameTooltip:SetOwner(self or UIParent, "ANCHOR_LEFT")
    	GameTooltip:SetText(“nehFragger”, 0.7, 0, 1)
    	GameTooltip:AddLine(" ", 1, 1, 1)
    	if IsShiftKeyDown() then
    		-- Show some more details, if the SHIFT key is pressed.
    		GameTooltip:AddLine(“Some detailed stuff about god and the world.”, 1, 1, 1)
    		GameTooltip:AddLine(“Even more great stuff to read.”, 0.9, 0.8, 0.1, 1)
    	else
    		-- Basic information to be displayed when no button is pressed.
    		GameTooltip:AddLine(“Some basic information. Yaaay!“, 1, 1, 1)
    		GameTooltip:AddLine(" ", 1, 1, 1)
    		GameTooltip:AddLine(“Hold SHIFT for more information…”, 0.5, 0.5, 0.5)
    	end
    	GameTooltip:Show()
    end

     

    But this only works if the SHIFT key is held before the mouse hovers the nehFraggerFrame. It also will display the detailed information even after releasing SHIFT as long as the mouse cursor remains on the nehFraggerFrame. But I want it dynamic!

     

    My question here is:

    - How can I make the tooltip to refresh itself according to the SHIFT key when the mouse cursor stays on the frame?

    I have in mind something like when I hover over an item in WoW and as long as I hold SHIFT, that item will be compared with what I currently wear. I want exactly this, just within the same tooltip.

     

    I hope somebody can push me in the right direction. I have tried using MODIFIER_STATE_CHANGED but I didn't get it working.

     

     

    Oh, and while we are talking about toolips...here's a bonus question:

    - Is it possible to format them a bit? Bold, italics, fontsize, colorchanges for a single word in a line, etc. ? I didn't find anything particular here (wowprogramming.com), but maybe I overlooked it.

    Posted in: AddOn HELP!
  • To post a comment, please or register a new account.