Hello everyone. Here we have Townfolk. Townfolk is an NPC that will speak to players in passing. The response that is delivered is based on the NPC's karma, checked against the player it is speaking to.
The NPC's Karma is random.
And based on it's karma, it's title is determined (also Random).Code (C#):
- this.Karma = (Utility.RandomMinMax(-500, 500));
You may want to edit the strings, (commented accordingly, titled to be easy enough to remember which belongs to what), as they are quite generic.Code (C#):
- if (this.Karma < 0)//bad
- switch( Utility.Random(5) )
- case 0:
- this.Title = "The Beggar";
- case 1:
- this.Title = "The Pickpocket";
- case 2:
- this.Title = "The Unsavory";
- case 3:
- this.Title = "The Vagabond";
- case 4:
- this.Title = "The Vagrant";
Installation is as simple as drag-and-drop into your custom script folder. I know it isn't much, but i hope someone finds some use from it. I'm open for ideas as well, if you think we can improve on it. Any questions, just ask. ~Thanks
Special thanks to Omegaexdeath for his guide on Talking NPC's who can teach, the idea was largely driven from stumbling across his post.