Uselfull Token Crafting


Author: Goma
Created: 2013-10-14T17:40:25-0400
Edited: 2013-10-14T17:40:25-0400
Denizen Version: 0.9.3
Views: 8
Downloads: 829
Likes: 0


WGET
Description: This script provides basic functionality examples for item scripts with crafting recipe, crafting permissions and a right-click event.

# The simpe item script with an example recipe
"UsefullToken":
    type: item
    material: 385
    recipe:
    - air|dirt|air
    - dirt|air|dirt
    - air|dirt|air
    display name: 'Dirt Token'
    lore:
        - '<dark_red>It is made of dirt'
        - '<dark_red>and you need to'
        - '<dark_red>make it usefull'
 
# This event stops the old behaviour of item 385 wo work. If you want the new item 
# to do something on right click, you should put it here

"UsefullTokenClick":
    type: world
    events:
        On player right clicks with i@UsefullToken:
            - determine cancelled
 
# this event checks if the item is being crafted and also checks if the player is in group "Admin" to
# craft it. To use it, you should probably change the group for your server or add other requirements
        on player clicks i@NoLootDropToken in inventory:
            - if <context.slot_type> == result {
              - if <player.in_group[Admin]> == true {
                - determine fulfilled
                }
                else {
                - narrate "You can't do that."
                - determine cancelled
                }
              }




Comments
No one has posted a comment! Post one below: