Date: 2016/04/12 10:46:18 UTC-07:00
Type: Denizen Script
"BodyStats":
Type: world
debug: true
events:
on server start:
- run "SprintCheck"
SprintCheck:
type: task
script:
- foreach <server.list_online_players.aslist> {
- narrate "SprintCheck start"
- if <player.walk_speed> > 0.2 {
- narrate "<player.walk_speed>"
#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 <player.flag[BodyStatsTemp]||0> < 10 {
- determine cancelled
- queue clear
}
- flag player BodyStatsTemp:+:1
- flag player BodyStatsThirst:-:2
- if <player.flag[BodyStatsTemp]||0> > 70 {
- determine cancelled
- queue clear
}
- if <player.flag[BodyStatsThirst]||0> < 35 {
- determine cancelled
- queue clear
}
- flag player BodyStatsStamina:-:3
}
}
- run "SprintCheck"