
Quests Tweaker
modA mod to integrate FTBQuests with CraftTweaker.

A mod to integrate FTBQuests with CraftTweaker.
A mod to integrate FTBQuests with CraftTweaker.
Add/set progress for any existing and available task from crafttweaker:
When the task is unavailable (for example has dependencies uncompleted), this function does nothing.
QuestManager.addTaskProgress(IPlayer player, string/int id, long progress);
QuestManager.setTaskProgress(IPlayer player, string/int id, long progress);
import mods.questtweaker.QuestManager;
// Add progress
// IPlayer player, string/int id, long progress
QuestManager.addTaskProgress(event.player,"4c4bd563",1 as long);
// Or use hex int
QuestManager.addTaskProgress(event.player,0x4c4bd563,1 as long);
// Set progress
// IPlayer player, string/int id, long progress
QuestManager.setTaskProgress(event.player,"4c4bd563",1 as long);
Example when player pickups an item, set the task progress to stack size:
import mods.questtweaker.QuestManager;
events.onPlayerPickupItem(function(event as crafttweaker.event.PlayerPickupItemEvent){
QuestManager.setTaskProgress(event.player,"52725826",event.item.item.amount as long);
});
Add a new function to use with this mod's 'Function' tasks and rewards:
FunctionManager.addFunction(string functionID, function(IPlayer) -> long);
The function must return an long.
Example 1: Player's current altitude
import mods.queststweaker.FunctionManager;
import crafttweaker.player.IPlayer;
// string functionID, function(IPlayer) -> long
FunctionManager.addFunction("height",function(player as IPlayer){
return player.y as long;
});
Example 2: On a Rail on_a_rail.zs
Executes a function peridocally, and uses its return value as the progress.
Parameters:
Executes a function when collected.
Parameters:
Does nothing on its own. Intended to use with the QuestManager above.
Parameters: