+ Reply to Thread
Results 1 to 3 of 3
Like Tree1Likes
  • 1 Post By Naifu

Thread: Zone IDs

  1. #1
    Rift Disciple Adansonia's Avatar
    Join Date
    Jan 2011
    Posts
    153

    Default Looting an Artifact

    Is there an event associated with looting and artifact(node)?
    Can I obtain info on this artifact?

    Say I've collected and artifact, can I determine if it was epic, rare, etc.?
    Last edited by Adansonia; 06-17-2016 at 04:08 PM.
    Dimensions on NA: Shoreward spa @ Faeblight

    Dimensions on EU: ENIGMA - the Spa @ Zaviel
    Marcienn's Magic Mansion @ Zaviel

  2. #2
    Champion
    Join Date
    Jun 2011
    Posts
    561

    Red face

    Take a look at how I implemented it into nkCartographer.

    You can monitor the 'world item interaction' ability through the cast bar. So you know that the player is doing something (like picking up an artifact)

    Here's how I do it in the nkCartographer addon:

    if info[data.playerUID] then
    local details = Inspect.Unit.Castbar(data.playerUID)
    if details and details.abilityNew == "A0000002B72E024A4" then
    data.collectStart = Inspect.Time.Real()
    end
    end
    If you use my EnKai library you can add an event like this:

    EnKai.inventory.init()

    Command.Event.Attach(EnKai.events["EnKai.InventoryManager"].Update, function (_, thisData)
    if data.collectStart and Inspect.Time.Real() - data.collectStart < 2 then
    _internal.CollectArtifact(thisData)
    data.collectStart = nil
    end
    end, "nkCartographer.EnKai.InventoryManager.Update" )
    Then you finally can work with the artifact:

    function _internal.CollectArtifact(itemData)
    for key, _ in pairs (itemData) do
    local details = Inspect.Item.Detail(key)

    --dump(details)

    if details and string.find(details.category, "artifact") == 1 then
    ...
    end
    end
    end
    Basically what you'd do is monitor the cast bar, then check for inventory slot changes within a specific time frame (the item dropping into the bag after collecting) and then checking that item if it is an artifact.

    Hope this helps

    Cheers
    N.

  3. #3
    Rift Disciple Adansonia's Avatar
    Join Date
    Jan 2011
    Posts
    153

    Default

    Thank you very much
    Dimensions on NA: Shoreward spa @ Faeblight

    Dimensions on EU: ENIGMA - the Spa @ Zaviel
    Marcienn's Magic Mansion @ Zaviel

+ Reply to Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts