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
oneverycooldude
Newbie


Joined: 09 Apr 2003
Posts: 1
Location: USA

PostPosted: Wed Apr 09, 2003 2:36 pm   

Autolog script
 
I am taking a vacation from the mud I am currently playing, and I'd like to make a script that would automatically log each of my characters and save in order to prevent them from autodeleting. I'm unsure how to script this and would be thankful for any help. Logon steps are 1) name 2) password 3) Hit enter twice 4) save 5) log off and repeat the 5 steps for each of my 20 chars.

Thanks in advance! :)
Reply with quote
Emit
Magician


Joined: 24 Feb 2001
Posts: 342
Location: USA

PostPosted: Sat Apr 12, 2003 5:24 pm   
 
This is a little beyond what zmud could do. If you have a linux account somewhere, i recommend a perl script like this one

#!/bin/perl
use IPC::Open2;

open2(TELIN, TELOUT, "telnetn") or die "Couldn't open telnetn";

print TELOUT "open <hostname> <port>n";
sleep 5;
print TELOUT "<char name>n<password>nn";
sleep 3;
print TELOUT "nnnsavenquitn";
close TELIN;
close TELOUT;



you can do a couple other things with a script like this one, for instance, having it read the names of the characters from a file, and entering a loop of connecting/saving/disconnecting each one. You can read from TELIN and look for any specific patterns that might be of note (checking to make sure it saves, etc.). Your other option is a vbscript that runs independantly of zmud. It could open zmud as a COM object and perform the necessary steps. the upside would be running it on your own computer, but i have no clue how to go about it.


--------

salford.cslab.uky.edu:4000
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Sat Apr 12, 2003 6:11 pm   
 
Depends how long you plan to leave it unattended. Lets say you go around the world in eighty days in a hot air balloon.

As long as you can leave zMud running on a machine with an active internet connection, you can easily have it cycle through accounts.

Something like this:

#VAR Accounts {Thumper|Baby|Tarzan|Zugg|Darker}
#VAR Passwords {rocks1|isspecial|swing|r0xr0x|test1test}
#VAR Current 1
#VAR DoneKeepAlive 0

#TRIGGER {Your name} {%item(@Accounts,@Current)} {nocr|prompt}
#TRIGGER {Your password} {%item(@Passwords,@Current);#CR;#CR;save;rent} {nocr|prompt}

#ALIAS ATDISCONNECT {#IF (!@DoneKeepAlive) {#ADD Current 1;#IF (@Current > %numitems(@Accounts)) {#VAR Current 1;#VAR DoneKeepALive 1} {#MENU {File|Reconnect}}}

#ALARM 5:00:00 {#VAR DoneKeepAlive 0;#MENU {File|Reconnect}}

This "should" spam the mud at 5am and cycle all the characters in @Accounts. At this rate the staff logged
in at that time will start considering implementing archiving characters or request you
cycle them weekly/monthly.

Add checking for last time you cycled the accounts, check it versus the current day and decide if it has been a week/month etc and do the cycle again?

Ton Diening
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Sat Apr 12, 2003 11:39 pm   
 
ZMud can do anything you can think up, Emit, it's just that more than a few things are just not coded or not coded in a way to make it easy/viable. Thus, the path from A to B might take you through X, Y, and Z.

li'l shmoe of Dragon's Gate MUD
Reply with quote
Emit
Magician


Joined: 24 Feb 2001
Posts: 342
Location: USA

PostPosted: Sun Apr 13, 2003 1:12 am   
 
lol, good point! Thats a very neat script, Ton. I was trying to think of a way to activate stored sessions, instead of using the same session with different autologin commands each time. Should turn off autoreconnect to use this script?

--------

salford.cslab.uky.edu:4000
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5187

PostPosted: Sun Apr 13, 2003 3:34 am   
 
Autoreconnect should be left on. However the script needs some minor changes. I won't tell the solution, but the problem is in the use of the atdisconnect alias. This alias is actually executed when no connection has been established. The alias gets executed each time a connection attempt ends; irregardless of whether that attempt succeed for 3 hours or failed after 10 seconds. So a few changes will produce a script that is capable of assuring connection to the mud and will change which character is connected only after successful connections of that character...another counter, and moving a few commands around is all that is needed (hint, hint, nudge, nudge).
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