Zeldaboy111

Skript #205 - tycoonF

Jul 11th, 2019
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.37 KB | None | 0 0
  1. options:
  2. prefix: &f[&2Tycoon&f] &8>>
  3. version: 1.0
  4.  
  5. function removeShop(p: Player, e: Entity, x: String, y: String, z: String, w: String):
  6. if {Tycoon::shopLocations::*} doesn't contain "%{_w}% - %{_x}%, %{_y}%, %{_z}%":
  7. send "Cancelled" to {_p}
  8. stop
  9.  
  10. else:
  11. loop all villagers in radius 6 around {_p}:
  12. if "%location of loop-entity%" is "x: %{_x}%, y: %{_y}%, z: %{_z}%":
  13. set health of loop-entity to 0
  14. play "block_wood_hit" to {_p} at volume 10
  15. close {_p}'s inventory
  16.  
  17. remove "%{_w}% - %{_x}%, %{_y}%, %{_z}%" from {Tycoon::shopLocations::*}
  18.  
  19.  
  20. function getItem(p: Player, i: string):
  21. if {_i} contains "_machine":
  22. replace "_machine" with " Machine" in {_i}
  23.  
  24.  
  25. add {_i} to {_i::*}
  26. loop {_i::*}:
  27. set {_i1} to first character of loop-value
  28. set {_i2} to last (length of loop-value - 1) characters of loop-value
  29. set {_i} to "%{_i1} to upper case%%{_i2} to lower case%"
  30.  
  31. set {_item} to paper named "&6%{_i}%" with lore "&5Tycoon Machine"
  32. send "{@prefix} &a%{_i}% &2gekocht!" to {_p}
  33. give {_p} {_item}
  34.  
  35.  
  36. function openShop(p: Player, page: String):
  37. if {_page} is "machines":
  38. open chest with 3 rows named "&6Shop - Machines" to {_p}
  39. make gui slot 22 of {_p} with a barrier named "&4Sluit menu" to close
  40. make gui slot 0 of {_p} with dirt named "&6Dirt Machine" to close then run function getItem({_p}, "dirt_machine")
Add Comment
Please, Sign In to add comment