Go Back   RunUO - Ultima Online Emulation > RunUO > Custom Script Release Archive

Custom Script Release Archive This is a pre-script database archive of what our users had released.

 
 
Thread Tools Display Modes
Old 04-18-2006, 01:03 PM   #1 (permalink)
God of Pandora
 
KillerBeeZ's Avatar
 
Join Date: Jun 2003
Location: Gainesville GA
Age: 31
Posts: 2,000
Default complete word list for AI

over 50,000 words from 2 letters to 10

This is a partial script, not a complete script by any means.

This is a list you may use to create a bit of AI on your shard.

This is intended for mobile speech

IMPORTANT

This list WILL need to be edited, there are many words you will not care to use, I just added them all because I wont know what words you wish to use, just delete the ones you don't wish to use.

to complete each word on the list you must provide the speech of the NPC

each word is in the following format...

Code:
/////////////////
		else if ( m.Speech.ToLower().IndexOf( "do" ) >= 0 )
		{
			Say( String.Format( "" ) );
		}
/////////////////
to complete it, you will need to add your own words such as...

Code:
/////////////////
		else if ( m.Speech.ToLower().IndexOf( "do" ) >= 0 )
		{
			Say( String.Format( "do what?" ) );
		}
/////////////////
the very 1st word in the list, you will need to remove the "else" to make it like so...

Code:
/////////////////
		if ( m.Speech.ToLower().IndexOf( "do" ) >= 0 )
		{
			Say( String.Format( "" ) );
		}
/////////////////
mainly, I am just saving some people a little work.

Also, I would love to see your completed lists, so if you use this list, please show us what you have done.

rar file size - 117.6 KB
uncompressed - 6.47 MB
Attached Files
File Type: rar WordList.rar (117.6 KB, 93 views)
__________________
The Den of KillerBeeZ...Kender's Komments, uncensored commentary from the Kender. Plus anything else the Kender might have in his pouches.
KillerBeeZ is offline  
Old 04-18-2006, 01:09 PM   #2 (permalink)
Tru
Forum Expert
 
Tru's Avatar
 
Join Date: Jan 2003
Location: California
Age: 39
Posts: 3,260
Default

Very cool.
Tru is offline  
Old 04-18-2006, 01:19 PM   #3 (permalink)
God of Pandora
 
KillerBeeZ's Avatar
 
Join Date: Jun 2003
Location: Gainesville GA
Age: 31
Posts: 2,000
Default

Quote:
Originally Posted by Tru
Very cool.
thanks... I tried using notepads replace feature which replaces at about 50 changes per second but it kept freezing, so I used dreamweaver, which was as slow as 1.5 changes per second... my puter was working for 2 days lol

I hope people can use this, I plan to create a massive AI system for all NPC's. actually a few AI's, such as Nobles, Commoners, War Vets and such

there are a few things to remember about the way this list is set up...

lets say you have 2 words, lets make them, "like" and "Pie"

lets also say that like is before pie in the list

if a player says "I like pie" it will show the speech for "like" but not "pie" because it saw like and since it did see like, it will not fall to the next if statement.

There are ways to get around this but every method has its own drawbacks.

So this list is mainly intended for single word statements, but if you put "I like Pie" in the list, it will look for that complete statement, so if you do this, be sure to put the sentences in the beginning, and now that I think about it, I prolly should have put the larger words on top and the smaller words on bottom....
__________________
The Den of KillerBeeZ...Kender's Komments, uncensored commentary from the Kender. Plus anything else the Kender might have in his pouches.
KillerBeeZ is offline  
Old 04-18-2006, 07:58 PM   #4 (permalink)
Forum Expert
 
Join Date: Dec 2005
Posts: 465
Default

damn. thats a huge file for what it does.
snicker7 is offline  
Old 04-18-2006, 10:27 PM   #5 (permalink)
God of Pandora
 
KillerBeeZ's Avatar
 
Join Date: Jun 2003
Location: Gainesville GA
Age: 31
Posts: 2,000
Default

Quote:
Originally Posted by snicker7
damn. thats a huge file for what it does.
well, it has over 50,000 words... I imagine when you get rid of the words that just dont fit with UO it will be less than half the size
__________________
The Den of KillerBeeZ...Kender's Komments, uncensored commentary from the Kender. Plus anything else the Kender might have in his pouches.
KillerBeeZ is offline  
Old 04-19-2006, 09:27 AM   #6 (permalink)
Forum Expert
 
Join Date: Oct 2004
Location: New York
Age: 28
Posts: 688
Default

Could you post an example of one of your mobiles that will be using this, I'm having a hard time trying to figure out a good use for this.

Another option for speech recognition is to use a spawner, I think all of the 3rd party spawning systems have that feature built in. Just place two spawner's near each other, one for the mobile, and another for the speech trigger.
X-SirSly-X is offline  
Old 04-19-2006, 10:58 AM   #7 (permalink)
God of Pandora
 
KillerBeeZ's Avatar
 
Join Date: Jun 2003
Location: Gainesville GA
Age: 31
Posts: 2,000
Default

Quote:
Originally Posted by X-SirSly-X
Could you post an example of one of your mobiles that will be using this, I'm having a hard time trying to figure out a good use for this.

Another option for speech recognition is to use a spawner, I think all of the 3rd party spawning systems have that feature built in. Just place two spawner's near each other, one for the mobile, and another for the speech trigger.
sure, here is an example

Code:
using System;
using Server;
using Server.Items;

namespace Server.Mobiles
{
	[CorpseName( "the corpse of TestNPC" )] 
	public class TestNPC : BaseCreature
	{
		[Constructable]
		public TestNPC() : base( AIType.AI_Mage, FightMode.Closest, 10, 1, 0.2, 0.4 )
		{
			Name = "Pookie";
			Body = 0x303;
			BaseSoundID = 0x482;

			SetStr( 600 );
			SetDex( 250 );
			SetInt( 1000 );

			SetHits( 2500 );

			SetDamage( 15, 25 );

			SetDamageType( ResistanceType.Physical, 20 );
			SetDamageType( ResistanceType.Cold, 40 );
			SetDamageType( ResistanceType.Energy, 40 );

			SetResistance( ResistanceType.Physical, 65 );
			SetResistance( ResistanceType.Fire, 30 );
			SetResistance( ResistanceType.Cold, 60 );
			SetResistance( ResistanceType.Poison, 60 );
			SetResistance( ResistanceType.Energy, 30 );

			SetSkill( SkillName.EvalInt, 130.0 );
			SetSkill( SkillName.Magery, 130.0 );
			SetSkill( SkillName.Meditation, 101.0 );
			SetSkill( SkillName.Poisoning, 101.0 );
			SetSkill( SkillName.MagicResist, 200.0 );
			SetSkill( SkillName.Tactics, 100.0 );
			SetSkill( SkillName.Wrestling, 100.0 );

			Fame = 2000;
			Karma = -2000;

			VirtualArmor = 20;
		}
		public TestNPC( Serial serial ) : base( serial ){}
		public override void Serialize( GenericWriter writer )
		{
			base.Serialize( writer );
			writer.Write( (int) 0 );
		}
		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );
			int version = reader.ReadInt();
		}
		public override void OnSpeech( SpeechEventArgs m )
		{
			if ( m.Mobile.InRange( this, 8 ) )
			{
				if ( m.Speech.ToLower().IndexOf( "help" ) >= 0 )
				{
					Say( String.Format( "the help command is [help" ) );
				}
				else if ( m.Speech.ToLower().IndexOf( "who" ) >= 0 )
				{
					Say( String.Format( "me? I am a test NPC" ) );
				}
				else if ( m.Speech.ToLower().IndexOf( "pandora" ) >= 0 )
				{
					Say( String.Format( "KillerBeeZ is the God of Pandora" ) );
				}
			}
		}
	}
}
__________________
The Den of KillerBeeZ...Kender's Komments, uncensored commentary from the Kender. Plus anything else the Kender might have in his pouches.
KillerBeeZ is offline  
Old 04-19-2006, 11:18 AM   #8 (permalink)
Forum Expert
 
Join Date: Feb 2004
Age: 27
Posts: 1,834
Default

Quote:
Originally Posted by KillerBeeZ
if a player says "I like pie" it will show the speech for "like" but not "pie" because it saw like and since it did see like, it will not fall to the next if statement.

There are ways to get around this but every method has its own drawbacks.
if ( m.Speech.ToLower().IndexOf( "like" ) >= 0 && m.Speech.ToLower().IndexOf( "pie" ) >= 0 && m.Speech.ToLower().IndexOf( "not" ) == -1 )
Something like that?
It's interesting, but I'll never fill that list.
On the other hand this gives me an idea... Do you know Alice?
Kamuflaro is offline  
Old 04-19-2006, 11:22 AM   #9 (permalink)
Forum Expert
 
Join Date: Apr 2004
Location: Lawton OK
Age: 33
Posts: 476
Default

Quote:
Originally Posted by Kamuflaro
Do you know Alice?
[sing] FOR TWENTY FOUR YEARS I'VE BEEN LIVING NEXT DOOR TO ALICE.....


ALICE.....


WHO THE @7!C3 IS ALICE


[/sing]
slithers is offline  
Old 04-19-2006, 11:22 AM   #10 (permalink)
God of Pandora
 
KillerBeeZ's Avatar
 
Join Date: Jun 2003
Location: Gainesville GA
Age: 31
Posts: 2,000
Default

Quote:
Originally Posted by Kamuflaro
if ( m.Speech.ToLower().IndexOf( "like" ) >= 0 && m.Speech.ToLower().IndexOf( "pie" ) >= 0 && m.Speech.ToLower().IndexOf( "not" ) == -1 )
Something like that?
It's interesting, but I'll never fill that list.
On the other hand this gives me an idea... Do you know Alice?
something like what? what are you attempting to do there?

yes I know Alice, and it has been discussed before, it would be awsome to have an alice AI in UO but Alice to run well needs resourses, which may lag the server a bit, it was even suggested that players could run the program client side, but I imagine you can see the difficulty there.
__________________
The Den of KillerBeeZ...Kender's Komments, uncensored commentary from the Kender. Plus anything else the Kender might have in his pouches.
KillerBeeZ is offline  
Old 04-19-2006, 08:25 PM   #11 (permalink)
Forum Expert
 
Join Date: Oct 2004
Location: New York
Age: 28
Posts: 688
Default

Thanks for the reply, now it makes more sense
X-SirSly-X is offline  
Old 04-20-2006, 11:15 AM   #12 (permalink)
Forum Expert
 
Join Date: Feb 2004
Age: 27
Posts: 1,834
Default

It was meant for the "I like pie" statement and prevents to get confused with "I do not like pie". Anyways, Alice rox, but truely takes plenty resources.
Just an idea, but the price is too high hehe.
Kamuflaro is offline  
Old 04-20-2006, 11:21 AM   #13 (permalink)
God of Pandora
 
KillerBeeZ's Avatar
 
Join Date: Jun 2003
Location: Gainesville GA
Age: 31
Posts: 2,000
Default

Quote:
Originally Posted by Kamuflaro
It was meant for the "I like pie" statement and prevents to get confused with "I do not like pie". Anyways, Alice rox, but truely takes plenty resources.
Just an idea, but the price is too high hehe.
one day I (or someone else) will figure a way to do it, Alice does rock, and I love things that make players take a second look and go "huh?!?"

as for the statement... I am thinking this might be a good way to do what you wanted... it wont get them confused, as it has to be exact

Code:
		if ( m.Speech.ToLower().IndexOf( "i do not like pie" ) >= 0 )
		{
			Say( String.Format( "I simply cannot trust anyone that doesn't like pie... shoo, off with you" ) );
		}
		else if ( m.Speech.ToLower().IndexOf( "i like pie" ) >= 0 )
		{
			Say( String.Format( "so do I, I like you already" ) );
		}
__________________
The Den of KillerBeeZ...Kender's Komments, uncensored commentary from the Kender. Plus anything else the Kender might have in his pouches.
KillerBeeZ is offline  
Old 04-20-2006, 11:48 AM   #14 (permalink)
Forum Novice
 
nerun's Avatar
 
Join Date: Jun 2003
Location: Brazil
Age: 29
Posts: 800
Default

Very cool man.

We can implement an option to the AI npc save the player's speeches in a file, each one in one line. Then in the future the Shard's Scripters can read the file at the end of each week or month and add the words (the most common) to the AI NPC, it will simulate a learn mode.
__________________
Ok, i am back...
Oh man, Work, University and RunUO Scripting are a hard triple journey...
nerun is offline  
Old 04-20-2006, 12:06 PM   #15 (permalink)
God of Pandora
 
KillerBeeZ's Avatar
 
Join Date: Jun 2003
Location: Gainesville GA
Age: 31
Posts: 2,000
Default

Quote:
Originally Posted by nerun
Very cool man.

