Перейти к содержанию

Дайджесты за январь-февраль

Обновления гайдов и аддонов

Январь Февраль

Мониторинг серверов и редактор аддонов

Представляем вам две легенды. То, о чем можно было только мечтать, стало реальностью.

Мониторинг серверов Редактор аддонов

Подсказки из игры на вашем сайте

Теперь вы можете отображать сведения о внутриигровых элементах простым наведением курсора мыши.

Подробнее

Апдейтер аддонов

Представляем вам программу для автообновления аддонов и делимся подробностями.

Подробнее Скачать

North

Пользователь
  • Постов

    32
  • Зарегистрирован

  • Посещение

Сообщения, опубликованные North

  1. I quit playing this game and I am no longer maintaining this addon.

     

    In any case, your life is far easier by using this addon then without it. You also have search box. I wanted to make it so that it receives autofocus but found it to be quite troublesome. I think I my approach was wrong at the time. Autofocus would solve a lot of usability issues.

     

    If you need an enhancement, I can think of a couple based on your feedback. Both are to appear as a Regular button on the top that leads to a new page of entries:

    1. Configure a number of most used teleport locations. Now, every time you teleport somewhere, a counter increases for that location. The top most used locations get shown in that entry sorted alphabetically.

    2. Create a list of favorite locations and display them sorted alphabetically. This could be further enhanced by allowing the possibility of defining multiple favorite categories. I think this would satisfy almost every player.

     

    The addon isn't compiled so anyone can edit it.

  2. It is because they enhance different addons in the game. They are separate to keep them clean, both events and widgets. I moved the container from the original addon to my widget form. Those panels are displayed by the game standard addons and they keep some functionality like current location. I only replaced the relevant parts of component.

    TeleportStoneEnhancer requires TeleportEnhancer because it reuses common functionality.

  3. Thank you icreator. exObj2 is really useful.

    My problem is that I get the following error:

    Game::LuaAvatarGetArmorCraftInfo: skill Mechanics/Skills/BlacksmithV2/Blacksmith.(DiceCraftSkillResource).xdb is not armor craft, details: int __cdecl Game::LuaAvatarGetArmorCraftInfo(struct lua_State *)

    I am not able to get a list of the recipes I can craft. I've managed to get such a list for alchemy. I would like to do the same for Blacksmithing for example.

    local alchemy = avatar.GetAlchemyInfo ()
    exObj2('alchemy', alchemy);
    for i, recipe in alchemy.recipes do
     local recipeInfo = avatar.GetRecipeInfo (recipe)
     exObj2('recipe', recipeInfo);
    end
    

  4. I don't know what you want to say. It is a function I use to see what information I get.

    function researchObj(tab,obj)
       tab = tab .. "    "
       --- limit the recursion
       if string.len (tab) > 50 then
        LogInfo ("Recursion is limited!")
        return
       end
       local metaTable = getmetatable (obj)
       if metaTable then
        ---- Show the function of the object
        for k,v in pairs( metaTable ) do
    	    LogInfo ( tab, k,":=",v)
        end
       end
       if type(obj) == "table" then
        ---- Show the fields (variables) of the table
        if GetTableSize( obj ) == 0
    	    then LogInfo ( tab, "{}")
    	    return
    	    end
        for k,v in pairs(obj) do
    	    LogInfo ( tab, k,":=",v,  "{", type (v), "}")
    	    if type (v) == "table" and k ~= "__index"  and k ~= "_G" then
    		    --- "__index" - It is exactly the same table is a nested loop that leads to
    		    researchObj(tab,v)
    	    end
        end
       else
        LogInfo ( tab, "_:=",obj, "{", type (obj), "}")
       end
    end
    

  5. I want to get the data for the items I can craft. It would be great if anybody can help me. This is what I tried (besides many other calls). I think avatar.GetArmorCraftInfo is the function to use but I don't know how to get that skillId.

    local skills = avatar.GetSkills ()
    for i = 0, GetTableSize (skills) - 1 do
     local skillInfo = avatar.GetSkillInfo (skills [i])
     if skillInfo then
      LogInfo (skillInfo.name)
      local armorCraft = avatar.GetArmorCraftInfo (skillInfo.id)
      if armorCraft and armorCraft.active then
       local recipesList = armorCraft.recipes
       researchObj('', recipesList);
      end
     end
    end
    

    Any help will be greatly appreciated

  6. The protected widgets most likely means that TeleportEnhancer won't work anymore. On EU we're not on 3.0.05 yet. I really hope my addon won't be broken. If it is... they should get the fuck off their asses and included it as an official addon. I've been dead tired of asking to fix that stupid localization.

    On the other note, if it means what I think it means, they could shove their API up their ass because one will lose very important addons, that make life easier in the game and don't really provide a competitive edge.

    I apologize for the language.

  7. To be able to get all the mail data, you need the standard mail addon opened and a mail opened too. So far I managed to get all the data for all mails on all mail pages (including the items in a mail). You compiling the AutoDeleteMail wasn't helpful. In fact, I don't even know why people precompile their addons.

    I'm back to writing my little mail addon (mostly utility for tasks I don't want to do manually).

  8. If you are interested in reactions and such, all strings in a luac file can be read (open using noteapad++ for example). Extract LuaCompiledIngame.pak using WinZip and opend the file you are interested in. There is one thing you must keep in mind. Only widgets that are part of your form send reactions to your addon. What is useful in knowing the reactions is that you can move the panel to your form and rewrite all the functionality. You will only have the GUI.

    I am using wtScrollableContainer:RemoveItems() to clear the container. As you can see, all other buttons are pushed after I've done my addition. The ContextNpcAddon sends an event when selecting the teleport option:

    Code:
    common.SendEvent( "SCRIPT_TOGGLE_TELEPORT", {} )

    The original addon uses this event to add the buttons to the ScrollableContainer. Unfortunatly, it seems I don't get this event in my addon.

    I know about using Widget:Show(false). I do use it in my addon. There is a problem though, namely, I don't have access to those buttons because they are not named resources. This is why I had to add my button.

    LE: You can look in the sources of my addon. I think it is quite clean apart from some test code in init.lua; you will also see how you can use closures to your advantage. The best example is the cachedButtonList. It encapsulates all the behavior in one place. You have an object with state and functions that modify that state when called.

    LLE: I want to align the text on my buttons to the left. Can anyone please help me with that? It doesn't seem to work for me.

  9. Yes. I did think about it. Portal Keepers are used more often though. That's why I did that first.

    It shouldn't be difficult to add this to the HearthStone too. The problem is I'll have to rewrite everthing for it (I will reuse the code I wrote until now but there are changes that need to be done). I want to center it and make sure there aren't issues when loading it before going over to HearthStone. After I've done that I will upload it as an addon.

    If there is one thing that I don't like is that I can't catch the event when the Panel is opened (even if I know it's name).

  10. The addon enters beta.

    Beta2 (if there is only one location on a certain map, the button will teleport to it instead of opening a list of locations)

    http://www.fileshare.ro/64852174498

    I know there are quirks to fix but it's an improvement. Feedback is welcome.

    Stuff to fix if anyone can help:

    • Center the widget

    Align button text: left

    LE: If the teleport panel doesn't appear, unload my addon, unload and then loac the ContextNpcTeleport standard addon. After that load my addon again (TeleportSort).

  11. I moved the NpcTeleportPanel to my form and now I get the reactions and everything look fine. If I'm not mistaken, you only get reactions from children of your form.

    Setras was ahead of me to predict the trouble catching the moment when the Teleport Panel is opened. In the old lua files, the NPC would send an event when the user clicked teleport:

    Code:
    common.SendEvent( "SCRIPT_TOGGLE_TELEPORT", {} )

    I don't know if this is still the case. I would need to extract the files from LuaCompiledIngame.pak and LuaCompiledSystem.pak .I know that the files are luac (compiled) but the strings and the function names can easily be read. This way I can see what events the game generates. This would be cleaner then checking in any other way.

    LE: I found that WinZip can decompress them. I'm on a roll here.

    LLE: I looked over the luac files and it seems they register a handler for the "SCRIPT_TOGGLE_TELEPORT" event. It seems I can't handle it. Can anyone of you check to see if it's just me?

  12. I know about that documentation but the last time I looked there weren't any xdb files in there. There are some sample widgets and sample common. That is where I took the button from and modified it to have align_both for X direction. I'll look over them again to see if there are more details on this.

    This is what I used to add a button. Also, I created buttons dynamically for each Zone.

    Code:
    wtScrollableContainer:PushBack (wtButton) 

    I used stateMainForm to get my button too. I'll try using mainForm.

    I did add the buttons to the ScrollableContainer from the standard addon. It is just that the function I wrote to run on click didn't run.

    PS: I think I found the problem. I used the mainForm of the standards addon to create the buttons. I'll use the mainForm of my widget. I think this will solve the issue. I'll post here how it goes.

  13. I imagined the reason why the reactions aren't sent to my addon is because I added my buttons to another form. I am used to functional programming, mainly JavaScript, and I was expecting the same type of flexibility.

    I don't know what you mean by copying the buttons. For one, as you know, we only have access to a very old version of that addon, and only the lua files for it. If you have the xdb files defining the gui elements could you please give me a link to them or tell me how I can get to them?

    Also, having a copy of those buttons isn't going to help me handle the reactions unless I replicate the panel. Replicating the panel doesn't help if I'm not mistaken. There needs to be interaction with a teleportNPC to be able to teleport (this claim isn't tested). Also, I would need to hide the original addon (easy part) and show mine when the teleport option is selected. This is the difficult part. I couldn't find events related to the Teleport Widget.

    I am starting to think that it is impossible to do what I want.

    The best I can think of is set the same reaction on click for my buttons and keep the name for each location button. This is how they seemed to keep their data. I think this is what you meant by copying their buttons. This is a poor replacement for what I had in mind in terms of usability. Also, I can't really get the actual buttons from the list because they are not named resources. So I don't have access to their name or label. The best I could do is guess what the order is. This means you could get scenarios when you click to teleport to a location and wake up to be in a totally different place.

    Thank you for your answer.

×
×
  • Создать...

Важная информация

Пользуясь сайтом, вы принимаете Условия использования