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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » Finished MUD Scripts
DeathShadow
Adept


Joined: 11 Nov 2000
Posts: 228
Location: USA

PostPosted: Wed May 28, 2003 9:44 pm   

dsAutoUpdate1.7 - Auto Download/Install of scripts
 
Greetings Everyone!

I am very excited about the #FTP abilities in the current zMUDs.
Using those functions I put together this script that makes installing and updating
scripts I make for the users on my mud _very_ easy for them (even the people that have
no clue about zmud or whatnot).

For a working example copy and paste the following into zmud. After you copy/paste
dsAutoUpdate you are now able to get scripts from my update server. For example;
to get a list of currently supported scripts type 'dsAutoUpdate' without
arguments.

dsAutoUpdate will also check to see if an update to the autoUpdate script is available;
if so, it will download and install the updated version. ** Users are always asked if
they wish to install something, and have the ability to cancel. **

So please check out this script! And while your at it come check out
Nightmare.imaginary.us 1701
all these scripts available will only work on this
mud. And this mud is great! And currently the story line is very exciting, the end of
the world is comming (approx 6-9 months real time) and at the end of world Nightmare
5 Version 6 will happen (rumored to be 500 mud years after the end of Nightmare 5)
all players are able to make history now! Come check us out!
Nightmare.Imaginary.us 1701
#CLASS {dsScripts|dsAutoUpdate1.7};

#ALIAS dsAutoUpdate {#ECHO %ansi( bold, magenta)@dsAutoUpdateVersion;#IF (%version < 660) {#SAY %ansi( bold, red)ERROR: ZMud Version not supported!;#ABORT 1};#ECHO %ansi( green)Connecting to Server... ~(please wait!~);#FTP open ColorPrintingSystems.com zscripts zscripts;#ECHO %ansi( green)Getting Support File...;#FTP get SUPPORT.TXT ..SUPPORT.TXT;#FILE 1 SUPPORT.TXT;#READ 1 (1);#ERASE 1;#IF (%1 = "") {#ECHO %ansi( yellow)dsAutoUpdate Syntax:;#ECHO %ansi( green, bold)dsAutoUpdate SCRIPT_NAME;#ECHO "";#ECHO %ansi( green)@dsAutoUpdateVersion knows how to install the following scripts:;#ECHO %ansi( bold, green)%replace( @dsTemp, "|", ", ");#FTP close;#UNVAR dsTemp;#ABORT 1};#IF (%ismember( %lower( %1), %lower( @dsTemp))) {#NOOP} {#ECHO %ansi( bold, red)I dont know how to update %1!;#FTP close;#UNVAR dsTemp;#ABORT 1};#ECHO %ansi( green, bold)Getting Version File...;#FILE 1 VERSION.TXT;#ERASE 1;#FTP get VERSION.TXT ..VERSION.TXT;#FILE 1 VERSION.TXT;#IF (%grep( 1, "dsAutoUpdate") = @dsAutoUpdateVersion) {#ECHO %ansi( yellow)Updater is current...} {#YESNO {p:An Update to the updater is avalable!} {Download:#FTP get %grep( 1, "dsAutoUpdate").TXT ..%grep( 1, "dsAutoUpdate").TXT;#FILE 2 %grep( 1, "dsAutoUpdate").TXT;#WHILE (@EOF != 1) {#READ 2 _noexpand};#CLOSE 1;#CLOSE 2;#FTP close;#ECHO %ansi( bold, magenta)Restarting Updater...;#ALARM +1 {dsAutoUpdate %1};#ABORT 1} {Cancel:#CLOSE 1;#FTP close;#ABORT 1}};#ECHO %ansi( green)File parsed: %grep( 1, "%1");#IF (%grep( 1, "%1") = @%1Version) {#ECHO %ansi( yellow)@%1Version is current.;#FTP close;#ABORT 1} {#YESNO {p:An update is available:} {Download:#FTP get %grep( 1, "%1").TXT ..%grep( 1, "%1").TXT;#FTP close} {Cancel:#FTP close;#CLOSE 1;#ABORT 1}};#YESNO {p:Ok to install %grep( 1, "%1") now?} {Yes:#FILE 2 %grep( 1, "%1").TXT;#WHILE (@EOF != 1) {#READ 2 _noexpand;#ECHOPROMPT -};#ECHO > Done!;#CLOSE 1;#CLOSE 2} {Cancel:#CLOSE 1;#CLOSE 2;#ABORT 1}};
#VAR dsAutoUpdateVersion {dsAutoUpdate1.7} {dsAutoUpdate1.7};
#CLASS 0


zMud 6.62; Win2000[url]Http://forum.imaginary.us/nmbb/ [/url]
Reply with quote
Manx
Apprentice


Joined: 10 Oct 2000
Posts: 152
Location: USA

PostPosted: Fri May 30, 2003 2:54 am   
 
I must say this is a very good idea.

pat o.
Reply with quote
Carabas
GURU


Joined: 28 Sep 2000
Posts: 434
Location: USA

PostPosted: Wed Jun 04, 2003 9:43 pm   
 
I would have to agree. Good Job.


Carabas
------
I like work; it fascinates me. I can sit and look at it for hours.
- Jerome K. Jerome
Reply with quote
Lalaynya
Wanderer


Joined: 23 Aug 2002
Posts: 96

PostPosted: Sat Jun 14, 2003 7:55 pm   
 
Ok, I took your idea, and extended it some... and hacked it up a lot.

If you'd like to test it, the following code will load my version (which, by the way, should not interfere at all with yours!)

Just cut and paste this into the command line, and it will download and install the latest updater, and create a button to start it.

#ftp open 24.116.192.23 zmud zmud;#ftp get {zmudscriptsautoupdate.txt} {..autoupdate.txt};#file 1 autoupdate.txt;#if (%filesize( 1)>1) {#var eof 0;#WHILE (@EOF != 1) {#READ 1 _noexpand;#ECHOPROMPT -}} {#echo Error downloading file!!!! Filesize: %filesize( 1)};#ftp close;#erase 1;#BUTTON 1 {Update} {autoupdate} {} {} {} {} {} {Size} {40} {23} {} {} {} {} {} {} {} "" {Right} {} {update}

Do note that the scripts are written for the mud that I play(although a couple of them are generic, and should work for every mud)

Any comments or suggestions should either be posted here, or e-mailed to me, at lalaynya@cableone.net
Reply with quote
DeathShadow
Adept


Joined: 11 Nov 2000
Posts: 228
Location: USA

PostPosted: Sat Jun 14, 2003 11:02 pm   
 
Great job Lalaynya... I really like the use of the Picklist.. :) *looks around quickly and grabs the idea*

zMud 6.62; Win2000[url]Http://forum.imaginary.us/nmbb/ [/url]
Reply with quote
Lalaynya
Wanderer


Joined: 23 Aug 2002
Posts: 96

PostPosted: Sun Jun 15, 2003 1:15 am   
 
A couple of other things that were tweaked, The full script info and version is stored in one file now...
this allows you to check versions without downloading a second file, and also allows you to only display scripts that need to be updated...
I'm also putting in a logging feature, that logs the updates, though I'm still working on that.

Also, storing the server, username, and password as variables allows for more flexibility,
in that you might have a group of friends that you've got set up with access to more scripts than everyone else.

The next feature I'm going to put in is a beta flag for the scripts, so that you have to have a variable set to a
certain value to be able to see scripts that are still a work in progress.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » Finished MUD Scripts 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