Moaning column

Eine Freundin von mir hatte mal so eine sprechende Säule gesehen und mich gefragt, ob ich ihr so ein Skript mache. Es handelt sich um eine Art Säule, die bei Berührung mindestens einmal in 24 Stunden wieder berührt werden will, ansonsten geht sie ein. Eine Spielerei eben :-)

/// script copyright by Rebekka Revnik

key Owner;
string OName = "Moaning Column of Longing";
string Name;
string VName;
integer Hours;
integer Minutes;
float Diff;
vector Pos;
vector Color = <1,1,1>
vector Scale;

Touch()
{
	llInstantMessage(Owner, VName+" loves me!");
	llInstantMessage(Owner, "My existence has meaning!");
	llInstantMessage(Owner, "I am no longer just a Second Life prim.");
	llInstantMessage(Owner, "Because "+VName+" loves me and will visit me again soon!");
	llInstantMessage(Owner, "Thank you for loving me, "+VName+". Without you, I am nothing. Come back and touch me within 24 hours, or I will die.");
}

default
{
	state_entry()
	{
		Pos = llGetPos();
		Scale = llGetScale();
		Diff = Scale.z / 24;
		llSetObjectName(OName);
		state Off;
	}
	on_rez(integer start_param)
	{
		llResetScript();
	}
}

state Off
{
	state_entry()
	{
		llSetTimerEvent(0);
		llSetPos(Pos);
		llSetScale(Scale);
		llSetText("", Color, 1);
		llSetObjectName(OName);
	}
	touch_start(integer total_number)
	{
		Owner = llDetectedKey(0);
		Name = llDetectedName(0);
		list l = llParseString2List(Name, [" "], []);
		VName = llList2String(l, 0);
		llSetText(Name+"'s Column", Color, 1);
		llSetObjectName(Name+"'s Column");
		llInstantMessage(Owner, VName+", you have spawned a Moaning Column of Longing. You must go and find your column, for it loves only you. It depends on your love for survival. You must visit and touch it at least once every 24 hours, or else it will die of loneliness and a broken heart.");
		Touch();		
		state On;
	}
}

state On
{
	state_entry()
	{
		llSetObjectName(llKey2Name(Owner)+"'s Column");
		Hours = 0;
		Minutes = 0;
		llSetTimerEvent(60);
	}
	touch_start(integer total_number)
	{
		if(Owner == llDetectedKey(0))
		{
			Hours = 0;
			Minutes = 0;
			llInstantMessage(Owner, "Moaning Column of Longing. You treat it so well, and make it so happy!");
			Touch();
			llSetPos(Pos);
			llSetScale(Scale);
		}
	}
	timer()
	{
		Minutes++;
		if(Minutes == 60)
		{
			Minutes = 0;
			Hours++;
			llInstantMessage(Owner, (string)Hours+" Stunden.");
			if(Hours == 3)
			{
				llInstantMessage(Owner, VName+", it's been 3 hours since you touched me. Please come and visit me soon, I am lonely without you.");
			} else if(Hours == 6)
			{
				llInstantMessage(Owner, VName+", you haven't visited me for 6 hours. I can't bear existence without you. Please come and touch me soon.");
			} else if(Hours == 9)
			{
				llInstantMessage(Owner, VName+", you have left me alone for 9 hours. Don't you love me anymore, "+VName+"? What have I done? Without you, I am nothing.");
			} else if(Hours == 12)
			{
				llInstantMessage(Owner, "I think you don't love me anymore, "+VName+". If you did, you would've visited me by now. Without your love, I have no meaning, no reason to continue the meaningless existence of a Second Life prim. With you, I was something, "+VName+", without you I am nothing.");
			} else if(Hours == 16)
			{
				llInstantMessage(Owner, "I don't think you ever loved me, "+VName+". I was a fool to trust you.");
			} else if(Hours == 20)
			{
				llInstantMessage(Owner, "You never loved me, "+VName+". My existence is meaningless. I have no reason to continue.");
			} else if(Hours == 23)
			{
				llInstantMessage(Owner, VName+", if you don't come and touch me within the hour, I will die of loneliness and a broken heart.");
			} else if(Hours == 24)
			{
				llInstantMessage(Owner, VName+", I have died of loneliness and a broken heart.");
				state Off;
			}
			float d = Scale.z - Diff * Hours;
			llSetScale(<Scale.x, Scale.y, d>);
			llSetPos(Pos - <0,0,(Hours * Diff) / 2>);
		}
	}
}