OrigenNetwork
Docs

Installation · origen_quests

1. SQL

Run sql/install.sql in your database:

sql
CREATE TABLE IF NOT EXISTS `origen_quests_locations` (
  `id`        int(11) NOT NULL AUTO_INCREMENT,
  `name`      varchar(255) NOT NULL,
  `uniqueID`  varchar(255) DEFAULT NULL,
  `type`      varchar(50)  NOT NULL DEFAULT 'marker',
  `category`  varchar(100) DEFAULT NULL,
  `model`     varchar(100) DEFAULT NULL,
  `coords`    longtext     NOT NULL,
  `anim1`     varchar(255) DEFAULT NULL,
  `anim2`     varchar(255) DEFAULT NULL,
  `anim3`     varchar(255) DEFAULT NULL,
  `anim4`     varchar(255) DEFAULT NULL,
  `missions`  longtext     NOT NULL DEFAULT '[]',
  `extra`     longtext     DEFAULT '{}',
  `dialog`    text         DEFAULT NULL,
  `audio`     varchar(255) DEFAULT NULL,
  `restart`   int(11)      DEFAULT 0,
  `rotationInterval` int(11) DEFAULT 0,
  `visibleOnGlobalMap` tinyint(1) DEFAULT 1,
  `activeSchedule` longtext DEFAULT '{}',
  `auto`      tinyint(1)   DEFAULT 0,
  `distance`  float        DEFAULT 1.5,
  `active`    tinyint(1)   DEFAULT 1,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
 
CREATE TABLE IF NOT EXISTS `origen_quests_missions` (
  `id`          int(11) NOT NULL AUTO_INCREMENT,
  `name`        varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `events`      longtext DEFAULT '[]',
  `rest`        longtext DEFAULT '[]',
  `used`        longtext DEFAULT '{}',
  `audio`       varchar(255) DEFAULT NULL,
  `npcs`        longtext DEFAULT '[]',
  `dispatch`    longtext DEFAULT '{}',
  `xpReward`    int(11) DEFAULT 0,
  `acceptDelay` int(11) DEFAULT 0,
  `requiredLevel` int(11) DEFAULT 1,
  `requiredMissions` longtext DEFAULT '[]',
  `requiredMode` varchar(10) DEFAULT 'all',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
 
CREATE TABLE IF NOT EXISTS `origen_quests_player_progress` (
  `identifier` varchar(80) NOT NULL,
  `xp` int(11) NOT NULL DEFAULT 0,
  `level` int(11) NOT NULL DEFAULT 1,
  `completedMissions` longtext DEFAULT '[]',
  `discoveredLocations` longtext DEFAULT '[]',
  `updatedAt` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`identifier`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
 
CREATE TABLE IF NOT EXISTS `origen_quests_trees` (
  `id`          int(11) NOT NULL AUTO_INCREMENT,
  `name`        varchar(120) NOT NULL,
  `category`    varchar(120) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `active`      tinyint(1) DEFAULT 1,
  `createdAt`   timestamp NOT NULL DEFAULT current_timestamp(),
  `updatedAt`   timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
 
CREATE TABLE IF NOT EXISTS `origen_quests_tree_nodes` (
  `id`        int(11) NOT NULL AUTO_INCREMENT,
  `treeId`    int(11) NOT NULL,
  `missionId` int(11) NOT NULL,
  `posX`      float DEFAULT 0,
  `posY`      float DEFAULT 0,
  `nodeType`  varchar(30) DEFAULT 'mission',
  `meta`      longtext DEFAULT '{}',
  PRIMARY KEY (`id`),
  KEY `idx_tree_nodes_treeId` (`treeId`),
  KEY `idx_tree_nodes_missionId` (`missionId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
 
CREATE TABLE IF NOT EXISTS `origen_quests_tree_edges` (
  `id`             int(11) NOT NULL AUTO_INCREMENT,
  `treeId`         int(11) NOT NULL,
  `fromNodeId`     int(11) NOT NULL,
  `toNodeId`       int(11) NOT NULL,
  `conditionType`  varchar(20) DEFAULT 'unlock',
  `conditionValue` longtext DEFAULT '{}',
  PRIMARY KEY (`id`),
  KEY `idx_tree_edges_treeId` (`treeId`),
  KEY `idx_tree_edges_fromNodeId` (`fromNodeId`),
  KEY `idx_tree_edges_toNodeId` (`toNodeId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
 
CREATE TABLE IF NOT EXISTS `origen_quests_evil_npcs` (
  `id`          int(11) NOT NULL AUTO_INCREMENT,
  `name`        varchar(255) NOT NULL,
  `model`       varchar(100) NOT NULL DEFAULT 'a_m_m_skater_01',
  `models`      longtext DEFAULT '[]',
  `coords`      longtext NOT NULL,
  `weapon`      varchar(100) DEFAULT '',
  `respawn`     varchar(50)  DEFAULT 'restart',
  `amount`      int(11)      DEFAULT 1,
  `difficulty`  varchar(20)  DEFAULT 'normal',
  `aggroDistance` float      DEFAULT 40,
  `dispatchMode` varchar(20) DEFAULT 'none',
  `dispatchChance` int(11)   DEFAULT 30,
  `itemsreward` longtext DEFAULT '{}',
  `skin`        longtext DEFAULT '{}',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

Column migrations are applied automatically on resource restart. You do not need to run SQL again after updating the resource.


2. server.cfg

Ensure the dependencies start before this resource:

bash
ensure oxmysql
ensure ox_lib
ensure origen_quests

3. Basic configuration

Open config/config.lua and set the minimum required values:

lua
Config.Framework    = 'auto'   -- auto | qbx | qb | esx | standalone
Config.NotifySystem = 'auto'   -- auto | ox_lib | qb | esx | chat | custom
Config.AdminSystem  = 'auto'   -- auto | origen_admin | qb | esx | ace | license | custom
Config.Locale       = 'en'     -- en | es
Config.Debug        = false

4. Available commands

CommandDescriptionPermission
/questadminOpens the admin panelRequires admin permission
/questmapOpens the global quest mapAll players

Set Config.Debug = true temporarily to inspect startup logs and permission detection. Disable it before going to production.