Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUDs ➜ General ➜ Automatic Character

Automatic Character

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Goblin   (39 posts)  Bio
Date Sat 12 Jul 2003 12:36 PM (UTC)
Message
Heya,

ok as you may or may not know - i am the creator of the siegewars wargames. We also host and have some of our own muds.

Our current project is as follows :

we are working on an automatic mud character creation program from within a ASP page. Basically my game players create a character and kingdom in the siegewars wargame and a character in one of our muds (testmud atm) is automatically created. At the moment we are trying to use code to create this character file in the player directory.
so the player can then have a character on a mud indentical to the one in the wargame.

problem is : ive got the file creation working but it creates a textfile with a .pl ending. When i try to log into the mud using this newly created file from siegewars. it doesnt recognise it.

our code to create a player file is :

filename=Server.mappath("\data\mud\ROMcodebase\player") & "\" & (charactername) &".pl"
Set fs = Server.CreateObject("Scripting.FileSystemObject")
Set file = fs.OpenTextFile(filename,8,true)
file.writeline "#PLAYER"
file.write "Name "
file.write charactername
file.writeline "~"
file.writeline "Id 1057789604"
file.writeline "LogO 1057791720"
file.writeline "Vers 5"
file.writeline "Prom <%hhp %mm %vmv> ~"
file.writeline "Race human~"
file.writeline "Sex 1"
file.writeline "Cla 2"
file.writeline "Levl 1"
file.writeline "Plyd 2116"
file.writeline "Not 0 0 0 0 0"
file.writeline "Scro 22"
file.writeline "Room 3700"
file.writeline "HMV 20 20 100 100 100 100"
file.writeline "Gold 0"
file.writeline "Silv 0"
file.writeline "Exp 1000"
file.writeline "Act Q"
file.writeline "Comm NO"
file.writeline "Pos 8"
file.writeline "Prac 5"
file.writeline "Trai 3"
file.writeline "Save -1"
file.writeline "Alig 0"
file.writeline "Hit 1"
file.writeline "ACs 95 95 95 99"
file.writeline "Attr 13 13 13 16 13"
file.writeline "AMod 0 0 0 0 0"
file.write "Pass "
file.write password
file.writeline "~"
file.writeline "Titl the Pilferer~"
file.writeline "Pnts 40"
file.writeline "TSex 1"
file.writeline "LLev 0"
file.writeline "HMVP 20 100 100"
file.writeline "Cnd 0 0 14 14"
file.writeline "Sk 40 'dagger'"
file.writeline "Sk 1 'mace'"
file.writeline "Sk 1 'sword'"
file.writeline "Sk 1 'backstab'"
file.writeline "Sk 1 'disarm'"
file.writeline "Sk 1 'dodge'"
file.writeline "Sk 1 'trip'"
file.writeline "Sk 1 'second attack'"
file.writeline "Sk 1 'hide'"
file.writeline "Sk 1 'peek'"
file.writeline "Sk 1 'pick lock'"
file.writeline "Sk 1 'sneak'"
file.writeline "Sk 1 'steal'"
file.writeline "Sk 1 'scrolls'"
file.writeline "Sk 1 'staves'"
file.writeline "Sk 1 'wands'"
file.writeline "Sk 50 'recall'"
file.writeline "Gr 'rom basics'"
file.writeline "Gr 'thief basics'"
file.writeline "Gr 'thief default'"
file.writeline "End"
file.writeline
file.writeline "#O"
file.writeline "Vnum 3716"
file.writeline "Nest 0"
file.writeline "Cond 0"
file.writeline "Wear 0"
file.writeline "Cost 0"
file.writeline "Val 0 0 166 0 0"
file.writeline "End"
file.writeline
file.writeline "#O"
file.writeline "Vnum 3703"
file.writeline "Nest 0"
file.writeline "Cond 0"
file.writeline "Wear 5"
file.writeline "Cost 0"
file.writeline "End"
file.writeline
file.writeline "#O"
file.writeline "Vnum 3701"
file.writeline "Nest 0"
file.writeline "Cond 0"
file.writeline "Wear 16"
file.writeline "Cost 210"
file.writeline "End"
file.writeline
file.writeline "#O"
file.writeline "Vnum 3704"
file.writeline "Nest 0"
file.writeline "Cond 0"
file.writeline "Wear 11"
file.writeline "Cost 0"
file.writeline "End"
file.writeline
file.writeline "#O"
file.writeline "Vnum 3162"
file.writeline "Nest 0"
file.writeline "Cond 0"
file.writeline "Wear -1"
file.writeline "Cost 500"
file.writeline "End"
file.writeline
file.writeline "#END"

file.Close
set file=nothing
set fs=nothing

as you can see we are mainly writing text to a text file with a .pl ending. the above code at the moment only contains the variables for charactername and password which are created from the wargame.

obviously i dont think we are in the right direction. any pointers? possibly changing opentextfile to something else?

the above does indeed create the following :

#PLAYER
Name Oblora~
Id 1057789604
LogO 1057791720
Vers 5
Prom <%hhp %mm %vmv> ~
Race human~
Sex 1
Cla 2
Levl 1
Plyd 2116
Not 0 0 0 0 0
Scro 22
Room 3700
HMV 20 20 100 100 100 100
Gold 0
Silv 0
Exp 1000
Act Q
Comm NO
Pos 8
Prac 5
Trai 3
Save -1
Alig 0
Hit 1
ACs 95 95 95 99
Attr 13 13 13 16 13
AMod 0 0 0 0 0
Pass ob~
Titl the Pilferer~
Pnts 40
TSex 1
LLev 0
HMVP 20 100 100
Cnd 0 0 14 14
Sk 40 'dagger'
Sk 1 'mace'
Sk 1 'sword'
Sk 1 'backstab'
Sk 1 'disarm'
Sk 1 'dodge'
Sk 1 'trip'
Sk 1 'second attack'
Sk 1 'hide'
Sk 1 'peek'
Sk 1 'pick lock'
Sk 1 'sneak'
Sk 1 'steal'
Sk 1 'scrolls'
Sk 1 'staves'
Sk 1 'wands'
Sk 50 'recall'
Gr 'rom basics'
Gr 'thief basics'
Gr 'thief default'
End

#O
Vnum 3716
Nest 0
Cond 0
Wear 0
Cost 0
Val 0 0 166 0 0
End

#O
Vnum 3703
Nest 0
Cond 0
Wear 5
Cost 0
End

#O
Vnum 3701
Nest 0
Cond 0
Wear 16
Cost 210
End

#O
Vnum 3704
Nest 0
Cond 0
Wear 11
Cost 0
End

#O
Vnum 3162
Nest 0
Cond 0
Wear -1
Cost 500
End

#END
Top

Posted by Goblin   (39 posts)  Bio
Date Reply #1 on Sat 12 Jul 2003 12:38 PM (UTC)
Message
ive just realised something :

note :

Id 1057789604

i guess this is unique to the mud and generated by it to make it unique?

dont suppose i can solve this easily from outside the mud?
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


10,185 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.