MMOMinion

Full Version: Specifying Number of Items to be Gathered?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I’m attempting to create a mission-based, user-configurable gathering profile, where I’m placing every gatherable (botany & mining) item in an excel spreadsheet. When complete I’ll be able to rapidly generate a filterable form via MS Word in correct LUA scripting format.

Important to this little exercise is the ability to specify the quantity of each item to be collected. I presume the correct form is as follows (Where “NNNN” represents the Item.ID.):

Code:
            ["condition"] = {
                ["ItemCount(NNNN) < 20"] = true;
            };
            ["complete"] = {
                ["ItemCount(NNNN) <= 20"] = false;
            };

If this is incorrect, could anyone recommend a means of specifying ItemCount which does not point to a specific inventory slot.

Thank you in advance!
That has the chance it will freeze at 20.

It wont have less than 20 so isnt valid but has 20 so cant complete....

< 20 = false or >= 20 = true

What do you mean mossion based?
Thank you so much, Sebbs!

Mission-based may be somewhat misleading. I'm trying to create an all-purpose profile, where I can use a spreadsheet to select different items to be gathered -- for instance, fulfillment of ALL the level 1-5 crafting materials in one go. It would also be useful in gathering shards in a less conspicuous way, or in satisfying the daily GC provisioning quests. I can tick off items on a spreadsheet and generate a perfect LUA profile in under a minute using this process.

I did something similar to this years ago in a completely unrelated application (Y2K testing for a major telecom), only then I was using MS Access, which would be more elegant, but a bit of overkill for this project.
Yes but in this case the complete isnt required.

If it checks the condition and isnt met it wont start the task and skip over it.

Complete conditions like that are mostly for buying items from a vendor etc.
Thank you again, Sebbs.

What argument would be suitable for specifying an approximate number of items to be gathered?

For instance, I want to gather 10 (or a few more) items for the daily GC quest. I know I must use Item.ID so I can specify HQ items.

NVM, misread your last. If I understand you correctly, this is all I need:

["condition"] = {
["ItemCount(NNNN) < 10"] = true;
};

Well, heck, that can't be right either. Keep in mind I may have many resources in the profile for gathering and I want the bot to move on to the next item or node once the desired quantity is achieved.
Yes thats correct.
Also hq item id is different than normal

Xivdb has all the ids if you dont want to gather all the items before making the list
You're my hero, Sebbs :) You'll remember some weeks ago I asked how to determine HQ IDs -- this project has been churning in my age-afflicted mind for some time.

And, yes, I found that db a while back or I wouldn't have even entertained doing this.
Just be aware

Pre hw hq itwms
+100 itemid. (1005693)
Hw
+101 itemid. (1015693)

At least the gathering items i have used so far
This is a fragment of the Excel sheet. (Spreadsheet aligns poorly in this example.)

Code:
TASK    TYPE    RADIUS    ITEM1    ITEM2    MINLEVEL    MAPID    POS_X    POS_Y    POS_Z    NORMALPRIORITY    USESTEALTH    GATHERMAPS    SKILLPROFILE    ITEMID    COUNT
1    botany    150    Maple Log    Maple Branch    1    154    78.23959351    4.323957443    -196.3209229    true    true    false    Botanist    5380    95
2    botany    150    Maple Branch    Maple Log    1    154    78.23959351    4.323957443    -196.3209229    true    true    true    Botanist    5396    5

This is the MS Word LUA template

Code:
        [«TASK»] = {
            ["type"] = "«TYPE»";
            ["radius"] = «RADIUS»;
            ["item1"] = "«ITEM1»";
            ["item2"] = "«ITEM2»";    
            ["minlevel"] = «MINLEVEL»;
            ["mapid"] = «MAPID»;
            ["pos"] =  {
                ["x"] = «POS_X»;
                ["y"] = «POS_Y»;     
                ["z"] = «POS_Z»;
            };
            ["normalpriority"] = «NORMALPRIORITY»;
            ["usestealth"] = «USESTEALTH»;
            ["gathermaps"] = «GATHERMAPS»;
            ["skillprofile"] = "«SKILLPROFILE»";
            ["condition"] = {
                ["ItemCount(«ITEMID») < «COUNT»"] = true;
            };
            ["complete"] = {
                ["ItemCount(«ITEMID») >= «COUNT»"] = false;
            };
        };

And this is the actual LUA output (minus the opening and ending lines which I'll add to an output form).

Code:
        [1] = {
            ["type"] = "botany";
            ["radius"] = 150;
            ["item1"] = "Maple Log";
            ["item2"] = "Maple Branch";    
            ["minlevel"] = 1;
            ["mapid"] = 154;
            ["pos"] =  {
                ["x"] = 78.23959350586;
                ["y"] = 4.3239574432373002;     
                ["z"] = -196.32092285156;
            };
            ["normalpriority"] = true;
            ["usestealth"] = true;
            ["gathermaps"] = false;
            ["skillprofile"] = "Botanist";
            ["condition"] = {
                ["ItemCount(5380) < 95"] = true;
            };
            ["complete"] = {
                ["ItemCount(5380) >= 95"] = false;
            };
        };
        [2] = {
            ["type"] = "botany";
            ["radius"] = 150;
            ["item1"] = "Maple Branch";
            ["item2"] = "Maple Log";    
            ["minlevel"] = 1;
            ["mapid"] = 154;
            ["pos"] =  {
                ["x"] = 78.23959350586;
                ["y"] = 4.3239574432373002;     
                ["z"] = -196.32092285156;
            };
            ["normalpriority"] = true;
            ["usestealth"] = true;
            ["gathermaps"] = true;
            ["skillprofile"] = "Botanist";
            ["condition"] = {
                ["ItemCount(5396) < 5"] = true;
            };
            ["complete"] = {
                ["ItemCount(5396) >= 5"] = false;
            };
        };

Totally selectable, filterable, and all modifications are done on the spreadsheet, not in the LUA script. Will be a bit of effort to complete the spreadsheet, but considering gatherers on multiple accounts I think it will be well worth the effort. When complete I'll start working on all the unspoiled nodes, which should go much more quickly.
I would make a seperate table for skill profiles so it is changeable or a dropdown selection in the spreadsheet.

Botanist ignored etc make sure there is an "isignored" setting somewhere or people will have issues with skillsettings at somepoint.

Complete isnt required as discussed.. and the complete should be = true in that format.

Rest looks good.
Pages: 1 2