# +---------------------------------- # | Region World Script # +---------------------------------- Regions_Script: type: world events: # +---------------------------------- # | Server Start # +---------------------------------- on server start: # | Cuboid gates - flag server Cathar_South_Gate:0 - flag server Cathar_West_Gate:0 - flag server Cathar_North_Gate:0 - note cu@l@9364,30,5874,world|l@9349,50,5825,world as:Cathar_South_Gate # | Cuboid Mines - note cu@l@6832,31,7437,world|l@6837,27,7437,world as:Lindorthell_Mine_W - note cu@l@-696,195,-687,resources|l@-691,199,-687,resources as:Lindorthell_Mine_R - note cu@l@1303,37,5475,world|l@1303,33,5485,world as:Orgoroth_Mine_W - note cu@l@1302,34,5474,world|l@1298,37,5475,world as:Orgoroth_Mine_W2 - note cu@l@-679,18,674,resources|l@-681,184,676,resources as:Orgoroth_Mine_R - note cu@l@-688,193,671,resources|l@-683,190,679,resources as:Orgoroth_Mine_R2 # +---------------------------------- # | Cathar Regions # +---------------------------------- on player enters cu@Cathar_South_Gate: - if > -1 { - flag server Cathar_South_Gate:++ - run Cathar_South_Gate_Task } on player exits cu@Cathar_South_Gate: - if > 0 { - flag server Cathar_South_Gate:-- - run Cathar_South_Gate_Task } # +---------------------------------- # | Mines # +---------------------------------- # | Lindorthell on player enters cu@Lindorthell_Mine_W: - teleport -693,194,-682,resources on player enters cu@Lindorthell_Mine_R: - teleport 6834,30,7433,world - look 6831,35,7427,world # | Orgoroth on player enters cu@Orgoroth_Mine_W: - teleport -677,180,675,resources - look -673,184,665,resources on player enters cu@Orgoroth_Mine_W2: - teleport -684,190,670,resources - look -669,184,654,resources on player enters cu@Orgoroth_Mine_R: - teleport 1302,34,5478,world - look 1292,40,5482,world on player enters cu@Orgoroth_Mine_R2: - teleport 1301,34,5476,world - look 1292,40,5482,world Cathar_South_Gate_Task: type: task Script: - if > -1 { - if ! { - if ! { - flag server Cathar_South_Gate_Closed:! - flag server Cathar_South_Gate_Open:! - flag server Cathar_South_Gate_Engaged duration:4s - execute as_server "rb rebuild southgate1" - wait 0.5s - execute as_server "rb rebuild southgate2" - wait 0.5s - execute as_server "rb rebuild southgate3" - wait 0.5s - execute as_server "rb rebuild southgate4" - wait 0.5s - execute as_server "rb rebuild southgate5" - wait 0.5s - execute as_server "rb rebuild southgate6" - flag server Cathar_South_Gate_Open - flag server Cathar_South_Gate_Closed:! } } else { - wait 5s - if ! { - if ! { - flag server Cathar_South_Gate_Closed:! - flag server Cathar_South_Gate_Open:! - flag server Cathar_South_Gate_Engaged duration:4s - execute as_server "rb rebuild southgate1" - wait 0.5s - execute as_server "rb rebuild southgate2" - wait 0.5s - execute as_server "rb rebuild southgate3" - wait 0.5s - execute as_server "rb rebuild southgate4" - wait 0.5s - execute as_server "rb rebuild southgate5" - wait 0.5s - execute as_server "rb rebuild southgate6" - flag server Cathar_South_Gate_Open - flag server Cathar_South_Gate_Closed:! } else { - wait 5s - run Cathar_South_Gate_Task } } } } - if == 0 { - if ! { - if ! { - flag server Cathar_South_Gate_Open:! - flag server Cathar_South_Gate_Closed:! - flag server Cathar_South_Gate_Engaged duration:4s - execute as_server "rb rebuild southgate6" - wait 0.5s - execute as_server "rb rebuild southgate5" - wait 0.5s - execute as_server "rb rebuild southgate4" - wait 0.5s - execute as_server "rb rebuild southgate3" - wait 0.5s - execute as_server "rb rebuild southgate2" - wait 0.5s - execute as_server "rb rebuild southgate1" - flag server Cathar_South_Gate_Closed - flag server Cathar_South_Gate_Open:! } } else { - wait 5s - if ! { - if ! { - flag server Cathar_South_Gate_Open:! - flag server Cathar_South_Gate_Closed:! - flag server Cathar_South_Gate_Engaged duration:4s - execute as_server "rb rebuild southgate6" - wait 0.5s - execute as_server "rb rebuild southgate5" - wait 0.5s - execute as_server "rb rebuild southgate4" - wait 0.5s - execute as_server "rb rebuild southgate3" - wait 0.5s - execute as_server "rb rebuild southgate2" - wait 0.5s - execute as_server "rb rebuild southgate1" - flag server Cathar_South_Gate_Closed - flag server Cathar_South_Gate_Open:! } else { - wait 5s - run Cathar_South_Gate_Task } } } }