xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
x- Nerds, JavaScript, and Online Parenting x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

	,o-o-o.o.
       o-o      o
      _O_ `o-o-o'   
    ,'   `.       
   / _/`.-.\        
  : \|"""|< :  Project Name: Online Tamag0chi  
  |-<|___|/-|  Project Conducted by: Cuebiz - Fonez@ca.tc - Febuary '99
  :  `'\/`' :  Time Frame to complete project: Two weeks (three weeks max.)
   `. OOO ,'
     """""  

Lamers Note:
 Some twit STOLE this code from my Nether account, and released it somewhere,
I dont know where, but Ive heard rumours. Setting the record straight once more,
the person who's trying to pass MY CODE off as their own, probably has no idea
what JavaScript, or programming in general is about, which would make perfect
sense out of the whole situation. In a way its my fault for forgeting to change
the permissions before I quit outta the account, but anyways, just wanted you
people to know. Oh yeah, and if you happen to run across this code somewhere else,
(that WASN'T RELEASED by me) contact me at Fonez@ca.tc and give me the URL. 

NEW Note:
 Haha! I just found out that my sources were stupid. They were joking about
that shit, which I thought wasn't funny at all. All of you who keep sending 
me email saying, "Iam going to find him if it kills me!" ... STOP IT!


	     [ - Nerds, JavaScript, and Online Parenting - ]

     Ideas expressed in this Tfile, are influenced by Rob Malda's File 
	written in 1994 called, "Nerds, Unix and Virtual Parenting".

 Iam sure that you've heard of a Tamag0chi. If it doesn't ring any bells, then
here's a brief description of 'em. They're little egg-shaped toys that have 
little square LCD screens on the front, and three (or four) buttons beneath it
that serve the purpose of feeding, spanking, giving it medicine and whatever
else you may need to do as a 'virtual parent' to raise a happy, healthy egg.
I have to admit that I've owned one of them back in '90, BEFORE they started
coming out with those fucking imitation ones, like the giga-pet and stuff. Now,
this is just what this project will be based on. I will attempt to make one that
you will be able to use on your computer. I plan on making it versatile so that
it will work on ALOT of OS's, it'll be open source and hence, programmers can 
tweek it and improve it. I was originally going to code this in BASIC because I
know ALOT of BASIC programmers and its NOT a hard language to learn and thus
insuring its survival because any average Joe can tweek it and have some fun with
it, but the obvious truth is that BASIC isn't a very versatile language. I mean,
that a program written in BASIC for Linux would hardly work on a Windows/DOS box.
So, BASIC is outta the question. I compiled a small list in my head knowing that
I would code this thing in either JavaScript, PERL, or C++. Of course, I would of
loved to make Rob's file a reality by coding it entirely with Xlibs, but the truth
of the matter is that I made a promise to do this in a matter of weeks, and to 
do what Rob dreamed up, would take months. After tons of lists with the different
'Pros' and 'Cons' of the remaining three languages, I've come to the conclusion
that JavaScript would best suit my needs seeing that I would later want to add
MORE internet functions to it, and having it up on a webpage would mean that there
would be NO download if you would want to try it. That would make things a little
more 'multi-user' and a little more fun for future projects, and so, the basic idea 
was born. The coding took me no longer than a week, and and then I passed it out
on IRC for 'beta-testing'. After some complaints, and fast tweeks, it was ready for
the release. Of course, Iam still working on the interface, but it works! There are
several things I've been thinking up for future releases and they consist of opening
its own tiny window so that it could be put up to a corner in your desktop and you
could do other things, creating an 'away' mode that would allow your 'child to send 
you email stating what it needs or, just to say 'I love you', having it blast a
cute little plurping noise after it eats to simulate a burp, a fairly irritating 
kludge of noise to simulate it crying, and other sounds that I've pulled together. 
If you have ANY ideas, send em on over to me beeeeeey0tch!

<HTML>
<!-- Online Tamagochi (TM) by: Cuebiz (BSC), HTML/JavaScript starts here! -->
<HEAD>
<title>Nerds, JavaScript and Online Parenting.</title>
<!-- Coding took two weeks, May '98 -->
<SCRIPT LANGUAGE="JavaScript">
now=new Date;
x=now.getTime() %32768;
function Random(min,max) {
x=(1103515245*x+12345) % 32768;
return Math.floor(x*(max-min+1)/32768+min);
}
var num = new Array;
num[0] = -1;
num[1] = 1;
var ctrsmit = new Array;
ctrsmit[0] = '<|x_x|>';
ctrsmit[1] = '<|!_!|>';
var i = 0, will2live = 0;
function livewill(j) {
i += j;
if (i == 0) tLiphe();
if (i < 6) stat(mood[3]);
if (oldstats == mood[3] && i >= 6) stat(mood[0]);
if (alive == true) {
barzies(i);
   }
}
var bars='';
function barzies(num) {
bars='';
for (var i=0;i!=num;i++) bars += '?';
document.ctrform.will.value = bars;
}
var mood = new Array;
mood[0] = 'Tamagochi Happy';
mood[1] = 'Tamagochi Mad';
mood[2] = 'Tamagochi Pissed-Off';
mood[3] = 'Tamagochi Suicidal';
mood[4] = 'Tamagochi Elated';

var Stat = new Array;
Stat[0] = 'Alive';
Stat[1] = 'Clean';
Stat[2] = 'Tamagochi NOT dirty';
Stat[3] = 'In Pain';
Stat[4] = 'Dead';
Stat[5] = 'Infected!';
Stat[6] = 'Disinfected!';
Stat[7] = 'Not infected';
Stat[8] = 'Drooling';
var alive = false, aniID, statID, moodID, liveID, crapID, sickID, illID, normguy = '<(^_^)>';
function gLiphe() {
normguy = '<(^_^)>';
stat('Starting...');
livewill(15);
statID = setTimeout("stat(Stat[0])",3500);
setTimeout("alive = true",3500);
Animate(false,'(-o-)');
aniID = setTimeout("Animate(false,'<(o_o)>')",2500);
aniID = setTimeout("Animate(false,'(O_o)>')",3500);
aniID = setTimeout("Animate(false,'<(o_o)>')",4300);
aniID = setTimeout("Animate(false,'<(o_O)')",4500);
aniID = setTimeout("Animate(false,'<(o_o)>')",5300);
aniID = setTimeout("Animate(false,'(O_o)>')",5500);
aniID = setTimeout("Animate(false,normguy)",6500);livewill(15);
setTimeout("independence()",6501)
}
function ID(dep) {
clearTimeout(aniID);
clearTimeout(statID);
clearTimeout(liveID);
clearTimeout(crapID);
if (dep == true) clearTimeout(independ);
}
var f, t = '          ';
function Animate(auto,ctrex) {
if (auto == false) f = ctrex;
if (auto == true) t = spacey.substring(0,Pos());
document.ctrform.ctr.value = t + ctrex + poopie();
}
var indID, independ;
function independence() {
independ = setTimeout("Animate(true,f)",400);
independ = setTimeout("Animate(true,f)",1200);
independ = setTimeout("Animate(true,f)",2000);
independ = setTimeout("Animate(true,f)",2800);
independ = setTimeout("Animate(true,f)",3600);
indID = setTimeout("independence()",4000);
}
var spacey = '                            ', k, l = 10;
function Pos() {
k = Random(0,1)
if (k == 0) {
if (t.length < 22) return l++;
else if (t.length >= 22) Pos()
}
if (k == 1) {
if (t.length > 0) return l--;
else if (t.length == 0) return l++;
   }
}
var poop = false;
function poopie() {
if (poop == true) return " <<sh1t>> ";
else return '';
}
function eatpoop() {
if (poop == false) {
document.ctrform.phood.selectedIndex = 0;
stat(Stat[2]);
} 
if (poop == true) {
ID(true);
eatpoopie();
   }
}
function eatpoopie() {
poop = false;
eat(false,'<<poo>>');
aniID = setTimeout("Animate(false,'<(Żo>)>')",750);
if (sick == false) setTimeout("befect()",4000);
}
var pasto,healthy,eaty='<(ŻoŻ)>',eati='<(Ż-Ż)>',eaty2;
function eat(health,pasti) {
healthy = health;
pasto = pasti;
if (sick == true) {
eaty = '<(ĄoĄ)>';
eaty2 = '<(Ąo)>';
eati = '<(Ą-Ą)>';
}
else {
eaty = '<(ŻoŻ)>';
eaty2 = '<(Żo)>';
eati = '<(Ż-Ż)>';
}
Animate(false,eati +'  '+ pasto);
aniID = setTimeout("Animate(false,eaty +'  '+ pasto)",150);
aniID = setTimeout("Animate(false,eaty +' '+ pasto)",300);
aniID = setTimeout("Animate(false,eaty + pasto)",450);
aniID = setTimeout("Animate(false,eaty2+ pasto)",600);
setTimeout("phood(healthy)",650);
}
function pheed(antipasto) {
if (antipasto == 0) eat(true,'>o<');
else if (antipasto == 1) eat(true,'<cUe>');
else if (antipasto == 2) eatpoop();
}
function takeone() {
ID(true);
Animate(false,'<(Ż=Ż)>');
aniID = setTimeout("Animate(false,'<(>_<)>')",500);
aniID = setTimeout("Animate(false,'<(Ż=Ż)>')",1300);
aniID = setTimeout("Animate(false,'<(>_<)>')",2600);
aniID = setTimeout("Animate(false,normguy)",4800);
setTimeout("infekt()",4799);
setTimeout("poop = true",4799);
full = 0;
}
function cleancage() {
if (poop == false) stat(Stat[2]);
if (poop == true) {
poop = false;
Animate(false,normguy);
stat(Stat[1]);
clearTimeout(sickID);
ickcount = 0;
   }
}
function tLiphe() {
normguy = '<(*_*)>';
poop = false;
clearTimeout(sickID);
clearTimeout(illID);
clearTimeout(indID);
ID(true);
sick = false;
full = 0;
l = 1;
i = 0;
aniID = setTimeout("Animate(false,normguy)",1);
statID = setTimeout("stat(Stat[4])",1);
barzies(0);
bruised = 0;
poked = false;
alive = false;
}
var oldstats, ick = '';
function stat(stats) {
ick = '';
oldstats = stats;
if (sick == true) ick = '[sick] ';
document.ctrform.ctrstatus.value = ick + oldstats;
}
var j;
function smite() {
if (sick == false) normguy = '<(<Ź>_<Ź>)>';
ID(true);
statID = setTimeout("stat(Stat[3])",10);
aniID = setTimeout("Animate(false,ctrsmit[Random(0,1)])",10);
liveID = setTimeout("livewill(num[0])",20);
aniID = setTimeout("Animate(false,normguy)",1300);
statID = setTimeout("stat(mood[1])",1300);
}
var full = 0;
function phood(salubrious) {
if (sick == false) normguy = '<(^_^)>';
ID(true);
full++;
if (salubrious == true) livewill(num[1]);
aniID = setTimeout("Animate(false,eaty)",200);
aniID = setTimeout("Animate(false,eati)",700);
aniID = setTimeout("Animate(false,eaty)",1200);
aniID = setTimeout("Animate(false,eati)",1700);
aniID = setTimeout("Animate(false,eaty)",2200);
aniID = setTimeout("Animate(false,eati)",2700);
aniID = setTimeout("Animate(false,normguy)",3200);
if (full == 3) setTimeout("takeone()",6000);
if (full >= 3) full = 0;
}
var sick = false, ickcount = 0;
function infekt() {
ickcount++;
if (ickcount != 2) sickID = setTimeout("infekt()",30000);
if (ickcount == 2) befect();
}
function befect() {
sick = true;
setTimeout("stat(Stat[5])",500);
ickcount = 0;
besick();
normguy = '<(Ą_Ą)>';
}
function besick() {
livewill(num[0]);
Animate(false,normguy);
if (sick == true) illID = setTimeout("besick()",2000);
}
function dnfekt() {
if (sick == false) stat(Stat[7]);
if (sick == true) {
if (poop == false) clearTimeout(sickID);
normguy = '<(^_^)>';
eat(false,'?');
sick = false;
setTimeout("stat(Stat[6])",4000);
ickcount = 0;
if (poop == true) infekt();
   }
}
function scratchyscratchy() {
normguy = '<(^_^)>';
ID(true);
statID = setTimeout("stat(Stat[8] +'(scratch scratch)')",710);
aniID = setTimeout("Animate(false,'| p')",200);
aniID = setTimeout("Animate(false,'| P¨')",800);
aniID = setTimeout("Animate(false,'| p ¨')",1400);
aniID = setTimeout("Animate(false,'| P¨¨')",2000);
aniID = setTimeout("Animate(false,'| p ¨¨')",2600);
aniID = setTimeout("Animate(false,'| P¨¨¨')",3400);
aniID = setTimeout("Animate(false,'| p ¨¨¨')",4200);
aniID = setTimeout("Animate(false,'| P ¨¨¨¨')",5000);
aniID = setTimeout("Animate(false,': P¨')",5600);
aniID = setTimeout("Animate(false,normguy)",6600);
statID = setTimeout("stat(mood[0])",6600);
liveID = setTimeout("livewill(num[1])",6600);
}
var bruised = 0, poked = false;
function poke() {
if (bruised >= 7) {
normguy='o_-';
aniID = setTimeout("Animate(false,'(O_-)')",1);
liveID = setTimeout("livewill(num[0])",1);
if (poked == false) statID = setTimeout("stat('You made him GAY !!!')",10);
aniID = setTimeout("Animate(false,normguy)",300);
poked = true;
}
if (bruised < 7) {
bruised++;
normguy = '<(^_^)>'
aniID = setTimeout("Animate(false,' <(^o^)>')",1);
liveID = setTimeout("livewill(num[1])",1);
statID = setTimeout("stat('Tamagochi likes that...')",10);
aniID = setTimeout("Animate(false,normguy)",300);
   }
}
//  End -->
</script>
</HEAD>
<!-- Here's the HTML Interface, send all comments to bizZy@aol.com -->
<BODY BGCOLOR="#000080" TEXT="white">
<BR><B><FONT SIZE=10 COLOR=RED><B>
<CENTER>
<FORM name="ctrform">
<TABLE BORDER="4" CELLSPACING="5" CELLPADDING="5" bgcolor="black">
<tr><td><FONT face="Arial, Verdana, Helvetica" color="#ccccc" size=1>
<MARQUEE><CENTER><B>rev0lt's Online Tamagochi ..... JavaScript k0de by: Cuebiz</B></FONT></CENTER></MARQUEE>
<CENTER><TABLE><tr align="center"><CENTER>
<th>Tamagochi</th></center></tr>
<tr align="center"><td><div align="center"><center>
<INPUT type="text" name="ctr" size="30" onFocus="if (alive == true) tLiphe()"><br>
<INPUT type="button" value="Start Tamagochi" onClick="if (alive == false) gLiphe()"></center></div></td></tr>
</TABLE></CENTER>
<TABLE><tr align="center">
<tr><th>Life</th>
<th>Status</th></tr>
<tr align="center"><td><div align="center"><center><p><input type="text" size="20" name="will"></td>
<td align="center"><input type="text" size="25" name="ctrstatus"></td></tr>
</TABLE>
<div align="center"><CENTER>
<TABLE><tr><td>
<INPUT type="button" value="Smack" onClick="if (alive == true) smite()">
<INPUT type="button" value="Clean" onClick="if (alive == true) cleancage()">
<INPUT type="button" value="Medicine" onClick="if (alive == true) dnfekt()">
<INPUT type="button" value="Scratch" onClick="if (alive == true) scratchyscratchy()">
<INPUT type="button" value="Tickle" onClick="if (alive == true) poke()"></center></td></tr>
<tr><td><CENTER>
<INPUT type="button" value="Give Food" onClick="if (alive == true) pheed(document.ctrform.phood.selectedIndex)"> 
<SELECT name="phood" size="1">
<OPTION>Rare Candy</OPTION>
<OPTION>Apple</OPTION>
</SELECT></CENTER></td></tr>
</TABLE></CENTER></DIV></td></tr></TABLE></FORM></CENTER>
<!-- Thats it k1ddiez, jo0 can stop cutting here -->

Known Bugs (Added to release of rev0lt #2 on March 1st, 2001):
1. Froze IE5 after about 20 tries (why do I always have problems like this?)
2. You can kill Tamagochi if you start it, then highlight it (in form-box).
3. The <marquee> was what made 25% of our browsers crash. If you are going
   to run your tamagochi 24/7 in your browser, use Opera (most stable) or
   cut (^k) out everything between (including) the marquee tags.

Tips (things you should consider):
1. Dont email me at the AOL account in the comments, its been dead since '98
2. Tickling it too much will obviously make it GAY!
3. Giving it too much food (esspecially when it just took a shit), will result
   in your Tamagochi getting sick.
4. If you tweek this source in anyway, send it to me at: Fonez@ca.tc


(REV0LT)/&*%#$[!^$?\(REV0LT)(REV0LT)/&*%#$[!^$?\(REV0LT)(REV0LT)/&*%#$[!^$?\
(REV0LT)/&*%#$[!^$?\(REV0LT)(REV0LT)/&*%#$[!^$?\(REV0LT)(REV0LT)/&*%#$[!^$?\
(REV0LT)/&*%#$[!^$?\(REV0LT)(REV0LT)/&*%#$[!^$?\(REV0LT)(REV0LT)/&*%#$[!^$?\