• 0
D3sync

Bambi timeout problem

Question

Alright so I've been working on this for a few days now everything is in order for the most part but I have a problem (bug) and a question. I'll ask the question first. When you get your DB set up and players join the server, does it create an account 'account' and add them to 'players' tab or do they not get added to the 'players' DB until they spawn in? 

Okay now to the bug:

Server RPT: http://pastebin.com/wjhtPzqf 

So here is the section of the RPT from my server where I had my friend join my server. He didn't actually get in but he made it to the location spawn screen, spawned (tried to anyway) and was kicked for bambi creation timeout.

If any more info is needed don't be afraid to ask.

I just want this thing to work lol

Share this post


Link to post
Share on other sites

18 answers to this question

  • 0

@tinboye Alright, now the only error in the db is the following:

23:31:35    /*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */    0 row(s) affected, 1 warning(s): 3135 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release.    0.016 sec
 

Edited by D3sync
BTW that is in the "data exporting was unselected." section at the bottom. It's the last error in database!

Share this post


Link to post
Share on other sites
Advertisement
  • 0

did you  try the 2nd one I posted without the

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET NAMES utf8mb4 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;

 

Share this post


Link to post
Share on other sites
  • 0
Spoiler

[Main]
Version = 5
;Threads = 0  
; Default Value is the number of CPU Cores Detected (max value is 6, min value is 2)
Randomize Config File = false
;This is a legacy option to randomize config file for Arma2 Servers. Only for Windows Builds


[Rcon]
;; This is functional, should be working fine. Just needs abit of testing on a $
;; Allow for changing Address for those running server in a VM environment.
IP = 127.0.0.1
Port = 2302

;; Rcon Password i.e Battleye/beserver.cfg
Password = 

;; Bad Player Name Checks
;;        This will only work if your mission / mod has started extDB2 Rcon. i.e 9:START_RCON:RCON
Bad Playername Enable = true
Bad Playername Kick Message = Bad Player Name

