-SprintCheck: - type: world +"BodyStats": + Type: world debug: true events: - on player toggles sprinting: - - foreach { - - narrate "SprintCheck start" - - if > 0.2 { - - narrate "" - #If the temperature flag is below 10 the event should be cancelled. If it is not, the flag should rise by one and the thirst flag should decrease by 2 and another check should be made - if it is above 70, the event will be cancelled, as it will if the thirst flag is below 35. If it does succeed, it will lower the stamina flag by 3. - - if < 10 { - - queue clear - } - - flag BodyStatsTemp:+:1 - - flag BodyStatsThirst:-:2 - - if > 70 { - - queue clear - } - - if < 35 { - - queue clear - } - - flag BodyStatsStamina:-:3 - } + on server start: + - wait 1t + - run "RollingClock1" + - wait 1t + - inject "SprintCheck" + +SprintCheck: + type: task + script: + - foreach { + - narrate "SprintCheck start" + - if > 0.2 { + - narrate "" + #If the temperature flag is below 10 the event should be cancelled. If it is not, the flag should rise by one and the thirst flag should decrease by 2 and another check should be made - if it is above 70, the event will be cancelled, as it will if the thirst flag is below 35. If it does succeed, it will lower the stamina flag by 3. + - if < 10 { + - queue clear + } + - flag BodyStatsTemp:+:1 + - flag BodyStatsThirst:-:2 + - if > 70 { + - queue clear + } + - if < 35 { + - queue clear + } + - flag BodyStatsStamina:-:3 } + } + - wait 1t + - inject "SprintCheck"