player_leave.mcfunction 1.1 KB

123456789101112131415161718
  1. # 任意玩家下线时触发
  2. execute as @a at @s run function lib:sounds/error
  3. # 由于玩家人数不足,强制结束游戏
  4. execute store result score $t_count mem if entity @a[tag=!watcher]
  5. execute if score $state mem matches 1.. if score $game_type mem matches 1 if score $t_count mem matches ..1 run function ltw:main/game_end
  6. execute if score $state mem matches 1.. if score $game_type mem matches 1 if score $t_count mem matches ..1 run tellraw @a {"text": "由于玩家人数不足, 游戏直接结束!","color":"red"}
  7. # 如果携带热土豆的玩家掉线,则重新生成土豆
  8. execute if score $state mem matches 5 if score $mini_type mem matches 3 run function mini:hotpm/player_leave
  9. # FIXME : [010/HIM] 奖励选择房和跑酷图还有结构方块的线
  10. # FIXME : [010/HIM] 玩家可以钓鱼
  11. # FIXME : 喝完药的玻璃瓶没有 clear
  12. # FIXME : <! 紧急> 跑酷中途掉线导致名次判断错误
  13. # FIXME : <! 紧急> [010] 弩和箭可能给不到人
  14. # FIXME : [010/HIM] 关闭原版进度,它会给玩家经验值什么的很烦
  15. # TODO : [010] 制作命运硬币(拾取时得分加倍或减半)、命运骰子(拾取时得分 +1~6)