Advertisement
Guest User

Untitled

a guest
Aug 25th, 2019
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.05 KB | None | 0 0
  1.  
  2.  
  3. on sign edit:
  4. if 1st line is "Ø":
  5. if 2nd line is "K":
  6. if 3rd line is not "":
  7. add location of block to {shops::k::ørken::*}
  8. set {shop::%location of block%::price} to 3rd line parsed as a number
  9. set {shop::%location of block%::item} to 4th line parsed as a item
  10. set line 1 to "&3Ørken"
  11. set line 2 to "&3Købe shop"
  12. set line 3 to "&b%{shop::%location of block%::price}% &3DKK"
  13. set line 4 to "&3%{shop::%location of block%::item}%"
  14. if 1st line is "Ø":
  15. if 2nd line is "R":
  16. if 3rd line is not "":
  17. add location of block to {shops::r::ørken::*}
  18. set {shop::%location of block%::price} to 3rd line parsed as a number
  19. set {shop::%location of block%::item} to 4th line parsed as a item
  20. set line 1 to "&3Ørken"
  21. set line 2 to "&3Repair shop"
  22. set line 3 to "&b%{shop::%location of block%::price}% &3DKK"
  23. set line 4 to "&3%{shop::%location of block%::item}%"
  24. if 1st line is "Ø":
  25. if 2nd line is "S":
  26. if 3rd line is not "":
  27. add location of block to {shops::s::ørken::*}
  28. set {shop::%location of block%::price} to 3rd line parsed as a number
  29. set {shop::%location of block%::item} to 4th line parsed as a item
  30. set line 1 to "&3Ørken"
  31. set line 2 to "&3Sælge shop"
  32. set line 3 to "&b%{shop::%location of block%::price}% &3DKK"
  33. set line 4 to "&3%{shop::%location of block%::item}%"
  34. set skutil yaml value "Sellshop.%{shop::%location of block%::item}%" from file "plugins/skriptliste/shops.yml" to "%{shop::%location of block%::item}%"
  35. set skutil yaml value "Sellshop.%{shop::%location of block%::item}%.price" from file "plugins/skriptliste/shops.yml" to "%{shop::%location of block%::price}%"
  36. on right click on sign:
  37. if 2nd line is "&3Købe shop":
  38. cancel event
  39. if {balance::%{uuid::%player%}%} is between 0 and {shop::%location of block%::price} - 0.1:
  40. message "&9CL&8: &3Du har ikke nok penge"
  41. else:
  42. give player 1 of {shop::%location of block%::item}
  43. remove {shop::%location of block%::price} from {balance::%{uuid::%player%}%}
  44. message "&9CL&8: &3Du har købet en &7%{shop::%location of block%::item}% &3for &b%{shop::%location of block%::price}% &3DKK"
  45. set skutil yaml value "%player%.balance" from file "plugins/players/%uuid of player%.yml" to "%{balance::%{uuid::%player%}%}%"
  46. if 2nd line is "&3Repair shop":
  47. cancel event
  48. if {balance::%{uuid::%player%}%} is between 0 and {shop::%location of block%::price} - 0.1:
  49. message "&9CL&8: &3Du har ikke nok penge"
  50. else:
  51. if player is holding {shop::%location of block%::item}:
  52. remove {shop::%location of block%::price} from {balance::%{uuid::%player%}%}
  53. message "&9CL&8: &3Du har fixet din &7%{shop::%location of block%::item}% &3for &b%{shop::%location of block%::price}% &3DKK"
  54. repair player's held item
  55. set skutil yaml value "%player%.balance" from file "plugins/players/%uuid of player%.yml" to "%{balance::%{uuid::%player%}%}%"
  56. else:
  57. message "&9CL&8: &3Du kun repair &7%{shop::%location of block%::item}% &3her"
  58. if 2nd line is "&3Sælge shop":
  59. cancel event
  60. set {_items} to amount of {shop::%location of block%::item} in player's inventory
  61. if {_items} is 0:
  62. message "&9CL&8: &3Du har intet &7%{shop::%location of block%::item}% &3i dit inventory"
  63. set skutil yaml value "%player%.balance" from file "plugins/players/%uuid of player%.yml" to "%{balance::%{uuid::%player%}%}%"
  64. delete {_items}
  65. else:
  66. if player is sneaking:
  67. if {_items} is bigger than 63:
  68. remove 64 of {shop::%location of block%::item} from player's inventory
  69. add 64 * {shop::%location of block%::price} to {balance::%{uuid::%player%}%}
  70. set {_fået} to 64 * {shop::%location of block%::price}
  71. message "&9CL&8: &3Du fik &b%{_fået}% &3DKK for &b64 &3af &7%{shop::%location of block%::item}%"
  72. set skutil yaml value "%player%.balance" from file "plugins/players/%uuid of player%.yml" to "%{balance::%{uuid::%player%}%}%"
  73. delete {_items}
  74. delete {_fået}
  75. else:
  76. remove {_items} of {shop::%location of block%::item} from player's inventory
  77. add {_items} * {shop::%location of block%::price} to {balance::%{uuid::%player%}%}
  78. set {_fået} to {_items} * {shop::%location of block%::price}
  79. message "&9CL&8: &3Du fik &b%{_fået}% &3DKK for &b%{_items}% &3af &7%{shop::%location of block%::item}%"
  80. set skutil yaml value "%player%.balance" from file "plugins/skriptliste/%uuid of player%.yml" to "%{balance::%{uuid::%player%}%}%"
  81. delete {_items}
  82. delete {_fået}
  83. else:
  84. remove 1 of {shop::%location of block%::item} from player's inventory
  85. add {shop::%location of block%::price} to {balance::%{uuid::%player%}%}
  86. message "&9CL&8: &3Du fik &b%{shop::%location of block%::price}% &3DKK for &b1 &3af &7%{shop::%location of block%::item}%"
  87. set skutil yaml value "%player%.balance" from file "plugins/players/%uuid of player%.yml" to "%{balance::%{uuid::%player%}%}%"
  88.  
  89. #on block break:
  90.  
  91. #remove "%{shop::%location of block%::item}%" from skutil yaml list "Sellshop" from file "plugins/skriptliste/shops.yml"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement