Advertisement
Zeldaboy111

Skript Tutorial #48

Nov 20th, 2018
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.00 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. set {_loc} to location of targeted block
  30. set {colshopsigns::prijs::%{_loc}%} to arg 2
  31. set {colshopsigns::item::%{_loc}%} to arg 3
  32. set {colshopsigns::iaantal::%{_loc}%} to arg 4
  33. set {colshopsigns::enchant::%{_loc}%} to ""
  34. set {colshopsigns::elevel::%{_loc}%} to ""
  35.  
  36.  
  37. replace every "_" with " " in {colshopsigns::prijs::%{_loc}%}
  38. replace every "_" with " " in {colshopsigns::item::%{_loc}%}
  39. replace every "_" with " " in {colshopsigns::iaantal::%{_loc}%}
  40.  
  41. set line 1 of targeted block to "%{colshopsigns::signtitle::buy}%"
  42. set line 2 of targeted block to "&e%{colshopsigns::prijs::%{_loc}%}%"
  43. set line 3 of targeted block to "&e%{colshopsigns::iaantal::%{_loc}%}% %{colshopsigns::item::%{_loc}%}%"
  44.  
  45. send "%{colshopsigns::title}%Je hebt een &eColShopSign &6gemaakt met de volgende eigenschappen:"
  46. send "%{colshopsigns::help::title}% &6&lPrijs: &e%arg 2%"
  47. send "%{colshopsigns::help::title}% &6&lItem: &e%arg 3%"
  48. send "%{colshopsigns::help::title}% &6&lAantal: &e%arg 4%"
  49. stop
  50. else:
  51. set {_loc} to location of targeted block
  52. set {colshopsigns::prijs::%{_loc}%} to arg 2
  53. set {colshopsigns::item::%{_loc}%} to arg 3
  54. set {colshopsigns::iaantal::%{_loc}%} to arg 4
  55. set {colshopsigns::enchant::%{_loc}%} to ""
  56. set {colshopsigns::elevel::%{_loc}%} to ""
  57.  
  58. replace every "_" with " " in {colshopsigns::prijs::%{_loc}%}
  59. replace every "_" with " " in {colshopsigns::item::%{_loc}%}
  60. replace every "_" with " " in {colshopsigns::iaantal::%{_loc}%}
  61.  
  62. set line 1 of targeted block to "%{colshopsigns::signtitle::buy}%"
  63. set line 2 of targeted block to "&e%{colshopsigns::prijs::%{_loc}%}%"
  64. set line 3 of targeted block to "&e%{colshopsigns::iaantal::%{_loc}%}% %{colshopsigns::item::%{_loc}%}%"
  65.  
  66. send "%{colshopsigns::title}%Je hebt een &eColShopSign &6gemaakt met de volgende eigenschappen:"
  67. send "%{colshopsigns::help::title}% &6&lPrijs: &e%arg 2%"
  68. send "%{colshopsigns::help::title}% &6&lItem: &e%arg 3%"
  69. send "%{colshopsigns::help::title}% &6&lAantal: &e1"
  70. stop
  71. else:
  72. send "%{colshopsigns::title}%Je moet nog een item opgeven."
  73. stop
  74.  
  75. if arg 1 is "remove":
  76.  
  77. set {_loc} to location of targeted block
  78. delete {colshopsigns::prijs::%{_loc}%}
  79.  
  80. send "%{colshopsigns::title}%Je hebt de ColShopSign succesvol weggehaalt."
  81. stop
  82.  
  83. else:
  84. send "%{colshopsigns::title}%%{colshopsigns::text::help}%"
  85. stop
  86. else:
  87. send "%{colshopsigns::title}%%{colshopsigns::text::help}%"
  88. stop
  89. else:
  90. send "%{colshopsigns::title}%&4Je moet in de wereld: &cColosseum-w1 &4zitten om deze command uit te voeren."
  91. stop
  92. else:
  93. send "%{colshopsigns::title}%%{colshopsigns::text::nep}%"
  94. stop
  95.  
  96. on rightclick:
  97. set {_loc} to location of targeted block
  98. if {colshopsigns::prijs::%{_loc}%} is set:
  99. if {colshopsigns::item::%{_loc}%} is set:
  100. if {colshopsigns::iaantal::%{_loc}%} is set:
  101. send "%{colshopsigns::help::title}% &6&lPrijs: &e%{colshopsigns::prijs::%{_loc}%}%"
  102. send "%{colshopsigns::help::title}% &6&lItem: &e%{colshopsigns::item::%{_loc}%}%"
  103. send "%{colshopsigns::help::title}% &6&lAantal items: &e%{colshopsigns::iaantal::%{_loc}%}%"
  104. stop
  105.  
  106. else:
  107. send "%{colshopsigns::help::title}% &6&lPrijs: &e%{colshopsigns::prijs::%{_loc}%}%"
  108. send "%{colshopsigns::help::title}% &6&lItem: &e%{colshopsigns::item::%{_loc}%}%"
  109. send "%{colshopsigns::help::title}% &6&lAantal items: &e%{colshopsigns::iaantal::%{_loc}%}%"
  110. stop
  111.  
  112.  
  113. on leftclick on sign:
  114. if player is in world "Colosseum-w1":
  115. if {colshopsigns::prijs::%location of clicked block%} is set:
  116. cancel event
  117. if line 1 of clicked block is "%{colshopsigns::signtitle::buy}%":
  118.  
  119. set {_price} to line 2 of clicked block
  120. set {_item} to {colshopsigns::item::%location of clicked block%} parsed as an item
  121. set {_iaantal} to {colshopsigns::iaantal::%location of clicked block%}
  122.  
  123. replace "&e" with "" in {_price}
  124. replace "&e" with "" in {_item}
  125. replace "&e" with "" in {_iaantal}
  126.  
  127.  
  128.  
  129. if "%{_price}-1%" parsed as a number is less than {colosseumgeld::total::%player%}:
  130. send "%{colshopsigns::title}%Je hebt dit item gekocht."
  131. remove {_price} parsed as a number from {colosseumgeld::total::%player%}
  132. give {_iaantal} of {_item} to player
  133. stop
  134.  
  135. else:
  136. send "%{colshopsigns::title}%Je hebt onvoldoende geld om dit item te kopen."
  137.  
  138. command /c1:
  139. trigger:
  140. set {colosseumgeld::total::%player%} to 10
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement