Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [Default]
- Version = 4
- Number of Inputs = 0
- Sanitize Value Check = false
- String Datatype Check = false
- ; Add Quotations around Text / VarChar DataTypes when retrieving Values
- ; Note: This Doesn't Work for Text DataTypes for MySQL1
- ; This is mainly a legacy option to provide similar behaviour as older DB_CUSTOM_V2/3
- Bad Chars = `/\|;{}<>'
- ; Can't Strip Char : since its used as a divider in extDB.
- ; If you need it stripped you will need todo it in SQF Code.
- ; Note: if value contains divider :
- ; It will result in extDB reading to many input values + will return an error anyway.
- ; Important if you are using $INPUT_STRING_x, recommended you strip the char `
- ; That is the quotation char used to wrap strings
- Bad Chars Action = STRIP
- ; Actions STRIP / NONE
- ;
- ;; $INPUT_x = normal value
- ;; $INPUT_STRING_x = " + value(stripped char ") + "
- ;; i.e "omg"it"stupid" -> "omgitstupid" etc
- ;; $INPUT_BEGUID_x = value converted to BEGuid i.e send it player guid + it will convert it to beguid.
- ; --------------------------------------------------------------------------------
- ; DB INFO
- ; --------------------------------------------------------------------------------
- [getDBVersion]
- SQL1_1 = SELECT IFNULL ((SELECT Value FROM DBInfo WHERE Name = 'Version'), '2.03');
- ; --------------------------------------------------------------------------------
- ; SERVER INSTANCE & MAP
- ; --------------------------------------------------------------------------------
- [checkServerInstance]
- SQL1_1 = SELECT IF ((SELECT 1 FROM ServerInstance WHERE ID = '$INPUT_1'), 'true', 'false');
- Number of Inputs = 1
- [insertServerInstance]
- SQL1_1 = INSERT INTO ServerInstance SET ID = '$INPUT_1';
- Number of Inputs = 1
- [getServerMapID]
- SQL1_1 = SELECT IFNULL ((SELECT ID FROM ServerMap WHERE WorldName = '$INPUT_1' AND Environment = '$INPUT_2'), 0);
- Number of Inputs = 2
- [insertServerMap]
- SQL1_1 = INSERT INTO ServerMap SET WorldName = '$INPUT_1', Environment = '$INPUT_2';
- SQL2_1 = SELECT LAST_INSERT_ID();
- Number of Inputs = 2
- ; --------------------------------------------------------------------------------
- ; PLAYER SAVING
- ; --------------------------------------------------------------------------------
- [checkPlayerSave]
- SQL1_1 = SELECT IF ((SELECT 1 FROM PlayerSave WHERE PlayerUID = '$INPUT_1' AND MapID = $INPUT_2), 'true', 'false');
- Number of Inputs = 2
- [getPlayerSave]
- SQL1_1 = SELECT $INPUT_3 FROM PlayerSave WHERE PlayerUID = '$INPUT_1' AND MapID = $INPUT_2;
- Bad Chars = `/\|;{}<>
- Number of Inputs = 3
- [getPlayerBankMoney]
- SQL1_1 = SELECT BankMoney FROM PlayerInfo WHERE UID = '$INPUT_1';
- Number of Inputs = 1
- [insertOrUpdatePlayerInfo]
- SQL1_1 = INSERT INTO PlayerInfo SET UID = '$INPUT_1', BattlEyeGUID = REPLACE('$INPUT_BEGUID_1', '"', ''), $INPUT_2
- SQL1_2 = ON DUPLICATE KEY UPDATE $INPUT_3;
- Bad Chars = `/\|;{}<>
- Number of Inputs = 3
- [insertOrUpdatePlayerSave]
- SQL1_1 = INSERT INTO PlayerSave SET PlayerUID = '$INPUT_1', MapID = $INPUT_2, CreationDate = NOW(), $INPUT_3
- SQL1_2 = ON DUPLICATE KEY UPDATE $INPUT_4;
- Bad Chars = `/\|;{}<>
- Number of Inputs = 4
- [deletePlayerSave]
- SQL1_1 = DELETE FROM PlayerSave WHERE PlayerUID = '$INPUT_1' AND MapID = $INPUT_2;
- Number of Inputs = 2
- [insertOrUpdatePlayerStats]
- SQL1_1 = INSERT INTO PlayerStats SET PlayerUID = '$INPUT_1', $INPUT_4 = $INPUT_5
- SQL1_2 = ON DUPLICATE KEY UPDATE $INPUT_4 = $INPUT_4 + $INPUT_5;
- SQL2_1 = INSERT INTO PlayerStatsMap SET PlayerUID = '$INPUT_1', ServerID = $INPUT_2, MapID = $INPUT_3, $INPUT_4 = $INPUT_5
- SQL2_2 = ON DUPLICATE KEY UPDATE $INPUT_4 = $INPUT_4 + $INPUT_5;
- Number of Inputs = 5
- ; --------------------------------------------------------------------------------
- ; WARCHEST
- ; --------------------------------------------------------------------------------
- [getWarchestMoney]
- SQL1_1 = SELECT WarchestMoneyBLUFOR, WarchestMoneyOPFOR FROM ServerInstance WHERE ID = $INPUT_1;
- Number of Inputs = 1
- [updateWarchestMoney]
- SQL1_1 = UPDATE ServerInstance SET WarchestMoneyBLUFOR = $INPUT_2, WarchestMoneyOPFOR = $INPUT_3 WHERE ID = $INPUT_1;
- Number of Inputs = 3
- ; --------------------------------------------------------------------------------
- ; OBJECT SAVING
- ; --------------------------------------------------------------------------------
- [getServerObjects]
- SQL1_1 = SELECT $INPUT_3 FROM ServerObjects WHERE ServerID = $INPUT_1 AND MapID = $INPUT_2;
- Number of Inputs = 3
- [newServerObject]
- SQL1_1 = INSERT INTO ServerObjects SET ServerID = $INPUT_1, MapID = $INPUT_2, CreationDate = NOW();
- SQL2_1 = SELECT LAST_INSERT_ID();
- Number of Inputs = 2
- [updateServerObject]
- SQL1_1 = UPDATE ServerObjects SET $INPUT_2 WHERE ID = $INPUT_1;
- Bad Chars = `/\|;{}<>
- Number of Inputs = 2
- [deleteServerObjects]
- SQL1_1 = DELETE FROM ServerObjects WHERE ID IN ($INPUT_1);
- Number of Inputs = 1
- [deleteExpiredServerObjects]
- SQL1_1 = DELETE FROM ServerObjects WHERE ServerID = $INPUT_1 AND MapID = $INPUT_2
- SQL1_2 = AND (($INPUT_3 > 0 AND TIMESTAMPDIFF(HOUR, LastInteraction, NOW()) > $INPUT_3)
- SQL1_3 = OR ($INPUT_4 <= 0 AND Locked = 0 AND Deployable = 0)
- SQL1_4 = OR Damage >= 1);
- Number of Inputs = 4
- ; --------------------------------------------------------------------------------
- ; VEHICLE SAVING
- ; --------------------------------------------------------------------------------
- [getServerVehicles]
- SQL1_1 = SELECT $INPUT_3 FROM ServerVehicles WHERE ServerID = $INPUT_1 AND MapID = $INPUT_2;
- Number of Inputs = 3
- [newServerVehicle]
- SQL1_1 = INSERT INTO ServerVehicles SET ServerID = $INPUT_1, MapID = $INPUT_2, CreationDate = NOW();
- SQL2_1 = SELECT LAST_INSERT_ID();
- Number of Inputs = 2
- [updateServerVehicle]
- SQL1_1 = UPDATE ServerVehicles SET $INPUT_2 WHERE ID = $INPUT_1;
- Bad Chars = `/|;{}<>
- Number of Inputs = 2
- [deleteServerVehicles]
- SQL1_1 = DELETE FROM ServerVehicles WHERE ID IN ($INPUT_1);
- Number of Inputs = 1
- [deleteExpiredServerVehicles]
- SQL1_1 = DELETE FROM ServerVehicles WHERE ServerID = $INPUT_1 AND MapID = $INPUT_2
- SQL1_2 = AND (($INPUT_3 > 0 AND TIMESTAMPDIFF(HOUR, CreationDate, NOW()) > $INPUT_3)
- SQL1_3 = OR ($INPUT_4 > 0 AND TIMESTAMPDIFF(HOUR, LastUsed, NOW()) > $INPUT_4)
- SQL1_4 = OR Damage >= 0.99);
- Number of Inputs = 4
- ; --------------------------------------------------------------------------------
- ; LOGGING
- ; --------------------------------------------------------------------------------
- [addAdminLog]
- SQL1_1 = INSERT INTO AdminLog (ServerID, PlayerName, PlayerUID, BattlEyeGUID, ActionType, ActionValue)
- SQL1_2 = VALUES ($INPUT_1, '$INPUT_2', '$INPUT_3', REPLACE('$INPUT_BEGUID_3', '"', ''), '$INPUT_STRING_4', '$INPUT_STRING_5');
- Number of Inputs = 5
- [addAntihackLog]
- SQL1_1 = INSERT INTO AntihackLog (ServerID, PlayerName, PlayerUID, BattlEyeGUID, HackType, HackValue)
- SQL1_2 = VALUES ($INPUT_1, '$INPUT_2', '$INPUT_3', REPLACE('$INPUT_BEGUID_3', '"', ''), '$INPUT_STRING_4', '$INPUT_STRING_5');
- Number of Inputs = 5
- [getAntihackEntry]
- SQL1_1 = SELECT '""', HackType FROM AntihackLog WHERE PlayerUID = '$INPUT_1' AND KickOnJoin = 1 LIMIT 1;
- ; First column was supposed to be CONCAT('"',PlayerName,'"'), but current scripts don't make use of it, so it's not really needed
- Number of Inputs = 1
- [addBankTransferLog]
- SQL1_1 = INSERT INTO BankTransferLog (ServerID, SenderName, SenderUID, SenderSide, RecipientName, RecipientUID, RecipientSide, Amount, Fee)
- SQL1_2 = VALUES ($INPUT_1, '$INPUT_2', '$INPUT_3', '$INPUT_4', '$INPUT_5', '$INPUT_6', '$INPUT_7', $INPUT_8, $INPUT_9);
- Number of Inputs = 9
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement