|
||
|
|||||||
| Custom Script Release Archive This is a pre-script database archive of what our users had released. |
|
|
Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
God of Pandora
Join Date: Jun 2003
Location: Gainesville GA
Age: 31
Posts: 2,000
|
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( "" ) );
}
/////////////////
Code:
/////////////////
else if ( m.Speech.ToLower().IndexOf( "do" ) >= 0 )
{
Say( String.Format( "do what?" ) );
}
/////////////////
Code:
/////////////////
if ( m.Speech.ToLower().IndexOf( "do" ) >= 0 )
{
Say( String.Format( "" ) );
}
/////////////////
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
__________________
The Den of KillerBeeZ...Kender's Komments, uncensored commentary from the Kender. Plus anything else the Kender might have in his pouches.
|
|
|
|
|
#2 (permalink) |
|
Forum Expert
Join Date: Jan 2003
Location: California
Age: 39
Posts: 3,260
|
Very cool.
__________________
My Scripts: HoodableRobe CellarAddon SeigeUpdates Refresh/CloneMe Commands VooDoo Dolls Lost Alchemy SVN 187 Updates: Bard System + Upgrade Ultima VII |
|
|
|
|
#3 (permalink) | |
|
God of Pandora
Join Date: Jun 2003
Location: Gainesville GA
Age: 31
Posts: 2,000
|
Quote:
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.
|
|
|
|
|
|
#5 (permalink) | |
|
God of Pandora
Join Date: Jun 2003
Location: Gainesville GA
Age: 31
Posts: 2,000
|
Quote:
__________________
The Den of KillerBeeZ...Kender's Komments, uncensored commentary from the Kender. Plus anything else the Kender might have in his pouches.
|
|
|
|
|
|
#6 (permalink) |
|
Forum Expert
Join Date: Oct 2004
Location: New York
Age: 28
Posts: 688
|
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. |
|
|
|
|
#7 (permalink) | |
|
God of Pandora
Join Date: Jun 2003
Location: Gainesville GA
Age: 31
Posts: 2,000
|
Quote:
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.
|
|
|
|
|
|
#8 (permalink) | |
|
Forum Expert
Join Date: Feb 2004
Age: 27
Posts: 1,834
|
Quote:
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? |
|
|
|
|
|
#10 (permalink) | |
|
God of Pandora
Join Date: Jun 2003
Location: Gainesville GA
Age: 31
Posts: 2,000
|
Quote:
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.
|
|
|
|
|
|
#13 (permalink) | |
|
God of Pandora
Join Date: Jun 2003
Location: Gainesville GA
Age: 31
Posts: 2,000
|
Quote:
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.
|
|
|
|
|
|
#14 (permalink) |
|
Forum Novice
Join Date: Jun 2003
Location: Brazil
Age: 29
Posts: 800
|
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... |
|
|
|
|
#15 (permalink) | |
|
God of Pandora
Join Date: Jun 2003
Location: Gainesville GA
Age: 31
Posts: 2,000
|
Quote:
__________________
The Den of KillerBeeZ...Kender's Komments, uncensored commentary from the Kender. Plus anything else the Kender might have in his pouches.
|
|
|
|
|
|
#16 (permalink) |
|
Forum Novice
Join Date: Jun 2003
Location: Brazil
Age: 29
Posts: 800
|
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 );
}
}
Code:
using System.Collections; using System.IO; 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... |
|
|
|
|
#17 (permalink) | |
|
Forum Expert
|
Quote:
Just thought it funny you call it a complete word list. lol
__________________
The valiant die but once. I have died many times. |
|
|
|
|
|
#18 (permalink) | |
|
God of Pandora
Join Date: Jun 2003
Location: Gainesville GA
Age: 31
Posts: 2,000
|
Quote:
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.
|
|
|
|
|
|
#19 (permalink) |
|
Forum Novice
Join Date: Jun 2003
Location: Brazil
Age: 29
Posts: 800
|
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. |
|
|
|
|
#20 (permalink) | |
|
God of Pandora
Join Date: Jun 2003
Location: Gainesville GA
Age: 31
Posts: 2,000
|
Quote:
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.
|
|
|
|
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|