Author Topic:  idea for a script  (Read 196 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
idea for a script
« on: December 14, 2016, 04:07:53 AM »
currently,i don't know if there's any way to detect movement from one inventory to another that easily without a bunch of complicated steps,and/or a bunch of queries.It would be pretty cool if we had something that would detect when something was moved from say a chest,to the player's inventory
for example:
i have a script to where i want to set it up,where it detects whether or not a chest has a certain item,or for my case,raw duck meat.i have it set up to where its supposed to have 2 outcomes...the 1st one,being if its out,that a message would pop up saying that you have no stock.

I wanted to have it setup to where either when you took something out of the chest,and/or the item became low,that a message would pop up telling the player that they should stock up soon....but for some reason outcome 2 seems really difficult for the game to do being i can't figure out a simple way of detecting movement instantly or easily.If there was a script or query that helped with this,then it would be really helpful




Craig

  • Developer
  • Extreme Member
  • ******
  • Posts: 6501
  • Dig Deep
  • Awards Developer 4 years on site+1000 posts 3 years on site+600 posts 2 years on site+300 posts Was in the top 10 of the forum stats page as of 4/12/15 Members who have unlocked the robotic avatar 1 year on site+100 posts Day 1 w/25+ posts (4/12/13)
    • View Profile
    • Twitter
    • Awards
Re: idea for a script
« Reply #1 on: December 14, 2016, 05:24:42 AM »
One option:

if
  HasInventory [x,y,z] [rawduckmeat] [<] [10]
then
  notify [Need to stock up]
  loop [20000]
endif
loop [10000]