valentin_bogdanov_schedule.tw 4.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. :: valentin_bogdanov_schedule
  2. <<set $here = 'valentin_bogdanov_schedule'>>
  3. <<set $ARGS = $location_var[$here]>>
  4. <!-- !! 2023-05-26-->
  5. <!-- !! His schedule:-->
  6. <!-- !ValentinLocCity tells us where Valentin is located-->
  7. <!-- !locat['A158']-->
  8. <!-- !------------------------------------------------>
  9. <!-- !locat['A158'] = 0 (Valentin not home Fri and Sat 20:00 for rest of night)-->
  10. <!-- !locat['A158'] = 1 (Valentin in the hallway)-->
  11. <!-- !locat['A158'] = 2 (Valentin in Anushka''s room)-->
  12. <!-- !locat['A158'] = 3 (Valentin in Radomir''s room)-->
  13. <!-- !locat['A158'] = 4 (Valentin in the kitchen)-->
  14. <!-- !locat['A158'] = 5 (Valentin in the livingroom)-->
  15. <!-- !locat['A158'] = 6 (Valentin in his and Arkadi''s room)-->
  16. <!-- !locat['A158'] = 7 (Valentin in the bathroom)-->
  17. <!-- !locat['A158'] = 8 (Valentin is in the garage with the band Wed 18-23)-->
  18. <!-- !locat['A158'] = 9 (Valentin is at work, mechanic Mon-Fri 8 to 17)-->
  19. <!-- !locat['A158'] = 10 (Valentin is in the garage working on his bike Mon 17-23)-->
  20. <!-- !----------------------------------------------->
  21. <!-- !! Standard location is his shared own room which should be set at init-->
  22. <!-- !locat['A158'] = 6-->
  23. <!-- ! TODO fix for-->
  24. <!-- !!Valentin is home Tues and Thurs from 18:00 for rest of night, Sat from 08:00 till 20:00, Sun all day-->
  25. <<if $time.weekday == 1>>
  26. <<if $time.hour >= 8 and $time.hour < 17>>
  27. <<setinit $locat['A158'] = 9>>
  28. <<elseif $time.hour >= 17 and $time.hour < 23>>
  29. <<setinit $locat['A158'] = 10>>
  30. <</if>>
  31. <<elseif $time.weekday == 2>>
  32. <<if $time.hour >= 8 and $time.hour < 17>>
  33. <<setinit $locat['A158'] = 9>>
  34. <<elseif $time.hour >= 18>>
  35. <<setinit $locat['A158'] = 6>>
  36. <</if>>
  37. <<elseif $time.weekday == 3>>
  38. <<if $time.hour >= 8 and $time.hour < 17>>
  39. <<setinit $locat['A158'] = 9>>
  40. <<elseif $time.hour >= 18 and $time.hour < 23>>
  41. <<setinit $locat['A158'] = 8>>
  42. <</if>>
  43. <<elseif $time.weekday == 4>>
  44. <<if $time.hour >= 8 and $time.hour < 17>>
  45. <<setinit $locat['A158'] = 9>>
  46. <<elseif $time.hour >= 18>>
  47. <<setinit $locat['A158'] = 6>>
  48. <</if>>
  49. <<elseif $time.weekday == 5>>
  50. <<if $time.hour >= 8 and $time.hour < 17>>
  51. <<setinit $locat['A158'] = 9>>
  52. <<elseif $time.hour >= 20>>
  53. <<setinit $locat['A158'] = 0>>
  54. <</if>>
  55. <<elseif $time.weekday == 6>>
  56. <<if $time.hour >= 8 and $time.hour < 20>>
  57. <<setinit $locat['A158'] = 6>>
  58. <<elseif $time.hour >= 20>>
  59. <<setinit $locat['A158'] = 0>>
  60. <</if>>
  61. <<elseif $time.weekday == 7>>
  62. <</if>>
  63. <<if getvar("$locat['A158']") > 0 and getvar("$locat['A158']") < 8>>
  64. <<set $ValentinLocCity = 'home'>>
  65. <<else>>
  66. <<set $ValentinLocCity = 'notHome'>>
  67. <</if>>
  68. <!-- ! Use this in the calendar app on Sveta''s phone Loop over an array there that holds NPC IDs she is allowed to see there, and for each ID call this function.-->
  69. <<if $location_var[$here][0] == 'getLocation'>>
  70. <!-- !Set the text for the current NPC ID-->
  71. <<if getvar("$locat['A158']") == 0>>
  72. <<setinit $npcLocation['A144'] = 'Valentin not home Fri and Sat 20:00 for rest of night.'>>
  73. <<elseif getvar("$locat['A158']") == 1>>
  74. <<setinit $npcLocation['A144'] = 'Valentin in the hallway.'>>
  75. <<elseif getvar("$locat['A158']") == 2>>
  76. <<setinit $npcLocation['A144'] = 'Valentin in Anushka`s room.'>>
  77. <<elseif getvar("$locat['A158']") == 3>>
  78. <<setinit $npcLocation['A144'] = 'Valentin in Radomir`s room.'>>
  79. <<elseif getvar("$locat['A158']") == 4>>
  80. <<setinit $npcLocation['A144'] = 'Valentin in the kitchen.'>>
  81. <<elseif getvar("$locat['A158']") == 5>>
  82. <<setinit $npcLocation['A144'] = 'Valentin in the livingroom.'>>
  83. <<elseif getvar("$locat['A158']") == 6>>
  84. <<setinit $npcLocation['A144'] = 'Valentin in his and Arkadi`s room.'>>
  85. <<elseif getvar("$locat['A158']") == 7>>
  86. <<setinit $npcLocation['A144'] = 'Valentin in the bathroom.'>>
  87. <<elseif getvar("$locat['A158']") == 8>>
  88. <<setinit $npcLocation['A144'] = 'Valentin is in the garage with the band.'>>
  89. <<elseif getvar("$locat['A158']") == 9>>
  90. <<setinit $npcLocation['A144'] = 'Valentin is at work, mechanic Mon-Fri 8 to 17.'>>
  91. <<elseif getvar("$locat['A158']") == 10>>
  92. <<setinit $npcLocation['A144'] = 'Valentin is in the garage working on his bike Mon 17-23.'>>
  93. <</if>>
  94. <</if>>