Skip to content
This repository was archived by the owner on Jun 23, 2024. It is now read-only.

Cactbot Support for Paisley Park

James Stine edited this page May 16, 2019 · 1 revision

This page will explain how to place waymarks with cactbot triggers. As editing cactbot triggers is more of an advanced topic requiring an understanding of JavaScript, I will not go into full detail as to how JavaScript works or how to create a new trigger. If you want something a little more user friendly, you might want to try Triggernometry.

Requirements

  • ACT with FFXIV plugin support.
  • Latest cactbot plugin.
  • Paisley Park.

Configuring Paisley Park

Paisley Park Port and Start Server

To ensure you can get up and running, you need to have Paisley Park running. Under the settings section, you should see the Port field, along with buttons for Start and Stop and a checkbox. The port field defaults to 1337, this is for the HTTP server that's created by Paisley Park. You normally shouldn't need to change this unless something else on your computer is using this port. If the port is already in use, just change it to another number.

To start the server, just click on the Start button. If for any reason you wish to stop the server, click on the Stop button. To allow the server to start each time you load up Paisley Park, just enable the checkbox.

Configuring Cactbot

For this example, I'm only going to create a simple trigger inside the raidboss.js file inside the user folder. I'm going to place the waymarks "A", "B", and "D" down with a cactbot trigger.

Cactbot Trigger

Above you can see an example of a trigger. I'm matching on all zones and I'm matching when I bow. The run function is called when this trigger is met. You can learn more about triggers on the cactbot page for triggers.

The real meat of this example comes in the run function. Here we can see that I'm creating an object with A, B and D waymarks. Note that you do not need to specify all waymarks, you can choose to only update a few. You can also remove a waymark by passing its Active property to be `false.

In order to send these waymarks over to Paisley Park, we use fetch with our HTTP server host that we specified in Paisley Park. Note that the localhost means this machine and the 1337 is the port we specified in Paisley Park. The /place endpoint is the one for placing waymarks, and it's currently the only one available.

The other important things to note from this fetch request is that this is a POST request, and that we need to send the Content-Type as application/json and of course convert the object into json with JSON.stringify.

After adding this trigger to my config file, I can click to Reload Overlay in ACT which will reload all triggers for cactbot. Now, I just need to bow in order to place down my waymarks!

Bow for Waymarks

Summary

Editing triggers for cactbot is very powerful due to having access to JavaScript, however it is not so forgiving to beginners. If you'd like to see new functionality for Paisley Park's HTTP requests, please feel free to create a new Issues and explain what you'd like to see.