Advertisement
Zeldaboy111

Skript Tutorial #47

Nov 17th, 2018
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.59 KB | None | 0 0
  1.  
  2.  
  3. on load:
  4. set {colshopsigns::title} to "&1[&e&k::&6ColShopSigns&e&k::&1] &6"
  5. set {colshopsigns::help::title} to "&1[&e&k::&6CSS&e&k::&1]"
  6. set {colshopsigns::text::nep} to "&4Je hebt &convoldoende permissies &4om deze command uit te voeren."
  7. set {colshopsigns::text::help} to "Doe &e/colshopsigns help &6voor meer informatie."
  8.  
  9. command /colshopsigns [<text>] [<text>] [<text>] [<number>] [<text>] [<number>]:
  10. aliases: /css
  11. trigger:
  12. if player has permission "colshopsigns.use" OR "colshopsigns.*":
  13. if player is in world "Colosseum-w1":
  14. if arg 1 is set:
  15. if arg 1 is "help":
  16. send "&e=========<&6ColShopSigns&e>========="
  17. send "%{colshopsigns::help::title}%&e&l/colshopsigns create [prijs] [item] [aantal items] [enchant]"
  18. send "%{colshopsigns::help::title}%&e&l/css create [prijs] [item] [aantal items] [enchant]"
  19. send "%{colshopsigns::help::title}%&6Zet op een sign een item die een bepaalde prijs kost."
  20. send "%{colshopsigns::help::title}%&e&l/colshopsigns [remove]"
  21. send "%{colshopsigns::help::title}%&e&l/css [remove]"
  22. send "%{colshopsigns::help::title}%&6Verwijder een ColShopSign."
  23. send "&e=========<&6ColShopSigns&e>========="
  24. stop
  25. if arg 1 is "create":
  26. if arg 2 is set:
  27. if arg 3 is set:
  28. if arg 4 is set:
  29. if arg 5 is set:
  30. if arg 6 is set:
  31. set {_loc} to location of targeted block
  32. set {colshopsigns::prijs::%{_loc}%} to arg 2
  33. set {colshopsigns::item::%{_loc}%} to arg 3
  34. set {colshopsigns::iaantal::%{_loc}%} to arg 4
  35. set {colshopsigns::enchant::%{_loc}%} to arg 5
  36. set {colshopsigns::elevel::%{_loc}%} to arg 6
  37.  
  38. replace every "_" with " " in {colshopsigns::prijs::%{_loc}%}
  39. replace every "_" with " " in {colshopsigns::item::%{_loc}%}
  40. replace every "_" with " " in {colshopsigns::iaantal::%{_loc}%}
  41. replace every "_" with " " in {colshopsigns::enchant::%{_loc}%}
  42. replace every "_" with " " in {colshopsigns::elevel::%{_loc}%}
  43.  
  44. set line 1 of targeted block to "%{colshopsigns::signtitle::buy}%"
  45. set line 2 of targeted block to "&e%{colshopsigns::prijs::%{_loc}%}%"
  46. set line 3 of targeted block to "&e%{colshopsigns::iaantal::%{_loc}%}% %{colshopsigns::item::%{_loc}%}%"
  47. set line 4 of targeted block to "&e%{colshopsigns::enchant::%{_loc}%}% %{colshopsigns::elevel::%{_loc}%}%"
  48.  
  49.  
  50. send "%{colshopsigns::title}%Je hebt een &eColShopSign &6gemaakt met de volgende eigenschappen:"
  51. send "%{colshopsigns::help::title}% &6&lPrijs: &e%arg 2%"
  52. send "%{colshopsigns::help::title}% &6&lItem: &e%arg 3%"
  53. send "%{colshopsigns::help::title}% &6&lAantal: &e%arg 4%"
  54. send "%{colshopsigns::help::title}% &6&lEnchant: &e%arg 5% %arg 6%"
  55. stop
  56.  
  57. else:
  58. set {_loc} to location of targeted block
  59. set {colshopsigns::prijs::%{_loc}%} to arg 2
  60. set {colshopsigns::item::%{_loc}%} to arg 3
  61. set {colshopsigns::iaantal::%{_loc}%} to arg 4
  62. set {colshopsigns::enchant::%{_loc}%} to arg 5
  63. set {colshopsigns::elevel::%{_loc}%} to arg 6
  64.  
  65. replace every "_" with " " in {colshopsigns::prijs::%{_loc}%}
  66. replace every "_" with " " in {colshopsigns::item::%{_loc}%}
  67. replace every "_" with " " in {colshopsigns::iaantal::%{_loc}%}
  68. replace every "_" with " " in {colshopsigns::enchant::%{_loc}%}
  69. replace every "_" with " " in {colshopsigns::elevel::%{_loc}%}
  70.  
  71. set line 1 of targeted block to "%{colshopsigns::signtitle::buy}%"
  72. set line 2 of targeted block to "&e%{colshopsigns::prijs::%{_loc}%}%"
  73. set line 3 of targeted block to "&e%{colshopsigns::iaantal::%{_loc}%}% %{colshopsigns::item::%{_loc}%}%"
  74. set line 4 of targeted block to "&e%{colshopsigns::enchant::%{_loc}%}% %{colshopsigns::elevel::%{_loc}%}%"
  75.  
  76. send "%{colshopsigns::title}%Je hebt een &eColShopSign &6gemaakt met de volgende eigenschappen:"
  77. send "%{colshopsigns::help::title}% &6&lPrijs: &e%arg 2%"
  78. send "%{colshopsigns::help::title}% &6&lItem: &e%arg 3%"
  79. send "%{colshopsigns::help::title}% &6&lAantal: &e%arg 4%"
  80. send "%{colshopsigns::help::title}% &6&lEnchant: &e%arg 5% 1"
  81. stop
  82.  
  83. else:
  84. set {_loc} to location of targeted block
  85. set {colshopsigns::prijs::%{_loc}%} to arg 2
  86. set {colshopsigns::item::%{_loc}%} to arg 3
  87. set {colshopsigns::iaantal::%{_loc}%} to arg 4
  88. set {colshopsigns::enchant::%{_loc}%} to ""
  89. set {colshopsigns::elevel::%{_loc}%} to ""
  90.  
  91.  
  92. replace every "_" with " " in {colshopsigns::prijs::%{_loc}%}
  93. replace every "_" with " " in {colshopsigns::item::%{_loc}%}
  94. replace every "_" with " " in {colshopsigns::iaantal::%{_loc}%}
  95.  
  96. set line 1 of targeted block to "%{colshopsigns::signtitle::buy}%"
  97. set line 2 of targeted block to "&e%{colshopsigns::prijs::%{_loc}%}%"
  98. set line 3 of targeted block to "&e%{colshopsigns::iaantal::%{_loc}%}% %{colshopsigns::item::%{_loc}%}%"
  99. set line 4 of targeted block to "&6&lGeen enchant"
  100.  
  101. send "%{colshopsigns::title}%Je hebt een &eColShopSign &6gemaakt met de volgende eigenschappen:"
  102. send "%{colshopsigns::help::title}% &6&lPrijs: &e%arg 2%"
  103. send "%{colshopsigns::help::title}% &6&lItem: &e%arg 3%"
  104. send "%{colshopsigns::help::title}% &6&lAantal: &e%arg 4%"
  105. stop
  106. else:
  107. set {_loc} to location of targeted block
  108. set {colshopsigns::prijs::%{_loc}%} to arg 2
  109. set {colshopsigns::item::%{_loc}%} to arg 3
  110. set {colshopsigns::iaantal::%{_loc}%} to arg 4
  111. set {colshopsigns::enchant::%{_loc}%} to ""
  112. set {colshopsigns::elevel::%{_loc}%} to ""
  113.  
  114. replace every "_" with " " in {colshopsigns::prijs::%{_loc}%}
  115. replace every "_" with " " in {colshopsigns::item::%{_loc}%}
  116. replace every "_" with " " in {colshopsigns::iaantal::%{_loc}%}
  117.  
  118. set line 1 of targeted block to "%{colshopsigns::signtitle::buy}%"
  119. set line 2 of targeted block to "&e%{colshopsigns::prijs::%{_loc}%}%"
  120. set line 3 of targeted block to "&e%{colshopsigns::iaantal::%{_loc}%}% %{colshopsigns::item::%{_loc}%}%"
  121. set line 4 of targeted block to "&6&lGeen enchant"
  122.  
  123. send "%{colshopsigns::title}%Je hebt een &eColShopSign &6gemaakt met de volgende eigenschappen:"
  124. send "%{colshopsigns::help::title}% &6&lPrijs: &e%arg 2%"
  125. send "%{colshopsigns::help::title}% &6&lItem: &e%arg 3%"
  126. send "%{colshopsigns::help::title}% &6&lAantal: &e1"
  127. stop
  128. else:
  129. send "%{colshopsigns::title}%Je moet nog een item opgeven."
  130. stop
  131.  
  132. if arg 1 is "remove":
  133.  
  134. set {_loc} to location of targeted block
  135. delete {colshopsigns::prijs::%{_loc}%}
  136.  
  137. send "%{colshopsigns::title}%Je hebt de ColShopSign succesvol weggehaalt."
  138. stop
  139.  
  140. else:
  141. send "%{colshopsigns::title}%%{colshopsigns::text::help}%"
  142. stop
  143. else:
  144. send "%{colshopsigns::title}%%{colshopsigns::text::help}%"
  145. stop
  146. else:
  147. send "%{colshopsigns::title}%&4Je moet in de wereld: &cColosseum-w1 &4zitten om deze command uit te voeren."
  148. stop
  149. else:
  150. send "%{colshopsigns::title}%%{colshopsigns::text::nep}%"
  151. stop
  152.  
  153. on rightclick:
  154. set {_loc} to location of targeted block
  155. if {colshopsigns::prijs::%{_loc}%} is set:
  156. if {colshopsigns::item::%{_loc}%} is set:
  157. if {colshopsigns::iaantal::%{_loc}%} is set:
  158. if {colshopsigns::enchant::%{_loc}%} is set:
  159. if {colshopsigns::elevel::%{_loc}%} is set:
  160. send "%{colshopsigns::help::title}% &6&lPrijs: &e%{colshopsigns::prijs::%{_loc}%}%"
  161. send "%{colshopsigns::help::title}% &6&lItem: &e%{colshopsigns::item::%{_loc}%}%"
  162. send "%{colshopsigns::help::title}% &6&lAantal items: &e%{colshopsigns::iaantal::%{_loc}%}%"
  163. send "%{colshopsigns::help::title}% &6&lEnchant: &e%{colshopsigns::enchant::%{_loc}%}%"
  164. send "%{colshopsigns::help::title}% &6&lEnchant level: &e%{colshopsigns::elevel::%{_loc}%}%"
  165. stop
  166. else:
  167. send "%{colshopsigns::help::title}% &6&lPrijs: &e%{colshopsigns::prijs::%{_loc}%}%"
  168. send "%{colshopsigns::help::title}% &6&lItem: &e%{colshopsigns::item::%{_loc}%}%"
  169. send "%{colshopsigns::help::title}% &6&lAantal items: &e%{colshopsigns::iaantal::%{_loc}%}%"
  170. send "%{colshopsigns::help::title}% &6&lEnchant: &e%{colshopsigns::enchant::%{_loc}%}%"
  171. send "%{colshopsigns::help::title}% &6&lEnchant level: &e%{colshopsigns::elevel::%{_loc}%}%"
  172. stop
  173. else:
  174. send "%{colshopsigns::help::title}% &6&lPrijs: &e%{colshopsigns::prijs::%{_loc}%}%"
  175. send "%{colshopsigns::help::title}% &6&lItem: &e%{colshopsigns::item::%{_loc}%}%"
  176. send "%{colshopsigns::help::title}% &6&lAantal items: &e%{colshopsigns::iaantal::%{_loc}%}%"
  177. stop
  178. else:
  179. send "%{colshopsigns::help::title}% &6&lPrijs: &e%{colshopsigns::prijs::%{_loc}%}%"
  180. send "%{colshopsigns::help::title}% &6&lItem: &e%{colshopsigns::item::%{_loc}%}%"
  181. send "%{colshopsigns::help::title}% &6&lAantal items: &e%{colshopsigns::iaantal::%{_loc}%}%"
  182. stop
  183.  
  184.  
  185. on leftclick on sign:
  186. if player is in world "Colosseum-w1":
  187. if {colshopsigns::prijs::%location of clicked block%} is set:
  188. cancel event
  189. if line 1 of clicked block is "%{colshopsigns::signtitle::buy}%":
  190.  
  191. set {_price} to line 2 of clicked block
  192. set {_item} to {colshopsigns::item::%location of clicked block%} parsed as an item
  193. set {_iaantal} to {colshopsigns::iaantal::%location of clicked block%} parsed as a number
  194. set {_enchant} to {colshopsigns::iaantal::%location of clicked block%} parsed as an enchantment
  195. set {_elevel} to {colshopsigns::iaantal::%location of clicked block%} parsed as an number
  196.  
  197. replace "&e" with "" in {_price}
  198. replace "&e" with "" in {_item}
  199. replace "&e" with "" in {_iaantal}
  200. replace "&e" with "" in {_enchant}
  201. replace "&6&l" with "" in {_enchant}
  202. replace "&e" with "" in {_elevel}
  203. replace "&6&l" with "" in {_elevel}
  204.  
  205. if {_price} parsed as a number is less than {colosseumgeld::total::%player%}:
  206. send "%{colshopsigns::title}%Je hebt dit item gekocht."
  207. remove {_price} parsed as a number from {colosseumgeld::total::%player%}
  208. send "%{_item}%"
  209. add {_item} to the player
  210. stop
  211.  
  212. else:
  213. send "%{colshopsigns::title}%Je hebt onvoldoende geld om dit item te kopen."
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement