Ability to trade items with NPCs
In quest based learning we often need to give specific items/blocks depending on the items/blocks a player has. For example we might want to have a player collect a book from a library before we give them a pick axe to clear a pathway. With NPCs we can trigger a /give command but not a /take type command. A merging of the villager trading system (with options to customize the trades) into the NPC interface would be very useful. A successful trade could them trigger a command as an additional. An attempt to trade an incorrect item could also trigger a different command. Success/failure depending on the outcome of the trade could be used as an assessment tool.
-
Looks like there's been some great work done to make economics enjoyable for students to learn in MEE. If you're willing to share your worlds, I'm sure there's many teachers like myself who would be very happy to use them with students.
0 -
This is really amazing, especially given the lack of mods in EE. Yes, I'd like to be a beta tester!
0 -
I would like to test this also.
0 -
How to return items back to Player Inventory when he has "no money"? I've spent some time to solve this.
We can use command blocks For/While Loops, same as in this video https://youtu.be/9yX7mhgIhs0
In LOOP we clear Emeralds or something else from Player's inventiry and count this in scorebpard variable
Finaly if Player has small amount of "money" we start second LOOP and give Emeralds back one-by-one
This is flat world with simple solution
https://drive.google.com/open?id=17KMo2R3zXvNrRotWY28sY7up961O6Sab
0 -
Hello. I don't tested the 50+ transaction at the same time. I think the best way - clone "LOOP" for every NPS
About "moneyback" - the best and super quick way to do this - use functions. We can test "Score" with moneyback and make list of commands from 32768 (maximum items in give command). If we store coins in scoreboard "moneyback":
give @s[scores={moneyback=32768..}] emerald 32768 0
scoreboard players remove @s[scores={moneyback=32768..}] moneyback 32768give @s[scores={moneyback=16384..}] emerald 16384 0
scoreboard players remove @s[scores={moneyback=16384..}] moneyback 16384https://drive.google.com/open?id=1BRq0WEkpXTJMcXMxLZFuu6-G9t7iyKVu
Using: import resource pack attached, declare scoreboard moneyback and set some value
and in command block run /execute @p[x=5,y=4,z=5,r=3] ~ ~ ~ function moneyback
:) offcource specify Your x,y,z in selector
0 -
Perhaps what is missing is a command to know what is in the player's inventory? I can't remember at the moment, but it seems to me that it is hard to test whether or not a player has something or not.
0 -
yaa
0
Please sign in to leave a comment.
Comments
37 comments