Signup Now
Results 1 to 1 of 1
  1. #1
    Free User
    Join Date
    Jan 2014
    Posts
    11
    Reputation
    10
    Rep Power
    0

    (Action) Check if .count < .uptocount for each supply item.

    Guys, can you see anything wrong in this action?

    Code:
    foreach supplyitem s do
    	if itemcount(s.id, getlootingdestination(main)) < s.uptocount then
    		gotolabel('Go Supply')
    	end
    end
    
    if islocation(5) then
    	gotolabel('Supplies end')
    end
    It should check if the amount of Health Potions and Mana Potions (both are Category 's') is below the amount to buy. If it is, then the script will Resupply. If it's not, then it will skip the resupply.
    However, it keeps skiping the resupply, even if it has less supplies than it needs.

    I've tried two different versions too. One with "Else" and another one with "elseif" (to include the 'Is Location' condition).
    Do you guys know what could be wrong with this action?
    Last edited by Psycho Ray; 07-27-2015 at 05:34 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
  •