Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function gwManifest():
- set {games::repo::glasswars::corner1} to location(4964, 0, 4964, {world})
- set {games::repo::glasswars::corner2} to location(5044, 3, 5044, {world})
- set {games::repo::glasswars::waitarea} to location(5000, 211.5, 5000, {world})
- set {games::repo::glasswars::mid} to location(5001, 4, 5001, {world})
- set {games::repo::glasswars::teams} to true
- set {games::repo::glasswars::teams::red} to true
- set {games::repo::glasswars::teams::red::mapres} to location(5000, 4, 4973, {world})
- set {games::repo::glasswars::teams::red::col} to "&c"
- set {games::repo::glasswars::teams::red::block} to red stained glass
- set {games::repo::glasswars::teams::blue} to true
- set {games::repo::glasswars::teams::blue::mapres} to location(5019, 4, 4981, {world})
- set {games::repo::glasswars::teams::blue::col} to "&9"
- set {games::repo::glasswars::teams::blue::block} to blue stained glass
- set {games::repo::glasswars::teams::yellow} to true
- set {games::repo::glasswars::teams::yellow::mapres} to location(5027, 4, 5000, {world})
- set {games::repo::glasswars::teams::yellow::col} to "&e"
- set {games::repo::glasswars::teams::yellow::block} to yellow stained glass
- set {games::repo::glasswars::teams::green} to true
- set {games::repo::glasswars::teams::green::mapres} to location(5019, 4, 5019, {world})
- set {games::repo::glasswars::teams::green::col} to "&a"
- set {games::repo::glasswars::teams::green::block} to green stained glass
- set {games::repo::glasswars::teams::purple} to true
- set {games::repo::glasswars::teams::purple::mapres} to location(5000, 4, 5027, {world})
- set {games::repo::glasswars::teams::purple::col} to "&5"
- set {games::repo::glasswars::teams::purple::block} to purple stained glass
- set {games::repo::glasswars::teams::pink} to true
- set {games::repo::glasswars::teams::pink::mapres} to location(4981, 4, 5019, {world})
- set {games::repo::glasswars::teams::pink::col} to "&d"
- set {games::repo::glasswars::teams::pink::block} to pink stained glass
- set {games::repo::glasswars::teams::orange} to true
- set {games::repo::glasswars::teams::orange::mapres} to location(4973, 4, 5000, {world})
- set {games::repo::glasswars::teams::orange::col} to "&6"
- set {games::repo::glasswars::teams::orange::block} to orange stained glass
- set {games::repo::glasswars::teams::black} to true
- set {games::repo::glasswars::teams::black::mapres} to location(4981, 4, 4981, {world})
- set {games::repo::glasswars::teams::black::col} to "&0"
- set {games::repo::glasswars::teams::black::block} to black stained glass
- set {games::repo::glasswars::items} to true
- add 6 sandstone to {games::repo::glasswars::items::*}
- add 4 oak planks to {games::repo::glasswars::items::*}
- add 1 leather chestplate to {games::repo::glasswars::items::*}
- add 1 leather leggings to {games::repo::glasswars::items::*}
- add 1 carrot on a stick named "&aLevitation Stick" to {games::repo::glasswars::items::*}
- add 1 diamond to {games::repo::glasswars::items::*}
- add 1 water bucket to {games::repo::glasswars::items::*}
- add 1 bow to {games::repo::glasswars::items::*}
- add 4 arrows to {games::repo::glasswars::items::*}
- set {_slappy} to 1 fish
- enchant {_slappy} with knockback 2
- add {_slappy} to {games::repo::glasswars::items::*}
- add 1 stone sword to {games::repo::glasswars::items::*}
- add 1 iron sword to {games::repo::glasswars::items::*}
- add 1 diamond pickaxe to {games::repo::glasswars::items::*}
- add 1 speed potion to {games::repo::glasswars::items::*}
- add 1 iron axe to {games::repo::glasswars::items::*}
- add 1 chainmail boots to {games::repo::glasswars::items::*}
- function gwRun(matchnum: number):
- set {games::matches::match%{_matchnum}%::state} to 3
- set {games::matches::match%{_matchnum}%::itemtimer} to 7
- set {games::matches::match%{_matchnum}%::gwteam} to true
- set {_wa} to {games::repo::glasswars::waitarea}
- set {_adder} to (({games::matches::match%{_matchnum}%::gamelabel} - 1) * 250)
- add {_adder} to {_wa}'s x-coordinate
- add "red" to {_teams::*}
- add "blue" to {_teams::*}
- add "yellow" to {_teams::*}
- add "green" to {_teams::*}
- add "purple" to {_teams::*}
- add "pink" to {_teams::*}
- add "orange" to {_teams::*}
- add "black" to {_teams::*}
- loop {games::repo::glasswars::teams::*}:
- set {games::matches::match%{_matchnum}%::gwteam::%loop-index%} to true
- set {_start} to 1
- set {_theend} to size of {_teams::*}
- loop {games::matches::match%{_matchnum}%::queued::*}:
- teleport loop-value to {_wa}
- generalReadyPlayer(loop-value, "adventure")
- set {player::%{_p}%::meta::glasswars} to true
- gwJoinTeam(loop-value, {_teams::%{_start}%})
- add 1 to {_start}
- if {_start} > {_theend}:
- set {_start} to 1
- wait 3 seconds
- set {_step} to 4
- set {_term} to 28
- set {_maxattempts} to 10
- set {_start} to 1
- set {_lc1} to {games::repo::glasswars::corner1}
- set {_mx1} to x-coordinate of {_lc1}
- set {_my1} to y-coordinate of {_lc1}
- set {_mz1} to z-coordinate of {_lc1}
- set {_lc2} to {games::repo::glasswars::corner2}
- set {_mx2} to x-coordinate of {_lc2}
- set {_my2} to y-coordinate of {_lc2}
- set {_mz2} to z-coordinate of {_lc2}
- add {_adder} to {_mx1}
- add {_adder} to {_mx2}
- while {_start} < {_maxattempts}:
- console command "/fill %{_mx1}% %{_my1}% %{_mz1}% %{_mx2}% %{_my2}% %{_mz2}% air"
- add {_step} to {_my1}
- add {_step} to {_my2}
- if {_my2} > {_term}:
- exit loop
- add 1 to {_start}
- loop {games::repo::glasswars::teams::*}:
- set {_loc} to {games::repo::glasswars::teams::%loop-index%::mapres}
- set {_lex} to {_loc}'s x-coordinate
- set {_ley} to {_loc}'s y-coordinate
- set {_lez} to {_loc}'s z-coordinate
- add {_adder} to {_lex}
- console command "/execute as @e[tag=anchor,type=minecraft:armor_stand,limit=1] run setblock %{_lex}% %{_ley}% %{_lez}% structure_block{metadata:"""",mirror:""NONE"",ignoreEntities:1b,powered:0b,seed:0L,author:""ThatOneTqnk"",rotation:""NONE"",posX:0,mode:""LOAD"",posY:1,sizeX:9,posZ:0,integrity:1.0f,showair:0b,x:-117,name:""minecraft:gw%loop-index%"",y:4,z:-70,id:""minecraft:structure_block"",sizeY:10,sizeZ:9,showboundingbox:1b}"
- console command "/execute as @e[tag=anchor,type=minecraft:armor_stand,limit=1] run setblock %{_lex}% %({_ley} - 1)% %{_lez}% redstone_block"
- console command "/execute as @e[tag=anchor,type=minecraft:armor_stand,limit=1] run fill %{_lex}% %{_ley}% %{_lez}% %{_lex}% %({_ley} - 1)% %{_lez}% air"
- set {_mloc} to {games::repo::glasswars::mid}
- set {_mlex} to {_mloc}'s x-coordinate
- set {_mley} to {_mloc}'s y-coordinate
- set {_mlez} to {_mloc}'s z-coordinate
- add {_adder} to {_mlex}
- console command "/execute as @e[tag=anchor,type=minecraft:armor_stand,limit=1] run setblock %{_mlex}% %{_mley}% %{_mlez}% structure_block{metadata:"""",mirror:""NONE"",ignoreEntities:1b,powered:0b,seed:0L,author:""ThatOneTqnk"",rotation:""NONE"",posX:0,mode:""LOAD"",posY:1,sizeX:9,posZ:0,integrity:1.0f,showair:0b,x:-117,name:""minecraft:gwmid"",y:4,z:-70,id:""minecraft:structure_block"",sizeY:10,sizeZ:9,showboundingbox:1b}"
- console command "/execute as @e[tag=anchor,type=minecraft:armor_stand,limit=1] run setblock %{_mlex}% %({_mley} - 1)% %{_mlez}% redstone_block"
- console command "/execute as @e[tag=anchor,type=minecraft:armor_stand,limit=1] run fill %{_mlex}% %{_mley}% %{_mlez}% %{_mlex}% %({_mley} - 1)% %{_mlez}% air"
- wait 1 second
- loop {games::matches::match%{_matchnum}%::queued::*}:
- gwRespawnMe({_matchnum}, loop-value)
- set {games::matches::match%{_matchnum}%::state} to 4
- function gwRespawnMe(matchnum: number, p: player):
- set {_team} to {player::%{_p}%::meta::glasswars::team}
- generalReadyPlayer({_p}, "survival")
- set {_loc} to {games::repo::glasswars::teams::%{_team}%::mapres}
- add 4 to {_loc}'s x-coordinate
- add 12 to {_loc}'s y-coordinate
- add 4 to {_loc}'s z-coordinate
- set {_adder} to (({games::matches::match%{_matchnum}%::gamelabel} - 1) * 250)
- add {_adder} to {_loc}'s x-coordinate
- teleport {_p} to {_loc}
- give {_p} 6 sandstone
- function gwPeriodical(matchnum: number):
- if {games::matches::match%{_matchnum}%::state} = 4:
- gwCheckGlasses({_matchnum})
- remove 1 from {games::matches::match%{_matchnum}%::itemtimer}
- if {games::matches::match%{_matchnum}%::itemtimer} <= 0:
- set {games::matches::match%{_matchnum}%::itemtimer} to 7
- gwItem({_matchnum})
- function gwCheckGlasses(matchnum: number):
- set {_adder} to (({games::matches::match%{_matchnum}%::gamelabel} - 1) * 250)
- loop {games::repo::glasswars::teams::*}:
- if {games::matches::match%{_matchnum}%::gwteam::%loop-index%} is true:
- set {_leloc} to {games::repo::glasswars::teams::%loop-index%::mapres}
- add {_adder} to {_leloc}'s x-coordinate
- add 4 to {_leloc}'s x-coordinate
- add 10 to {_leloc}'s y-coordinate
- add 4 to {_leloc}'s z-coordinate
- set {_gamer} to true if block at {_leloc} is {games::repo::glasswars::teams::%loop-index%::block} else false
- if {_gamer} is false:
- set {games::matches::match%{_matchnum}%::gwteam::%loop-index%} to false
- function gwItem(matchnum: number):
- loop {games::matches::match%{_matchnum}%::queued::*}:
- if loop-value is alive:
- set {_lei} to a random element out of {games::repo::glasswars::items::*}
- give {_lei} to loop-value's inventory
- # might as well test endgame
- gwCheckEndGame({_matchnum})
- function gwJoinTeam(p: player, teamname: text):
- set {_c} to {games::repo::glasswars::teams::%{_teamname}%::col}
- set {_p} tab name to "%{_c}%%{_p}%"
- set {player::%{_p}%::meta::glasswars::team} to {_teamname}
- on break:
- if {player::%player%::gametype} is "glasswars":
- if event-block is iron block:
- cancel event
- stop
- set {_found} to false
- set {_targetteam} to ""
- loop {games::repo::glasswars::teams::*}:
- if event-block is {games::repo::glasswars::teams::%loop-index%::block}:
- set {_targetteam} to loop-index
- set {_found} to true
- if {_found} is true:
- set {_matchnum} to {player::%player%::ingame}
- set {_team} to {player::%player%::meta::glasswars::team}
- set {_theblocc} to {games::repo::glasswars::teams::%{_team}%::block}
- if event-block is {_theblocc}:
- cancel event
- stop
- set {_c} to {games::repo::glasswars::teams::%{_team}%::col}
- set {_cc} to {games::repo::glasswars::teams::%{_targetteam}%::col}
- set {_upper} to the first character of {_targetteam}
- set {_upper} to "%{_upper}%" in upper case
- set {_rest} to subtext of {_targetteam} from characters 2 to (the length of {_targetteam})
- sendToQueued("", {_matchnum})
- sendToQueued("%{_c}%%player% &7destroyed %{_cc}%%{_upper}%%{_rest}%'s glass!", {_matchnum})
- sendToQueued("", {_matchnum})
- playToQueued("entity.ender_dragon.growl", {_matchnum}, 1, 10)
- set {_tspan} to 2 seconds
- loop {games::matches::match%{_matchnum}%::queued::*}:
- if {player::%loop-value%::meta::glasswars::team} is {_targetteam}:
- sendTitleWithSubtitle(loop-value, "&cGLASS DESTROYED!", "You will no longer respawn!", {_tspan})
- wait 2 ticks
- gwCheckGlasses({_matchnum})
- on death:
- if {player::%victim%::gametype} is "glasswars":
- set {_matchnum} to {player::%victim%::ingame}
- if {games::matches::match%{_matchnum}%::state} >= 3:
- set {_vt} to {player::%victim%::meta::glasswars::team}
- set {_vcc} to {games::repo::glasswars::teams::%{_vt}%::col}
- set {_dmsg} to ""
- if attacker is set:
- set {_at} to {player::%attacker%::meta::glasswars::team}
- set {_acc} to {games::repo::glasswars::teams::%{_at}%::col}
- set {_dpart} to deathGrabRandHomicide()
- set {_dmsg} to "%{_vcc}%%victim% %{_dpart}% %{_acc}%%attacker%"
- else:
- set {_dpart} to deathGrabRandSolo()
- set {_dmsg} to "%{_vcc}%%victim% %{_dpart}%"
- sendToQueued({_dmsg}, {_matchnum})
- gwShouldRespawn(victim, {_matchnum})
- function gwShouldRespawn(p: player, matchnum: number):
- set {_team} to {player::%{_p}%::meta::glasswars::team}
- if {games::matches::match%{_matchnum}%::gwteam::%{_team}%} is true:
- set {player::%{_p}%::meta::glasswars::resp} to true
- else:
- set {player::%{_p}%::meta::glasswars::resp} to false
- wait 2 ticks
- softReset({_p})
- gwCheckEndGame({_matchnum})
- function gwCheckEndGame(matchnum: number):
- loop {games::matches::match%{_matchnum}%::queued::*}:
- set {_team} to {player::%loop-value%::meta::glasswars::team}
- if {_tlist::%{_team}%} is not set:
- set {_tlist::%{_team}%} to true
- if size of {_tlist::*} <= 1:
- gwEndGame({_matchnum}, {_team})
- function gwQuit(matchnum: number, p: player):
- remove {_p} from {games::matches::match%{_matchnum}%::queued::*}
- gwCheckEndGame({_matchnum})
- function gwEndGame(matchnum: number, winner: text):
- set {games::matches::match%{_matchnum}%::state} to -1
- set {_col} to "&7"
- set {_gm} to {games::matches::match%{_matchnum}%::gamelabel}
- loop {games::matches::match%{_matchnum}%::queued::*}:
- softReset(loop-value)
- if {_winner} is set:
- set {_col} to {games::repo::glasswars::teams::%{_winner}%::col}
- set {_upper} to the first character of {_winner}
- set {_upper} to "%{_upper}%" in upper case
- set {_rest} to subtext of {_winner} from characters 2 to (the length of {_winner})
- sendToLobby("%{_col}%%{_upper}%%{_rest}% &7won &6Glass&eWars! &7(Match &e%{_gm}%&7)")
- playToLobby("entity.player.levelup", 1.6, 10)
- clear {games::matches::match%{_matchnum}%::queued::*}
- set {games::matches::match%{_matchnum}%::state} to 0
- on respawn:
- if {player::%player%::gametype} is "glasswars":
- if {player::%player%::meta::glasswars::resp} is true:
- wait 2 ticks
- gwRespawnMe({player::%player%::ingame}, player)
- on right click:
- if {player::%player%::gametype} is "glasswars":
- if event-item is carrot on a stick:
- if name of item is "&aLevitation Stick":
- remove 1 carrot on a stick from player's inventory
- apply potion of levitation of tier 2 without particles to player for 7 seconds
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement