Signup Now
Results 1 to 3 of 3
  1. #1
    Free User Jesusz0r's Avatar
    Join Date
    Dec 2013
    Location
    Spain
    Posts
    278
    Reputation
    70
    Rep Power
    21

    How to get all items from a looting category?

    As the title say, how do i get all items in a category?
    I want to count how many items i have from each category

  2. #2
    Administrator Lucas Terra's Avatar
    Join Date
    Dec 2013
    Location
    Brazil
    Posts
    2,202
    Reputation
    141
    Rep Power
    10
    Lets say you want all the items from category 'a', you do:

    foreach lootingitem i 'a' do
    print(i.name, i.destination)
    end


    Now you want all the items from category 'a' and category 'b', you do:

    foreach lootingitem i 'ab' do
    print(i.name, i.destination)
    end



    Easy, huh?

  3. #3
    Free User Jesusz0r's Avatar
    Join Date
    Dec 2013
    Location
    Spain
    Posts
    278
    Reputation
    70
    Rep Power
    21
    I'm not sure if that will count how many items of each catergory i have on my backpack

    I tried something like
    Code:
    foreach lootingitem i 'sn' do
       if itemcount(i.name) > 0 then
            say('>')
        end
    end
    This works but count 1 by 1
    Is there anyway to add it to a table and then count all items from that table?
    Last edited by Jesusz0r; 03-31-2014 at 02:07 PM.

 

 

Posting Permissions

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