Here we will show you how to use variables
scripts, to really make things happen. We will also talk a bit about Helpbot
and how to use Helpbots features, as well as give you some examplescripts to play
around with on your own.
Variables are user-inputted keywords that the script can use. To understand what
a variable is, you only have to compare this:
As you will see, the second example sends you directly to the Emote Help section
of the text, and saves you some time. AO Variables work in the same way, for when
you call on your scripts, lets make another testscript, this time naming it "add
Write the following into your script:
Save your script, and start AO. Call on your script like this:
You will now have added me to your friendslist. If I am in there already, you
will see the text "Player Twicer is already in your friendslist" so
in either case you will see it working. The %1 in the script picks up with which
variables you are calling the script with. Here is another example:
||/cc addbuddy %1
/cc addbuddy %2
This will add two people to your friendslist, and would be called upon like this:
/add Twicer Ellusion
There, now the two smaertiest metas in the game are in your friendslist! Happy
days! Think of all the nanoprogramming we...uh..nevermind.
There are other variables as well, one of which you might have used time upon
time and not given much thought, and these are them:
(displays your nick, like this : Twicer)
(displays whatever you are currently targeting)
(displays the target you are currently attacking, not necessarily what
you are targeting)
When you are using these variables, its important to remember to use lower-case
letters only - %T instead of %t will not work.
Ah, yes, this is really a remarkable piece of art. I dare say not a day goes by
without me using this bot, and the player behind it should be awarded Nobels Peace
Price several times in a row. Well, maybe not, but its one of the best tools there
is, and believe me, once you start using Helpbot there is no turning back.
I'm not going to explain all the different features of Helpbot here (doing a "/tell
" will explain things to you) but what I will explain is
how you can make Helpbot work much more smoother with scripting. The principle
is very easy - Helpbot has a string of commands, some with variables of their
own, so instead of writing this:
/tell helpbot whois Twicer
You could with a simple script named "whois
" containing the following...
...have the same results by calling on your script like this:
Much shorter, wouldnt you say?
Now you should have some ideas about making scripts of your own - I'm fairly certain
you are already thinking about making some neat stuff to make things just a bit
easier in AO. Scripts are especially powerful with variables, and some of the
commands in AO are rather lenghty to write.
I wrote a few (13) scripts for you to look over and poke around with if you still
feel uncertain about scripting, available here, available in a small zip-file
for you to download, complete with an Instruction.txt
file which will explain
Last updated 13. December 2002