[Home] [Downloads] [Search] [Help/forum]


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Jscript
. . -> [Subject]  Script snippets?

Script snippets?

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


Posted by Zotiel   (14 posts)  [Biography] bio
Date Sun 12 Oct 2003 06:09 PM (UTC)
Message
I've never used scripts, and I'm not much of a coder...but I have worked in the mud's shell a bit...change this, added that, tweaked the other thing...I can read & understand most of what's going on in code, just am rather clueless when it comes down to writing my own.

I'm interested in JScript (I have the Java Script bible here, but have not opened it). I currently don't have time to read it...I'm too busy with IRL work, and am the head builder on my mud (which takes up most of my free time). So I'm looking for samples of various scripts...I've tried to google it, but I'm not really finding anything that really helps on the mud front. I don't really mind reading the documentation on scripting...but if I can't find something that pertains to muds, me converting it to a mud will be a bit more difficult...if I can actually figure them out, I'll try to write some howto's as I learn them myself... (it's how I learned OLC, and Mprogs)

Does anyone know of a decent web page that has (more or less) script snippets for MUDs?

If not, can you either post some here, or email them to me ( perplexed_pixie@yahoo.com ). If I can get them to work, I'll repost them on my page and hopefully get a nice collection of them up for referance, and with luck to keep the lazy ppl (me) and the clueless ppl from asking all sorts of pointless questions.

Thanks,
-Zot

P.S. I'm spcifically looking to be a self-suficient spellup bot...but am willing to try out others as well....the owner of my mud is writing a new codebase, and is planning on using scripts instead of mprogs...so I gotta learn them eventually anyways...figured this would be a fun place to start.
[Go to top] top

Posted by Shadowfyr   USA  (1,786 posts)  [Biography] bio
Date Reply #1 on Sun 12 Oct 2003 07:39 PM (UTC)
Message
I doubt you will find anything anyplace. The reason is fairly simple, JavaScript and VBScript where never intended to exist outside a web browser. Nearly everything they do relies in one way or another on the assumption that another program can deal with all the nasty stuff that the script can't. Perl is a bit more of an exception and Python is even complex enough to code real programs in. However, of these, only Python (and maybe Perl) provide web pages that don't assume that you are coding for a web browser and imbedding them in an HTML document. This has driven me nuts on several occations when trying to figure out how to do something in Mushclient, it is bound to be worse for running a mud.

The fact is that in both Mushclient and a mud the script would be fish out of water and you will 'never' find code snippets or the like from any site that is not dedicated to the specific use you are trying to make of it. If you develope a mud that uses it, then it is vitrually 100% certain that web sites dedicated to that mud will be the 'only' places with such snippets. The same is the case for scripts as they are used here in Mushclient.

Now it is possible I am wrong and some place there is a really obscure page buried at the bottom of a heap of 42,500,000+ websites that have information on JavaScript, but I am not holding my breath waiting for someone to find it. ;) lol

However... If you do a Google search on 'JavaScript mud' it returns a little over 37,800 pages, of which this one:

http://www.bbassett.net/njs/projects.html

