on load:
set {wires::redwool} to 0
set {wires::bluewool} to 0
set {wires::limewool} to 0
on right click:
if block is gold ore:
open chest inventory with 5 rows named "&cFix Wires" to player
set {coords::x} to floor(x-coordinate of event-block)
set {coords::y} to floor(y-coordinate of event-block)
set {coords::z} to floor(z-coordinate of event-block)
wait 1 tick
#fill background
loop integers from 0 to 44:
set slot loop-integer of player's current inventory to black stained glass pane named " "
#middle
loop integers from 11 to 15:
set slot loop-integer of player's current inventory to redstone named "&cWire"
loop integers from 20 to 24:
set slot loop-integer of player's current inventory to redstone named "&cWire"
loop integers from 29 to 33:
set slot loop-integer of player's current inventory to redstone named "&cWire"
#wool colors list
#right
set {_colors::*} to red wool, blue wool, lime wool
wait 1 tick
set {_chosen} to random element out of {_colors::*}
set slot 10 of player's current inventory to {_chosen}
remove {_chosen} from {_colors::*}
wait 1 tick
set {_colour::chosen} to random element out of {_colors::*}
set slot 19 of player's current inventory to {_colour::chosen}
remove {_colour::chosen} from {_colors::*}
wait 1 tick
set {_colour::chosen} to random element out of {_colors::*}
set slot 28 of player's current inventory to {_colour::chosen}
remove {_colour::chosen} from {_colors::*}
#left
set {_colors::*} to red wool, blue wool, lime wool
wait 1 tick
set {_chosen} to random element out of {_colors::*}
set slot 16 of player's current inventory to {_chosen}
remove {_chosen} from {_colors::*}
wait 1 tick
set {_colour::chosen} to random element out of {_colors::*}
set slot 25 of player's current inventory to {_colour::chosen}
remove {_colour::chosen} from {_colors::*}
wait 1 tick
set {_colour::chosen} to random element out of {_colors::*}
set slot 34 of player's current inventory to {_colour::chosen}
remove {_colour::chosen} from {_colors::*}
on inventory click:
if name of event-inventory contains "&cFix Wires":
cancel event
if clicked inventory is player's inventory:
stop
if index of event-slot = 16 or 25 or 34:
if {coords::x} = -91:
if {coords::y} = -17:
if {coords::z} = -120:
if {task::NavigationWires::%player%} is true:
stop
if event-slot is red wool or blue wool or lime wool:
if {wireChosen::%player%::right} is true:
stop
set {wireChosen::%player%::right} to true
send "test" to player
if event-item is red wool:
send "test0" to player
wait 1 tick
add 1 to {wires::redwool}
wait 1 tick
send "test1" to player
if {wires::bluewool} is 1 or 2:
send "&cWrong!" to player
set {wires::bluewool} to 1
stop
if {wires::limewool} is 1 or 2:
send "&cWrong!" to player
set {wires::limewool} to 1
stop
set event-slot to redstone block
if {wires::redwool} is 2:
set {wires::redwool} to 1
send "test2" to player
if index of event-slot is 16 or 25 or 34:
send "test3" to player
loop integers from 16 to 34:
send "test4" to player
if loop-integer is 16:
wait 1 tick
if slot 16 of player's current inventory is redstone block:
set slot 16 of player's current inventory to air
send "testredstone" to player
if loop-integer is 25:
if slot 25 of player's current inventory is redstone block:
set slot 25 of player's current inventory to air
send "testredstone" to player
if loop-integer is 34:
if slot 34 of player's current inventory is redstone block:
set slot 34 of player's current inventory to air
send "testredstone" to player
loop integers from 10 to 28:
send "test4" to player
if loop-integer is 10:
wait 1 tick
if slot 10 of player's current inventory is redstone block:
set slot 10 of player's current inventory to air
send "testredstone" to player
if loop-integer is 19:
if slot 19 of player's current inventory is redstone block:
set slot 19 of player's current inventory to air
send "testredstone" to player
if loop-integer is 28:
if slot 28 of player's current inventory is redstone block:
set slot 28 of player's current inventory to air
send "testredstone" to player
set {wireChosen::%player%::right} to false
set {wireChosen::%player%::left} to false
add 1 to {task::wires::finish}
set {wires::redwool} to 0
set {wires::limewool} to 0
set {wires::bluewool} to 0
else if event-item is lime wool:
send "test0" to player
wait 1 tick
add 1 to {wires::limewool}
wait 1 tick
send "test1" to player
set event-slot to redstone block
if {wires::limewool} is 2:
send "test2" to player
set {wires::limewool} to 1
if index of event-slot is 16 or 25 or 34:
send "test3" to player
loop integers from 16 to 34:
send "test4" to player
if loop-integer is 16:
wait 1 tick
if slot 16 of player's current inventory is redstone block:
set slot 16 of player's current inventory to air
send "testredstone" to player
if loop-integer is 25:
if slot 25 of player's current inventory is redstone block:
set slot 25 of player's current inventory to air
send "testredstone" to player
if loop-integer is 34:
if slot 34 of player's current inventory is redstone block:
set slot 34 of player's current inventory to air
send "testredstone" to player
loop integers from 10 to 28:
send "test4" to player
if loop-integer is 10:
wait 1 tick
if slot 10 of player's current inventory is redstone block:
set slot 10 of player's current inventory to air
send "testredstone" to player
if loop-integer is 19:
if slot 19 of player's current inventory is redstone block:
set slot 19 of player's current inventory to air
send "testredstone" to player
if loop-integer is 28:
if slot 28 of player's current inventory is redstone block:
set slot 28 of player's current inventory to air
send "testredstone" to player
set {wireChosen::%player%::right} to false
set {wireChosen::%player%::left} to false
add 1 to {task::wires::finish}
set {wires::redwool} to 0
set {wires::limewool} to 0
set {wires::bluewool} to 0
else if event-item is blue wool:
send "test0" to player
wait 1 tick
add 1 to {wires::bluewool}
wait 1 tick
send "test1" to player
set event-slot to redstone block
if {wires::bluewool} is 2:
send "test2" to player
set {wires::bluewool} to 1
if index of event-slot is 16 or 25 or 34:
send "test3" to player
loop integers from 16 to 34:
send "test4" to player
if loop-integer is 16:
wait 1 tick
if slot 16 of player's current inventory is redstone block:
set slot 16 of player's current inventory to air
send "testredstone" to player
if loop-integer is 25:
if slot 25 of player's current inventory is redstone block:
set slot 25 of player's current inventory to air
send "testredstone" to player
if loop-integer is 34:
if slot 34 of player's current inventory is redstone block:
set slot 34 of player's current inventory to air
send "testredstone" to player
loop integers from 10 to 28:
send "test4" to player
if loop-integer is 10:
wait 1 tick
if slot 10 of player's current inventory is redstone block:
set slot 10 of player's current inventory to air
send "testredstone" to player
if loop-integer is 19:
if slot 19 of player's current inventory is redstone block:
set slot 19 of player's current inventory to air
send "testredstone" to player
if loop-integer is 28:
if slot 28 of player's current inventory is redstone block:
set slot 28 of player's current inventory to air
send "testredstone" to player
add 1 to {task::wires::finish}
set {wireChosen::%player%::right} to false
set {wireChosen::%player%::left} to false
set {wires::redwool} to 0
set {wires::limewool} to 0
set {wires::bluewool} to 0
else:
send "%{wires::redwool}%" to player
else:
send "%event-item%" to player
else:
send "&cWrong location!"
send "&7Your coords: %{coords::x}%, %{coords::y}%, %{coords::z}%"
else:
send "&cWrong location!"
send "&7Your coords: %{coords::x}%, %{coords::y}%, %{coords::z}%"
else:
send "&cWrong location!"
send "&7Your coords: %{coords::x}%, %{coords::y}%, %{coords::z}%"
if index of event-slot = 10 or 19 or 28:
if {coords::x} = -91:
if {coords::y} = -17:
if {coords::z} = -120:
if event-slot is red wool:
if {wireChosen::%player%::left} is true:
stop
if {wireChosen::%player%::right} is false:
set {wireChosen::%player%::left} to true
if {wires::bluewool} is 1 or 2:
send "&cWrong!" to player
stop
if {wires::limewool} is 1 or 2:
send "&cWrong!" to player
stop
if event-slot is blue wool:
if {wireChosen::%player%::left} is true:
stop
if {wireChosen::%player%::right} is false:
set {wireChosen::%player%::left} to true
if {wires::redwool} is 1 or 2:
send "&cWrong!" to player
stop
if {wires::limewool} is 1 or 2:
send "&cWrong!" to player
stop
if event-slot is lime wool:
if {wireChosen::%player%::left} is true:
stop
if {wireChosen::%player%::right} is false:
set {wireChosen::%player%::left} to true
if {wires::bluewool} is 1 or 2:
send "&cWrong!" to player
stop
if {wires::redwool} is 1 or 2:
send "&cWrong!" to player
stop
wait 3 ticks
if event-slot is red_wool:
set event-slot to redstone block
add 1 to {wires::redwool}
if event-slot is lime_wool:
set event-slot to redstone block
add 1 to {wires::limewool}
if event-slot is blue_wool:
set event-slot to redstone block
add 1 to {wires::bluewool}
if index of event-slot = 16 or 25 or 34:
if {coords::x} = -91:
if {coords::y} = -17:
if {coords::z} = -120:
if {task::wires::finish} > 3:
set {task::wires::finish} to 3
if {task::wires::finish} < 0:
set {task::wires::finish} to 0
if {task::wires::finish} = 3:
send "&aNavigation Wires Complete"
set {task::NavigationWires::%player%} to true
execute console command "/taskcomplete add 100"
set {task::wires::finish} to 0
else:
send "&cWrong location!"
send "&7Your coords: %{coords::x}%, %{coords::y}%, %{coords::z}%"
else:
send "&cWrong location!"
send "&7Your coords: %{coords::x}%, %{coords::y}%, %{coords::z}%"
else:
send "&cWrong location!"
send "&7Your coords: %{coords::x}%, %{coords::y}%, %{coords::z}%"
on inventory close:
if name of player's current inventory contains "&cFix Wires":
delete {wireChosen::%player%::*}
set {wires::redwool} to 0
set {wires::limewool} to 0
set {wires::bluewool} to 0
set {task::wires::finish} to 0
set {wireChosen::%player%::right} to false
set {wireChosen::%player%::left} to false