Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- options:
- prefix: &6Tycoon&8:&7
- function sendBalance():
- if {tc.loopingBalance} is true:
- stop
- set {tc.loopingBalance} to true
- while {tc.loopingBalance} is true:
- if {tc.stopped} is true:
- delete {tc.loopingBalance}
- if size of online players is 0:
- delete {tc.loopingBalance}
- else:
- loop all players:
- send actionbar "&6Coins&8: &e%{tc.%uuid of loop-player%.balance}%" to loop-player
- wait 40 ticks
- on join:
- if {tc.%uuid of player%.balance} is not set:
- set {tc.%uuid of player%.balance} to 0
- sendBalance()
- on enable:
- while {tc.loopingBalance} is true:
- wait 10 ticks
- if {tc.stopped}:
- sendBalance()
- delete {tc.stopped}
- on disable:
- if {tc.loopingBalance} is true:
- set {tc.stopped} to true
- function setLineData(sign: Location, line: String, firstType: String, secondType: String):
- set {_lines::*} to {_line} split at " "
- if size of {_lines::*} is not 2:
- stop
- set {_firstValue} to {_lines::1} parsed as an integer
- set {_secondValue} to {_lines::2} parsed as an integer
- if {_firstValue} is set:
- if {_secondValue} is set:
- if {_firstValue} > 0:
- if {_secondValue} > 0:
- set {tc.signdata.%{_sign}%.%{_firstType}%} to {_firstValue}
- set {tc.signdata.%{_sign}%.%{_secondType}%} to {_secondValue}
- on sign change:
- if line 1 is not "Tycoon":
- stop
- setLineData(location of event-block, line 3 of event-block, "cost", "costIncrease")
- setLineData(location of event-block, line 4 of event-block, "level", "maxLevel")
- if {tc.signdata.%location of event-block%.cost} is not set:
- stop
- set line 1 to "&6&l%line 2%"
- set line 2 to ""
- set line 3 to "&eCost&8: &7%{tc.signdata.%location of event-block%.cost}%"
- set line 4 to "&bLevel&8: &7%{tc.signdata.%location of event-block%.level}%"
- on right click on sign:
- if {tc.signdata.%location of event-block%.cost} is not set:
- stop
- else if {tc.signdata.%location of event-block%.level} >= {tc.signdata.%location of event-block%.maxLevel}:
- # play sound
- stop
Advertisement
Add Comment
Please, Sign In to add comment