Resource icon

Townfolk 1.0 (Karma-Based NPC) 2015-10-26

Author
Anomaly
Downloads
77
Views
1,779
First release
Last update
Rating
0.00 star(s) 0 ratings
No permission to download Join the discussion
::Townfolk 1.0::

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.
Code:
this.Karma = (Utility.RandomMinMax(-500, 500));

And based on it's karma, it's title is determined (also Random).
(example: )
Code:
if (this.Karma < 0)//bad
{
switch( Utility.Random(5) )
{
case 0:
this.Title = "The Beggar";
break;
case 1:
this.Title = "The Pickpocket";
break;
case 2:
this.Title = "The Unsavory";
break;
case 3:
this.Title = "The Vagabond";
break;
case 4:
this.Title = "The Vagrant";
break;
}
}

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.

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.
https://www.servuo.com/threads/howtomake-talking-npcs-with-titles-who-can-teach.2973/
  • Like
Reactions: RedBeard

Active Shards

Donations

Total amount
$0.00
Goal
$1,000.00
Back