177 lines
8.0 KiB
Plaintext
177 lines
8.0 KiB
Plaintext
void main()
|
|
{
|
|
//Setting up variables
|
|
object crusader;
|
|
object o_huddlepoint = GetObjectByTag("chuddlepoint");
|
|
object o_pc = GetLocalObject(OBJECT_SELF, "nonhuman");
|
|
int hostilecount = GetLocalInt(OBJECT_SELF, "hostilecount");
|
|
int beersongline = GetLocalInt(OBJECT_SELF, "beersongline");
|
|
string songline = "";
|
|
int nonhumancheck = GetLocalInt(OBJECT_SELF, "nonhumancheck");
|
|
int newbeersongline = beersongline + 1;
|
|
int newhostilecount = hostilecount +1;
|
|
//If the beersongline goes over 100 then reset the beer song line.
|
|
if (beersongline > 70)
|
|
{
|
|
SetLocalInt(OBJECT_SELF, "beersongline", 0);
|
|
}
|
|
//If there are no non-humans in the bar the hostility goes to 0 and the beer song starts
|
|
//If there are then the beer song stops and the hostility counter goes up by 1 point
|
|
|
|
if (nonhumancheck < 1)
|
|
{
|
|
SetLocalInt(OBJECT_SELF, "hostilecount", 0);
|
|
SetLocalInt(OBJECT_SELF, "beersongline", newbeersongline);
|
|
}
|
|
else
|
|
{
|
|
SetLocalInt(OBJECT_SELF, "beersongline", 0);
|
|
SetLocalInt(OBJECT_SELF, "hostilecount", newhostilecount);
|
|
}
|
|
//Choose the line for the beer song.
|
|
if (hostilecount < 1)
|
|
{
|
|
switch(beersongline)
|
|
{
|
|
case 23: {
|
|
songline = "Some people drink all their days to employ.";
|
|
crusader = GetObjectByTag("crusader6");
|
|
break;
|
|
}
|
|
case 24: {
|
|
songline = "Some drink in haste aye and some drink for joy.";
|
|
crusader = GetObjectByTag("crusader8");
|
|
break;
|
|
}
|
|
case 25: {
|
|
songline = "Some drink when they're christened and some when they're wed.";
|
|
crusader = GetObjectByTag("crusader8");
|
|
break;
|
|
}
|
|
case 26: {
|
|
songline = "Some drink your good health when you're dead.";
|
|
crusader = GetObjectByTag("crusader6");
|
|
break;
|
|
}
|
|
case 27: {
|
|
songline = "Some drink on all these occasions, like I.";
|
|
crusader = GetObjectByTag("crusader8");
|
|
break;
|
|
}
|
|
case 28: {
|
|
songline = "For I drank at my birth and I'll drink 'til I die.";
|
|
crusader = GetObjectByTag("crusader3");
|
|
break;
|
|
}
|
|
case 40: {
|
|
songline = "Oh, when we get together just me and all the lads!";
|
|
crusader = GetObjectByTag("crusader3");
|
|
break;
|
|
}
|
|
case 41: {
|
|
songline = "Everone remebers all the fun we have!";
|
|
crusader = GetObjectByTag("crusader8");
|
|
break;
|
|
}
|
|
case 42: {
|
|
songline = "'cause every time we gather there's always plenty of cheer!";
|
|
crusader = GetObjectByTag("crusader8");
|
|
break;
|
|
}
|
|
case 43: {
|
|
songline = "Hey, shut up will ya?";
|
|
crusader = GetObjectByTag("crusader5");
|
|
break;
|
|
}
|
|
case 44: {
|
|
songline = "Another beer here!";
|
|
crusader = GetObjectByTag("crusader3");
|
|
break;
|
|
}
|
|
}
|
|
if (songline != "")
|
|
{
|
|
AssignCommand(crusader, SpeakString(songline, TALKVOLUME_TALK));
|
|
}
|
|
}
|
|
//If there are non humans in the bar then a series of events begins, culminating in a bar fight if the non-humans remain.
|
|
switch (hostilecount)
|
|
{
|
|
case 1: {
|
|
AssignCommand(OBJECT_SELF, SpeakString("Well, well, look what just walked in."));
|
|
break;
|
|
}
|
|
case 3: {
|
|
crusader = GetObjectByTag("crusader6");
|
|
AssignCommand(crusader, ActionMoveToObject(o_pc));
|
|
AssignCommand(crusader, SpeakString("Your kind ain't welcome in here.", TALKVOLUME_TALK));
|
|
break;
|
|
}
|
|
case 6: {
|
|
crusader = GetObjectByTag("crusader6");
|
|
AssignCommand(crusader, ActionMoveToObject(o_pc));
|
|
AssignCommand(crusader, SpeakString("I said, your kind isn't welcome here."));
|
|
break;
|
|
}
|
|
case 7: {
|
|
crusader = GetObjectByTag("crusader3");
|
|
AssignCommand(crusader, SpeakString("Yeah, get out!"));
|
|
break;
|
|
}
|
|
case 10: {
|
|
crusader = GetObjectByTag("crusader6");
|
|
AssignCommand(crusader, ActionMoveToObject(o_huddlepoint));
|
|
break;
|
|
}
|
|
case 11: {
|
|
crusader = GetObjectByTag("crusader3");
|
|
AssignCommand(crusader, ActionMoveToObject(o_huddlepoint, FALSE, 2.0));
|
|
AssignCommand(crusader, ActionPlayAnimation(ANIMATION_LOOPING_TALK_FORCEFUL, 1.0, 0.0));
|
|
crusader = GetObjectByTag("crusader8");
|
|
AssignCommand(crusader, ActionMoveToObject(o_huddlepoint, FALSE, 2.0));
|
|
AssignCommand(crusader, ActionPlayAnimation(ANIMATION_LOOPING_TALK_FORCEFUL, 1.0, 0.0));
|
|
crusader = GetObjectByTag("crusader5");
|
|
AssignCommand(crusader, ActionMoveToObject(o_huddlepoint, FALSE, 2.0));
|
|
AssignCommand(crusader, ActionPlayAnimation(ANIMATION_LOOPING_TALK_FORCEFUL, 1.0, 0.0));
|
|
crusader = GetObjectByTag("crusader6");
|
|
AssignCommand(crusader, ActionPlayAnimation(ANIMATION_LOOPING_TALK_FORCEFUL, 1.0, 0.0));
|
|
break;
|
|
case 15: {
|
|
crusader = GetObjectByTag("crusader5");
|
|
AssignCommand(crusader, ActionMoveToObject(o_pc));
|
|
AssignCommand(crusader, SpeakString("I'm afraid we're goin' to have to teach you a lesson.", TALKVOLUME_TALK));
|
|
AssignCommand(crusader, ActionEquipMostDamagingMelee());
|
|
AssignCommand(crusader, ActionAttack(o_pc));
|
|
crusader = GetObjectByTag("crusader3");
|
|
AssignCommand(crusader, ActionEquipMostDamagingMelee());
|
|
AssignCommand(crusader, ActionAttack(o_pc));
|
|
crusader = GetObjectByTag("crusader8");
|
|
AssignCommand(crusader, ActionEquipMostDamagingMelee());
|
|
AssignCommand(crusader, ActionAttack(o_pc));
|
|
crusader = GetObjectByTag("crusader6");
|
|
AssignCommand(crusader, ActionEquipMostDamagingMelee());
|
|
AssignCommand(crusader, ActionAttack(o_pc, FALSE));
|
|
crusader = GetObjectByTag("crusader1");
|
|
ChangeFaction(crusader, GetObjectByTag("boy_crusaderarms"));
|
|
crusader = GetObjectByTag("crusader2");
|
|
ChangeFaction(crusader, GetObjectByTag("boy_crusaderarms"));
|
|
crusader = GetObjectByTag("crusader3");
|
|
ChangeFaction(crusader, GetObjectByTag("boy_crusaderarms"));
|
|
crusader = GetObjectByTag("crusader4");
|
|
ChangeFaction(crusader, GetObjectByTag("boy_crusaderarms"));
|
|
crusader = GetObjectByTag("crusader5");
|
|
ChangeFaction(crusader, GetObjectByTag("boy_crusaderarms"));
|
|
crusader = GetObjectByTag("crusader6");
|
|
ChangeFaction(crusader, GetObjectByTag("boy_crusaderarms"));
|
|
crusader = GetObjectByTag("crusader7");
|
|
ChangeFaction(crusader, GetObjectByTag("boy_crusaderarms"));
|
|
crusader = GetObjectByTag("crusader8");
|
|
ChangeFaction(crusader, GetObjectByTag("boy_crusaderarms"));
|
|
crusader = GetObjectByTag("prostitute_bad");
|
|
ChangeFaction(crusader, GetObjectByTag("boy_crusaderarms"));
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|