RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

[2.0] Say Command(s)

Joeku

Lord
[2.0] Say Command(s)

Say Command(s)
RunUO 2.0 (RC0) Script

Code:
/**************************************
*Script Name: Say Command(s)          *
*Author: David                        *
*Modified by: Joeku AKA Demortris     *
*For use with RunUO 2.0               *
*Client Tested with: 5.0.2b           *
*Version: 2.1                         *
*Initial Release: 02/24/04            *
*Revision Date: 06/18/06              *
**************************************/

Description:
This script enables staff members (Counselor+) to force items or mobiles to "say" a word or phrase.
  • AccessLevel Prevention - when using this for mobiles, you can only use it for those below your own AccessLevel.
  • Log-writing - when using this for mobiles, usage is written to the respective command log.
  • Optional Seperation - it is now optional whether or not you want to have the [Say command work for items and mobiles (default), or seperate them into [Say (mobile) and [ItemSay (item) commands.
  • Embedded Command - you can now embed a command when you use [Say <text>, basically forcing your target (if it is a mobile) to invoke said command. Example: "[Say [Self Kill".
  • Anti-Contained Message - if you target an item that is in a container, it automatically finds the item's root parent and uses that for the action instead.
  • StaticTarget - you can use the command for frozen statics, too.

Installation:
Place "SayCommands.cs" in your custom scripts folder. Open the file, and look for the following code:
Code:
namespace Server.Commands
{
	public class CustomCmdHandlers
	{
		private static bool SeperateCommands = [COLOR="Red"]false[/COLOR];
If you want to have seperate commands for items/mobiles rather than one command for both, change the code in red to true.
Restart the server and enjoy!

Updated from 1.0:
The 1.0 version of this script does NOT work unmodified in 2.0. This version adds the optional seperation, embedded command, and anti-contained message features.
 

Attachments

  • SayCommands.zip.zip
    1.6 KB · Views: 252

Joeku

Lord
v2.0 > v2.1
Info- you can now use PublicOverheadMessages for StaticTargets. Serialize deletion added to prevent possible "ghost items."
 

snicker7

Sorceror
interesting approach. In my ventriloquistkit, I handled static targets and land targets by using effectitems.
 

snicker7

Sorceror
ah yeah. similar approach. effect items work just about the same way, except they reuse themselves. IE, when one self deletes, it just moves to the internal map for clean up (same thing happens with yours) but effect items first look for a valid free previously-deleted effectitem on the internal map and reuse it. very nice =]
 
Top