Scripting Resources & Utilities > Stealth Snippets\Library

Python item counter, for backpack

(1/2) > >>

JlM:
I have a def that will work if I reach a certain weight. I'm needing one for item count in my backpack. Can someone shoot me in the direction of a example or some documentation. Any help would be appreciated.

ZeroDX:
here you are
CountEx
Count

JlM:
Thank you for the response.

To be more descriptive. I need to know when I'm close to over item count ie 120 items in my backpack. I have the ability to do it based on weight, but with certain items I will not be over weight but reach the item limit.
Post Merge: December 19, 2018, 09:25:56 AMFor instance a bod book. Full of bods

ZeroDX:

--- Code: Python ---LIMIT = 120 if Count(-1) > LIMIT:    pass  # items quantity in a backpack more than 120 

JlM:
LIMIT = 100

if Count(-1) > LIMIT:
  pass
  print("Overweight")


It prints a blank with no words when i hit play and have more or less than 100 items in bag.

Navigation

[0] Message Index

[#] Next page

Go to full version