|
||
|
|||||||
| Script Support Get support for modifying RunUO Scripts, or writing your own! |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Forum Novice
Join Date: Jan 2003
Location: Rochester NY
Age: 26
Posts: 208
|
Okay, one more question.
Has anyone got an example of converting a spoken name to a MobileID? In reworking my falconry script, I would like to be able to have the player say "Send this to PlayerName". Capture that player name from the speech argument and the item chosen is put in the falcon's pack. The falcon is then teleported (after a Fly-off screen animation and short delay I've worked up) to the location of the Mobile named in the command. The reciving player then is freiended to the bird and given a message that a package has arrived for them etc. Some obvious problems, converting string to a Mobile type, handling letter case etc. I've looked at several chat systems and mail systems but don't quite see what I need. I am trying to avoid creating a "Friend List" or limiting the number of people that the falcon can interact with. Since the sending and recieving players may be in different areas of the world, targeting is no good. I'll be implementing a custom letter-writing system as well. I prefer this to current chat systems as dialogue between 2 people 1000 miles apart should not be instantaneous. I think it lends more to the realism of my shard. I've considered reading in from the accounts list and converting it to Lowercase and building an array, but it presents an issue since new players would have to wait for a complete recompile before being accessible by the system. Any ideas?
__________________
•¤•¤•Arkryal •¤•¤• |
|
|
|
|
|
#2 (permalink) |
|
Master of the Internet
|
best way would be to set it up as a command
[Falcon "name" or [FalconGoTo "Name" etc if no "name" return with message error needs a name then have a check for all mobiles and if playermobile and name == "name" then sendfalcon and break if none are found - send message to make sure the player's name is spelled correctly also - remember if more than 1 player with that name, it will only send it to the 1st one it fines with the name and the name has to be exact, including CaPs
__________________
http://www.AoAUO.com
:) ..... Come for the Customs, Play for the Fun. Return to see your new Friends ..... :) |
|
|
|
|
|
#4 (permalink) |
|
Forum Expert
|
Take what you have that works now, and apply it to the OnSpeech method in your Falcon NPC script, to check the name, simply use something like:
Code:
//Get "Name" from "Send this to <Name>"
//(where "nameToCheck" is a string variable of the name from the list you have already.
//If it IS a match.
if( e.GetString( 3 ).IndexOf( nameToCheck ) != -1 )
{
//do something.
}
![]() As for deciding which player to send it to in a multiple scenario, you can have something like; "Send this to [<Title>] <Name> [ in ] [ in region <Region>/ in guild <Guild> ]" "Send this to Lord Vorspire in guild Staffembers" "Send this to Lord Vorspire in region Shame" "Send this to Vorspire in guild Staffembers" etc... where [ and ] are optional?
__________________
![]() RPK.VORSPIRE.COM - The WoW-UO Cross-Over Shard Last edited by Vorspire; 08-06-2008 at 11:18 AM. |
|
|
|
|
|
#5 (permalink) |
|
Forum Novice
Join Date: Jan 2003
Location: Rochester NY
Age: 26
Posts: 208
|
cool idea. I was thinking about simply passing a name from the speech events to the existing command code. The trouble I have is the fact that there would be multiple commands that may include a player name.
At lower levels, a player may train the falcon to send a message. At a higher level, they may send an item. At the highest, they may send many items (pack capacity). They may be commanded to track a player if it's in x range (imagine bounty systems then )So I would need to compare part of the string to the name list and reference another part to a list of commands. Any ideas??? C# is not my language of choice, my efforts there have been victim of many syntactical errors.
__________________
•¤•¤•Arkryal •¤•¤• |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|