A script to create many of one type of NPC in a facet.

Post your Custom Scripts or Packages.

Moderator: POL Developer

Post Reply
Yukiko
Distro Developer
Posts: 2784
Joined: Thu Feb 02, 2006 1:41 pm
Location: San Antonio, Texas
Contact:

A script to create many of one type of NPC in a facet.

Post by Yukiko » Fri Jul 23, 2021 12:42 am

From the program header:

Code: Select all

/////////////////////////////////////////////////////////////////////
//
// Program Name: CreateMassNPCs
//
// Author: Kiko
//
// Date Created: 2021-07-23
//
// Description: This is a staff text command to create many of one
// type of NPC distributed pseudo-randomly throughout
// the entire facet the staff member is in.
// I needed to test the server load with an unrealistic
// amount of NPCs. So I wrote this program.
//
// There is a lot of user input error checking for a staff level
// text command but it was good practice writing it.
//
// The command syntax is:
// .createmassnpcs [NPC Name] [Amount to create]
//
// The NPC Name and Amount parameters are both optional.
// If no parameters are entered the default of horse will
// be used for the NPC and default of 5,000 will be used for
// the amount to create.
//
// If only one parameter is entered the program will determine
// whether an integer or string was entered. If a valid integer,
// greater than 0, it will use that for the amount and default to
// horse for the NPC. If the parameter is a string, and
// string is a valid NPC, it will create that NPC using the
// default amount of 5,000.
//
// Parameters:	string::NPC Name
//				integer::Amount to create
//
//
// Return Value: 1 if successful and 0 if unsuccessful.
//
/////////////////////////////////////////////////////////////////////
Attachments
createmassnpcs.zip
Creates many NPCs distributed pseudo-randomly in the facet where the staff member is located.
(1.75 KiB) Downloaded 23 times

Post Reply