Page 1 of 1

Scripting 101

Posted: Mon May 08, 2006 12:00 am
by Shohizzle
To make a script:
1) Go in to your Anarchy Online Directory (mine is C:/Program Files/Funcom/Anarchy Online) and create a folder called scripts.
2) Open up notepad, type some text (doesn't matter what just yet) and save it in the scripts folder under the name test.
3) Log into AO and type /test.txt. It should spit out what you put into your notepad file.

Basic scripting:
You can change the color of your text with <font color='#RRGGBB'>text</font>. Common hexidecimal color codes can be found here

You can underline text with <u>text</u>

You can input variables with %1, %2, %3, etc. These can only be replaced by 1 word.

Example:
Script (name is script.txt):

Code: Select all

/tell %1 can you buff me with %2 please?
To run the script type /script.txt Shohizzle MOP

It will send a /tell to Shohizzle with the text "can you buff me with MOP please?"

Windows:
To make a clickable link that creates a window...

Code: Select all

<a href="text://<br>line 1<br>line 2<br>">Window title</a>
You cannot hit return in a link's content. Instead use <br>

Text commands:
These can only be used in a window. It makes a clickable link that either makes a macro, or sends a /tell, etc.

Code: Select all

<a href="text://<br><a href='chatcmd://text command'>Link title</a>">Window title</a>
Example scripts:

Code: Select all

<a href="text://<br>Click --><a href='chatcmd:///macro assist /assist %1'>Here</a><--">Assist Macro</a>

Code: Select all

<a href="text://<br>Level 115-160 AI raid looking for %1 more.<br><br><a href='chatcmd:///tell Shodocizzle'>Click here</a> and send me your profession/level">It's about that time again...</a>

Code: Select all

/tell %1 <a href="text://<br>Omni Ent platform bank is at 985x580<br>that is east of the grid terminal between the wompas">Wrangles Available at Ent Platform Bank</a>

Posted: Mon May 08, 2006 12:29 am
by bling
good work sho :D
that's very usefull :)

Posted: Mon May 08, 2006 1:15 am
by fenster
Real geeks use vim :[

Posted: Mon May 08, 2006 5:40 am
by Havagrim
Awsome Sho. That stuff sure helps alot. :)

Posted: Mon May 08, 2006 4:26 pm
by ClockworkD
Yes, nice work Sho... I made a nice script that should be appreciated by the org. :)

Posted: Tue Nov 14, 2006 10:06 pm
by Sorhan
A couple of points that haven't been mentioned...

#1 After you've made the .txt file for the script, you can rename it and remove the extension.

#2 You can use %t in a script which of course puts in the target's name.

#3 You can add delays in your script using '/delay xxxx' where xxxx is a number in milliseconds.

So for example with Sho's buff script, you can save yourself a little typing using #1 and #2, so that all you need to do is target Sho and type '/script mop' instead of '/script.txt shohizzle mop' since by that time Shohizzle has already run away ;)

Posted: Fri Dec 15, 2006 5:34 pm
by Sozinho
How do you make the "fake description" that you can link to the chat ? Like mosbricka and fake nanos and nerfbats ?

Posted: Sat Dec 16, 2006 9:42 am
by Toffemaster
A lot of work to get the colors and everything right, but just as a regular pop up. I can post some of the ones that I've made when I get home unless someone else wanna reveal the secret.

Posted: Sat Dec 16, 2006 9:32 pm
by Sozinho
Toffemaster wrote:A lot of work to get the colors and everything right, but just as a regular pop up. I can post some of the ones that I've made when I get home unless someone else wanna reveal the secret.
Okay please do. Woud like to make some (=

Posted: Wed Dec 20, 2006 2:18 pm
by Toffemaster
Here's the hard coding that I'v done with the nerf bat. I've divided the sections for easier overview. You can copy/paste it and use it but you do need to change it so it all goes into the same line. Notice the '%1' mod, here's an example of how to use it.
Example: /bat Toffe
naming the script 'bat' will activate it and print out: "*smacks Toffe with the OO Nerf Bat*". Feel free to use it but pls add a tag saying I made it so I can get some credz for taking my time doing them scripts :D

=======
*smacks %1 with the <a href="text://<font color=#e3e33d>OO Nerf Bat</font><br>
<font color=#75a575>NODROP UNIQUE</font><br>
<font color=#4add4a>Quality level: </font><font color=#75a575>SPECIAL</font><br>
<font color=#4add4a>Requirements:</font><br><font color=#75a575> Wield:<br> Member of Obsidian Order<br>
<font color=#4add4a>Damage: </font><br><font color=#75a575> 500-1500(2000)</font><br>
<font color=#4add4a>Speed:</font><br><font color=#75a575> Attack 0.13s<br> Recharge 0.37s<br></font>
<font color=#4add4a>Location: </font><font color=#75a575>RightHand</font><br>
<font color=#4add4a>Special: </font><font color=#75a575>Snipe Burst FlingShot FullAuto SneakAttack FastAttack </font><br>
<font color=#4add4a>Attack skills: </font><font color=#75a575>Nerfage 100%</font><br>
<font color=#4add4a>Defence skills: </font><font color=#75a575>Nerf Resist 100%</font><br>
<font color=#4add4a>Description:</font><br><font color=#75a575> Those who deserve it shall have it..</font> ">OO Nerf Bat</a>*

Posted: Mon Jan 01, 2007 8:23 pm
by Toffemaster
I'm offering my services to ppl that are too lazy or just don't know how to make scripts. Just post here or talk to me in game about the script you want made and I'll see what I can do.

Here's the LE research script btw, I know someone wanted to have it.
Right Clicky and save, also remove the .txt if you want.
Simply save in your script foled in AO and do /le in game to use it.

Posted: Tue Jan 02, 2007 12:33 am
by Sozinho
So basically it's html codes then. Very nicely done with the OO nerfbat. Gonna try make something sometime when there's less RL this week.