So, for Christmas, I'm pulling a prank on my uncle.
Last year, he downed my connection for a week.
This year, I want to get him back, but I don't wanna do anything bad.
So, I'm using this annoying image.
Thing is, I can't seem to get it to work.
Code:
cookie: proc;
messages (7) char (64) initial (
"Give me a cookie?",
"I want a cookie!",
"Come on: I want a cookie!",
"GIVE ME A COOKIE!!",
"I ^RNEED^B a cookie!!!!!",
"Please, just ^Rone^B cookie, I promise I'll go away!!",
"YOU BAGBITER, ^RKEEP^B YOUR ******* COOKIES!!"),
flipflop bit (1) static initial (""b),
ioa_ ext entry,
cookie$bear ext entry,
timer_manager_$alarm_call ext entry (fixed bin (71), bit (2), entry),
timer_manager_$reset_alarm_call ext entry (entry),
counter static initial (1) fixed bin,
times (6) fixed bin (71) static initial (60, 240, 240, 200, 400, 120),
newl static initial ("^/") char (2);
/*+ This entrypoint is called when the hacker types "cookie" the first
time, or when the victim types "cookie" to satisfy the monster. +*/
if flipflop = ""b
then call timer_manager_$alarm_call (1200, "11"b, cookie$bear);
else do;
call timer_manager_$reset_alarm_call (cookie$bear);
call ioa_ ("Thank you!! (yum yum yum yum.......)");
counter = 1;
end;
flipflop = ^flipflop;
return;
/*+ This entrypoint is called by the timer_manager_ "call back" facility
after the timer goes off. Note that after printing 7 messages, the
cookie program "gives up" and stops setting further alarm timers. But
it also resets itself so that if sometime types "cookie", it will
start the cycle all over again. +*/
bear: entry;
call ioa_ (newl || messages (counter));
if counter = 7 then do;
flipflop = ""b;
call timer_manager_$reset_alarm_call (cookie$bear);
counter = 1;
return;
call timer_manager_$reset_alarm_call (cookie$bear);
call timer_manager_$alarm_call (times (counter), "11"b, cookie$bear);
counter = counter + 1;
return;
end cookie;
Any tips?