# gp_elene_schedule !! Date Created: 15th May, 2024 !! Version: .01 !! Author: Myles Croft !! !! Sveta''s Grandmother in Gad npc id A31 !! !locat['A31'] tells us where Elene is Located !---------------------------------------------- !locat['A31'] = 100 Bedroom !locat['A31'] = 110 Livingroom !locat['A31'] = 111 Livingroom - Reading a book !locat['A31'] = 112 Livingroom - Watching tv !locat['A31'] = 113 Livingroom - Repearing some clothes !locat['A31'] = 114 Livingroom - knitting !locat['A31'] = 120 Kitchen - Cooking !locat['A31'] = 121 Kitchen - Reading? !locat['A31'] = 200 Garden - gardening !locat['A31'] = 210 Sauna - Bathing !locat['A31'] = 300 Village !locat['A31'] = 310 Church !! scheduled weekday events. if $ARGS[0] = 'cikl': locat['A31_rand'] = rand(0, 839) end if $ARGS[0] = '': locat['A31_prev'] = locat['A31'] gs 'gp_elene_schedule', 'update_locat' end if $ARGS[0] = 'update_locat': locat['A31'] = 0 gs 'gp_elene_schedule', 'get_base_schedule' if SunWeather = 0: if locat['A31'] = 200: locat['A31'] = 110 end gs 'gp_elene_schedule', 'get_random_schedule' end if $ARGS[0] = 'get_base_schedule': if hour <= 5: locat['A31'] = 100 elseif hour = 6: locat['A31'] = 120 elseif hour = 7: locat['A31'] = 110 elseif hour = 8: if week <= 3: locat['A31'] = 0 elseif week => 5: locat['A31'] = 300 else locat['A31'] = 110 end elseif hour <= 11: if week <= 3: locat['A31'] = 0 elseif week = 5 or week = 6: locat['A31'] = 300 elseif week = 7: locat['A31'] = 310 else locat['A31'] = 110 end elseif hour = 12: locat['A31'] = 120 elseif hour = 13: if week = 7: locat['A31'] = 120 else locat['A31'] = 210 end elseif hour = 14: if week = 7: locat['A31'] = 120 else locat['A31'] = 110 end elseif hour <= 17: locat['A31'] = 110 elseif hour = 18: locat['A31'] = 120 elseif hour <= 20: if week = 6: locat['A31'] = 310 else locat['A31'] = 110 end else locat['A31'] = 100 end end if $ARGS[0] = 'get_random_schedule': if locat['A31'] = 0: if hour / 2 mod 2 = 0: if locat['A31_rand'] mod 2 = 0: locat['A31'] = 110 else locat['A31'] = 200 end else if locat['A31_rand'] / 2 mod 2 = 0: locat['A31'] = 110 else locat['A31'] = 200 end end end if locat['A31'] = 110: if hour <= 8: temp_subloc = locat['A31_rand'] / 4 mod 4 elseif hour <= 10: temp_subloc = locat['A31_rand'] / 16 mod 4 elseif hour <= 12: temp_subloc = locat['A31_rand'] / 12 mod 4 elseif hour <= 14: temp_subloc = locat['A31_rand'] / 48 mod 4 elseif hour <= 16: temp_subloc = locat['A31_rand'] / 20 mod 4 elseif hour <= 18: temp_subloc = locat['A31_rand'] / 80 mod 4 elseif hour <= 20: temp_subloc = locat['A31_rand'] / 28 mod 4 end locat['A31'] = 111 + temp_subloc killvar 'temp_subloc' end end if $ARGS[0] = 'getLocation': gs 'gp_elene_schedule', 'update_locat' if locat['A31'] / 10 = 10: $npcLocation['A31'] = 'Your grandmother is in her bedroom' elseif locat['A31'] / 10 = 11: $npcLocation['A31'] = 'Your grandmother is in her livingroom' elseif locat['A31'] / 10 = 12: $npcLocation['A31'] = 'Your grandmother is in her kitcher' elseif locat['A31'] / 10 = 20: $npcLocation['A31'] = 'Your grandmother is in her garden' elseif locat['A31'] / 10 = 21: $npcLocation['A31'] = 'Your grandmother is bathing in her sauna' elseif locat['A31'] / 10 = 30: $npcLocation['A31'] = 'Your grandmother is out and about in Gadukino' elseif locat['A31'] / 10 = 31: $npcLocation['A31'] = 'Your grandmother is at her church' end end --- gp_elene_schedule ---------------------------------