Advertisement
70sOn7

Skript Tutorial [Commands]

Nov 21st, 2017
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.14 KB | None | 0 0
  1. # Tutorial by: 70sOn7
  2. #
  3. # This is a tutorial on how to "code" some skripts!
  4. # First we all want to know on how to make Commands. First we need to enter
  5. # the text 'command' like this
  6.  
  7. command
  8.  
  9. # Next we need to enter out command. So like this
  10.  
  11. command /chat
  12.  
  13. # Then if we want, we will enter variables if you say.
  14.  
  15. command /chat <text>
  16.  
  17. # Now we are not done with out first line of code! After all variables we need to enter :
  18. # So like this!
  19.  
  20. command /chat <text>:
  21.  
  22. # Now we can move onto our permission stuff! This will be our next to lines below our first line.
  23. # We will need to hit TAB once on both lines. On our seconds line we will enter 'permission:'
  24. # On the third line we will enter 'permission message:'
  25. # It should look like this
  26.  
  27. command /chat <text>:
  28. permission:
  29. permission message:
  30.  
  31. # Now we can fill into the right of these lines
  32. # Permission is the permission they need to access this command. And permission message
  33. # is the denial message if they dont have the correct permission
  34. # If you do not want a permission for the command. You dont have to include this part
  35. # It should look something like this
  36.  
  37. command /chat <text>:
  38. permission: server.chat
  39. permission message: &cYou do not have the required permission for this command
  40.  
  41. # Now we move on to our 4th line. This is including the text 'trigger:'
  42. # This is when the person has the permission to this command and when they run it.
  43. # this will happen. We can use different strings for this part. The 4th line also has
  44. # one TAB too. It should look something like this!
  45.  
  46. command /chat <text>:
  47. permission: server.chat
  48. permission message: &cYou do not have the required permission for this command
  49. trigger:
  50.  
  51. # That will be all for the 4th line. Now we will move on to the 5th line.
  52. # These are the strings that run. We will be using the string 'broadcast'
  53. # And no this isnt [Broadcast]. It is like tellraw.
  54. # After the string broadcast you enter your text surrounded by quotation marks.
  55. # What you want to put in the quotation marks is up to you! When you use these
  56. # strings you need to TAB two times.
  57. # Im going to show you what this looks like
  58.  
  59. command /chat <text>:
  60. permission: server.chat
  61. permission message: &cYou do not have the required permission for this command
  62. trigger:
  63. broadcast ""
  64.  
  65. # I will be filling these quotation marks in for you though.
  66. # We will be using %player% and %arg-1% First lets understand what they do
  67. # '%player%' is the player that is executing the command and %arg-1% is the
  68. # first argument or as I called them variables. In this case %arg-1% will be
  69. # <text> Now lets fill this string in!'
  70.  
  71. command /chat <text>:
  72. permission: server.chat
  73. permission message: &cYou do not have the required permission for this command
  74. trigger:
  75. broadcast "&a[CHAT] &a%player%&8: &f%arg-1%"
  76.  
  77. # Now this is the basics of a skript command. I might post other tutorials on different types of skripts
  78. # "codings" in the future if this one gets positive feed back. Now this is a basic understanding. You can
  79. # find more variables on http://en.njol.ch/projects/skript/doc
  80. # If this helped you then im glad. This is all I have for today. Bye
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement