TheMangoCrew Posted November 15, 2020 Share Posted November 15, 2020 So... I don't know how to skript. This idea is pretty much what people have on the minehut server dangerzone, but if you haven't heard of it, i'll explain what I want to make (but can't). I want to make a thing where you press a specific type of button (material of button) with for example a glass pane named smt. You have multiple levels of keycards (lets say 1-5) if you use a level 3 keycard on a level 3 reader, the iron door opens. If you use a lower level, it doesn't. If you use a higher level, it still opens. How do you do that? Link to comment Share on other sites More sharing options...
AgentGamerPro Posted November 15, 2020 Share Posted November 15, 2020 * = Untested, and unsure if the skript works For what i'm thinking of, I would create a command that adds the block the player is facing to a list. Here's a rough* example: command /setlock <integer>: permission: skript.setcard trigger: if arg-1 is not set: send "&cSet The Keycard! (1-5)" to player else if arg-1 is "1": add player's targeted block to {Block1::*} send "&aSuccess!" to player else if arg-1 is "2": add player's targeted block to {Block2::*} send "&aSuccess!" to player else if arg-1 is "3": add player's targeted block to {Block3::*} send "&aSuccess!" to player else if arg-1 is "4": add player's targeted block to {Block4::*} send "&aSuccess!" to player else if arg-1 is "5": add player's targeted block to {Block5::*} send "&aSuccess!" to player else: send "&cYou must set the argument from 1 to 5, and must be a number!" to player Now im not sure how to make it open a door, so thats gonna rely on someone else. The next skript finds the player's held item and finds out if it's the right keycard. Here is another rough* example: on right-click: if player's held item is paper named "&cKeycard &7- &4Rank 1": if {Block1::*} contains player's targeted block: # Don't know how to make a door open here so :/ else if player's held item is paper named "&cKeycard &7-" &4Rank 1": if {Block1::*} contains player's targeted block: # Don't know how to make a door open here so :/ else if {Block2::*} contains player's targeted block: # Don't know how to make a door open here so :/ # Repeat the steps here. You should be able to see the pattern, and im to lazy to make the whole thing Lifestealed | Minecraft Servers OG [VIP] 12/26/20 - 10/27/2021 OG [PRO] 12/27/21 - 11/18/2022 OG [LEGEND] 11/18/2022 - 3/14/2023 [DEFAULT] 3/14/2023 - Present Link to comment Share on other sites More sharing options...
TheMangoCrew Posted November 17, 2020 Author Share Posted November 17, 2020 so, 1st thing... When I just copy-pasted it skript reload it gave me 19 errors jesus christ at least 8 of them was that you put 3 spaces and 1 tab on each "else if" and the "if" in the first one. You need 2 tabs there. I fixed those... There were also problems with some "number cant be integer" or smt idk i'll look into it i guess... Link to comment Share on other sites More sharing options...
TheMangoCrew Posted November 17, 2020 Author Share Posted November 17, 2020 On 11/15/2020 at 10:04 PM, AgentGamerPro said: * = Untested, and unsure if the skript works For what i'm thinking of, I would create a command that adds the block the player is facing to a list. Here's a rough* example: command /setlock <integer>: permission: skript.setcard trigger: if arg-1 is not set: send "&cSet The Keycard! (1-5)" to player else if arg-1 is "1": add player's targeted block to {Block1::*} send "&aSuccess!" to player else if arg-1 is "2": add player's targeted block to {Block2::*} send "&aSuccess!" to player else if arg-1 is "3": add player's targeted block to {Block3::*} send "&aSuccess!" to player else if arg-1 is "4": add player's targeted block to {Block4::*} send "&aSuccess!" to player else if arg-1 is "5": add player's targeted block to {Block5::*} send "&aSuccess!" to player else: send "&cYou must set the argument from 1 to 5, and must be a number!" to player Now im not sure how to make it open a door, so thats gonna rely on someone else. The next skript finds the player's held item and finds out if it's the right keycard. Here is another rough* example: on right-click: if player's held item is paper named "&cKeycard &7- &4Rank 1": if {Block1::*} contains player's targeted block: # Don't know how to make a door open here so :/ else if player's held item is paper named "&cKeycard &7-" &4Rank 1": if {Block1::*} contains player's targeted block: # Don't know how to make a door open here so :/ else if {Block2::*} contains player's targeted block: # Don't know how to make a door open here so :/ # Repeat the steps here. You should be able to see the pattern, and im to lazy to make the whole thing so, 1st thing... When I just copy-pasted it skript reload it gave me 19 errors jesus christ at least 8 of them was that you put 3 spaces and 1 tab on each "else if" and the "if" in the first one. You need 2 tabs there. I fixed those... There were also problems with some "number cant be integer" or smt idk i'll look into it i guess... Link to comment Share on other sites More sharing options...
CoolProgrammer Posted November 22, 2020 Share Posted November 22, 2020 On 11/17/2020 at 11:47 PM, TheMangoCrew said: so, 1st thing... When I just copy-pasted it skript reload it gave me 19 errors jesus christ at least 8 of them was that you put 3 spaces and 1 tab on each "else if" and the "if" in the first one. You need 2 tabs there. I fixed those... There were also problems with some "number cant be integer" or smt idk i'll look into it i guess... They clearly mentioned that it's untested and might have many bugs. They also tried their best to provide you the Skript with your needs for free. Hello there! If you're reading this, hope you're having a wonderful day! Feel free to contact me via Discord (CoolProgrammer#1920) for any help. My DMs are always open for help. You can also message via. forum messages for help. Also, don't hesitate to leave a like on my post if I helped you in any way. Link to comment Share on other sites More sharing options...
TheMangoCrew Posted November 24, 2020 Author Share Posted November 24, 2020 On 11/22/2020 at 8:11 AM, CoolProgrammer said: They clearly mentioned that it's untested and might have many bugs. They also tried their best to provide you the Skript with your needs for free. I know, I do not have any issues with it, and I completely agree. I just wanted to highlight some info for the creator of the skript, and thanking him for doing this. You don't have to understand this in a bad way. I'm not trying to get into an agruement here, but do you mind just being a bit more chill and friendly? I read the stuff he wrote, I am just noting things. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now