Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on sign edit:
- if 1st line is "Ø":
- if 2nd line is "K":
- if 3rd line is not "":
- add location of block to {shops::k::ørken::*}
- set {shop::%location of block%::price} to 3rd line parsed as a number
- set {shop::%location of block%::item} to 4th line parsed as a item
- set line 1 to "&3Ørken"
- set line 2 to "&3Købe shop"
- set line 3 to "&b%{shop::%location of block%::price}% &3DKK"
- set line 4 to "&3%{shop::%location of block%::item}%"
- if 1st line is "Ø":
- if 2nd line is "R":
- if 3rd line is not "":
- add location of block to {shops::r::ørken::*}
- set {shop::%location of block%::price} to 3rd line parsed as a number
- set {shop::%location of block%::item} to 4th line parsed as a item
- set line 1 to "&3Ørken"
- set line 2 to "&3Repair shop"
- set line 3 to "&b%{shop::%location of block%::price}% &3DKK"
- set line 4 to "&3%{shop::%location of block%::item}%"
- if 1st line is "Ø":
- if 2nd line is "S":
- if 3rd line is not "":
- add location of block to {shops::s::ørken::*}
- set {shop::%location of block%::price} to 3rd line parsed as a number
- set {shop::%location of block%::item} to 4th line parsed as a item
- set line 1 to "&3Ørken"
- set line 2 to "&3Sælge shop"
- set line 3 to "&b%{shop::%location of block%::price}% &3DKK"
- set line 4 to "&3%{shop::%location of block%::item}%"
- set skutil yaml value "Sellshop.%{shop::%location of block%::item}%" from file "plugins/skriptliste/shops.yml" to "%{shop::%location of block%::item}%"
- set skutil yaml value "Sellshop.%{shop::%location of block%::item}%.price" from file "plugins/skriptliste/shops.yml" to "%{shop::%location of block%::price}%"
- on right click on sign:
- if 2nd line is "&3Købe shop":
- cancel event
- if {balance::%{uuid::%player%}%} is between 0 and {shop::%location of block%::price} - 0.1:
- message "&9CL&8: &3Du har ikke nok penge"
- else:
- give player 1 of {shop::%location of block%::item}
- remove {shop::%location of block%::price} from {balance::%{uuid::%player%}%}
- message "&9CL&8: &3Du har købet en &7%{shop::%location of block%::item}% &3for &b%{shop::%location of block%::price}% &3DKK"
- set skutil yaml value "%player%.balance" from file "plugins/players/%uuid of player%.yml" to "%{balance::%{uuid::%player%}%}%"
- if 2nd line is "&3Repair shop":
- cancel event
- if {balance::%{uuid::%player%}%} is between 0 and {shop::%location of block%::price} - 0.1:
- message "&9CL&8: &3Du har ikke nok penge"
- else:
- if player is holding {shop::%location of block%::item}:
- remove {shop::%location of block%::price} from {balance::%{uuid::%player%}%}
- message "&9CL&8: &3Du har fixet din &7%{shop::%location of block%::item}% &3for &b%{shop::%location of block%::price}% &3DKK"
- repair player's held item
- set skutil yaml value "%player%.balance" from file "plugins/players/%uuid of player%.yml" to "%{balance::%{uuid::%player%}%}%"
- else:
- message "&9CL&8: &3Du kun repair &7%{shop::%location of block%::item}% &3her"
- if 2nd line is "&3Sælge shop":
- cancel event
- set {_items} to amount of {shop::%location of block%::item} in player's inventory
- if {_items} is 0:
- message "&9CL&8: &3Du har intet &7%{shop::%location of block%::item}% &3i dit inventory"
- set skutil yaml value "%player%.balance" from file "plugins/players/%uuid of player%.yml" to "%{balance::%{uuid::%player%}%}%"
- delete {_items}
- else:
- if player is sneaking:
- if {_items} is bigger than 63:
- remove 64 of {shop::%location of block%::item} from player's inventory
- add 64 * {shop::%location of block%::price} to {balance::%{uuid::%player%}%}
- set {_fået} to 64 * {shop::%location of block%::price}
- message "&9CL&8: &3Du fik &b%{_fået}% &3DKK for &b64 &3af &7%{shop::%location of block%::item}%"
- set skutil yaml value "%player%.balance" from file "plugins/players/%uuid of player%.yml" to "%{balance::%{uuid::%player%}%}%"
- delete {_items}
- delete {_fået}
- else:
- remove {_items} of {shop::%location of block%::item} from player's inventory
- add {_items} * {shop::%location of block%::price} to {balance::%{uuid::%player%}%}
- set {_fået} to {_items} * {shop::%location of block%::price}
- message "&9CL&8: &3Du fik &b%{_fået}% &3DKK for &b%{_items}% &3af &7%{shop::%location of block%::item}%"
- set skutil yaml value "%player%.balance" from file "plugins/skriptliste/%uuid of player%.yml" to "%{balance::%{uuid::%player%}%}%"
- delete {_items}
- delete {_fået}
- else:
- remove 1 of {shop::%location of block%::item} from player's inventory
- add {shop::%location of block%::price} to {balance::%{uuid::%player%}%}
- message "&9CL&8: &3Du fik &b%{shop::%location of block%::price}% &3DKK for &b1 &3af &7%{shop::%location of block%::item}%"
- set skutil yaml value "%player%.balance" from file "plugins/players/%uuid of player%.yml" to "%{balance::%{uuid::%player%}%}%"
- #on block break:
- #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