AOC Scripts: What are they? How to make or modify scripts etc

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):

/helloworld.txt

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 "hello-popup.txt" :
<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 "Applause!".

Also, script files can accept parameters, if started with them in same line.
Example:

`/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>`

We use %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:
/show_icon.txt 5031535
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 &nbsp; (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 lu-zhi.txt):

    /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:
/loadclip stopwatch.swf
and, when done with it, remove it from screen by typing in chat:
/unloadclip stopwatch.swf
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

Special Script: "auto_login"
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 *********************************

[AOC Scripts: What are they? How to make or modify scripts etc]
[Circumventing the Game Errors (revival of old topic)]
[Parsers - setting up, using, interpreting, tips and tricks, etc]
[Enigmata of Yag picture guide to orbs, teleports, ways to top, etc]
[Scripts and Tools For AOC Feel free to add if have something missing]

3 Likes

<a href="text://<font color=yellow face=HEADLINE>Actual useable in-game color names</font><br><font color=html_link_color face=LARGE_BOLD>html_link_color</font><br><font color=black face=LARGE_BOLD>black</font><br><font color=green face=LARGE_BOLD>green</font><br><font color=silver face=LARGE_BOLD>silver</font><br><font color=lime face=LARGE_BOLD>lime</font><br><font color=gray face=LARGE_BOLD>gray</font><br><font color=olive face=LARGE_BOLD>olive</font><br><font color=white face=LARGE_BOLD>white</font><br><font color=yellow face=LARGE_BOLD>yellow</font><br><font color=maroon face=LARGE_BOLD>maroon</font><br><font color=navy face=LARGE_BOLD>navy</font><br><font color=red face=LARGE_BOLD>red</font><br><font color=blue face=LARGE_BOLD>blue</font><br><font color=purple face=LARGE_BOLD>purple</font><br><font color=teal face=LARGE_BOLD>teal</font><br><font color=fuchsia face=LARGE_BOLD>fuchsia</font><br><font color=aqua face=LARGE_BOLD>aqua</font><br><font color=orange face=LARGE_BOLD>orange</font><br><font color=active face=LARGE_BOLD>active</font><br><font color=actv_disabled face=LARGE_BOLD>actv_disabled</font><br><font color=standard face=LARGE_BOLD>standard</font><br><font color=std_disabled face=LARGE_BOLD>std_disabled</font><br><font color=negative face=LARGE_BOLD>negative</font><br><font color=positive face=LARGE_BOLD>positive</font><br><font color=paperstd face=LARGE_BOLD>paperstd</font><br><font color=standard_bright face=LARGE_BOLD>standard_bright</font><br><font color=tooltip_positive face=LARGE_BOLD>tooltip_positive</font><br><font color=tooltip_negative face=LARGE_BOLD>tooltip_negative</font><br><font color=friends face=LARGE_BOLD>friends</font><br><font color=mundane face=LARGE_BOLD>mundane</font><br><font color=superior face=LARGE_BOLD>superior</font><br><font color=enchanted face=LARGE_BOLD>enchanted</font><br><font color=rare face=LARGE_BOLD>rare</font><br><font color=epic face=LARGE_BOLD>epic</font><br><font color=legendary face=LARGE_BOLD>legendary</font><br><font color=enchantedlight face=LARGE_BOLD>enchantedlight</font><br><font color=rarelight face=LARGE_BOLD>rarelight</font><br><font color=epiclight face=LARGE_BOLD>epiclight</font><br><font color=money_gold face=LARGE_BOLD>money_gold</font><br><font color=money_silver face=LARGE_BOLD>money_silver</font><br><font color=money_copper face=LARGE_BOLD>money_copper</font><br><font color=money_tin face=LARGE_BOLD>money_tin</font><br><font color=gold_rank face=LARGE_BOLD>gold_rank</font><br><font color=silver_rank face=LARGE_BOLD>silver_rank</font><br><font color=bronze_rank face=LARGE_BOLD>bronze_rank</font><br><font color=renown_valor face=LARGE_BOLD>renown_valor</font><br><font color=renown_glory face=LARGE_BOLD>renown_glory</font><br><font color=renown_artistry face=LARGE_BOLD>renown_artistry</font><br>">Click this link to show in-game useable colors</a><br>

<a href="text://<font color='#ff6820' face='HYBORIANLARGE'>HYBORIANLARGE</font><br><font color='#ff6820' face='HYBORIANSMALL'>HYBORIANSMALL</font><br><font color='#ff6820' face='LARGE_BOLD'>LARGE_BOLD</font><br><font color='#ff6820' face='LARGE'>LARGE</font><br><font color='#ff6820' face='NORMAL'>NORMAL</font><br><font color='#ff6820' face='NORMAL_BOLD'>NORMAL_BOLD</font><br><font color='#ff6820' face='SMALL'>SMALL</font><br><font color='#ff6820' face='COMBAT_FEEDBACK'>COMBAT_FEEDBACK</font><br><font color='#ff6820' face='FLYING_NUMBERS_SHIELDED_ITALICS'>FLYING_NUMBERS_SHIELDED_ITALICS</font><br><font color='#ff6820' face='FLYING_NUMBERS_SHIELDED'>FLYING_NUMBERS_SHIE LDED</font><br><font color='#ff6820' face='FLYING_NUMBERS_ITALICS'>FLYING_NUMBERS_ITALI CS</font><br><font color='#ff6820' face='FLYING_NUMBERS'>FLYING_NUMBERS</font><br><font color='#ff6820' face='3D_TEXT_HYB'>3D_TEXT_HYB</font><br><font color='#ff6820' face='3D_TEXT_ARIAL'>3D_TEXT_ARIAL</font><br><font color='#ff6820' face='3D_TEXT_SMALL'>3D_TEXT_SMALL</font><br><font color='#ff6820' face='SCALED'>SCALED</font><br><font color='#ff6820' face='3D_TEXT_BOLD'>3D_TEXT_BOLD</font><br><font color='#ff6820' face='3D_TEXT'>3D_TEXT</font><br><font color='#ff6820' face='HEADLINE'>HEADLINE</font><br><font color='#ff6820' face='CHAT'>CHAT</font><br><font color='#ff6820' face='HUGE'>HUGE</font><br>">Font Faces</a>

<font color='%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</font>

Save as write.txt
Use as such: /write.txt yellow Hello AOC!

Ways to output text messages in AOC scripts and chat:

  • /say Text (this is seen by vicinity players in same area)
  • /text Text Text (this is only seen by you)
  • /g Text or /group Text (output Text into current group)
  • /raid Text (outputs Text in current raid chat)
  • /global Text (outputs Text in [Global] channel - same with other channel names available to you, just add / before channel name)
  • /t Name Text or /tell NameText (sends message Text in tell to Name - players name)
  • /guild Text (outputs Text in [Guild] channel of your current guild)

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.