Results 1 to 5 of 5

Thread: Doubt about itemcount()

  1. #1
    Premium User Norkk's Avatar
    Join Date
    Jan 2013
    Location
    BH - MG - Brazil
    Posts
    1,167
    Mentioned
    78 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    207 Post(s)
    Reputation
    135
    Rep Power
    7

    Doubt about itemcount()

    Itemcount('mana potion') for example, only work if my bp that contains this potions be opened? If yes, there is another function, that me returns if i have potions yet, don't matter if the bp that contain this potions, are opened?

  2. #2
    Normal User nemiks's Avatar
    Join Date
    Aug 2012
    Posts
    225
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    17
    Rep Power
    5
    servercountitem(string item) - Returns the count of item with name/id as seen in the latest 'Using one of itemname...' message. It's called a server count because the server is counting the items for you while they don't have to be visible.

    Example.

    PHP Code:
    if servercountitem("mana potion") <= 40 then
    playsound
    ("alert.wav")
    end 

  3. #3
    zami84's Avatar
    Join Date
    May 2012
    Posts
    316
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    1 Post(s)
    Reputation
    48
    Rep Power
    5
    Quote Originally Posted by nemiks View Post
    servercountitem(string item) - Returns the count of item with name/id as seen in the latest 'Using one of itemname...' message. It's called a server count because the server is counting the items for you while they don't have to be visible.

    Example.

    PHP Code:
    if servercountitem("mana potion") <= 40 then
    playsound
    ("alert.wav")
    end 
    But that does not work with ammunition. True?

  4. #4
    Normal User
    Join Date
    Jun 2012
    Location
    Sweden
    Posts
    1,671
    Mentioned
    18 Post(s)
    Tagged
    1 Thread(s)
    Quoted
    8 Post(s)
    Reputation
    132
    Rep Power
    9
    That's correct, unless you make an action to "use" the ammunition every once in a while.

  5. #5
    Premium User Norkk's Avatar
    Join Date
    Jan 2013
    Location
    BH - MG - Brazil
    Posts
    1,167
    Mentioned
    78 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    207 Post(s)
    Reputation
    135
    Rep Power
    7
    That works for my case, i'm appreciate, thankz!

Posting Permissions

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