Tutorials/Use a map item as a scroll

In his recent videos, Sethbling uses a map as a scroll to perform commands (summon creatures, teleport). He has an empty map in his inventory and when he uses it, it becomes a filled map which immediately disappears and a redstone task is done. In this tutorial I will show you how to build a redstone mechanism to detect the use of a map as a scroll and perform a task (give an effect, open a door,...).

Pros

 * Fast redstone interaction.
 * Compact system.
 * At-will triggered system, just right-click to activate it.
 * Single use : the map disappears during the inventory check, but you can give it back through a /give command

Cons

 * There can only be one purpose for the scroll. I.E. you cannot do a scroll of teleporting and a scroll of strength.
 * You may see the map animation when activating the map before it gets deleted.
 * You cannot use the map item during your playthrough (showing a text message, a path, a drawing,...).

The initial item
You can change the display name of an item to give the player a better understanding of the object and use the tooltip display. Use the following command to give the player a custom named map : /give map 1 0 {display:{Name:"",Lore:[" "]}}
 * player : the player you want to reach (@p, @a[arguments],...).
 * displayName : the name displayed when you scroll in the hotbar or when you hover the item with your mouse.
 * tooltip : the text below the item name when you hover it.

Detecting the activation of the map
Build the following mechanism :



/clear filled_map
 * The two hoppers form a redstone clock. You can use other clocks shown here.
 * The Command block 1 contains the /give command described in the section above. It can be dismissed if you don't want the scroll to come back after being activated.
 * The Command block 2 contains the inventory check command :
 * The Command block 3 is the output in case of success. You can do whatever you want : give an effect to the player, teleport him somewhere,... You can also wire this output to a door, a piston,...

Going further
The /clear command can check for other interactive items : /clear fishing_rod 2
 * check for a glass_bottle if the player just drank a potion.
 * Sethbling also uses a fishing rod but it works when the line is reeled in. The /clear syntax involves another argument which I don't understand, probably the damage value (feel free to edit) :