Initial upload. PRC8 has been added. Module compiles, PRC's default AI & treasure scripts have been integrated. Started work on top hak for SLA / Ability / Scripting modifications.
223 lines
12 KiB
Plaintext
223 lines
12 KiB
Plaintext
//::///////////////////////////////////////////////
|
|
//:: swt_NPC_random
|
|
//:: swt_NPC_random.nss
|
|
//:: Copyright (c) 2001 Bioware Corp.
|
|
//:://////////////////////////////////////////////
|
|
/*
|
|
|
|
*/
|
|
//:://////////////////////////////////////////////
|
|
//:: Created By: Lysandius
|
|
//:: Created On: 09-07-2002
|
|
//:://////////////////////////////////////////////
|
|
|
|
|
|
|
|
void swtSit();
|
|
void swtWalk();
|
|
void swtChange();
|
|
string gettext();
|
|
|
|
void main()
|
|
{
|
|
object oChair=GetLocalObject(OBJECT_SELF,"oMychair");
|
|
string sString=gettext();
|
|
object oPC=GetLastSpeaker();
|
|
object oMe=OBJECT_SELF;
|
|
AssignCommand(oPC,ClearAllActions());
|
|
AssignCommand(oPC,SetFacingPoint(GetPosition(oMe)));
|
|
if (!GetLocalInt(OBJECT_SELF, "nSitting"))
|
|
{
|
|
ClearAllActions();
|
|
SetFacingPoint(GetPosition(oPC));
|
|
ActionSpeakString(sString);
|
|
}
|
|
else
|
|
{
|
|
ClearAllActions();
|
|
ActionSpeakString(sString);
|
|
ActionSit(oChair);
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
void swtSit()
|
|
{
|
|
object oSittable = GetNearestObjectByTag("Sittable");
|
|
//if(!GetIsObjectValid(GetSittingCreature(oSittable))) // q1 Is something sitting on the nearest sittable?
|
|
//{
|
|
ActionMoveToLocation(GetLocation(oSittable)); // a1 No: go to the nearest sittable.
|
|
//if(!GetIsObjectValid(GetSittingCreature(oSittable))) // q2 Is something sitting on the nearest sittable now?
|
|
//{
|
|
SetLocalInt(OBJECT_SELF, "nSitting", 1);
|
|
ActionSit(oSittable); // a2 No: sit down.
|
|
//}
|
|
//else
|
|
//ActionRandomWalk(); // a2 Yes: start walking again.
|
|
//}
|
|
//else
|
|
//ActionRandomWalk(); // a1 Yes: continue walking.
|
|
}
|
|
|
|
void swtWalk()
|
|
{
|
|
SetLocalInt(OBJECT_SELF, "nSitting", 0);
|
|
ActionRandomWalk();
|
|
}
|
|
|
|
void swtChange()
|
|
{
|
|
if(GetLocalInt(OBJECT_SELF, "nSitting"))
|
|
swtWalk();
|
|
else
|
|
swtSit();
|
|
}
|
|
|
|
string gettext()
|
|
{
|
|
|
|
int nRandom=Random(67)+1;
|
|
string sString;
|
|
switch (nRandom)
|
|
{
|
|
case 1: sString="The clerics have their critics, but they certainly know how to keep this place safe.";
|
|
break;
|
|
case 2: sString="I heard some of the merchants were upset with the temple. They think they should be running this town!";
|
|
break;
|
|
case 3: sString="Whatever you do, don't go to Three Rivers Way. Those orcs are out of control, and bandits control the roads.";
|
|
break;
|
|
case 4: sString="There's something nasty in the crypts. Someone ought to do something about it. That's meant to be a place for the dead to rest in peace.";
|
|
break;
|
|
case 5: sString="Yasdin controls the trade in this place. When the boats come in, the merchants go straight to him. Don't know why he's so popular.";
|
|
break;
|
|
case 6: sString="Poor old Minsol. Yasdin put him out of business. Hey, I thought Yasdin was a great guy when he first showed up, but now I don't know.";
|
|
break;
|
|
case 7: sString="The mines are flooded and can't be used. But the longer we stay out of them, the more creatures are going to move in. If nothing gets done, we'll never be able to use them again.";
|
|
break;
|
|
case 8: sString="Chauntea is the deity I worship. It's her church that made Pilgrim's Rest what it is today.";
|
|
break;
|
|
case 9: sString="You know, somebody set up an arena where fighting takes place. The guards know about it, but they won't do anything. Just as long as those clerics don't find out.";
|
|
break;
|
|
case 10: sString="Other religions are tolerated here, but if you don't serve Chauntea, don't go around preaching. You'll make yourself unpopular.";
|
|
break;
|
|
case 11: sString="That Vlasik was so corrupt, the people in Essembra refused to bury him. So we put him in our crypt here! That was a mistake.";
|
|
break;
|
|
case 12: sString="Some of the sailors that turn up here, I swear they are out of their minds.";
|
|
break;
|
|
case 13: sString="This town used to be called Sailors' Rest but you know, apparently there was a settlement here even before humans arrived. I don't believe it myself.";
|
|
break;
|
|
case 14: sString="I saw orcs around the gulch. They collect all sorts of rubbish and don't even know what they have. No brains, but you don't want to fight them.";
|
|
break;
|
|
case 15: sString="The orcs of the bloody axe tribe are stronger than the rest of them. If you see one of those green-skinned monsters, just run.";
|
|
break;
|
|
case 16: sString="The Ashaba Crossing really is beautiful. I could spend hours just looking at the river.";
|
|
break;
|
|
case 17: sString="Cormanthor could be a treasure trove for all we know. Those elves must have left some amazing things behind when they left, but nobody dares go in there.";
|
|
break;
|
|
case 18: sString="The forest to the west is said to have magical properties, but it's also supposed to be cursed. It's right on our doorstep, but it's not safe.";
|
|
break;
|
|
case 19: sString="The drow used to be considered a myth. But more and more, you hear reports of them terrorising travellers.";
|
|
break;
|
|
case 20: sString="Those Zhents . . . they sent orcs to invade Teshendale only six years ago. I really hate to think what would happen if they ever came around here.";
|
|
break;
|
|
case 21: sString="There's a door in the temple that's always locked. Nobody knows what's in there. I guess the clerics know what's best.";
|
|
break;
|
|
case 22: sString="Sailors come here from all around. You never know who you're going to meet at the docks.";
|
|
break;
|
|
case 23: sString="There's an old library somewhere in Cormanthor with lots of information about the elves.";
|
|
break;
|
|
case 24: sString="I know a lot of adventurers like to explore, but I wouldn't go near Three Rivers Way until I was ready, if I was you. That place really is dangerous.";
|
|
break;
|
|
case 25: sString="Why can't the drow just stay underground where they belong?";
|
|
break;
|
|
case 26: sString="This whole region used to belong to the elves, but they left for some island across the sea. Only a few stayed around.";
|
|
break;
|
|
case 27: sString="You can buy all sorts of goods here in Pilgrim's Rest, but magic items are very rare. You'll be lucky to find any.";
|
|
break;
|
|
case 28: sString="Some adventurers like to travel alone, but they never seem to last long. If you're one of those adventurer types, I suggest you find some friends.";
|
|
break;
|
|
case 29: sString="We can be pretty isolated here in Pilgrim's Rest. Sure, there's Spiritwood and Brighthaven, but the roads are sometimes closed.";
|
|
break;
|
|
case 30: sString="Essembra is the capital of Battledale, but they can't help us much. All their resources are being used to find the drow. They want those dark elves dead.";
|
|
break;
|
|
case 31: sString="Battledale has an interesting history. Hey, if you want to find out more you should try reading some books.";
|
|
break;
|
|
case 32: sString="The guards can't deal with every problem. If you want to make yourself useful, there might be people in the town who need some help.";
|
|
break;
|
|
case 33: sString="I think we should respect the Dales Compact, even though the elves aren't here any more. We agreed not to destroy the forests, and we should honour that agreement.";
|
|
break;
|
|
case 34: sString="There's bears in the caves by the gulch. But if you're the hunting type, don't go too far in. I heard there was something really nasty waiting in there.";
|
|
break;
|
|
case 35: sString="An easy way to make money is to hunt the deer in Ashaba Crossing. You'll only get a gold piece or two for their hides and meat, but it's safe.";
|
|
break;
|
|
case 36: sString="That old drunk outside, he earns a living making musical instruments.";
|
|
break;
|
|
case 37: sString="The guards here report to the temple. We do have a council, but I don't think it does much.";
|
|
break;
|
|
case 38: sString="If you ever get any information about the drow, show it to the captain of the guards. They're always grateful for help.";
|
|
break;
|
|
case 39: sString="Pilgrim's Rest is in Battledale, but it's not the only dale. There's Featherdale to the east, and Shadowdale to the north, and many others.";
|
|
break;
|
|
case 40: sString="You know, this place used to be full of brothels and cut-throats? That was a long time ago though, before the clerics came.";
|
|
break;
|
|
case 41: sString="Ships come here from all over, because the River Ashaba is joined to the Shining Sea. From here they can send goods all across the Dales, even though it's dangerous.";
|
|
break;
|
|
case 42: sString="I spend all my time in this tavern. Isn't that terrible?";
|
|
break;
|
|
case 43: sString="The great thing about this place is, the beer isn't watered down at all. Well, not much at least.";
|
|
break;
|
|
case 44: sString="That famous wizard Elminster lives in Shadowdale, but we had a famous wizard once. They called him the Moonmage.";
|
|
break;
|
|
case 45: sString="Ha, you adventurer types like to think you're brave, but you always end up in the local tavern getting drunk.";
|
|
break;
|
|
case 46: sString="I love a bit of Silverymoon wine. It's hard to get hold of, but it's a real delicacy.";
|
|
break;
|
|
case 47: sString="Have a drink with me. That's the great thing about this place, you're always meeting new people.";
|
|
break;
|
|
case 48: sString="You'd think this region had been explored thoroughly, but people still find new things.";
|
|
break;
|
|
case 49: sString="A drow killed the black dragon that used to live near Lake Sember.";
|
|
break;
|
|
case 50: sString="It's said that kobolds live by the water, but those small lizards would never dare attack us.";
|
|
break;
|
|
case 51: sString="The cave by the sea leads into a sewer system, but it was never completed. If you ever go down there, there's only once source of clean water. You might need to find it.";
|
|
break;
|
|
case 52: sString="Some people think they're smarter than they really are. Intelligence isn't enough, sometimes you need learning too.";
|
|
break;
|
|
case 53: sString="The goblins around here are bad enough, but you should see the ones in Semberholme.";
|
|
break;
|
|
case 54: sString="I heard there were still a few elves living in Semberholme, but they really hate humans.";
|
|
break;
|
|
case 55: sString="There's a graveyard in Cormanthor but it has been blocked off for decades. I heard the clerics had decided to open it up again.";
|
|
break;
|
|
case 56: sString="Battledale's had a number of names over the centuries. It was once known as Yevendale, and once as Stone Circle Country";
|
|
break;
|
|
case 57: sString="A dwarf is staying in the taven upstairs, and he had some stone shrine transported here from miles away!.";
|
|
break;
|
|
case 58: sString="Some strange gnomes moved into a mine near the Yeven, but they won't do us any harm if we leave them alone.";
|
|
break;
|
|
case 59: sString="There's meant to be some old Elven keep near the graveyard in Cormanthor.";
|
|
break;
|
|
case 60: sString="I heard someone opened up an old dwarven mine that had been closed for centuries.";
|
|
break;
|
|
case 61: sString="They say some parts of Cormanthor are inhabited by demons. I can't believe that - I know it's dangerous, but it's not that bad.";
|
|
break;
|
|
case 62: sString="Brighthaven has been overrun. The stories coming out of that place are terrible.";
|
|
break;
|
|
case 63: sString="The most famous wizard in Battledale was called Andros Dray, but it was all so long ago I wonder if he really existed.";
|
|
break;
|
|
case 64: sString="The most beautiful part of Cormanthor was known as the Silver Forest but something happened to it. They say it's cursed.";
|
|
break;
|
|
case 65: sString="Someone said there was a secret rogues' guild around here, but if there was I'd know about it.";
|
|
break;
|
|
case 66: sString="That stone circle near the Semberflow is so old, nobody knows who built it or why.";
|
|
break;
|
|
case 67: sString="Some gnome from a place called Lantan was walking around offering smokepowder for sale, but it was very expensive.";
|
|
break;
|
|
}
|
|
return (sString);
|
|
}
|