Discussion in 'OgreBot' started by quan, Jan 24, 2011.

  1. quan

    quan Active Member

    Messages:
    97
    Is it possible to set the loot options within ogrebot to loot only the collectables that the bots need?
  2. Kevinshp

    Kevinshp Well-Known Member

    Messages:
    835
    This would be cool but I would think very hard to do.
  3. Kannkor

    Kannkor Ogre

    Messages:
    3,615
    I started looking at doing just that, for L&L items etc. While I do think it's possible, I'm not sure I will work on it any time soon. It's a VERY lengthy process. I'm still out of town until Feb. Then I'm going to try to work on some xpac stuff to ensure a smooth transaction when that goes live.
  4. pr517

    pr517 Active Member

    Messages:
    118
    Collections are cake and a simple way to implement L&L items is just automatically greed known drops. You can sort out who needs what manually. Here's an example snippet. Enjoy:

    Code (Text):

    // ...
    variable(script) collection:string AllowedLoot
       // ...
       AllowedLoot:Clear
       AllowedLoot:Set[keys]
       AllowedLoot:Set[trash]
       AllowedLoot:Set[L&L stuff]
       // ...
    atom(script) EQ2_onLootWindowAppeared(string ID)
       // ...
        case Need Before Greed
            if ${LootWindow[${ID}].Item[1].IsCollectible}
            {
               if !${LootWindow[${ID}].Item[1].AlreadyCollected}
               {
                          // Need that shiny
                  LootWindow[${ID}]:SelectNeed
                          // or just greed, whatever you want
               }
               else
               {
                          // Greed that shiny
                  LootWindow[${ID}]:SelectGreed
                          // or decline, whatever you want
               }
            }
            else
            {
                       // can also check for what you want to NEED
                       // ...
               if ${AllowedLoot.Element[${LootWindow.Item[1].Name}](exists)}
               {
                          // pre-approved stuff to auto greed
                  LootWindow[${ID}]:SelectGreed
               }
                       // ...
                }
                    // ...
     
  5. Kannkor

    Kannkor Ogre

    Messages:
    3,615
    Have you tested that? I'm almost positive that won't work..
    Pretty sure .IsCollectible or .AlreadyCollected returns NULL no matter what.

    Assuming both of them do work, I know for sure AlreadyCollected is a server check (same as when you first hover your mouse, it shows needing to be collected, then changes to already collected). So that check can't be done in an atom because it wouldn't retrieve the value (since atoms are instant and there isn't time allowed for the server to update).

    I can code around this by adding a loot thread that handles all of this, but it's a lengthy process to do it right. I don't want to add some half assed method that requires xml files to be updated (because it usually means I have to keep updating them) or have all toons greeding L&L items then manually sort them out. If that's the case, I'd rather 1 toon take them all, then pass them out as I see fit.

    If you have tested that code I'll have another look at it, but I'm pretty sure it won't work correctly.
  6. pr517

    pr517 Active Member

    Messages:
    118
    It's from my own private scripts and it works perfectly. My guys either greed or need based on if they have it already.
  7. quan

    quan Active Member

    Messages:
    97
    EQ2 bot

    i know you could also set it with the eq2 bot script.... at least for collectibles.

    which is what brought it to mind ;)

Share This Page