Skript Version: Skript 2.3.6
Skript Author: Bensku
Minecraft Version: 1.13.2
Code (Removed Money and Gui stuff):
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?
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
;)