;; By default : is a bad character (used as seperator for extDB2 Calls (this is hardcoded in)
Bad Playername Strings = (:):{:}
;;Bad Playername Regex_1 = [:alnum:]
;;Bad Playername Regex_2 = [:alnum:]
;;Bad Playername Regex_3 = [:alnum:]

;; Whitelisting / Reserve Slots
;;        This will only work if your mission / mod has started extDB2 Rcon. i.e 9:START_RCON:RCON
Whitelist Enable = false
Whitelist Kick Message = Only Reserved Slots Left
Whitelist Public Slots = 999

;; Database settings to use (Optional)
Whitelist Database = MySQL_Example
Whitelist SQL Prepared Statement = SELECT CASE WHEN EXISTS(SELECT UID FROM PlayerInfo WHERE BattlEyeGUID=? AND Whitelisted=1) THEN 1 ELSE 0 END
Whitelist Kick on SQL Query Failed = false

;; Hardcoded BEGuids for whitelisted players
;Whitelist BEGuids = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx : yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy

[Steam]
;; This is for VAC Protocol for VAC Bans + Steam Friends.
;; https://steamcommunity.com/dev/apikey
API Key = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

[VAC]
;; This feature requires Steam + Rcon to be enabled.
;; Also this feature is called via SQF Code atm, i.e it doesn't auto detect players joining server yet....
Auto Ban = false

;; For Player to get banned ( their total VAC Bans => NumberOfVACBans)  AND ( Days Since their Last Ban was <= DaysSinceLastBan)
;; This is also used extDB Protocol VAC:VACBanned returned results

NumberOfVACBans = 1
DaysSinceLastBan = 999999999
BanDuration = 1
;; 0 = Forever, otherwise its x Minutes
BanMessage = Steam VAC Banned

[Log]
;; Flush Logs after each write, more work on Harddrive
Flush = true

[exile]
Type = MySQL
Name = exile
Username = root
Password = 
IP = 127.0.0.1
Port = 3306
minSessions = 2
idleTime = 60
; Really should only use this if MySQL server is external. Also only for MySQL
compress = false
; Recommend you turn this on http://dev.mysql.com/doc/refman/5.6/en/mysql-command-options.html#option_mysql_secure-auth
Secure Auth = true

[SQLite_Example]
Type = SQLite
Name = sqlite.db

minSessions = 1
; minSession Default Value = 1

;maxSessions = 4
; maxSession Default Value = number of Main->Threads
;     You really should leave this value alone
idleTime = 60
; idleTime no Default Value yet, needs to be defined.
;     idleTime is the time before a database session is stopped if not used. 
;    If Database Sessions are greater than minSessions

This is my extdb-conf file just incase there is something wrong in there (removed passwords for safety)

Share this post


Link to post
Share on other sites
  • 0
49 minutes ago, D3sync said:

@tinboye Alright, now the only error in the db is the following:

23:31:35    /*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */    0 row(s) affected, 1 warning(s): 3135 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release.    0.016 sec
 

@tinboye that was this occurence. currently there are no errors in the db, but the server still has bambi creation timeout.

Share this post


Link to post
Share on other sites
  • 0
Spoiler

-- phpMyAdmin SQL Dump
-- version 4.6.6
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Mar 16, 2017 at 06:20 AM
-- Server version: 5.7.17-log
-- PHP Version: 7.1.1

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;

--
-- Database: `exile_9`
--

-- --------------------------------------------------------

--
-- Table structure for table `account`
--

CREATE TABLE IF NOT EXISTS `account` (
  `uid` varchar(32) NOT NULL,
  `clan_id` int(11) UNSIGNED DEFAULT NULL,
  `name` varchar(64) NOT NULL,
  `score` int(11) NOT NULL DEFAULT '0',
  `humanity` int(11) NOT NULL DEFAULT '2500',
  `kills` int(11) UNSIGNED NOT NULL DEFAULT '0',
  `deaths` int(11) UNSIGNED NOT NULL DEFAULT '0',
  `locker` int(11) NOT NULL DEFAULT '0',
  `first_connect_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `last_connect_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `last_disconnect_at` datetime DEFAULT NULL,
  `total_connections` int(11) UNSIGNED NOT NULL DEFAULT '1',
  `whitelisted` int(1) UNSIGNED NOT NULL DEFAULT '0',
  PRIMARY KEY (`uid`),
  KEY `clan_id` (`clan_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Table structure for table `clan`
--

CREATE TABLE IF NOT EXISTS `clan` (
  `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
  `name` varchar(64) NOT NULL,
  `leader_uid` varchar(32) NOT NULL,
  `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `leader_uid` (`leader_uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Table structure for table `clan_map_marker`
--

CREATE TABLE IF NOT EXISTS `clan_map_marker` (
  `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
  `clan_id` int(11) UNSIGNED NOT NULL,
  `markerType` tinyint(4) NOT NULL DEFAULT '-1',
  `positionArr` text NOT NULL,
  `color` varchar(255) NOT NULL,
  `icon` varchar(255) NOT NULL,
  `iconSize` float UNSIGNED NOT NULL,
  `label` varchar(255) NOT NULL,
  `labelSize` float UNSIGNED NOT NULL,
  PRIMARY KEY (`id`),
  KEY `clan_id` (`clan_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Table structure for table `construction`
--

CREATE TABLE IF NOT EXISTS `construction` (
  `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
  `class` varchar(64) NOT NULL,
  `account_uid` varchar(32) NOT NULL,
  `spawned_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `position_x` double NOT NULL DEFAULT '0',
  `position_y` double NOT NULL DEFAULT '0',
  `position_z` double NOT NULL DEFAULT '0',
  `direction_x` double NOT NULL DEFAULT '0',
  `direction_y` double NOT NULL DEFAULT '0',
  `direction_z` double NOT NULL DEFAULT '0',
  `up_x` double NOT NULL DEFAULT '0',
  `up_y` double NOT NULL DEFAULT '0',
  `up_z` double NOT NULL DEFAULT '0',
  `is_locked` tinyint(1) NOT NULL DEFAULT '0',
  `pin_code` varchar(6) NOT NULL DEFAULT '000000',
  `damage` tinyint(1) UNSIGNED DEFAULT '0',
  `territory_id` int(11) UNSIGNED DEFAULT NULL,
  `last_updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `deleted_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `account_uid` (`account_uid`),
  KEY `territory_id` (`territory_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Table structure for table `container`
--

CREATE TABLE IF NOT EXISTS `container` (
  `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
  `class` varchar(64) NOT NULL,
  `spawned_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `account_uid` varchar(32) DEFAULT NULL,
  `is_locked` tinyint(1) NOT NULL DEFAULT '0',
  `position_x` double NOT NULL DEFAULT '0',
  `position_y` double NOT NULL DEFAULT '0',
  `position_z` double NOT NULL DEFAULT '0',
  `direction_x` double NOT NULL DEFAULT '0',
  `direction_y` double NOT NULL DEFAULT '0',
  `direction_z` double NOT NULL DEFAULT '0',
  `up_x` double NOT NULL DEFAULT '0',
  `up_y` double NOT NULL DEFAULT '0',
  `up_z` double NOT NULL DEFAULT '1',
  `cargo_items` text NOT NULL,
  `cargo_magazines` text NOT NULL,
  `cargo_weapons` text NOT NULL,
  `cargo_container` text NOT NULL,
  `last_updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `pin_code` varchar(6) NOT NULL DEFAULT '000000',
  `territory_id` int(11) UNSIGNED DEFAULT NULL,
  `deleted_at` datetime DEFAULT NULL,
  `money` int(11) UNSIGNED NOT NULL DEFAULT '0',
  `abandoned` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `account_uid` (`account_uid`),
  KEY `territory_id` (`territory_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT;

-- --------------------------------------------------------

--
-- Table structure for table `infistar_logs`
--

CREATE TABLE IF NOT EXISTS `infistar_logs` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `logname` char(50) NOT NULL,
  `logentry` text NOT NULL,
  `time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `marxet`
--

CREATE TABLE IF NOT EXISTS `marxet` (
  `listingID` varchar(8) NOT NULL,
  `itemAvailable` tinyint(1) NOT NULL DEFAULT '1',
  `itemArray` text NOT NULL,
  `price` double NOT NULL,
  `sellerUID` varchar(64) NOT NULL,
  `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`listingID`),
  KEY `listingID` (`listingID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Table structure for table `player`
--

CREATE TABLE IF NOT EXISTS `player` (
  `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
  `name` varchar(64) NOT NULL,
  `account_uid` varchar(32) NOT NULL,
  `money` int(11) UNSIGNED NOT NULL DEFAULT '0',
  `damage` double UNSIGNED NOT NULL DEFAULT '0',
  `hunger` double UNSIGNED NOT NULL DEFAULT '100',
  `thirst` double UNSIGNED NOT NULL DEFAULT '100',
  `alcohol` double UNSIGNED NOT NULL DEFAULT '0',
  `temperature` double NOT NULL DEFAULT '37',
  `wetness` double UNSIGNED NOT NULL DEFAULT '0',
  `oxygen_remaining` double UNSIGNED NOT NULL DEFAULT '1',
  `bleeding_remaining` double UNSIGNED NOT NULL DEFAULT '0',
  `hitpoints` varchar(255) NOT NULL DEFAULT '[]',
  `direction` double NOT NULL DEFAULT '0',
  `position_x` double NOT NULL DEFAULT '0',
  `position_y` double NOT NULL DEFAULT '0',
  `position_z` double NOT NULL DEFAULT '0',
  `spawned_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `assigned_items` text NOT NULL,
  `backpack` varchar(64) NOT NULL,
  `backpack_items` text NOT NULL,
  `backpack_magazines` text NOT NULL,
  `backpack_weapons` text NOT NULL,
  `current_weapon` varchar(64) NOT NULL,
  `goggles` varchar(64) NOT NULL,
  `handgun_items` text NOT NULL,
  `handgun_weapon` varchar(64) NOT NULL,
  `headgear` varchar(64) NOT NULL,
  `binocular` varchar(64) NOT NULL,
  `loaded_magazines` text NOT NULL,
  `primary_weapon` varchar(64) NOT NULL,
  `primary_weapon_items` text NOT NULL,
  `secondary_weapon` varchar(64) NOT NULL,
  `secondary_weapon_items` text NOT NULL,
  `uniform` varchar(64) NOT NULL,
  `uniform_items` text NOT NULL,
  `uniform_magazines` text NOT NULL,
  `uniform_weapons` text NOT NULL,
  `vest` varchar(64) NOT NULL,
  `vest_items` text NOT NULL,
  `vest_magazines` text NOT NULL,
  `vest_weapons` text NOT NULL,
  `last_updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `player_uid` (`account_uid`)
) ENGINE=InnoDB AUTO_INCREMENT=5056 DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Table structure for table `player_history`
--

CREATE TABLE IF NOT EXISTS `player_history` (
  `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
  `account_uid` varchar(32) NOT NULL,
  `name` varchar(64) NOT NULL,
  `died_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `position_x` double NOT NULL,
  `position_y` double NOT NULL,
  `position_z` double NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4374 DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Table structure for table `territory`
--

CREATE TABLE IF NOT EXISTS `territory` (
  `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
  `owner_uid` varchar(32) NOT NULL,
  `name` varchar(64) NOT NULL,
  `position_x` double NOT NULL,
  `position_y` double NOT NULL,
  `position_z` double NOT NULL,
  `radius` double NOT NULL,
  `level` int(11) NOT NULL,
  `flag_texture` varchar(255) NOT NULL,
  `flag_stolen` tinyint(1) NOT NULL DEFAULT '0',
  `flag_stolen_by_uid` varchar(32) DEFAULT NULL,
  `flag_stolen_at` datetime DEFAULT NULL,
  `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `last_paid_at` datetime DEFAULT CURRENT_TIMESTAMP,
  `xm8_protectionmoney_notified` tinyint(1) NOT NULL DEFAULT '0',
  `build_rights` varchar(640) NOT NULL DEFAULT '0',
  `moderators` varchar(320) NOT NULL DEFAULT '0',
  `deleted_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `owner_uid` (`owner_uid`),
  KEY `flag_stolen_by_uid` (`flag_stolen_by_uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Table structure for table `vehicle`
--

CREATE TABLE IF NOT EXISTS `vehicle` (
  `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
  `class` varchar(64) NOT NULL,
  `spawned_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `account_uid` varchar(32) DEFAULT NULL,
  `is_locked` tinyint(1) NOT NULL DEFAULT '0',
  `fuel` double UNSIGNED NOT NULL DEFAULT '0',
  `damage` double UNSIGNED NOT NULL DEFAULT '0',
  `hitpoints` text NOT NULL,
  `position_x` double NOT NULL DEFAULT '0',
  `position_y` double NOT NULL DEFAULT '0',
  `position_z` double NOT NULL DEFAULT '0',
  `direction_x` double NOT NULL DEFAULT '0',
  `direction_y` double NOT NULL DEFAULT '0',
  `direction_z` double NOT NULL DEFAULT '0',
  `up_x` double NOT NULL DEFAULT '0',
  `up_y` double NOT NULL DEFAULT '0',
  `up_z` double NOT NULL DEFAULT '1',
  `cargo_items` text NOT NULL,
  `cargo_magazines` text NOT NULL,
  `cargo_weapons` text NOT NULL,
  `cargo_container` text NOT NULL,
  `last_updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `pin_code` varchar(6) NOT NULL DEFAULT '000000',
  `deleted_at` datetime DEFAULT NULL,
  `money` int(11) UNSIGNED NOT NULL DEFAULT '0',
  `vehicle_texture` text NOT NULL,
  `ammo` text NOT NULL,
  PRIMARY KEY (`id`),
  KEY `account_uid` (`account_uid`)
) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Table structure for table `virtual_garage`
--

CREATE TABLE IF NOT EXISTS `virtual_garage` (
  `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
  `class` varchar(64) NOT NULL,
  `account_uid` varchar(32) DEFAULT NULL,
  `fuel` double UNSIGNED NOT NULL DEFAULT '0',
  `damage` double UNSIGNED NOT NULL DEFAULT '0',
  `hitpoints` text NOT NULL,
  `pin_code` varchar(6) NOT NULL DEFAULT '000000',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Constraints for dumped tables
--

--
-- Constraints for table `account`
--
ALTER TABLE `account`
  ADD CONSTRAINT `account_ibfk_1` FOREIGN KEY (`clan_id`) REFERENCES `clan` (`id`) ON DELETE SET NULL;

--
-- Constraints for table `clan`
--
ALTER TABLE `clan`
  ADD CONSTRAINT `clan_ibfk_1` FOREIGN KEY (`leader_uid`) REFERENCES `account` (`uid`) ON DELETE CASCADE;

--
-- Constraints for table `clan_map_marker`
--
ALTER TABLE `clan_map_marker`
  ADD CONSTRAINT `clan_map_marker_ibfk_1` FOREIGN KEY (`clan_id`) REFERENCES `clan` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `construction`
--
ALTER TABLE `construction`
  ADD CONSTRAINT `construction_ibfk_1` FOREIGN KEY (`account_uid`) REFERENCES `account` (`uid`) ON DELETE CASCADE,
  ADD CONSTRAINT `construction_ibfk_2` FOREIGN KEY (`territory_id`) REFERENCES `territory` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `container`
--
ALTER TABLE `container`
  ADD CONSTRAINT `container_ibfk_1` FOREIGN KEY (`account_uid`) REFERENCES `account` (`uid`) ON DELETE CASCADE,
  ADD CONSTRAINT `container_ibfk_2` FOREIGN KEY (`territory_id`) REFERENCES `territory` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `player`
--
ALTER TABLE `player`
  ADD CONSTRAINT `player_ibfk_1` FOREIGN KEY (`account_uid`) REFERENCES `account` (`uid`) ON DELETE CASCADE;

--
-- Constraints for table `territory`
--
ALTER TABLE `territory`
  ADD CONSTRAINT `territory_ibfk_1` FOREIGN KEY (`owner_uid`) REFERENCES `account` (`uid`) ON DELETE CASCADE,
  ADD CONSTRAINT `territory_ibfk_2` FOREIGN KEY (`flag_stolen_by_uid`) REFERENCES `account` (`uid`) ON DELETE SET NULL;

--
-- Constraints for table `vehicle`
--
ALTER TABLE `vehicle`
  ADD CONSTRAINT `vehicle_ibfk_1` FOREIGN KEY (`account_uid`) REFERENCES `account` (`uid`) ON DELETE CASCADE;

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

 

try this db, it is what I use.

and use this exile.ini

Spoiler

[Default]
Version = 12
Number of Inputs = 0
Sanitize Input Value Check = false
Sanitize Output Value Check = false
Prepared Statement Cache = true
Return InsertID = false
Strip = true
Strip Chars Action = STRIP
Strip Chars = \/\|;{}<>\'
Strip Custom Chars = \/\|;{}<>\'

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Account related queries
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

[isKnownAccount]
SQL1_1 = SELECT CASE WHEN EXISTS(SELECT uid FROM account WHERE uid = ?) THEN 'true' ELSE 'false' END
Number of Inputs = 1
SQL1_INPUTS = 1 
OUTPUT = 1

[createAccount]
SQL1_1 = INSERT INTO account SET uid = ?, name = ?
Number Of Inputs = 2
SQL1_INPUTS = 1,2

[startAccountSession]
SQL1_1 = UPDATE account SET name = ?, last_connect_at = NOW(), total_connections = total_connections + 1 WHERE uid = ?
Number Of Inputs = 2
SQL1_INPUTS = 2,1

[endAccountSession]
SQL1_1 = UPDATE account SET last_disconnect_at = NOW() WHERE uid = ?
Number Of Inputs = 1
SQL1_INPUTS = 1

[getAccountStats]
SQL1_1 = SELECT score, kills, deaths, clan_id, locker FROM account WHERE uid = ?
Number of Inputs = 1
SQL1_INPUTS = 1 
OUTPUT = 1,2,3,4,5

[addAccountKill]
SQL1_1 = UPDATE account SET kills = kills + 1 WHERE uid = ?
Number Of Inputs = 1
SQL1_INPUTS = 1

[addAccountDeath]
SQL1_1 = UPDATE account SET deaths = deaths + 1 WHERE uid = ?
Number Of Inputs = 1
SQL1_INPUTS = 1

[getAccountScore]
SQL1_1 = SELECT score FROM account WHERE uid = ?
Number of Inputs = 1
SQL1_INPUTS = 1 
OUTPUT = 1

[setAccountScore]
SQL1_1 = UPDATE account SET score = ? WHERE uid = ?
Number of Inputs = 2
SQL1_INPUTS = 1,2 

[modifyAccountScore]
SQL1_1 = UPDATE account SET score = score + ? WHERE uid = ?
Number of Inputs = 2
SQL1_INPUTS = 1,2 

[updateLocker]
SQL1_1 = UPDATE account SET locker = ? WHERE uid = ?
Number of Inputs = 2
SQL1_INPUTS = 1,2 

[getLocker]
SQL1_1 = SELECT locker FROM account WHERE uid = ?
Number of Inputs = 1
SQL1_INPUTS = 1
OUTPUT = 1

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Player related queries
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

[hasAlivePlayer]
SQL1_1 = SELECT CASE WHEN EXISTS(SELECT account_uid FROM player WHERE account_uid = ? AND damage < 1) THEN 'true' ELSE 'false' END
Number of Inputs = 1
SQL1_INPUTS = 1
OUTPUT = 1

[createPlayer]
SQL1_1 = INSERT INTO player SET account_uid = ?, name = ?
Number Of Inputs = 2
SQL1_INPUTS = 1,2
Return InsertID = true

[insertPlayerHistory]
SQL1_1 = INSERT INTO player_history SET account_uid = ?, name = ?, position_x = ?, position_y = ?, position_z = ?
Number Of Inputs = 5
SQL1_INPUTS = 1,2,3,4,5

[deletePlayer]
SQL1_1 = DELETE FROM player WHERE id = ? 
Number Of Inputs = 1
SQL1_INPUTS = 1

[loadPlayer]
SQL1_1 = SELECT p.id,
SQL1_2 = p.name,
SQL1_3 = p.account_uid,
SQL1_4 = p.damage,
SQL1_5 = p.hunger,
SQL1_6 = p.thirst,
SQL1_7 = p.alcohol,
SQL1_8 = p.oxygen_remaining,
SQL1_9 = p.bleeding_remaining,
SQL1_10 = p.hitpoints,
SQL1_11 = p.direction,
SQL1_12 = p.position_x,
SQL1_13 = p.position_y,
SQL1_14 = p.position_z,
SQL1_15 = p.assigned_items,
SQL1_16 = p.backpack,
SQL1_17 = p.backpack_items,
SQL1_18 = p.backpack_magazines,
SQL1_19 = p.backpack_weapons,
SQL1_20 = p.current_weapon,
SQL1_21 = p.goggles,
SQL1_22 = p.handgun_items,
SQL1_23 = p.handgun_weapon,
SQL1_24 = p.headgear,
SQL1_25 = p.binocular,
SQL1_26 = p.loaded_magazines,
SQL1_27 = p.primary_weapon,
SQL1_28 = p.primary_weapon_items,
SQL1_29 = p.secondary_weapon,
SQL1_30 = p.secondary_weapon_items,
SQL1_31 = p.uniform,
SQL1_32 = p.uniform_items,
SQL1_33 = p.uniform_magazines,
SQL1_34 = p.uniform_weapons,
SQL1_35 = p.vest,
SQL1_36 = p.vest_items,
SQL1_37 = p.vest_magazines,
SQL1_38 = p.vest_weapons,
SQL1_39 = p.money,
SQL1_40 = a.score,
SQL1_41 = a.kills,
SQL1_42 = a.deaths,
SQL1_43 = c.id,
SQL1_44 = c.name,
SQL1_45 = p.temperature,
SQL1_46 = p.wetness,
SQL1_47 = a.locker
SQL1_48 = FROM player p
SQL1_49 = INNER JOIN account a
SQL1_50 = ON a.uid = p.account_uid 
SQL1_51 = LEFT JOIN clan c 
SQL1_52 = ON c.id = a.clan_id
SQL1_53 = WHERE p.account_uid = ?
Number of Inputs = 1
SQL1_INPUTS = 1
OUTPUT = 1,2-STRING,3-STRING,4,5,6,7,8,9,10,11,12,13,14,15,16-STRING,17,18,19,20-STRING,21-STRING,22,23-STRING,24-STRING,25-STRING,26,27-STRING,28,29-STRING,30,31-STRING,32,33,34,35-STRING,36,37,38,39,40,41,42,43,44-STRING,45,46,47

[updatePlayer]
SQL1_1 = UPDATE player SET
SQL1_2 = name = ?,
SQL1_3 = damage  = ?,
SQL1_4 = hunger = ?,
SQL1_5 = thirst = ?,
SQL1_6 = alcohol = ?,
SQL1_7 = oxygen_remaining  = ?,
SQL1_8 = bleeding_remaining = ?,
SQL1_9 = hitpoints = ?,
SQL1_10 = direction = ?,
SQL1_11 = position_x = ?,
SQL1_12 = position_y = ?,
SQL1_13 = position_z = ?,
SQL1_14 = assigned_items = ?,
SQL1_15 = backpack = ?,
SQL1_16 = backpack_items = ?,
SQL1_17 = backpack_magazines = ?,
SQL1_18 = backpack_weapons = ?,
SQL1_19 = current_weapon = ?,
SQL1_20 = goggles = ?,
SQL1_21 = handgun_items = ?,
SQL1_22 = handgun_weapon = ?,
SQL1_23 = headgear = ?,
SQL1_24 = binocular = ?,
SQL1_25 = loaded_magazines = ?,
SQL1_26 = primary_weapon = ?,
SQL1_27 = primary_weapon_items = ?,
SQL1_28 = secondary_weapon = ?,
SQL1_29 = secondary_weapon_items = ?,
SQL1_30 = uniform = ?,
SQL1_31 = uniform_items = ?,
SQL1_32 = uniform_magazines = ?,
SQL1_33 = uniform_weapons = ?,
SQL1_34 = vest = ?,
SQL1_35 = vest_items = ?,
SQL1_36 = vest_magazines = ?,
SQL1_37 = vest_weapons = ?,
SQL1_38 = temperature = ?,
SQL1_39 = wetness = ?
SQL1_40 = WHERE id = ?
Number Of Inputs = 39
SQL1_INPUTS = 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

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Vehicle related queries
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

[insertVehicle]
SQL1_1 = INSERT INTO vehicle SET 
SQL1_2 = class = ?, 
SQL1_3 = account_uid = ?,
SQL1_4 = is_locked = ?,
SQL1_5 = position_x = ?,
SQL1_6 = position_y = ?,
SQL1_7 = position_z = ?,
SQL1_8 = direction_x = ?,
SQL1_9 = direction_y = ?,
SQL1_10 = direction_z = ?,
SQL1_11 = up_x = ?,
SQL1_12 = up_y = ?,
SQL1_13 = up_z = ?,
SQL1_14 = pin_code = ?
Number of Inputs = 13
SQL1_INPUTS = 1,2,3,4,5,6,7,8,9,10,11,12,13
Return InsertID = true

[deleteVehicle]
SQL1_1 = DELETE FROM vehicle WHERE id = ?
Number Of Inputs = 1
SQL1_INPUTS = 1

[loadVehicleIdPage]
SQL1_1 = SELECT id FROM vehicle WHERE deleted_at IS NULL LIMIT ?,?
Number Of Inputs = 2
SQL1_INPUTS = 1,2
OUTPUT = 1

[loadVehicle]
SQL1_1 = SELECT id,class,spawned_at,account_uid,is_locked,fuel,damage,hitpoints,position_x,position_y,position_z,direction_x,direction_y,direction_z,up_x,up_y,up_z,cargo_items,cargo_magazines,cargo_weapons,pin_code,vehicle_texture,deleted_at,money FROM vehicle WHERE id = ?
Number Of Inputs = 1
SQL1_INPUTS = 1
OUTPUT = 1,2-STRING,3-STRING,4-STRING,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21-STRING,22,23,24

[loadVehicleContainer]
SQL1_1 = SELECT cargo_container FROM vehicle WHERE id = ?
Number Of Inputs = 1
SQL1_INPUTS = 1
OUTPUT = 1

[updateVehicle]
SQL1_1 = UPDATE vehicle SET 
SQL1_2 = is_locked = ?, 
SQL1_3 = fuel = ?, 
SQL1_4 = damage = ?, 
SQL1_5 = hitpoints = ?,
SQL1_6 = position_x = ?,
SQL1_7 = position_y = ?,
SQL1_8 = position_z = ?,
SQL1_9 = direction_x = ?,
SQL1_10 = direction_y = ?,
SQL1_11 = direction_z = ?,
SQL1_12 = up_x = ?,
SQL1_13 = up_y = ?,
SQL1_14 = up_z = ?,
SQL1_15 = cargo_items = ?,
SQL1_16 = cargo_magazines = ?,
SQL1_17 = cargo_weapons = ?,
SQL1_18 = cargo_container = ?,
SQL1_19 = money = ?
SQL1_20 = WHERE id = ?
Number of Inputs = 19
SQL1_INPUTS = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19

[updateVehicleSkin]
SQL1_1 = UPDATE vehicle SET vehicle_texture = ? WHERE id = ?
Number of Inputs = 2
SQL1_INPUTS = 1,2

[vehicleSetPinCode]
SQL1_1 = UPDATE vehicle SET pin_code = ? WHERE id = ?
Number of Inputs = 2
SQL1_INPUTS = 1,2


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Construction related queries
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

[insertConstruction]
SQL1_1 = INSERT INTO construction SET 
SQL1_2 = class = ?, 
SQL1_3 = account_uid = ?, 
SQL1_4 = position_x = ?,
SQL1_5 = position_y = ?,
SQL1_6 = position_z = ?,
SQL1_7 = direction_x = ?,
SQL1_8 = direction_y = ?,
SQL1_9 = direction_z = ?,
SQL1_10 = up_x = ?,
SQL1_11 = up_y = ?,
SQL1_12 = up_z = ?,
SQL1_13 = territory_id = $CUSTOM_1$
Number of Inputs = 11
Number of Custom Inputs = 1
SQL1_INPUTS = 1,2,3,4,5,6,7,8,9,10,11
Return InsertID = true

[deleteConstruction]
SQL1_1 = DELETE FROM construction WHERE id = ?
Number Of Inputs = 1
SQL1_INPUTS = 1 

[loadConstructionIdPage]
SQL1_1 = SELECT id FROM construction WHERE deleted_at IS NULL LIMIT ?,?
Number Of Inputs = 2
SQL1_INPUTS = 1,2
OUTPUT = 1

[loadConstruction]
SQL1_1 = SELECT id,class,account_uid,spawned_at,position_x,position_y,position_z,direction_x,direction_y,direction_z,up_x,up_y,up_z,is_locked,pin_code,territory_id,deleted_at,damage FROM construction WHERE id = ?
Number Of Inputs = 1
SQL1_INPUTS = 1 
OUTPUT = 1,2-STRING,3-STRING,4-STRING,5,6,7,8,9,10,11,12,13,14,15-STRING,16,17,18

[countConstruction]
SQL1_1 = SELECT COUNT(*) FROM construction
Number Of Inputs = 0
OUTPUT = 1

[constructionSetPinCode]
SQL1_1 = UPDATE construction SET pin_code= ? WHERE id = ?
Number of Inputs = 2
SQL1_INPUTS = 1,2

[upgradeObject]
SQL1_1 = UPDATE construction SET class=? WHERE id = ?
Number of Inputs = 2
SQL1_INPUTS = 1,2

[addDoorLock]
SQL1_1 = UPDATE construction SET pin_code = ?,is_locked = -1 WHERE id = ?
Number of Inputs = 2
SQL1_INPUTS = 1,2

[updateLock]
SQL1_1 = UPDATE construction SET is_locked = ? WHERE id = ?
Number of Inputs = 2
SQL1_INPUTS = 1,2

[updateConstructionTerritoryIDs]
SQL1_1 = UPDATE construction SET territory_id = ? WHERE id IN(?)
Number of Inputs = 2
SQL1_INPUTS = 1,2

[updateDamage]
SQL1_1 = UPDATE construction SET damage = ? WHERE id = ?
Number of Inputs = 2
SQL1_INPUTS = 1,2

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Containers related queries
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

[insertContainer]
SQL1_1 = INSERT INTO container SET 
SQL1_2 = class = ?, 
SQL1_3 = account_uid = ?, 
SQL1_4 = position_x = ?,
SQL1_5 = position_y = ?,
SQL1_6 = position_z = ?,
SQL1_7 = direction_x = ?,
SQL1_8 = direction_y = ?,
SQL1_9 = direction_z = ?,
SQL1_10 = up_x = ?,
SQL1_11 = up_y = ?,
SQL1_12 = up_z = ?,
SQL1_13 = cargo_items = ?,
SQL1_14 = cargo_magazines = ?,
SQL1_15 = cargo_weapons = ?,
SQL1_16 = cargo_container = ?,
SQL1_17 = money = ?,
SQL1_18 = pin_code = ?,
SQL1_19 = territory_id = $CUSTOM_1$
Number of Inputs = 17
Number of Custom Inputs = 1
SQL1_INPUTS = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17
Return InsertID = true

[deleteContainer]
SQL1_1 = DELETE FROM container WHERE id = ?
Number Of Inputs = 1
SQL1_INPUTS = 1

[loadContainerIdPage]
SQL1_1 = SELECT id FROM container WHERE deleted_at IS NULL LIMIT ?,?
Number Of Inputs = 2
SQL1_INPUTS = 1,2
OUTPUT = 1

[loadContainer]
SQL1_1 = SELECT id,class,account_uid,is_locked,position_x,position_y,position_z,direction_x,direction_y,direction_z,up_x,up_y,up_z,cargo_items,cargo_magazines,cargo_weapons,pin_code,territory_id,abandoned,deleted_at,money FROM container WHERE id = ?
Number Of Inputs = 1
SQL1_INPUTS = 1
OUTPUT = 1,2-STRING,3-STRING,4,5,6,7,8,9,10,11,12,13,14,15,16,17-STRING,18,19-STRING,20,21

[loadContainerCargo]
SQL1_1 = SELECT cargo_container FROM container WHERE id = ?
Number Of Inputs = 1
SQL1_INPUTS = 1
OUTPUT = 1

[updateContainer]
SQL1_1 = UPDATE container SET 
SQL1_2 = is_locked = ?, 
SQL1_3 = position_x = ?,
SQL1_4 = position_y = ?,
SQL1_5 = position_z = ?,
SQL1_6 = direction_x = ?,
SQL1_7 = direction_y = ?,
SQL1_8 = direction_z = ?,
SQL1_9 = up_x = ?,
SQL1_10 = up_y = ?,
SQL1_11 = up_z = ?,
SQL1_12 = cargo_items = ?,
SQL1_13 = cargo_magazines = ?,
SQL1_14 = cargo_weapons = ?,
SQL1_15 = cargo_container = ?,
SQL1_16 = territory_id = $CUSTOM_1$,
SQL1_17 = money = ?
SQL1_18 = WHERE id = ?
Number of Inputs = 16
Number of Custom Inputs = 1
SQL1_INPUTS = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16

[containerSetPinCode]
SQL1_1 = UPDATE container SET pin_code= ? WHERE id = ?
Number of Inputs = 2
SQL1_INPUTS = 1,2

[updateContainerTerritoryIDs]
SQL1_1 = UPDATE container SET territory_id = ? WHERE id IN(?)
Number of Inputs = 2
SQL1_INPUTS = 1,2

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Clan related queries
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

[createClan]
SQL1_1 = INSERT INTO clan SET leader_uid = ?, name = ?
Number Of Inputs = 2
SQL1_INPUTS = 1,2
Return InsertID = true

[setAccountClanLink]
SQL1_1 = UPDATE account SET clan_id = ? WHERE uid = ?
Number Of Inputs = 2
SQL1_INPUTS = 1,2

[unLinkClanLink]
SQL1_1 = UPDATE account SET clan_id = NULL WHERE uid = ?
Number Of Inputs = 1
SQL1_INPUTS = 1

[updateClanLeader]
SQL1_1 = UPDATE clan SET leader_uid = ? WHERE id = ?
Number Of Inputs = 2
SQL1_INPUTS = 1,2

[deleteClan]
SQL1_1 = DELETE FROM clan WHERE id = ?
Number Of Inputs = 1
SQL1_INPUTS = 1

[loadClansIdPage]
SQL1_1 = SELECT id FROM clan LIMIT ?,?
Number Of Inputs = 2
SQL1_INPUTS = 1,2
OUTPUT = 1

[getClanInfo]
SQL1_1 = SELECT name,leader_uid FROM clan WHERE id = ?
Number Of Inputs = 1
SQL1_INPUTS = 1
OUTPUT = 1-STRING,2-STRING

[getClanMembers]
SQL1_1 = SELECT uid,name FROM account WHERE clan_id = ?
Number Of Inputs = 1
SQL1_INPUTS = 1
OUTPUT = 1-STRING,2-STRING

[getClanMarkers]
SQL1_1 = SELECT id,markerType,positionArr,color,icon,iconSize,label,labelSize FROM clan_map_marker WHERE clan_id = ?
Number Of Inputs = 1
SQL1_INPUTS = 1
OUTPUT = 1,2,3,4,5-STRING,6,7-STRING,8

[addMarker]
SQL1_1 = INSERT INTO clan_map_marker SET clan_id = ?, markerType = 0, positionArr = ?, color = ?, icon = ?, iconSize = ?, label = ?, labelSize = ?
Number Of Inputs = 7
SQL1_INPUTS = 1,2,3,4,5,6,7
Return InsertID = true

[addPoly]
SQL1_1 = INSERT INTO clan_map_marker SET clan_id = ?, markerType = 1, positionArr = ?, color = ?
Number Of Inputs = 3
SQL1_INPUTS = 1,2,3
Return InsertID = true

[deleteMarker]
SQL1_1 = DELETE FROM clan_map_marker WHERE id = ?
Number Of Inputs = 1
SQL1_INPUTS = 1

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Territory related queries
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

[createTerritory]
SQL1_1 = INSERT INTO territory SET owner_uid = ?, name = ?, position_x = ? , position_y = ? , position_z = ?, radius = ? , level = ? , flag_texture = ? , flag_stolen = ? , flag_stolen_by_uid =$CUSTOM_1$ , build_rights = ? , moderators = ? 
Number Of Inputs = 11
Number Of Custom Inputs = 1
SQL1_INPUTS = 1,2,3,4,5,6,7,8,9,10,11
Return InsertID = true

[loadTerriotryIdPage]
SQL1_1 = SELECT id FROM territory WHERE deleted_at IS NULL LIMIT ?,?
Number Of Inputs = 2
SQL1_INPUTS = 1,2
OUTPUT = 1

[loadTerritory]
SQL1_1 = SET @connector = ?;
SQL2_1 = SELECT id,owner_uid,name,position_x,position_y,position_z,radius, level,flag_texture,flag_stolen,flag_stolen_by_uid,last_paid_at,build_rights,moderators,deleted_at,(SELECT COUNT(*)FROM construction c WHERE c.territory_id = @connector) FROM territory WHERE id = @connector
Number Of Inputs = 1
SQL1_INPUTS = 1
OUTPUT = 1,2-STRING,3-STRING,4,5,6,7,8,9-STRING,10,11-STRING,12-DateTime_ISO8601,13,14,15,16

[setTerritoryLevel]
SQL1_1 = UPDATE territory SET level = ? WHERE id = ?
Number Of Inputs = 2
SQL1_INPUTS = 1,2

[setTerritorySize]
SQL1_1 = UPDATE territory SET radius = ? WHERE id = ?
Number Of Inputs = 2
SQL1_INPUTS = 1,2

[updateTerritoryBuildRights]
SQL1_1 = UPDATE territory SET build_rights = ? WHERE id = ?
Number Of Inputs = 2
SQL1_INPUTS = 1,2

[updateTerritoryModerators]
SQL1_1 = UPDATE territory SET moderators = ? WHERE id = ?
Number Of Inputs = 2
SQL1_INPUTS = 1,2

[maintainTerritory]
SQL1_1 = UPDATE territory SET last_paid_at = NOW(),xm8_protectionmoney_notified = 0 WHERE id = ?
Number Of Inputs = 1
SQL1_INPUTS = 1

[deleteTerritory]
SQL1_1 = DELETE FROM territory WHERE id = ?
Number Of Inputs = 1
SQL1_INPUTS = 1

[flagStolen]
SQL1_1 = UPDATE territory SET flag_stolen = 1, flag_stolen_by_uid = ?, flag_stolen_at = NOW() WHERE id = ?
Number of Inputs = 2
SQL1_INPUTS = 1,2

[flagRestore]
SQL1_1 = UPDATE territory SET flag_stolen = 0, flag_stolen_by_uid = NULL, flag_stolen_at = NULL WHERE id = ?
Number of Inputs = 1
SQL1_INPUTS = 1

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Garbage Collector
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

; Marks for deletion containers outside territories that were not accessed within ? days
[markDeleteOldContainers]
SQL1_1 = UPDATE container SET deleted_at = NOW() WHERE last_updated_at < DATE_SUB(NOW(), INTERVAL ? DAY) AND territory_id IS NULL AND deleted_at IS NULL
Number Of Inputs = 1
SQL1_INPUTS = 1

; Removes containers outside territories that were not accessed within ? days
[deleteOldContainers]
SQL1_1 = DELETE FROM container WHERE deleted_at < DATE_SUB(NOW(), INTERVAL ? DAY) AND territory_id IS NULL
Number Of Inputs = 1
SQL1_INPUTS = 1

; Marks contructions outside territories deleted after ? days
[markDeleteOldConstructions]
SQL1_1 = UPDATE construction SET deleted_at = NOW() WHERE last_updated_at < DATE_SUB(NOW(), INTERVAL ? DAY) AND territory_id IS NULL AND deleted_at IS NULL
Number Of Inputs = 1
SQL1_INPUTS = 1

; Removes contructions outside territories after ? days
[deleteOldConstructions]
SQL1_1 = DELETE FROM construction WHERE deleted_at < DATE_SUB(NOW(), INTERVAL ? DAY) AND territory_id IS NULL
Number Of Inputs = 1
SQL1_INPUTS = 1

; Marks for deletion vehicles that were not used within ? days
[markDeleteOldVehicles]
SQL1_1 = UPDATE vehicle SET deleted_at = NOW() WHERE last_updated_at < DATE_SUB(NOW(), INTERVAL ? DAY) AND deleted_at IS NULL
Number Of Inputs = 1
SQL1_INPUTS = 1

; Removes vehicles that were not used within ? days
[deleteOldVehicles]
SQL1_1 = DELETE FROM vehicle WHERE deleted_at < DATE_SUB(NOW(), INTERVAL ? DAY)
Number Of Inputs = 1
SQL1_INPUTS = 1

; Marks territories (and all containers/constructions) that were not paid within ? days as deleted
[markDeleteUnpaidTerritories]
SQL1_1 = UPDATE territory SET deleted_at = NOW() WHERE last_paid_at < DATE_SUB(NOW(), INTERVAL ? DAY) AND deleted_at IS NULL
SQl2_1 = UPDATE construction SET deleted_at = (select deleted_at from territory where territory.id=construction.territory_id and territory.deleted_at IS NOT NULL)
SQL3_1 = UPDATE container SET deleted_at = (select deleted_at from territory where territory.id=container.territory_id and territory.deleted_at IS NOT NULL)
Number Of Inputs = 1
SQL1_INPUTS = 1

; Removes territories (and all containers/constructions) that were not paid within ? days
[deleteUnpaidTerritories]
SQL1_1 = DELETE FROM territory WHERE deleted_at < DATE_SUB(NOW(), INTERVAL ? DAY)
Number Of Inputs = 1
SQL1_INPUTS = 1

[addAbandonedSafes]
SQL1_1 = UPDATE container SET abandoned = NOW(), pin_code = '0000' WHERE last_updated_at < DATE_SUB(NOW(), INTERVAL ? DAY) AND class = "Exile_Container_Safe" AND territory_id IS NULL
Number Of Inputs = 1
SQL1_INPUTS = 1

[deleteBaseFlagStolen]
SQL1_1 = DELETE FROM territory WHERE flag_stolen_at < DATE_SUB(NOW(), INTERVAL ? DAY)
Number Of Inputs = 1
SQL1_INPUTS = 1

; Unlock doors and mark safes as abandoned if flag stolen for X days
[setAbandonedUnlocked]
SQL1_1 = UPDATE container SET abandoned = NOW(), pin_code = '0000' WHERE (SELECT flag_stolen_at from territory WHERE territory.id=container.territory_id AND territory.flag_stolen_at < DATE_SUB(NOW(), INTERVAL ? DAY));
SQL2_1 = UPDATE construction SET pin_code = '0000' WHERE (SELECT flag_stolen_at from territory WHERE territory.id = construction.territory_id AND territory.flag_stolen_at < DATE_SUB(NOW(), INTERVAL ? DAY)) AND pin_code != '000000'
Number Of Inputs = 1
SQL1_INPUTS = 1
SQL2_INPUTS = 1

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Moneh moneh moneh
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

[setPlayerMoney]
SQL1_1 = UPDATE player SET money = ? WHERE id = ?
Number of Inputs = 2
SQL1_INPUTS = 1,2 

[getPlayerMoney]
SQL1_1 = SELECT money FROM player WHERE id = ?
Number of Inputs = 1
SQL1_INPUTS = 1
OUTPUT = 1

[setContainerMoney]
SQL1_1 = UPDATE container SET money = ? WHERE id = ?
Number of Inputs = 2
SQL1_INPUTS = 1,2 

[setVehicleMoney]
SQL1_1 = UPDATE vehicle SET money = ? WHERE id = ?
Number of Inputs = 2
SQL1_INPUTS = 1,2 

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;	XM8
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

[getAllNotifTerritory]
SQL1_1 = SELECT id FROM territory WHERE last_paid_at < DATE_SUB(NOW(), INTERVAL ? - 1 DAY) and xm8_protectionmoney_notified = 0
Number of Inputs = 1
SQL1_INPUTS = 1

[setTerritoryNotified]
SQL1_1 = UPDATE territory SET xm8_protectionmoney_notified = ? WHERE id = ?
Number of Inputs = 2
SQL1_INPUTS = 1,2

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; VIRTUAL GARAGE
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

[getStoredVehicles]
SQL1_1 = SELECT id, class FROM virtual_garage WHERE account_uid = ?
Number Of Inputs = 1
SQL1_INPUTS = 1
OUTPUT = 1,2-STRING

[insertVehicleToVG]
SQL1_1 = INSERT INTO virtual_garage SET
SQL1_2 = class = ?,
SQL1_3 = account_uid = ?,
SQL1_4 = fuel = ?,
SQL1_5 = damage = ?,
SQL1_6 = hitpoints = ?,
SQL1_7 = pin_code = ?,
SQL1_8 = position_x = ?,
SQL1_9 = position_y = ?,
SQL1_10 = position_z = ?,
SQL1_11 = direction_x = ?,
SQL1_12 = direction_y = ?,
SQL1_13 = direction_z = ?,
SQL1_14 = up_x = ?,
SQL1_15 = up_y = ?,
SQL1_16 = up_z = ?,
SQL1_17 = vehicle_texture = ?
Number of Inputs = 16
SQL1_INPUTS = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16
Return InsertID = true

[RetrieveVehicle]
SQL1_1 = SELECT id,class,account_uid,fuel,damage,hitpoints,pin_code,position_x,position_y,position_z,direction_x,direction_y,direction_z,up_x,up_y,up_z,vehicle_texture FROM virtual_garage WHERE id = ?
Number Of Inputs = 1
SQL1_INPUTS = 1
OUTPUT = 1,2-STRING,3-STRING,4,5,6,7-STRING,8,9,10,11,12,13,14,15,16,17

[deleteVehicleFromVG]
SQL1_1 = DELETE FROM virtual_garage WHERE id = ?
Number Of Inputs = 1
SQL1_INPUTS = 1


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;	Author: Chris(tian) "infiSTAR" Lorenzen
;;	Contact: infiSTAR23@gmail.com // www.infiSTAR.de
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;	please add everything below this comment to the bottom of your exile.ini file
;;	to allow your exileserver/infiSTAR to communicate with your database!
;;	
;;	path where exile.ini should be:
;;	Arma 3\@ExileServer\extDB\sql_custom_v2
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

[getAccountWhitelisted]
SQL1_1 = SELECT whitelisted FROM account WHERE uid = ?
Number Of Inputs = 1
SQL1_INPUTS = 1
OUTPUT = 1

[insert_infiSTARLog]
SQL1_1 = INSERT INTO infistar_logs SET logname = ?, logentry = ?
Number Of Inputs = 2
SQL1_INPUTS = 1,2

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;  MarXet by WolfkillArcadia
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

[createNewListing]
SQL1_1 = INSERT INTO marxet SET listingID = ?, itemAvailable = ?, itemArray = ?, price = ?, sellerUID = ?
Number Of Inputs = 5
SQL1_INPUTS = 1,2,3,4,5

[getListings]
SQL1_1 = SELECT listingID, itemAvailable, itemArray, price, sellerUID FROM marxet
Number Of Inputs = 0
OUTPUT = 1-STRING,2,3,4-STRING,5-STRING

[updateListing]
SQL1_1 = UPDATE marxet SET itemAvailable = 0 WHERE listingID = ?
Number Of Inputs = 1
SQL1_INPUTS = 1

[deleteListing]
SQL1_1 = DELETE FROM marxet WHERE listingID = ?
Number Of Inputs = 1
SQL1_INPUTS = 1

[restrictOldListings]
SQL1_1 = UPDATE marxet SET sellerUID = 0 WHERE created_at < DATE_SUB(NOW(), INTERVAL ? DAY) AND sellerUID != 0
Number of Inputs = 1
SQL1_INPUTS = 1

[deleteOldListings]
SQL1_1 = DELETE FROM marxet WHERE created_at < DATE_SUB(NOW(), INTERVAL ? DAY) AND sellerUID = 0
Number of Inputs = 1
SQL1_INPUTS = 1

 

 

Share this post


Link to post
Share on other sites
  • 0

@tinboye thank you so much for the reply I'll try your db and ini now and get back to you (and yes im backing up my version just so im not back to square one lol)

 

Edited by D3sync
What mods do you have for your server? I think thats the reason why it isn't working now.

Share this post


Link to post
Share on other sites
Advertisement

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.