I wrote this in Scar so it might not work on Simba without editing
You can go to https://www.naturalreaders.com/online/
and use https://www.howtogeek.com/217348/how...ut-stereo-mix/
to record your systems audio and create your own alarms
you will just need to edit the file paths to them
Here is the code and the .scar and alarms
https://ufile.io/9au46
Place it in your Scripts Folder In The Simba/Scar Folder In My Documents and Un Zip it.
Enjoy!
Code:
program SupplementAlarmClockReminder;
var LatencyLag, SystemTimeAtStartUp,SystemTimeAtCurrentTime,TimeThatHasPassed:longint;
CurrentLocalTime, CurrentLocalTimeHours, CurrentLocalTimeMinutes
,CurrentLocaltimeSeconds:extended; CounterExt:array of extended;
Counter:TIntArray;
AM_PM_Holder: String;
{
I have designed this bot so that I can reduce my liver load
If my liver only has to process 1 tablet at a time
Then it won't be as stressed and it will recover faster
It will ensure the rest of my body is healthy while
My liver is also not as stressed while doing so
To ensure my whole body is healthy I need to take
Multivitamins, Vitamin B Tablets, Calcium + Vitamin D + Magnesium Tablets
and
To ensure my mind is healthy I need to ensure the part of the body which allows me to have a mind
(My Brain) is healthy amd to do that I need to take:
Piracetam 3000mg Tablets, Ginkgo Biloba + American Ginseng + Bacopa Monneria Tablets
I need to get these into my system in divided portions
Otherwise I will be sick and they won't work as well because of the diminishing of their effects
caused by not taking them in divided portions which is caused by the negative effects that
overloading ones liver has on the rest of the body and mind.
Supplements all work at a much higher efficiancy if I one can reduce the workload
on their livers
Overloading the liver causes
A range of different negative effects on the whole body including the brain
Which leads to a loss of intelligence overtime and bad health
and can instantaneously make you feel slugish and have a lack of energy and feel sick at the same time.
}
//As long as the clock is watched while it is ticking
//And the time typed in
//The hours that have passed can be measured
//And the current local time at any point during the bot being active
//So alarms can highly accurately be generated
const
CurrentTime='6.02'; AM_PM='AM';
TotalAlarmAmount='10';
Reminder_1='Take Your.. MultiVitamin Tablet...'; Time_1='7.00'; AM_PM_1='PM';
Alarm_Path_1='C:\Users\Million\Documents\SCAR Divi\Scripts\Supplement Alarm Clock + Announcer\Multivitamin Alarm.wav';
Reminder_2='Take Your.. Vitamin B Complex Tablet... Noawwwrhhhhh!!!..'; Time_2='3.01'; AM_PM_2='PM';
Alarm_Path_2='C:\Users\Million\Documents\SCAR Divi\Scripts\Supplement Alarm Clock + Announcer\Vitamin B Complex Tablet Alarm.wav';
Reminder_3='Take Your.. Vitamin D + Calcium + Magnesium Tablet... Noawwwrhhhhh!!!..'; Time_3='1.00'; AM_PM_3='PM';
Alarm_Path_3='C:\Users\Million\Documents\SCAR Divi\Scripts\Supplement Alarm Clock + Announcer\Vitamin D + Calcium + Magnesium Tablet Alarm.wav';
Reminder_4='Take Your.. Milk Thistle Tablet... Noawwwrhhhhh!!!..'; Time_4='10.00'; AM_PM_4='AM';
Alarm_Path_4='C:\Users\Million\Documents\SCAR Divi\Scripts\Supplement Alarm Clock + Announcer\Milk Thistle Tablet Alarm.wav';
Reminder_5='Take 50mg.. of Oleanolic Acid... Noawwwrhhhhh!!!..'; Time_5='7.01'; AM_PM_5='AM';
Alarm_Path_5='C:\Users\Million\Documents\SCAR Divi\Scripts\Supplement Alarm Clock + Announcer\German Shepard.wav';
Reminder_6='Take... your _____ tablet Noawwwrhhhhh!!!..'; Time_6='3.03'; AM_PM_6='AM';
Alarm_Path_6='C:\Users\Million\Documents\SCAR Divi\Scripts\Supplement Alarm Clock + Announcer\German Shepard.wav';
Reminder_7=''; Time_7='0.00'; AM_PM_7='PM';
Alarm_Path_7='';
Reminder_8=''; Time_8='0.00'; AM_PM_8='AM';
Alarm_Path_8='';
Reminder_9=''; Time_9='0.00'; AM_PM_9='AM';
Alarm_Path_9='';
Reminder_10=''; Time_10='0.00'; AM_PM_10='AM';
Alarm_Path_10='';
begin
SystemTimeAtStartUp:=GetSystemTime();
AM_PM_Holder:=AM_PM;
Disguise('SupplementAlarmClockReminder - By [_] 23 ______]');
writeln('SystemTimeAtStartUp=' + inttostr(SystemTimeAtStartUp));
sleep(1000);
writeln('Sleeped for 1000ms');
SystemTimeAtCurrentTime:=GetSystemTime();
TimeThatHasPassed:=(SystemTimeAtCurrentTime-SystemTimeAtStartUp);
writeln('SystemTimeAtCurrentTime=' + inttostr(SystemTimeAtCurrentTime));
writeln('TimeThatHasPassed=' + inttostr(Trunc(TimeThatHasPassed)) + 'MS');
//I need to divide the MS that have passed into Seconds, Minutes and Hours
//if 60 seconds have passed then 1 Minute needs to be added to the minutes
//By using round or trunc I should be able get the hours and minutes and seconds
//into a decimal value
setlength(Counter, 3);
setlength(CounterExt, 3);
CurrentLocalTime:=StrToFloat(CurrentTime);
writeln('Started at LocalTime: ' + FloatToStr(CurrentLocalTime) + AM_PM);
repeat
begin
writeln('CounterExt[0]=' + FloatToStr(CounterExt[0]));
if(CounterExt[0] > (CurrentLocalTime-1.00))then
begin
CurrentLocalTimeHours:=CounterExt[0];
break;
end;
CounterExt[0]:=CounterExt[0]+1.00;
Counter[0]:=Counter[0]+1;
end;
until(false);
CounterExt[1]:=CounterExt[0];
repeat
begin
Counter[1]:=Counter[1]+1;
writeln('CounterExt[1]=' + FloatToStr(CounterExt[1]));
if(CounterExt[1] > (CurrentLocalTime-0.01))then
begin
CurrentLocalTimeMinutes:=CounterExt[1];
break;
end;
CounterExt[1]:=CounterExt[1]+0.01;
end;
until(false);
CurrentLocalTimeHours:=Counter[0];
CurrentLocalTimeMinutes:=Counter[1];
Counter[0]:=0;
Counter[1]:=0;
repeat
begin
sleep(1000-LatencyLag);
SystemTimeAtCurrentTime:=GetSystemTime();
Counter[0]:=Counter[0]+1;
CurrentLocalTimeSeconds:=Counter[0];
//Timer Clock
if(CurrentLocalTimeSeconds=60.00)then
begin
Counter[1]:=Counter[1]+1;
Counter[0]:=0;
CurrentLocalTimeMinutes:=CurrentLocalTimeMinutes+1.00;
end;
if(CurrentLocalTimeMinutes=60.00)then
begin
Counter[1]:=0;
Counter[2]:=Counter[2]+1;
CurrentLocalTimeHours:=CurrentLocalTimeHours+1.00;
CurrentLocalTimeMinutes:=0.00;
if(CurrentLocalTimeHours=12.00) and (CurrentLocalTimeMinutes=0.00) and (CurrentLocalTimeSeconds=60.00)
and (AM_PM_Holder='PM') then
begin
AM_PM_Holder:='AM';
end;
if(CurrentLocalTimeHours=12.00) and (CurrentLocalTimeMinutes=0.00) and (CurrentLocalTimeSeconds=60.00)
and (AM_PM_Holder='AM') then
begin
AM_PM_Holder:='PM';
end;
if(CurrentLocalTimeHours=13.00) and (CurrentLocalTimeMinutes=0.00) and (CurrentLocalTimeSeconds=60.00) then
CurrentLocalTimeHours:=1.00
end;
writeln('Hours that have passed:' + inttostr(Trunc(Counter[2])));
writeln('Minutes that have passed:' + inttostr(Trunc(Counter[1])));
writeln('Seconds that have passed:' + inttostr(Trunc(Counter[0])));
writeln('CurrentLocalTime: ' + FloatToStr(CurrentLocalTimeHours) + ':' +
FloatToStr(CurrentLocalTimeMinutes) + ':' + FloatToStr(CurrentLocalTimeSeconds)
+ AM_PM_Holder);
//Trunc(Trunc(strtoint(CurrentTime)*100)/100);
if(StrToFloat(Time_1)=StrToFloat((Floattostr(CurrentLocalTimeHours) + '.' + FloatToStr(CurrentLocalTimeMinutes))))
and (AM_PM_Holder=AM_PM_1)then
begin
Playsound(Alarm_Path_1);
writeln(Reminder_1);
sleep(10000);
end else
if(StrToFloat(Time_2)=StrToFloat((Floattostr(CurrentLocalTimeHours) + '.' + FloatToStr(CurrentLocalTimeMinutes))))
and (AM_PM_Holder=AM_PM_2)then
begin
Playsound(Alarm_Path_2);
writeln(Reminder_2);
sleep(10000);
end else
if(StrToFloat(Time_3)=StrToFloat((Floattostr(CurrentLocalTimeHours) + '.' + FloatToStr(CurrentLocalTimeMinutes))))
and (AM_PM_Holder=AM_PM_3)then
begin
Playsound(Alarm_Path_4);
writeln(Reminder_3);
sleep(10000);
end else
if(StrToFloat(Time_4)=StrToFloat((Floattostr(CurrentLocalTimeHours) + '.' + FloatToStr(CurrentLocalTimeMinutes))))
and (AM_PM_Holder=AM_PM_4)then
begin
Playsound(Alarm_Path_4);
writeln(Reminder_4);
sleep(10000);
end else
if(StrToFloat(Time_5)=StrToFloat((Floattostr(CurrentLocalTimeHours) + '.' + FloatToStr(CurrentLocalTimeMinutes))))
and (AM_PM_Holder=AM_PM_5)then
begin
Playsound(Alarm_Path_5);
writeln(Reminder_5);
sleep(10000);
end else
if(StrToFloat(Time_6)=StrToFloat((Floattostr(CurrentLocalTimeHours) + '.' + FloatToStr(CurrentLocalTimeMinutes))))
and (AM_PM_Holder=AM_PM_6)then
begin
Playsound(Alarm_Path_6);
writeln(Reminder_6);
sleep(10000);
end else
if(StrToFloat(Time_7)=StrToFloat((Floattostr(CurrentLocalTimeHours) + '.' + FloatToStr(CurrentLocalTimeMinutes))))
and (AM_PM_Holder=AM_PM_7)then
begin
Playsound(Alarm_Path_7);
writeln(Reminder_7);
sleep(10000);
end else
if(StrToFloat(Time_8)=StrToFloat((Floattostr(CurrentLocalTimeHours) + '.' + FloatToStr(CurrentLocalTimeMinutes))))
and (AM_PM_Holder=AM_PM_8)then
begin
Playsound(Alarm_Path_8);
writeln(Reminder_8);
sleep(10000);
end else
if(StrToFloat(Time_9)=StrToFloat((Floattostr(CurrentLocalTimeHours) + '.' + FloatToStr(CurrentLocalTimeMinutes))))
and (AM_PM_Holder=AM_PM_9)then
begin
Playsound(Alarm_Path_9);
writeln(Reminder_9);
sleep(10000);
end else
if(StrToFloat(Time_10)=StrToFloat((Floattostr(CurrentLocalTimeHours) + '.' + FloatToStr(CurrentLocalTimeMinutes))))
and (AM_PM_Holder=AM_PM_10)then
begin
Playsound(Alarm_Path_10);
writeln(Reminder_10);
sleep(10000);
end;
LatencyLag:=GetSystemTime()-SystemTimeAtCurrentTime;
writeln('LatencyLag = ' + inttostr(LatencyLag) + 'MS');
end;
until(false);
end.