We can implement an option to the AI npc save the player's speeches in a file, each one in one line. Then in the future the Shard's Scripters can read the file at the end of each week or month and add the words (the most common) to the AI NPC, it will simulate a learn mode.
sounds like a lot of work to me, but also a damn good idea... I'ma think of a way to automate as much of the process as possible... maybe it saves it in script format, and all you have to do is add the replies, or maybe there is a way to impliment ALICE behind the scenes, we have this file saved from the NPC's fed into ALICE and output ALICE's replies to script format... I don't believe I could actually acomplish this though, not yet, I still have a lot to learn... keep the ideas flowing, this is getting interesting
__________________
The Den of KillerBeeZ...Kender's Komments, uncensored commentary from the Kender. Plus anything else the Kender might have in his pouches.
KillerBeeZ is offline  
Old 04-20-2006, 12:54 PM   #16 (permalink)
Forum Novice
 
nerun's Avatar
 
Join Date: Jun 2003
Location: Brazil
Age: 29
Posts: 800
Default

It is not so hard, i did a begining:

Under public override void OnSpeech( SpeechEventArgs m ):
Code:
ArrayList wordssave = new ArrayList();

if ( m.Mobile.InRange( this, 8 ) )
{
	if ( m.Speech.ToLower().IndexOf( "help" ) >= 0 )
	{
		wordssave.Add( m.Speech );
		Say( String.Format( "something here" ) );
	}
}

using ( StreamWriter op = new StreamWriter( "Data/AIwords.txt" ) )
{
	foreach ( String speech in wordssave )
	{
		op.WriteLine( "- {0}", speech );
	}
}
And remember to add:
Code:
using System.Collections;
using System.IO;
to the top of the file.

Just one problem: for every speech the player says, the code will delete the file AIwords.txt and write again the new words.

Could somebody help-me here?
__________________
Ok, i am back...
Oh man, Work, University and RunUO Scripting are a hard triple journey...
nerun is offline  
Old 04-20-2006, 01:08 PM   #17 (permalink)
Forum Expert
 
siran's Avatar
 
Join Date: Dec 2003
Location: Shreveport, Louisiana
Age: 50
Posts: 474
Send a message via Yahoo to siran
Default

Quote:
Originally Posted by KillerBeeZ
over 50,000 words from 2 letters to 10

This is a partial script, not a complete script by any means.
No offense....
Just thought it funny you call it a complete word list. lol
__________________
The valiant die but once.

I have died many times.
siran is offline  
Old 04-20-2006, 02:09 PM   #18 (permalink)
God of Pandora
 
KillerBeeZ's Avatar
 
Join Date: Jun 2003
Location: Gainesville GA
Age: 31
Posts: 2,000
Default

Quote:
Originally Posted by siran
No offense....
Just thought it funny you call it a complete word list. lol
both are true...

it IS a complete word list, but NOT a complete script
__________________
The Den of KillerBeeZ...Kender's Komments, uncensored commentary from the Kender. Plus anything else the Kender might have in his pouches.
KillerBeeZ is offline  
Old 04-21-2006, 03:41 AM   #19 (permalink)
Forum Novice
 
nerun's Avatar
 
Join Date: Jun 2003
Location: Brazil
Age: 29
Posts: 800
Default

Ok, i did an AI npc that saves to an AIwords.txt file all the word players says and who said it. Remember to create a file called AIwords.txt to the RunUO root directory (c:\RunUO).

It works fine. You can read the lines, or words the players talk and analyse it. Adding yhe most common to the AI npc in the future.
__________________
Ok, i am back...
Oh man, Work, University and RunUO Scripting are a hard triple journey...

Last edited by nerun; 05-04-2008 at 05:35 PM.
nerun is offline  
Old 04-21-2006, 12:50 PM   #20 (permalink)
God of Pandora
 
KillerBeeZ's Avatar
 
Join Date: Jun 2003
Location: Gainesville GA
Age: 31
Posts: 2,000
Default

Quote:
Originally Posted by nerun
Ok, i did an AI npc that saves to an AIwords.txt file all the word players says and who said it. Remember to create a file called AIwords.txt to the RunUO root directory (c:\RunUO).

It works fine. You can read the lines, or words the players talk and analyse it. Adding yhe most common to the AI npc in the future.
maybe it might make it easier if the file could be formatted as it is created...

such as adding a (2) after the word if the word is repeated and keeping it all in alphabetical order, or something of that nature, something to make it easier to go through what will be thousands of lines of text

but in any case, nice job, this will be useful for many more reasons than just recording text for AI
__________________
The Den of KillerBeeZ...Kender's Komments, uncensored commentary from the Kender. Plus anything else the Kender might have in his pouches.
KillerBeeZ is offline  
 

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC5