gp_elene_schedule.qsrc 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  1. # gp_elene_schedule
  2. !! Date Created: 15th May, 2024
  3. !! Version: .01
  4. !! Author: Myles Croft
  5. !!
  6. !! Sveta''s Grandmother in Gad npc id A31
  7. !!
  8. !locat['A31'] tells us where Elene is Located
  9. !----------------------------------------------
  10. !locat['A31'] = 100 Bedroom
  11. !locat['A31'] = 110 Livingroom
  12. !locat['A31'] = 111 Livingroom - Reading a book
  13. !locat['A31'] = 112 Livingroom - Watching tv
  14. !locat['A31'] = 113 Livingroom - Repearing some clothes
  15. !locat['A31'] = 114 Livingroom - knitting
  16. !locat['A31'] = 120 Kitchen - Cooking
  17. !locat['A31'] = 121 Kitchen - Reading?
  18. !locat['A31'] = 200 Garden - gardening
  19. !locat['A31'] = 210 Sauna - Bathing
  20. !locat['A31'] = 300 Village
  21. !locat['A31'] = 310 Church
  22. !! scheduled weekday events.
  23. if $ARGS[0] = 'cikl':
  24. locat['A31_rand'] = rand(0, 839)
  25. end
  26. if $ARGS[0] = '':
  27. locat['A31_prev'] = locat['A31']
  28. gs 'gp_elene_schedule', 'update_locat'
  29. end
  30. if $ARGS[0] = 'update_locat':
  31. locat['A31'] = 0
  32. gs 'gp_elene_schedule', 'get_base_schedule'
  33. if SunWeather = 0:
  34. if locat['A31'] = 200: locat['A31'] = 110
  35. end
  36. gs 'gp_elene_schedule', 'get_random_schedule'
  37. end
  38. if $ARGS[0] = 'get_base_schedule':
  39. if hour <= 5:
  40. locat['A31'] = 100
  41. elseif hour = 6:
  42. locat['A31'] = 120
  43. elseif hour = 7:
  44. locat['A31'] = 110
  45. elseif hour = 8:
  46. if week <= 3:
  47. locat['A31'] = 0
  48. elseif week => 5:
  49. locat['A31'] = 300
  50. else
  51. locat['A31'] = 110
  52. end
  53. elseif hour <= 11:
  54. if week <= 3:
  55. locat['A31'] = 0
  56. elseif week = 5 or week = 6:
  57. locat['A31'] = 300
  58. elseif week = 7:
  59. locat['A31'] = 310
  60. else
  61. locat['A31'] = 110
  62. end
  63. elseif hour = 12:
  64. locat['A31'] = 120
  65. elseif hour = 13:
  66. if week = 7:
  67. locat['A31'] = 120
  68. else
  69. locat['A31'] = 210
  70. end
  71. elseif hour = 14:
  72. if week = 7:
  73. locat['A31'] = 120
  74. else
  75. locat['A31'] = 110
  76. end
  77. elseif hour <= 17:
  78. locat['A31'] = 110
  79. elseif hour = 18:
  80. locat['A31'] = 120
  81. elseif hour <= 20:
  82. if week = 6:
  83. locat['A31'] = 310
  84. else
  85. locat['A31'] = 110
  86. end
  87. else
  88. locat['A31'] = 100
  89. end
  90. end
  91. if $ARGS[0] = 'get_random_schedule':
  92. if locat['A31'] = 0:
  93. if hour / 2 mod 2 = 0:
  94. if locat['A31_rand'] mod 2 = 0:
  95. locat['A31'] = 110
  96. else
  97. locat['A31'] = 200
  98. end
  99. else
  100. if locat['A31_rand'] / 2 mod 2 = 0:
  101. locat['A31'] = 110
  102. else
  103. locat['A31'] = 200
  104. end
  105. end
  106. end
  107. if locat['A31'] = 110:
  108. if hour <= 8:
  109. temp_subloc = locat['A31_rand'] / 4 mod 4
  110. elseif hour <= 10:
  111. temp_subloc = locat['A31_rand'] / 16 mod 4
  112. elseif hour <= 12:
  113. temp_subloc = locat['A31_rand'] / 12 mod 4
  114. elseif hour <= 14:
  115. temp_subloc = locat['A31_rand'] / 48 mod 4
  116. elseif hour <= 16:
  117. temp_subloc = locat['A31_rand'] / 20 mod 4
  118. elseif hour <= 18:
  119. temp_subloc = locat['A31_rand'] / 80 mod 4
  120. elseif hour <= 20:
  121. temp_subloc = locat['A31_rand'] / 28 mod 4
  122. end
  123. locat['A31'] = 111 + temp_subloc
  124. killvar 'temp_subloc'
  125. end
  126. end
  127. if $ARGS[0] = 'getLocation':
  128. gs 'gp_elene_schedule', 'update_locat'
  129. if locat['A31'] / 10 = 10:
  130. $npcLocation['A31'] = 'Your grandmother is in her bedroom'
  131. elseif locat['A31'] / 10 = 11:
  132. $npcLocation['A31'] = 'Your grandmother is in her livingroom'
  133. elseif locat['A31'] / 10 = 12:
  134. $npcLocation['A31'] = 'Your grandmother is in her kitcher'
  135. elseif locat['A31'] / 10 = 20:
  136. $npcLocation['A31'] = 'Your grandmother is in her garden'
  137. elseif locat['A31'] / 10 = 21:
  138. $npcLocation['A31'] = 'Your grandmother is bathing in her sauna'
  139. elseif locat['A31'] / 10 = 30:
  140. $npcLocation['A31'] = 'Your grandmother is out and about in Gadukino'
  141. elseif locat['A31'] / 10 = 31:
  142. $npcLocation['A31'] = 'Your grandmother is at her church'
  143. end
  144. end
  145. --- gp_elene_schedule ---------------------------------