Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- options:
- p: &8[&3&lTeam&8] &7
- table_prefix: Team
- limit: 5
- script options:
- $ db url jdbc:mysql://172.16.0.1:3306/kitpvp_stats
- $ db username kitpvp_stats
- $ db password SIfZE1iiQRpUzzjk
- on sign change:
- line 1 is "[Team]"
- set {_line2} to line 2 of event-block
- set {_line3} to line 3 of event-block
- set {_region} to {_line2} parsed as a region
- set {_beløb} to {_line3} parsed as a number
- if {_region} is a region:
- if {_beløb} is set:
- set {_r.s} to "%{_region}%"
- replace " in world world" with "" in {_r.s}
- set line 1 to "[&3Team Home&0]"
- set line 2 to "Hus: %{_r.s}%"
- set line 3 to "Pris: %{_beløb}%$"
- set line 4 to "&2Ledigt"
- set yaml value "team" from file "../../GG-KitPvP/Team/Homes/%{_r.s}%.yml" to 0
- set yaml value "Tilbage.dage" from file "../../GG-KitPvP/Team/Homes/%{_r.s}%.yml" to 0
- set yaml value "Tilbage.timer" from file "../../GG-KitPvP/Team/Homes/%{_r.s}%.yml" to 0
- set yaml value "Tilbage.minutter" from file "../../GG-KitPvP/Team/Homes/%{_r.s}%.yml" to 0
- replace " " with "" in {_r.s}
- stop
- message "{@p}&cDer er sket en fejl!"
- message "&7&oSådan laves et Team Home skilt:"
- message "&7&o[Team]"
- message "&7&oWorldGuard Region"
- message "&7&oPris per dag"
- set line 1 to "&4[Team]"
- stop
- on rightclick on a sign:
- if line 1 is "[&3Team Home&0]":
- set {_in.team} to yaml value "id" from file "../../GG-KitPvP/Team/data/%uuid of player%.yml"
- if {_in.team} is not set:
- message "{@p}Du er ikke medlem af et team!"
- stop
- set {_bank} to yaml value "bank" from file "../../GG-KitPvP/Team/Teams/%{_in.team}%.yml"
- if line 4 is "&2Ledigt":
- set {_line2} to line 2 of event-block
- set {_line3} to line 3 of event-block
- replace "Hus: " with "" in {_line2}
- replace "Pris: " with "" in {_line3}
- replace "$" with "" in {_line3}
- set {_pris} to {_line3} parsed as a number
- set {_region} to {_line2} parsed as a region
- if {_bank} is less than {_pris}:
- message "{@p}Dit team har ikke nok penge!"
- stop
- set {_Medlemmer::*} to yaml list "Medlemmer" from file "../../GG-KitPvP/Team/Teams/%{_in.team}%.yml"
- loop {_Medlemmer::*}:
- console command "rg addmember %{_region}% %loop-value%"
- set yaml value "team" from file "../../GG-KitPvP/Team/Homes/%{_region}%.yml" to 0
- set yaml value "Tilbage.dage" from file "../../GG-KitPvP/Team/Homes/%{_region}%.yml" to 0
- set yaml value "Tilbage.timer" from file "../../GG-KitPvP/Team/Homes/%{_region}%.yml" to 23
- set yaml value "Tilbage.minutter" from file "../../GG-KitPvP/Team/Homes/%{_region}%.yml" to 59
- else:
- message "{@p}Dette hus er allerede optaget!"
- stop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement