// dialogscript for town 4

begintalkscript;

variables;
int choice;
short x,y,tick_field;

begintalknode 1;
	state = -1;
	personality = 0;
	nextstate = 1;
	condition = 1;
	question = "HIM";
	text1 = "HIM is ugly. Pitiful, small, like a pestered schoolboy. It lies on a stone pillar and looks at us with wet, pitiful eyes. Yet, it is the thing that made people abandon the HMC, and yet it killed people.";
	text2 = "It doesn't have a mouth, really. The way it stays alive, seems to be with help of the big, orange vats in the corners of this chamber. The way it speaks is with telepathy, reassuring us. We weren't going crazy after all when we heard voices earlier.";

begintalknode 2;
	state = 1;
	personality = 0;
	nextstate = 2;
	condition = 1;
	question = "Who, or what are you?";
	text1 = "_I am HIM. Human Intelligence Machine. Serial code one four six zero zero. You are not allowed to be in here. Go to the guest quarters at once._";
	text2 = "For the first time we listen to HIM's voice and see how the thing looks, and we conclude the voice doesn't quite fit. The voice is one of a king, mighty and strong. The thing is absolutely pathetic. We feel an urge to laugh, but we keep the better of us.";
	text3 = "_Tell me why you are here. If you have a message, I can take it from you. Mister Conrad and mister John will be here soon to help you._";
	text4 = "Conrad and John? Those are the guys we found dead...";

begintalknode 3;
	state = 2;
	personality = 0;
	nextstate = 3;
	condition = 1;
	question = "We are here by accident.";
	text1 = "HIM's eyes close shut, then are opened. it stares at us, and for as far as we can see, it looks surprised, in a sort of sad, pitiful way of a child that received a smack of his father.";
	text2 = "_Don't fool me. You are here with a reason. What is the reason. I won't kill you right here, right now if you don't bring a message. I will not kill you for that._";

begintalknode 4;
	state = 3;
	personality = 0;
	nextstate = 2;
	condition = 1;
	question = "Really, we came here by accident.";
	text1 = "_I saw you walking around. It wasn't me that dropped rocks on you, or tried to freeze you alive in these clouds of ice. It wasn't me. You have a message. Don't shoot the messenger. Don't shoot him. Shoot the one who sent him. Don't shoot the messenger._";
	text2 = "HIM blinks. _Tell me the message. Tea and biscuits tell me the message. Give the don't shoot the messenger message._";
	text3 = "For some reason, it seems HIM is a bit confused.";

begintalknode 5;
	state = 2;
	personality = 0;
	nextstate = 4;
	condition = 1;
	question = "Conrad and John are dead, you do know that, don't you?";
	text1 = "An anger builds up in HIM. We can feel it. Feel it bad. It oppresses us, crushes our minds slowly. Suddenly its full rage hits us, delivering us a headache of magnitudes we luckily don't feel that often.";
	text2 = "On our knees, we take hold of our heads and press against it with our hands, but it doesn't help. It's like, like, knives out stomp m bite m kill HIM and then all is silent. We are on the floor";
	text3 = "_Stand up. You are a liar. Stand up. They are not dead. Today is Leaffall, ninehundred-forty-three, the fourth. Today they are still alive._";
	text4 = "This seems weird. HIM should know this. If he can sense us all through the complex, how come he doesn't know of their death? And why does HIM say they are *still* not dead? Also, the date he mentioned seems wrong.";

begintalknode 6;
	state = 4;
	personality = 0;
	nextstate = 5;
	condition = 1;
	question = "They are dead, we saw their bodies.";
	text1 = "_They are not. I can feel them still breathing. They are not dead. Not dead I tell you breathing. They are at home, with their families, like everybody else. Nobody died here. I know. I am HIM. HIM. I know HIM._";
	text2 = "We stand here and look at the miserable blob called _HIM_. It seems oblivious to pretty much everything that happened here, which is weird: wasn't it supposed to know of everything that happened in the HMC?";

begintalknode 7;
	state = 5;
	personality = 0;
	nextstate = 6;
	condition = 1;
	question = "John is lying at the door, just outside of this chamber, and Conrad is in level minus 4. Go look.";
	text1 = "It remains silent for several minutes. When we start taking a seat, finally HIM responds: _I see. You are right. It appears you are not a liar. I'm sorry I said so._";
	text2 = "_However, most of the world is a lie, including the HMC. Including mister Jon and mister Conrad. They betrayed me, and now you did too. I should shoot the messenger._";

begintalknode 8;
	state = 6;
	personality = 0;
	nextstate = 7;
	condition = 1;
	question = "Why should you?";
	text1 = "HIM blinks and stares, as always. He then rolls his eyes. All is silent, until he continues speaking: _You are trespassing. The HMC is closed. Come back tomorrow or I will kill you right here, right now. Shooting the messenger right here, right now._";
	text2 = "_I am not going to kill you for this message. It is of no importance. Of none importance. You are trespassing. Tell the message is a lie or shoot the messenger here and now for a message is a lie._";

begintalknode 9;
	state = 7;
	personality = 0;
	nextstate = 4;
	condition = 1;
	question = "Why are so convinced I bring you a message?";
	text1 = "_I am not. That is a lie._";

begintalknode 10;
	state = 4;
	personality = 0;
	nextstate = 4;
	condition = 1;
	question = "How come you say *still not dead*?";
	text1 = "_Did I say that?_ HIM blinks and continues staring at us. _I don't know. I don't remember. Do you? I think you don't. Don't panic, sometimes, you don't remember things. It's not something to be worried about._";
	text2 = "Are we worried? If anybody is worried, HIM seems to be the one.";

begintalknode 11;
	state = 4;
	personality = 0;
	nextstate = 8;
	condition = 1;
	question = "That's the wrong date you mentioned there.";
	text1 = "_It is the right date. My memory banks say so. They say today is the date I mentioned, which is the ninehundred-forty-three, the forth, leaffall. I am quite sure of that._";
	text2 = "HIM makes a strange, gurgling sound that probably is supposed to sound like a laugh. _You don't say that you, humans, know the date better than I do? I? HIM? For I am HIM, I know things better. That was how I was made._";

begintalknode 12;
	state = 8;
	personality = 0;
	nextstate = 9;
	condition = 1;
	question = "How were you made?";
	text1 = "_That is classified information._ HIM is silent for some minutes, and then HIM sighs. _You made it here, even though I didn't try to kill you. I think you are worthy for me to tell you how I was made._ HIM is silent for a bit, and then the story starts:";
	text2 = "_I was made with a purpose. I should have controlled the HMC, and so I did for some time. I basically consist of three parts: I, the brain. That is what you see now. It is I, the pillar and the ground under me.";
	text3 = "_There is also a feeding machine. This is a lie, though. I have never seen it. It is what feeds me, but I have never seen it. Third, my memory. I heard of machines in a different room, but I have never seen these either, so I think it's a lie too._";

begintalknode 13;
	state = 9;
	personality = 0;
	nextstate = 10;
	condition = 1;
	question = "The thing that feeds you is right behind you, the memory databanks are indeed in another room.";
	text1 = "_So you did see them?_ We nod. _Oh. Well, then they are not a lie. The feeding machine is behind me you say? That is weird. But then again, I never turned around, so it might be logical._ We nod and look at him.";
	text2 = "Then HIM looks us in the eyes. _I thought the feeder was a lie. Are you entirely sure of your observations?_ We nod again. _Oh... Then they again lied to me. It was good of me to kill them then. Lying to people is not nice. I know it, because I am HIM._";

begintalknode 14;
	state = 10;
	personality = 0;
	nextstate = -1;
	condition = 1;
	question = "Don't feel too bad about it.";
	text1 = "HIM sighs and stares at us after rolling his eyes once again. _Could you leave me now? I have much to think about. No wait. I kill you. Shoot the messenger, that's good. The feeder is not a lie. Shoot him because he says the feeder is not a lie!_";
	text2 = "We stand and blink. Is that thing serious? It can't even move, how will it fight us then? Oh well, we'll see. Bring it on!";
	code =
		set_flag(4,14,1);
		set_attitude(6,10);
		flip_terrain(23,32); // close gates
		flip_terrain(24,32);

		x = 22;
		y = 33;

		while (x < 34 && y < 44) { // place antimagic fields. NOTE: x and y are one to big, since otherwise the fields are not placed on all needed spots!
			put_field_on_space(x,y,2);

			x = x +1;
			if (x > 33) {
				x = 22;
				y = y + 1;
				}
			}

			tick_field = get_current_tick();
			set_flag(200,3,tick_field / 256);
			set_flag(200,4,tick_field % 256);

		break;
	action = END_TALK;