Mentions a JavaScript based mud. There may be others, but pinning down the right search terms is often like trying to catch butterflies with an empty loop. :(
[Go to top] top

Posted by Zotiel   (14 posts)  [Biography] bio
Date Reply #2 on Mon 13 Oct 2003 09:05 AM (UTC)

Amended on Mon 13 Oct 2003 09:19 AM (UTC) by Zotiel

Message
I want it to mud, not to write a mud...sorry if I was not clear...or did you understand me & I'm not following you now?

I don't know scripting enough to translate from the examples in the book and web pages to mudding applications (as in MushClient Triggers). And was having trouble finding examples for JScript...I've found a few, but not many I can convert to what I need.

I've not problem finding tutorials and command/function lists, but I've no clue what order to put things in. A few of the players on my mud use GMud as well...and mainly because everything beyond * == %1 flies circles over their heads.

Looking over my first post here, and thinking it over a bit more lemme reword the thing so ya got a better clue as to what I'm talking about...I wrote the post after trying things on my own, and with no luck even getting simplistic triggers to work correctly (* gives you 5 gold.).

I wanna start a trigger/script repository with the simple minded in mind. Like the plugin's page here at Gammon (http://www.gammon.com.au/mushclient/plugins/), or the ones you wrote for Magnum's Mud page (http://colosseum.com/MagnumsW/muds/INDEX.HTM). Just I want scripts (and preferably Jscripts as I have more experience with them). And not necessarily complex ones...even simple ones. That I can convert for not only my use, but ones that I can post to a web page for the use & reference for all (While keeping in mind the novice or clueless users)

If I can figure them out I'll put step by step instructions along with them on how to add them to MushClient, how to convert them to a different muds, and whatnot. I'm guessing that if I can not figure them out and am not really willing to mull through tutorials and books, then there has to be thousands (ok, well, maybe hundreds, or tens) of people just like me.
[Go to top] top

Posted by Shadowfyr   USA  (1,786 posts)  [Biography] bio
Date Reply #3 on Mon 13 Oct 2003 07:42 PM (UTC)
Message
Yeah. I misread what you said. lol

Having cleared up what you mean, this client is a fairly recent arrival on the scene, so there are no vast repositories of examples and the like. Save for the ones on Magnum's site and here, and the various posts in the forums, the only place you might find some code for it is on muds where someone has posted a solution to some problem of one sort or another.

I have often seen the same questions over and over. And once in a while run into fun things like the trailing spaces you got, which the trigger couldn't match because you where basically telling it to find the 'literal' line that ended with '.'. It is one of those things that can drive you nuts when it doesn't want to work. lol I frankly think that we could do with such a FAQ page for scripting or a tutorial page, but imho it would really be better if it was here among the forums.

Not to say it wouldn't hurt for someone else to have one either, but I worry that such critical content could vanish due to the loss of the posters web page. That said, the forums here are the only place you are likely to find mud related code for JScript or the others. This fact tends to be quite inconvenient, since almost everyone here uses VBScript. Both of them have odd limitations. For instance it is easy to sort an array in JScript, but it lacks the functions Trim, RTrim and LTrim for removing leading and trailing spaces. Arrays themselves also seem more straight forward and understandable in VB. A recent attempt at posting some code in JScript to help someone out resulted in A) my being unable to make a complete plugin to handle the problem and B) no one else bothering to post anything to help solve the rest of the problem.

I am afraid that while we can help answer questions (maybe..) that like the rest of us you are more or less on your own in finding out the quirks and complications of trying to use script in Mushclient. They may be significantly more versitile because of the range of options you get and what they can actually do, but using them present far more complex problems than 'most' of what they are used for in the web environment and a number of things you can do there turn out to be impossible, complicated or really really stupid to try in Mushclient.

For-next loops for instance, when used to add a 'delay', are a major no-no, since they will freeze the client during the loop. You end have to use a timer to add such delays or to execute code that needed to be executed at specific intervals. Even connecting to some controls like the Inet control for ripping HTML pages is an issue here, since it will lag the client for the entire time it takes to connect, send a page request, and finally recieve the contents. The delay when initially executing a command to a database for the first time is 'much' shorter, but still noticable.

Some of us are aware of these things from experience, but even me and Magnum can't claim to be complete experts on all the quirks this client provides. Expecting to find code anyplace else that deals with muds, when even zMud only very recently added support for windows scripting (probably in a lame response to Mushclient), is very unlikely. Most clients impliment their own native scripting, of which zMud's is the only one that 'sort of' resembles any modern language. And that clients scripting has been so full of bugs and things that fail to work as documented that I won't touch it with a 100' pole.

Yeah. A tutorial page is something I and probably others have considered and just been too lazy to do. No matter how you look at it, it requires a lot of work to figure out, because finding existing examples for things ranges from hard to impossible.
[Go to top] top

Posted by Zotiel   (14 posts)  [Biography] bio
Date Reply #4 on Tue 14 Oct 2003 09:57 AM (UTC)

Amended on Tue 14 Oct 2003 10:04 AM (UTC) by Zotiel

Message
Your points are valid...but maybe a few people could mirror it...or maybe Nick Gammon could host a script page...

Maybe the forum could compile a FAQ to accent the existing documentation.

If I had the knowledge to write them, or had enough sent to me to figure out, I'd GLADDLY host it on my page, but your right...I've no clue how long I'll be here...while I don't plan on leaving, it could happen. Or worse yet, I'd get fed up trying & just go back to what I know *represses the tears* GMud.

But currently, I'd still like to see some more posted...weather I use them or not, weather I or someone else makes a page, weather Nick adds them to this site...they would be a healthy addition, especially if this *IS* a new client.

I'm gunna head over to suggestions & post a few requests for contributors pages & resources, and a place fer fan links.

[edit]
Suggestions seems to be fer additions to the client, not the web page...so I'll just leave this post as a suggestion ;)

Suggestions:
* Links (to play pages)
* Expanded FAQs
* Scripts page
* Player written plugins / Scripts

Maybe even break the plugin/script pages down into the various scripts...I'm more inclinded to use JS, or VBS..the others I've not NO expieriance, and as such would be less inclinded to want to try tweaking.
[Go to top] top

Posted by Shadowfyr   USA  (1,786 posts)  [Biography] bio
Date Reply #5 on Tue 14 Oct 2003 09:37 PM (UTC)

Amended on Tue 14 Oct 2003 09:38 PM (UTC) by Shadowfyr

Message
Much of this exists, to an extent.

There is a plugin/script page, but it doesn't divide into different types and not a lot of user made ones are there. Basically, better cross referencing, really truly copying some scripts, plugins, etc. from where they are in the forum (which currently makes them hard to find) into the plugin section and a definite extension of the FAQ to include really basic things that keep getting asked over and over, would all help.

Links to game site.. That would be nice to see, especially if it provided a good idea where and how people are using the client. Right now, I could maybe name 2-3 I know it is used on and find maybe 4-5 more by searching the forums, but there is no real clear picture from the point of view of anyone looking at the client.

Don't get my other comments wrong though, I see nothing wrong with such a page, as long as plugins and other critical things get mirrored someplace safer. In the future I may even design one myself, I am just too lazy to do it. lol I have a journal for my character bio and some 100+ additional rooms for the house on the mud I play at, several projects that I planned for use with Mushclient I haven't finished (or in a few cases even started) and a bunch of designing and planning for a possible area I 'may' eventually build when/if I apply to be a wizard on the mud where I play. If you think I have completed or am actively working on any of these... ;) lol

But if you actually have the patience to do so, good luck. ;)
[Go to top] top

Posted by Magnum   Canada  (580 posts)  [Biography] bio
Date Reply #6 on Wed 15 Oct 2003 03:05 AM (UTC)
Message
A better URL for my mud page is the one in my tagline. Indeed, I will be moving to a different host any day, and the colosseum link won't work.

Get my plugins here: http://www.magnumsworld.com/muds/

Constantly proving I don't know what I am doing...
Magnum.
[Go to top] 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.


22,141 views.

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

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

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

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at HostDash]