Skriptπ
BetonQuest can also hook into Skript. Firstly, to avoid any confusion, I will reference to everything here by name of the plugin (Skript action is something else than BetonQuest action). Having Skript on your server will enable using BetonQuest actions and conditions in scripts, and also trigger them by BetonQuest action.
You can use cross-package paths using - between the packages. Example:
player meets condition "default-Forest-Jack>Completed"
Skript event triggered by BetonQuest skript actionπ
This entry will describe two things: Skript event and BetonQuest action.
- Skript event -
on [betonquest] action "id"- this is the line you use in your scripts to trigger the code.betonquestpart is optional, andidis just some string, which must be equal to the one you specified in BetonQuest action. - BetonQuest action -
skript- this action will trigger the above Skript event in your scripts. The instruction string accepts only one argument, id of the event. It have to be the same as the one defined in Skript event for it to be triggered.
In your script
on betonquest action "concrete":
In BetonQuest
actions:
fire_concrete_script: "skript concrete"
Skript conditionπ
You can check BetonQuest conditions in your scripts by using the syntax player meets [betonquest] condition "id". betonquest is optional, and id is the name of the condition, as defined in the conditions section.
In your script
player meets condition "has_ore"
In BetonQuest
conditions:
has_ore: "item iron_ore:5"
Skript actionπ
You can also fire BetonQuest actions with scripts. The syntax for Skript effect is fire [betonquest] action "id" for player. Everything else works just like in condition above.
In your script
fire action "give_emeralds" for player
In BetonQuest
actions:
give_emeralds: "give emerald:5"