Scripts are simple html language command files in “text” format, so they can be written in any text editor, saving .txt files, such as Windows Notepad editor. To have access to scripts at all, you must have a sub-folder in
"\Program Files\Funcom\Age of Conan\" called “scripts”.
to work, it should look like this:
"\Program Files\Funcom\Age of Conan\scripts". If you are missing this folder, it can be created manually by you.
Age Of Conan uses two types of scripts: Pop-up window or Timer text.
Pop-up window script is very similar to writing a small web page in simple html, with few changes. It is always necessary for all the commands in such script to be in one (usually long) line.
Timer text scripts do the opposite, each line has one command (that can also be a call to a short script file). As a general rule, you should not mix both types of scripts in same code, but Timer scripts can be called from Pop-up window ones.
Easiest script is just a line of text, like:
/guild Hello, world!
If saved in
"\Program Files\Funcom\Age of Conan\scripts\helloworld.txt"
this line of text will output:
[Guild]: Hello, world!
in default font and color of text. And /guild is just specifying to put it in Guild chat, not in Global or any other chat.
Like all other scripts, you will need to start the script in AOC game chat by typing a slash symbol and name of the script file (without any spaces between those):
and pressing Enter key.
How to stop running a script: so far only one way I know is to do a
"/reloadui" command in chat. Also its not adviseable to have multiple timer scripts running at the same time on same character.
Pop-up window scripts structure:
<a href="text://Script body here ">Script name here</a>
We are writing all html code inside a link set as text wndow and ending it with Name link will output to click in the game chat.
Lets try turn our example from before into Pop-up version and save it as
<a href="text://Hello, world!">Hello, world script</a>
Note, that we do not need /guild, since our pop-up does not write into guild chat, but instead does it in a window. If we do want to output text into chat on clik in pop-up window, we will need to use
chatcmd:// command, with text after it and as another link on top.
Which will look something like this:
<a href="text://<a href='chatcmd:///guild Hello, world!'>Hello, world!</font></a>">Hello, world script</a>
About using single ’ or double brackets ", its not set in stone but you need to stick with one or the other, because one type is needed to contain the text window code, and any of same brackets will break the code, so if using double brackets like here:
"text://Script body here ">, we will then use in the Script Body only single brackets (’), that can simulate double brackets if we put two of them together in a row like so: ‘’.
Timer text scripts structure:
Text_Line_1 /Delay TimeInMilliseconds Text_Line_2 /Delay TimeInMilliseconds ... repeat as many times as needed ... End Of Script
Now for example of Timer Text script:
main command we need to keep timers is
"/delay TimeInMilliseconds", (Millisecond is 1/1000 of a second) so
"/delay 6000" is going to wait for exactly 6 seconds real time before going to next command (both “/delay” and just “delay” work the same way). Here starts our script:
/guild Hello, world! /delay 3000 /guild It Worked?! /delay 1000 /guild Applause!
This 5 lines should be saved in a text file as hw.txt, and then used as
/hw.txt in AOC chat. Which will output
"Hello, world!" in guild chat, then wait 3 seconds, output
"It Worked?!", wait another 1 second and, finally, output
Also, script files can accept parameters, if started with them in same line.
`/helloscript.txt NameOne NameTwo`
This is similar to using parameters in Windows, each has to have a space in between or script will treat it as single parameter.
We take our last example and, say we want to say hello to two different people in guild, John and James (example names only here):
/guild Hello, %1 /delay 3000 /guild Hello, %2 /delay 1000 /guild %1 & %2 come to Raid!
Again save it as .txt file
"helloscript.txt" into script folder and start like so:
/helloscript.txt John James
Which should show the following:
[Guild] : Hello, John [Guild] : Hello, James [Guild] : John & James come to Raid!
Calling smaller scripts to output something in Timer text scripts.
We’ll take our helloworld.txt and use it in modified hw.txt example:
/helloworld.txt /delay 3000 /guild It Worked?! /delay 1000 /guild Applause!
You can use parameters up to %99, but I’ve found its not necessary to go that far:
`%1 %2 %3 %4 %5 %6 %7 %8 %9 %10 %11 %12 %13 %14 %15 %16 %17 %18 %19 %20 %21 %22 %23 %24 %25 %26 %27 %28 %29 %30 %31 %32 %33 %34 %35 %36 %37 %38 %39 %40 %41 %42 %43 %44 %45 %46 %47 %48 %49 %50`
this will pick up most text. Also special case parameters:
"%m" will insert current character name, you start script from, instead of %m, or “%t” is the parameter “current target” - what or whomever you are currently targeting on your character.
How to write colored text in game font of non-standard size:
`<font color='%1' face='hyborianlarge'>%2 %3 %4 %5 %6 %7 %8 %9 %10 %11 %12 %13 %14 %15 %16 %17 %18 %19 %20 %21 %22 %23 %24 %25 %26 %27 %28 %29 %30 %31 %32 %33 %34 %35 %36 %37 %38 %39 %40 %41 %42 %43 %44 %45 %46 %47 %48 %49 %50</font>`
%1 parameter to supply Color name or hexadecimal value of color (#RedGreenBlue , where 00 = 0, and FF = 255 color intensity) with the # symbol before it: Green or #00ff00. The font is set to hyborianlarge (brackets around font or color name are not 100% needed) in the script, but can easily be modified to any font available in-game. So to use this script we save it as “hlarge.txt” in script folder, and run it like so:
/hlarge.txt Green Quick Brown Fox Jumped Over a Lazy Dog
and there it is on the screen in full glory!
You can use any fonts of any types or colors that you can see in fonts.txt and listcolors.txt scripts, I shall post below.
What about just taking an html page from web site and using it as a script?
It will require modification in most cases, because not all commands for text formatting are supported some html tags will just be ignored, others will not work and show up wrong, and since most web pages are closer to pop-up window type script, you need them to be in one consecutive line to process in game correctly, and have no repeating double brackets. Also such formatting conveniences as text bulleted lists are not working, no text or page background color or picture is possible to set, no pictures or working hyperlinks to any Internet content will work (some will show as text, but not clickable).
But how can pictures still be seen in some scripts? Those are the pictures from AOC game resource files (.RDB) extracted by 3rd party tools like RDBExtractor, which can also get music and some other type resources extracted as well. To show a picture we just need to know its number in resource file. Example:
5031535 - $05B05250.png is a picture of Rocknose achievement pet. We do not need the part after the " - ", just the beginning number. I wrote a small script to display the pictures like that:
`<a href="text://<center><font color='#FFFFFF' face='hyboriansmall'>%1 icon looks like this:<br><img src='rdb://%1'><br>"><img src='rdb://%1'><font color='#FF0000' face='hyboriansmall'>%1 icon looks like this</a></font>`
Save this script as show_icon.txt to scripts folder, and use it, like so, in game chat:
It should let you see the Rocknose pet icon. I also add extra code to display icon in script, just so game pre-loads it, or it may not show up until pop-up window is refreshed by clicking the link in chat again (workaround of annoying bug).
Limitations and Bugs (cough cough, Features). You made a long line of spaces in your script: ’ ', but it’s suddenly cut short to only 3x spaces: ’ '. This is where we hit limit of consecutive spaces in a row, it cannot be more than 3. Solution: be creative, use characters like (non breakable space, invisible html character) to “glue” the line together, or use font color of background, to hide normal characters in plain sight. Limits on script file size: I’ve found that scripts over 10Kb will just crash and not start at all, so use 9.5KB file size at most. Another Funcom imposed limit (this is because of G0ld$pammers) is how many characters you can output in chat, and how many lines in short succession. Three lines at once will start you getting message
"Line Deleted by flood protection" instead of next line posting in chat, so you need to insert “delay” commands to have a pause between outputting lines. Here is an example I use (save it as
/hlarge red GENEROSITY OF YUN = Knockbacks /hlarge silver DREAMS OF YUN = Rogues FH Charmed /hlarge aqua WATCHFUL EYE OF YUN = Rogues TW Boss /delay 3000 /hlarge yellow Prepare to start fight with a Dread Shadow!
Each in-game chat channel has its own character limit. Those are very relaxed in Guild or Raid or even Group chat, so you can post 9.5Kb scripts there, but not on Global or NPH channels. Those will block any script outputting more than certain character limit in one line, so you need to shorten the script (use shorter names, less brackets, can even skip some closing tags) or break it into separate lines, to output in those channels (unfortunately those limits change daily and I can not give you exact current limits).
Very special case - using ShockWave Flash .SWF objects in scripts and in AOC in general. Since Age of Conan uses a modified Chromium browser for chat, some Flash compiled objects can work in it, using the special commands
"/loadclip Name" and
"/unloadclip Name". For this to work, we need to 1st copy the flash file (for example
"stopwatch.swf") to a special folder, already containing game’s flash files:
"\Program Files\Funcom\Age of Conan\Data\Gui\Default\Flash". After this done, we can start the file by command:
and, when done with it, remove it from screen by typing in chat:
or it gets only removed after restarting game (it even shows up on Character Selection screen!).
The few ShockWave Flash .SWF objects that I know to work correctly in AOC are:
stopwatch.swf clock.swf zodiac.swf zodiacTank.swf
From those I find the StopWatch to be the most useful tool in noticing timings or even keeping track of repeatable events while fighting.
I’ve put the aforementioned swf files in this file hosting but can send by e-mail, to any interested (it may pop AD-s when clicked, so use right-click and “Save As” from browser): swf_for_aoc.zip
The file has to be named exactly like that (no extension), to work. This script will auto-execute, when a character is being loaded from selection screen into game proper. I have it do some vital changes that game refuses to keep for some reason:
/setoption SpellEffect_DisplayLevel 3 /setoption ShowVicinityPlayerNames false /setoption ShowVicinityPlayerDetails false /setoption ShowVicinityPlayerHealthbar false /setoption ShowVicinityPlayerLevel false /setoption ShowAllPets false /setoption FeedbackGUI_FIFO_SubtitleScreenPos 900 /setoption HotBarDisableSwitchingWhileSprinting true /delay 20000 /logcombat off /delay 2000 /logcombat on
******************************** other Guides posted by me *********************************