ProfesseurCraft

Code d'exemple du plugin Skript

Feb 27th, 2014
1,311
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.02 KB | None | 0 0
  1. #-------------------------------------------------------
  2. # Ecrire en couleur sur les panneaux
  3. #-------------------------------------------------------
  4. on sign change:
  5. replace "$" in line 1 with "§"
  6. replace "$" in line 2 with "§"
  7. replace "$" in line 3 with "§"
  8. replace "$" in line 4 with "§"
  9.  
  10. #-------------------------------------------------------
  11. # Faire nager les chevaux
  12. #-------------------------------------------------------
  13.  
  14. every 0.6 seconds:
  15. loop all horses:
  16. block below loop-entity is water:
  17. push the loop-entity up at speed 0.5
  18. else:
  19. block at loop-entity is water:
  20. push the loop-entity up at speed 0.5
  21.  
  22. #-------------------------------------------------------
  23. # S'asseoir sur les escaliers
  24. #-------------------------------------------------------
  25. command /chair:
  26. trigger:
  27. set {_block} to targeted block
  28. spawn 1 arrow above {_block}
  29. set {chair::%spawned entity%} to true
  30. set block above targeted block to wooden stairs
  31. while spawned entity exists:
  32. teleport spawned entity above {_block}
  33. wait 1 tick
  34.  
  35. on damage:
  36. {chair::%victim%} is true
  37. cancel event
  38.  
  39. on right click:
  40. clicked block is wooden stairs
  41. loop entities in radius 2 around clicked block:
  42. {chair::%loop-entity%} is set
  43. make player ride loop-entity
  44. while loop-entity exists:
  45. if player is sneaking:
  46. stop
  47. teleport player to loop-entity
  48. wait 1 tick
  49.  
  50. #-------------------------------------------------------
  51. # Système wireless (redstone sans fil)
  52. #-------------------------------------------------------
  53.  
  54. on rightclick on button:
  55. loop blocks in radius 5 around event-block:
  56. loop-block is sign
  57. line 1 of loop-block is "[rt]"
  58. set {red.%player%.last} to line 2 of loop-block
  59. set {red.%player%.carry} to true
  60. if {red.%player%.carry} is true:
  61. delete {red.%player%.carry}
  62. loop blocks in radius 50 around event-block:
  63. loop-block is sign
  64. line 1 of loop-block is "[rr]"
  65. line 2 of loop-block is {red.%player%.last}
  66. if line 3 of loop-block is "1" or "":
  67. if {red.%location of loop-block%.enabled} is not set:
  68. if the block under the block in front of the loop-block is air:
  69. set block under the block in front of the loop-block to stone
  70. set block in front of loop-block to active redstone torch
  71. set {red.%location of loop-block%.enabled} to true
  72. else:
  73. set block in front of loop-block to air
  74. delete {red.%location of loop-block%.enabled}
  75. if line 3 of loop-block is "2":
  76. if {red.%location of loop-block%.enabled} is not set:
  77. if the block under the block 2 blocks in front of the loop-block is air:
  78. set block under the block 2 blocks in front of the loop-block to stone
  79. set block 2 blocks in front of loop-block to active redstone torch
  80. set {red.%location of loop-block%.enabled} to true
  81. else:
  82. set block 2 blocks in front of loop-block to air
  83. delete {red.%location of loop-block%.enabled}
  84. if line 3 of loop-block is "3":
  85. if {red.%location of loop-block%.enabled} is not set:
  86. if the block under the block 3 blocks in front of the loop-block is air:
  87. set block under the block 3 blocks in front of the loop-block to stone
  88. set block 3 blocks in front of loop-block to active redstone torch
  89. set {red.%location of loop-block%.enabled} to true
  90. else:
  91. set block 3 blocks in front of loop-block to air
  92. delete {red.%location of loop-block%.enabled}
  93.  
  94. #----------------------------------------------------------------------
  95. # Se téléporter à l'endroit que l'on pointe avec une boussole
  96. #----------------------------------------------------------------------
  97.  
  98. aliases:
  99. # blocks without collision as of Minecraft 1.5 (excluding fire, nether portal & end portal)
  100. nonsolid = 0, 6, 27, 28, 30, 31, 32, 37, 38, 39, 40, 50, 55, 59, 63, 64, 65, 66, 68, 69, 70, 71, 72, 75, 76, 77, 78:0, 83, 85:4-7, 104, 105, 106, 111, 115, 131, 132, 141, 142, 143, 147, 148, 157
  101.  
  102. on rightclick with compass:
  103. player has permission "skript.admin"
  104. loop blocks above targeted block:
  105. loop-block is nonsolid
  106. block above loop-block is nonsolid
  107. teleport player to loop-block
  108. stop trigger
  109.  
  110. #----------------------------------------------------------------------
  111. # Calculatrice
  112. #----------------------------------------------------------------------
  113.  
  114. command /calc <number> <text> <number>:
  115. description: §bCalculatrice (c'est explicite non ?)
  116. usage:§b/calc §6valeur (+ - * / ^) valeur
  117. executable by: players
  118. aliases: /c
  119. trigger:
  120. set {_a} to arg 1
  121. set {_b} to arg 3
  122. set {_result} to 0
  123. if arg 2 is "+":
  124. set {_result} to {_a} + {_b}
  125. message "<light green>%{_result}%"
  126. if arg 2 is "-":
  127. set {_result} to {_a} - {_b}
  128. message "<light green>%{_result}%"
  129. if arg 2 is "*":
  130. set {_result} to {_a} * {_b}
  131. message "<light green>%{_result}%"
  132. if arg 2 is "/":
  133. set {_result} to {_a} / {_b}
  134. message "<light green>%{_result}%"
  135. if arg 2 is "^":
  136. set {_result} to {_a} ^ {_b}
  137. message "<light green>%{_result}%"
Advertisement
Add Comment
Please, Sign In to add comment