Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
PrestoPimp
Apprentice


Joined: 18 Sep 2001
Posts: 175
Location: USA

PostPosted: Sun Jan 26, 2003 4:12 pm   

creating a new character from command line
 
Is this doable? I now know about the #SES command for opening existing characters. But is it possible to somehow open a new character not in the char. database from the command line somehow?

-Presto

For tomarrow is another day, and other days come but 6 times a week.
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Sun Jan 26, 2003 6:44 pm   
 
You can also specify a hostname and port in #SES to connect to another connection not present in the character database.

To create a new character in the character database by code, you would have to use ADO and SQL to insert a new record into the database. This is, however, much more advanced.

Kjata
Reply with quote
PrestoPimp
Apprentice


Joined: 18 Sep 2001
Posts: 175
Location: USA

PostPosted: Sun Jan 26, 2003 8:00 pm   
 
I know some visual basic is there anyway to integrate that with Zmud?

For tomarrow is another day, and other days come but 6 times a week.
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Sun Jan 26, 2003 8:40 pm   
 
You could code a program in Visual Basic that adds a new character to the database and have zMUD call the program. Of course, you still must know how to use ADO and SQL to insert a new record into the database, so it won't be much different from doing it inside zMUD.

I could create an alias for you, but right now I can't test it, so you'll have to wait a little.

Kjata
Reply with quote
PrestoPimp
Apprentice


Joined: 18 Sep 2001
Posts: 175
Location: USA

PostPosted: Sun Jan 26, 2003 8:44 pm   
 
Okay, just post the alias when you get around to it and I will check back cuz I have it set to notify me when some1 replies. Thanks Kjata

For tomarrow is another day, and other days come but 6 times a week.
Reply with quote
PrestoPimp
Apprentice


Joined: 18 Sep 2001
Posts: 175
Location: USA

PostPosted: Sun Jan 26, 2003 11:31 pm   
 
test

<img src="http://web.tampabay.rr.com/presto/PrestoSig.gif">
Reply with quote
PrestoPimp
Apprentice


Joined: 18 Sep 2001
Posts: 175
Location: USA

PostPosted: Sun Jan 26, 2003 11:36 pm   
 
test

<a href="http://web.tampbay.rr.com/presto/sig.html">
<img src="http://web.tampabay.rr.com/presto/PrestoSig.gif"></a>
Reply with quote
PrestoPimp
Apprentice


Joined: 18 Sep 2001
Posts: 175
Location: USA

PostPosted: Sun Jan 26, 2003 11:42 pm   
 
last test and I'm done I promise :)

Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Mon Jan 27, 2003 1:07 am   
 
Here you go:
#ALIAS createNewChar {#VARIABLE Conn %comcreate( "ADODB.Connection");#CALL @Conn.Open( "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=chardb.mdb");#EXECUTE %concat( "#CALL @Conn.Execute( INSERT INTO chardb (Title, IconCaption, Host, Port, Filename, cName, Days, Folder, UseProxy) VALUES ('", %4, "', '", %4, "', '", %2, "', ", %3, ", '", %5, "', '", %1, "', 30, '", %6, "', Yes);"));#CALL @Conn.Close;#VARIABLE Conn ""}

Usage:
createNewChar sessionID host port title settingsFile folder

where sessionID is the unique ID used to refered to that character, host is the hostname of the server the character will connect to, port is the port of the hostname to which the connection is to be made, title is the title for that character which will also appear as the icon's caption, settingsFile is the name of a settings file for that character, and folder is the name of the folder within the zMUD main folder where the settings, maps, and databases for that character will be located.

Example:
createNewChar testChar test.com 1234 "This is a test char" test.mud testfolder

Notes:
- Remember to enclose multi-word arguments in double quotes
- If either settingsFile or folder does not exist, zMUD will complain and give errors when closing the character

Kjata
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net