Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Coloration des panneaux et mise en place des panneaux de téléportation
- #----------------------------------------------------------------------
- on sign change:
- replace every "&" with "§" in line 1
- replace every "&" with "§" in line 2
- replace every "&" with "§" in line 3
- replace every "&" with "§" in line 4
- if line 2 contains "[runEdit]":
- set {_id} to line 3 parsed as number
- if {run::%{_id}%} is set:
- set line 2 to "§6§l[runStart]"
- set line 3 to "§b§l{_id}"
- set {_data::*} to {run::%{_id}%} split at "|"
- set line 1 to "§2§l{_data::1}"
- else:
- message "<red><bold>Cette id n'existe pas, action annulée..."
- wait 1 second
- delete block at event-location
- #Rejoindre une partie
- #------------------------
- on rightclick on sign:
- if line 2 contains "[runStart]":
- set {_id} to line 3 parsed as number
- set {_data::*} to {run::%{_id}%} split at "|"
- set {_coords::*} to {_runData::2} split at ","
- loop {_coords::*}:
- set {_coord_%loop-index%} to loop-value parsed as number
- message "<yellow><bold>Téléportation dans 3 secondes"
- wait 3 seconds
- execute console command "/tp %player% %{_coord_1}% %{_coord_2}% %{_coord_3}%"
- #Créer un parcours
- #------------------------
- command /runCreate <text>:
- usage: §b /runCreate ou /rc <nom du parcours>
- aliases:/rc
- trigger:
- set {_coords} to player's location
- set {_x} to round x-coord of {_coords}
- set {_y} to round y-coord of {_coords}
- set {_z} to round z-coord of {_coords}
- add "%arg 1%|%{_x}%,%{_y}%,%{_z}%" to {run::*}
- #Déterminer le point de spawn d'un parcours
- #------------------------
- command /runEdit <int> [<text>]:
- usage: §b /runEdit ou /re <id du parcours> [<nom du parcours>]
- aliases:/re
- trigger:
- set {_coords} to player's location
- set {_x} to round x-coord of {_coords}
- set {_y} to round y-coord of {_coords}
- set {_z} to round z-coord of {_coords}
- set {_data::*} to {run::%arg 1%} split at "|"
- if arg 2 is set:
- set {_data::1} to arg 2
- set {_data::2} to "%{_x}%,%{_y}%,%{_z}%"
- set {run::%arg 1%} to join {_data::*} with "|"
- on rightclick on stone:
- add "13" to {list::*}
- add "31" to {list::*}
- add "28" to {list::*}
- add "56" to {list::*}
- set {_count} to 0
- loop {list::*}:
- set {_count} to {_count} + 1
- set {_i} to 1
- set {_j} to 1
- while {_i} is smaller than {_count}:
- set {_elemToInsert} to {list::%{_i}%}
- set {_i} to {_i} + 1
- while {_j} is smaller than {_i}:
- set {_currentElem} to {list::%{_j}%}
- set {_j} to {_j} + 1
- if {_elemToInsert} is smaller than {_currentElem}:
- set {list::%{_j}%} to {_elemToInsert}
- set {_elemToInsert} to {_currentElem}
- set {list::%{_i}%} to {_elemToInsert}
- loop {list::*}:
- message "<yellow>%loop-index% : <white>%loop-value%"
- clear {list::*}
Advertisement
Add Comment
Please, Sign In to add comment