Jump to content

Disable crafting with an item that has a specific name


coshnaut

Recommended Posts

sorry it took so long, i spent a whole day looking for what is known as workbench

command /gibwandything:
    permission: op
    trigger:
        give player 1 blaze rod named "&eWand of Fire"
on inventory click:
    if type of clicked inventory is crafting table inventory:
        wait 0.05 seconds
        if clicked slot contains blaze rod named "&eWand of Fire":
            send "&cNot allowed to do this!"
            close player's inventory
    if type of clicked inventory is workbench inventory:
        wait 0.05 seconds
        if clicked slot contains blaze rod named "&eWand of Fire":
            send "&cNot allowed to do this!"
            close player's inventory

Just a skripter who likes to have fun

I also think I'm pretty good at it

PS my discord is Enchanted#3933 incase idk anything?

Link to comment
Share on other sites

@Enchanted_Reeses Hey there, sorry to bother you, but do you know how i would make it so all items with lore have this restriction as well

+ It seems like the code has broken even though i havent modified it in any way

Hmm i think wasn't clear enough

Basically i'd like it so that you can't put the items in the crafting grid

To be honest i would work on it myself but i have so many other things to do with the server as well

Edited by breadels
revelation

Skript is omnipotent, Skript is everything

Link to comment
Share on other sites

yea so you can shift click the item in their which i see is the problem, and without tuske i cant really detect a shift click on an item to prevent it, so id recommend using an object such as bedrock with a name and making it unplacable, ik it looks ugly but i cant really find out how to detect on shift right click on a player's inventory item, or maybe im stupid ive been up around 19 hours so i might look back on this best of luck and sorry for the delayed response

Just a skripter who likes to have fun

I also think I'm pretty good at it

PS my discord is Enchanted#3933 incase idk anything?

Link to comment
Share on other sites

okey so i broke skript and fix i dunno just to tierd u can fix is ez just time consuming

command /gibwandything:
    permission: op
    trigger:
        give player 1 blaze rod named "&eWand of Fire"
on inventory click:
    if type of clicked inventory is crafting table inventory:
        wait 0.05 seconds
        if clicked slot contains blaze rod named "&eWand of Fire":
            send "&cNot allowed to do this!"
            close player's inventory
    if type of clicked inventory is workbench inventory:
        wait 0.05 seconds
        if clicked slot contains blaze rod named "&eWand of Fire":
            send "&cNot allowed to do this!"
            close player's inventory
on inventory click:
    if click type is left mouse button with shift:
        if event-item = blaze rod:
            cancel event
also dont name that blaze rod, or maybe u can i just cant figure outs how

Just a skripter who likes to have fun

I also think I'm pretty good at it

PS my discord is Enchanted#3933 incase idk anything?

Link to comment
Share on other sites

  • 3 weeks later...
on craft:
    loop 9 times:
        loop {blocked_items::*}:
            1 of loop-value-2 = 1 of slot loop-value-1 of player's current inventory
            cancel event
            send "&cYou cannot craft with a &4%loop-value-2%&c!"
            stop

command /blockitem:
    trigger:
        set {_item} to 1 of player's tool
        loop {blocked_item::*}:
            {_item} is loop-value:
                send "&cYou have already blocked &4%{_item}%&c from being crafted with!"
                stop
        add {_item} to {blocked_items::*}
        send "&aYou have blocked &2%{_item}%&a from being crafted with!"

command /blocklist:
    trigger:
        send "&aBlocked Items:"
        loop {blocked_items::*}:
            send " &8- &2%loop-value%"

command /resetblock:
    trigger:
        delete {blocked_items::*}
        send "&aYou have reset the blocked items list!"

 

Minecraft Ranks
[DEFAULT] - 9th October 2020
[PRO] - 21st November 2020
[PATRON] - 27th October 2021

Proficiency
Python - 8 Years
C/C++ - 5 Years
Skript - 4 Years
Javascript - 3 Year
Java - 1 Year

Links
Discord - kegnh#1234

 
Link to comment
Share on other sites

do /blockitem while holding it

Minecraft Ranks
[DEFAULT] - 9th October 2020
[PRO] - 21st November 2020
[PATRON] - 27th October 2021

Proficiency
Python - 8 Years
C/C++ - 5 Years
Skript - 4 Years
Javascript - 3 Year
Java - 1 Year

Links
Discord - kegnh#1234

 
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...