Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to "verify" your details, 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.
Entire forum
➜ MUSHclient
➜ Jscript
➜ No idea on how to script.. and wanting to learn.. few questions
No idea on how to script.. and wanting to learn.. few questions
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Scorne
(3 posts) Bio
|
Date
| Sat 08 May 2004 07:13 PM (UTC) Amended on Sat 08 May 2004 07:15 PM (UTC) by Scorne
|
Message
| OK.. Ive got no idea where to start..
Do i start with that examplescript.js?
Do I even need to use that thing?
Does "Help files for scripting version 5.6 " file thing give examples on how to start off early with scripts so people can learn the basics...
I can write a script to act as a bot right?
Is there a main script that most people use.. so if i see a part of a script they post.. i would know which one to use it with?
Thanks :)
http://www.gammon.com.au/forum/bbshowpost.php?bbsubject_id=4156 <-- my post..
I think that post has to do with scripts.. so i wanna learn :) Unless it can be done without.. eithe way a heads up would be nice.
***I can edit scripts with EditPlus or Textpad right?.. Both editing programs*** | Top |
|
Posted by
| Poromenos
Greece (1,037 posts) Bio
|
Date
| Reply #1 on Sun 09 May 2004 09:55 AM (UTC) |
Message
| You could read Microsoft's Scripting documentation, it has example for the functions you could learn from, and you could look at plugins at the plugins page to see how people write them. Yes, you can write scripts for MUclient to do anything, and you can edit scripts with any text editor that writes plaintext (notepad, textpad, whatever). Do you know any programming languages, or are you entirely new to this? |
Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it! | Top |
|
Posted by
| Nick Gammon
Australia (23,046 posts) Bio
Forum Administrator |
Date
| Reply #2 on Mon 10 May 2004 09:35 PM (UTC) |
Message
|
Quote:
Do i start with that examplescript.js?
Do I even need to use that thing?
Not necessarily. That has examples of setting up triggers, processing wildcards, and has the constants in it for various operations, such as the meanings of certain error codes like this:
var eTimerAlreadyExists = 30018; // Attempt to add a timer that already exists
Also it illustrates how to convert a VB array to a JScript arrray:
wildcards = VBArray(wildcardsVB).toArray();
Quote:
Does "Help files for scripting version 5.6 " file thing give examples on how to start off early with scripts so people can learn the basics...
Not really - that explains the JScript function calls but is really a reference rather than a tutuorial.
Quote:
I can write a script to act as a bot right?
Sure, you can do practically anything, providing the data you want comes from the MUD (or you) somehow.
Quote:
Is there a main script that most people use.. so if i see a part of a script they post.. i would know which one to use it with?
Not really - you might use the constants if you use a lot of the inbuilt function calls (eg. world.AddTrigger). I would scan the scripts in this part of the forum, read the example script file, try to do something, and if you have difficulties post a more specific question.
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Flannel
USA (1,230 posts) Bio
|
Date
| Reply #3 on Mon 10 May 2004 10:43 PM (UTC) Amended on Mon 10 May 2004 10:45 PM (UTC) by Flannel
|
Message
| If youre going to try and tackle a bot, theres a few things you need to figure out before you start.
How are you going to get the information (and keep it updated) are there prompts? that you can set? will you have to keep typing something to get the information?
Second, What triggers what you want? Are you going to be killing something, then moving on a preset route? or more freeform roaming? What exactly are you going to be doing?
The second bit leads itself to pseudocode, which is a step up from flowcharting. For a beginner, you might want to figure out the second stuff, the first stuff should be pretty cut and dry. Figure out the second bit, whether its drawing it on paper, or whatever, but youll probably want it to be modular, have an "explore" routine, a "battle" routine, and whatnot.
However, you cant script MC like you would other programs, since you need to allow for the client to accept other input, and things like that. There are ways around this, such as having a "mode" variable. It does complicate things, but figuring stuff out like that comes after you actually figure out how youre going to make the bot behave.
Edit:
Also, if youre completely new to scripting, you might not want to use javascript, unless you already know JS. More people in these forums know VBScript, so youll be able to get more help in VBscript. Of course, if you have some sort of reason youre using JS, then that might influence your decision. |
~Flannel
Messiah of Rose
Eternity's Trials.
Clones are people two. | Top |
|
Posted by
| Ian Kirker
(30 posts) Bio
|
Date
| Reply #4 on Sun 23 May 2004 04:35 PM (UTC) |
Message
| It's also a good idea to check what your MUD does and does not allow before you start making complex bots and trigger systems. :P | 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.
19,135 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top