Author Topic: [Scripts] inventory stock checker  (Read 166 times)

0 Members and 1 Guest are viewing this topic.

.ok

  • Supreme Member
  • *****
  • Posts: 2211
  • Awards Site art contributions/TPs in-game/Contest winners 4 years on site+1000 posts Members who have unlocked the robotic avatar Donated a giveaway prize. (Must be a prize of cash value.) 3 years on site+600 posts 2 years on site+300 posts Week 1 members w/25+ posts (4/13/13-4/20/13) 1 year on site+100 posts
    • View Profile
    • Awards
[Scripts] inventory stock checker
« on: December 14, 2016, 06:34:17 AM »
so i made a pretty cool script system that can tell if you're low on a item,or if its out



Beginning script



part 2


part 3


end/exit script


so the way this script works, is this:

part one is actually tied onto a menu box, but the menu box is just dialogue asking you if you want to check the block or inventory.part one opens up the block, or for my situation, a chest, and then activates the 2nd script as well

part 2 is the 1st script.it checks to see if you're out of that item, to where it says you need to stock up on some more food.if it comes up as false, then part 3 is activated

part 3 activates if there's food in the inventory.For this situation, if you have less than 5 of the raw duck meat then after you take some out, if some is leftover, then a message pops up saying that you should probably stock up soon

Part for is the end script, to where for this situation, once you exit the zone, the final script activates and closes off the 2nd and 3rd script, completing it

the settings  for the amount of stock or the wait times can be adjusted to whatever you want, and it could probably be expanded to multiple items, where if anyone wants that made, then i could try messing around with it later on....just this works pretty good for 1 item

Edit:add another wait [1000] on both the 2nd and 3rd script at the begining for better acuracy