Items in a chest

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

player2709

Member
Aug 1, 2017
10
0
0
22
Skript Version: Skript 2.3.6
Skript Author: Bensku
Minecraft Version: 1.13.2

Code (Removed Money and Gui stuff):
Code:
if {shopinv.%player%} is true:
  cancel event
  if inventory of block at {_storage} contains {_buyitem}:
   remove {_buyitem} from {_storage}'s inventory
   give {_buyitem} to player
  else:
   send "This shop is out of stock."
;)

Hello,
I'm trying to make a Player shop script and I have the problem, that the shop system can't acces the storage of the shop. A small explanation: The variable {_storage} contains the location of the storage chest from the shop and {_buyitem} is the item, that the customer wants to buy.

Errors on reload:
I don't get any errors.

My problem:
The system always says that the shop is out of stock and after I tried this version, the script gave the item to the customer, but it doesn't took the item from the storage (The storage chest was full). Do you have any ideas to fix this?

Code:
[/COLOR][/LEFT][/COLOR][/COLOR][/LEFT]
[COLOR=#007008][COLOR=rgb(44, 44, 44)][LEFT]   remove {_buyitem} from {_storage}'s inventory
   give {_buyitem} to player
;)
 
Status
Not open for further replies.