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
eclpmb
Novice


Joined: 29 Feb 2004
Posts: 36
Location: United Kingdom

PostPosted: Sun Jan 29, 2006 5:16 pm   

zMud maps and changing the recall point
 
I have several characters on the same mud. zMud shares the map between them, which is very useful.

The problem I have is that each character has a different recall point. I have been looking but I've not found any way to change the recall point in code so I can put something in each characters autologin

Can anyone help?
Reply with quote
mr_kent
Enchanter


Joined: 10 Oct 2000
Posts: 698

PostPosted: Sun Jan 29, 2006 10:41 pm   
 
#TELEPORT will move your position on the map without changing your MUD postion. Maybe you can use #TELEPORT to update each character's position after a recall.
Reply with quote
Taz
GURU


Joined: 28 Sep 2000
Posts: 1395
Location: United Kingdom

PostPosted: Mon Jan 30, 2006 9:33 am   
 
I could only find one place the recall room information is held. It is the .ini file for the map (has main maps name) which is laid out like a usual .ini file in plain text.

It is not beyond the realms of possibility to create a vbscript to alter the information in this file, this could then be run on character startup.

* EDIT: Later on
Code:
Const ForReading = 1
Const ForWriting = 2

Dim strContents

Dim strFile
Dim strRoom
GetArgs

Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile(strFile, ForReading)
Do While objFile.AtEndOfStream = False
   strLine = objFile.ReadLine
   If Left(strLine, 11) = "RecallRoom=" Then
      strContents = strContents & "RecallRoom=" & strRoom & vbCrLf
   Else
      strContents = strContents & strLine & vbCrLf
   End If
Loop
objFile.Close

Set objFile = objFSO.OpenTextFile(strFile, ForWriting)
objFile.WriteLine strContents
objFile.Close


Function GetArgs()
   Dim objArgs, blnQuit
   Set objArgs = WScript.Arguments.Named
   If objArgs.Exists("file") Then
      strFile = objArgs.Item("file")
   Else
      WScript.Echo "No file argument please use /file:<file name>"
      blnQuit = True
   End If
   If objArgs.Exists("room") Then
      strRoom = objArgs.Item("room")
   Else
      WScript.Echo "No room argument please use /room:<room number>"
      blnQuit = True
   End If
   If blnQuit Then WScript.Quit
End Function

You need to pass the above code two parameters, file name and room number in the following way /file:"C:\Program Files\zMUD\Sample\Sample.ini" and /room:11

This script changes the RoomRecall= line such that it ends with the number you supply. It works perfectly under Windows when I tested it, however I have no idea what you need to do to get it to work from within zMUD, I tried to get it to work but was unable to. Perhaps other gurus can point you in the right direction.
_________________
Taz :)
Reply with quote
Vitae
Enchanter


Joined: 17 Jun 2005
Posts: 673
Location: New York

PostPosted: Mon Jan 30, 2006 1:42 pm   
 
Or he can just set an alias. I think something like this might work
#alias {recall} {~recall;#if (%char=char1) {#teleport recall_room1} {};#if (%char=char2) {#teleport Recall_room2} {} {etc etc}
_________________
http://www.Aardwolf.com
Reply with quote
Taz
GURU


Joined: 28 Sep 2000
Posts: 1395
Location: United Kingdom

PostPosted: Mon Jan 30, 2006 7:20 pm   
 
Nah, that's too simple! Twisted Evil
_________________
Taz :)
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