diff --git a/@exileserver/InfoByCloud.txt b/@exileserver/InfoByCloud.txt new file mode 100644 index 0000000..15b97c9 --- /dev/null +++ b/@exileserver/InfoByCloud.txt @@ -0,0 +1,7 @@ +The only thing that changed in this is the exile_server.pbo and the exile.ini. You can A) If you havent TOUCHED EITHER just copy and replace the file B) Merge them, but be wary somethings in extDB2 are not in extDB3 +You can literally just drop in your exile_server_config.pbo in here and replace the current one and it will work +YOU WILL HAVE TO MODIFY exile_server.pbo if you have made custom changes like me (this pbo is vanilla exile_server.pbo with ONLY changes from extdb2 to extdb3) +Both the config.cfg and basic.cfg are unchanged. +Pretty much this is a drop in replace for extdb3. Make sure you keep updated on Torndeco's downloads at https://bitbucket.org/torndeco/extdb3/downloads/ +If Torndeco updates extdb3 (which he does :D a lot) simply over write the current .so files for linux or the dlls for windows. +OH AND LASTLY I did not update the names of the files in the exile_server.pbo. if you want to thats fine but change that fn_preinit as needed. Again this is not at all necessary. \ No newline at end of file diff --git a/@exileserver/PUT THIS IN ARMA INSTALL/tbbmalloc.dll b/@exileserver/PUT THIS IN ARMA INSTALL/tbbmalloc.dll new file mode 100644 index 0000000..a1e0143 Binary files /dev/null and b/@exileserver/PUT THIS IN ARMA INSTALL/tbbmalloc.dll differ diff --git a/@exileserver/PUT THIS IN ARMA INSTALL/tbbmalloc_x64.dll b/@exileserver/PUT THIS IN ARMA INSTALL/tbbmalloc_x64.dll new file mode 100644 index 0000000..ea697cd Binary files /dev/null and b/@exileserver/PUT THIS IN ARMA INSTALL/tbbmalloc_x64.dll differ diff --git a/@exileserver/addons/exile_server.pbo b/@exileserver/addons/exile_server.pbo new file mode 100644 index 0000000..46d6551 Binary files /dev/null and b/@exileserver/addons/exile_server.pbo differ diff --git a/@exileserver/addons/exile_server/$PREFIX$ b/@exileserver/addons/exile_server/$PREFIX$ new file mode 100644 index 0000000..78d2871 --- /dev/null +++ b/@exileserver/addons/exile_server/$PREFIX$ @@ -0,0 +1 @@ +exile_server \ No newline at end of file diff --git a/@exileserver/addons/exile_server/bootstrap/fn_postInit.sqf b/@exileserver/addons/exile_server/bootstrap/fn_postInit.sqf new file mode 100644 index 0000000..1a4aa8a --- /dev/null +++ b/@exileserver/addons/exile_server/bootstrap/fn_postInit.sqf @@ -0,0 +1,15 @@ +/** + * Post-Initialization + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + + +call ExileServer_system_process_postInit; + +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/bootstrap/fn_preInit.sqf b/@exileserver/addons/exile_server/bootstrap/fn_preInit.sqf new file mode 100644 index 0000000..40fa78a --- /dev/null +++ b/@exileserver/addons/exile_server/bootstrap/fn_preInit.sqf @@ -0,0 +1,280 @@ +/** + * Pre-Initialization + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private ['_code', '_function', '_file']; + +{ + _code = ''; + _function = _x select 0; + _file = _x select 1; + + if (isText (missionConfigFile >> 'CfgExileCustomCode' >> _function)) then + { + _file = getText (missionConfigFile >> 'CfgExileCustomCode' >> _function); + }; + + _code = compileFinal (preprocessFileLineNumbers _file); + + missionNamespace setVariable [_function, _code]; +} +forEach +[ + ['ExileServer_object_bush_network_chopBushRequest', 'exile_server\code\ExileServer_object_bush_network_chopBushRequest.sqf'], + ['ExileServer_object_concreteMixer_mixingProcess', 'exile_server\code\ExileServer_object_concreteMixer_mixingProcess.sqf'], + ['ExileServer_object_concreteMixer_network_concreteMixerStartRequest', 'exile_server\code\ExileServer_object_concreteMixer_network_concreteMixerStartRequest.sqf'], + ['ExileServer_object_construction_database_delete', 'exile_server\code\ExileServer_object_construction_database_delete.sqf'], + ['ExileServer_object_construction_database_insert', 'exile_server\code\ExileServer_object_construction_database_insert.sqf'], + ['ExileServer_object_construction_database_load', 'exile_server\code\ExileServer_object_construction_database_load.sqf'], + ['ExileServer_object_construction_database_lockUpdate', 'exile_server\code\ExileServer_object_construction_database_lockUpdate.sqf'], + ['ExileServer_object_construction_event_onMpKilled', 'exile_server\code\ExileServer_object_construction_event_onMpKilled.sqf'], + ['ExileServer_object_construction_network_addLockRequest', 'exile_server\code\ExileServer_object_construction_network_addLockRequest.sqf'], + ['ExileServer_object_construction_network_buildConstructionRequest', 'exile_server\code\ExileServer_object_construction_network_buildConstructionRequest.sqf'], + ['ExileServer_object_construction_network_buildTerritoryRequest', 'exile_server\code\ExileServer_object_construction_network_buildTerritoryRequest.sqf'], + ['ExileServer_object_construction_network_deconstructConstructionRequest', 'exile_server\code\ExileServer_object_construction_network_deconstructConstructionRequest.sqf'], + ['ExileServer_object_construction_network_moveConstructionRequest', 'exile_server\code\ExileServer_object_construction_network_moveConstructionRequest.sqf'], + ['ExileServer_object_construction_network_repairConstructionRequest', 'exile_server\code\ExileServer_object_construction_network_repairConstructionRequest.sqf'], + ['ExileServer_object_construction_network_swapConstructionRequest', 'exile_server\code\ExileServer_object_construction_network_swapConstructionRequest.sqf'], + ['ExileServer_object_construction_network_upgradeConstructionRequest', 'exile_server\code\ExileServer_object_construction_network_upgradeConstructionRequest.sqf'], + ['ExileServer_object_container_createContainer', 'exile_server\code\ExileServer_object_container_createContainer.sqf'], + ['ExileServer_object_container_packContainer', 'exile_server\code\ExileServer_object_container_packContainer.sqf'], + ['ExileServer_object_container_database_delete', 'exile_server\code\ExileServer_object_container_database_delete.sqf'], + ['ExileServer_object_container_database_insert', 'exile_server\code\ExileServer_object_container_database_insert.sqf'], + ['ExileServer_object_container_database_load', 'exile_server\code\ExileServer_object_container_database_load.sqf'], + ['ExileServer_object_container_database_setPin', 'exile_server\code\ExileServer_object_container_database_setPin.sqf'], + ['ExileServer_object_container_database_update', 'exile_server\code\ExileServer_object_container_database_update.sqf'], + ['ExileServer_object_container_event_onMpKilled', 'exile_server\code\ExileServer_object_container_event_onMpKilled.sqf'], + ['ExileServer_object_container_network_packRequest', 'exile_server\code\ExileServer_object_container_network_packRequest.sqf'], + ['ExileServer_object_flies_spawn', 'exile_server\code\ExileServer_object_flies_spawn.sqf'], + ['ExileServer_object_floodLight_network_toggleFloodLightRequest', 'exile_server\code\ExileServer_object_floodLight_network_toggleFloodLightRequest.sqf'], + ['ExileServer_object_handcuffs_network_breakFreeRequest', 'exile_server\code\ExileServer_object_handcuffs_network_breakFreeRequest.sqf'], + ['ExileServer_object_handcuffs_network_freeRequest', 'exile_server\code\ExileServer_object_handcuffs_network_freeRequest.sqf'], + ['ExileServer_object_handcuffs_network_handcuffRequest', 'exile_server\code\ExileServer_object_handcuffs_network_handcuffRequest.sqf'], + ['ExileServer_object_lock_network_hotwireLockRequest', 'exile_server\code\ExileServer_object_lock_network_hotwireLockRequest.sqf'], + ['ExileServer_object_lock_network_lockToggle', 'exile_server\code\ExileServer_object_lock_network_lockToggle.sqf'], + ['ExileServer_object_lock_network_scanCodeLockRequest', 'exile_server\code\ExileServer_object_lock_network_scanCodeLockRequest.sqf'], + ['ExileServer_object_lock_network_setPin', 'exile_server\code\ExileServer_object_lock_network_setPin.sqf'], + ['ExileServer_object_player_createBambi', 'exile_server\code\ExileServer_object_player_createBambi.sqf'], + ['ExileServer_object_player_sendStatsUpdate', 'exile_server\code\ExileServer_object_player_sendStatsUpdate.sqf'], + ['ExileServer_object_player_database_insert', 'exile_server\code\ExileServer_object_player_database_insert.sqf'], + ['ExileServer_object_player_database_load', 'exile_server\code\ExileServer_object_player_database_load.sqf'], + ['ExileServer_object_player_database_update', 'exile_server\code\ExileServer_object_player_database_update.sqf'], + ['ExileServer_object_player_event_onMpKilled', 'exile_server\code\ExileServer_object_player_event_onMpKilled.sqf'], + ['ExileServer_object_player_network_beginTakeAllRequest', 'exile_server\code\ExileServer_object_player_network_beginTakeAllRequest.sqf'], + ['ExileServer_object_player_network_connectionTest', 'exile_server\code\ExileServer_object_player_network_connectionTest.sqf'], + ['ExileServer_object_player_network_createPlayerRequest', 'exile_server\code\ExileServer_object_player_network_createPlayerRequest.sqf'], + ['ExileServer_object_player_network_endBambiStateRequest', 'exile_server\code\ExileServer_object_player_network_endBambiStateRequest.sqf'], + ['ExileServer_object_player_network_endTakeAllRequest', 'exile_server\code\ExileServer_object_player_network_endTakeAllRequest.sqf'], + ['ExileServer_object_player_network_hasPlayerRequest', 'exile_server\code\ExileServer_object_player_network_hasPlayerRequest.sqf'], + ['ExileServer_object_player_network_hideBodyRequest', 'exile_server\code\ExileServer_object_player_network_hideBodyRequest.sqf'], + ['ExileServer_object_player_network_loadPlayerRequest', 'exile_server\code\ExileServer_object_player_network_loadPlayerRequest.sqf'], + ['ExileServer_object_player_network_resetPlayerRequest', 'exile_server\code\ExileServer_object_player_network_resetPlayerRequest.sqf'], + ['ExileServer_object_player_network_savePlayerRequest', 'exile_server\code\ExileServer_object_player_network_savePlayerRequest.sqf'], + ['ExileServer_object_player_network_setPlayerMoneyRequest', 'exile_server\code\ExileServer_object_player_network_setPlayerMoneyRequest.sqf'], + ['ExileServer_object_player_network_switchMoveRequest', 'exile_server\code\ExileServer_object_player_network_switchMoveRequest.sqf'], + ['ExileServer_object_player_network_updatePlayerIncapacitatedRequest', 'exile_server\code\ExileServer_object_player_network_updatePlayerIncapacitatedRequest.sqf'], + ['ExileServer_object_shippingContainer_network_smashShippingContainerRequest', 'exile_server\code\ExileServer_object_shippingContainer_network_smashShippingContainerRequest.sqf'], + ['ExileServer_object_supplyBox_network_attachSupplyBoxRequest', 'exile_server\code\ExileServer_object_supplyBox_network_attachSupplyBoxRequest.sqf'], + ['ExileServer_object_supplyBox_network_detachSupplyBoxRequest', 'exile_server\code\ExileServer_object_supplyBox_network_detachSupplyBoxRequest.sqf'], + ['ExileServer_object_supplyBox_network_installSupplyBoxRequest', 'exile_server\code\ExileServer_object_supplyBox_network_installSupplyBoxRequest.sqf'], + ['ExileServer_object_tree_network_chopTreeRequest', 'exile_server\code\ExileServer_object_tree_network_chopTreeRequest.sqf'], + ['ExileServer_object_vehicle_carefulCreateVehicle', 'exile_server\code\ExileServer_object_vehicle_carefulCreateVehicle.sqf'], + ['ExileServer_object_vehicle_createNonPersistentVehicle', 'exile_server\code\ExileServer_object_vehicle_createNonPersistentVehicle.sqf'], + ['ExileServer_object_vehicle_createPersistentVehicle', 'exile_server\code\ExileServer_object_vehicle_createPersistentVehicle.sqf'], + ['ExileServer_object_vehicle_remove', 'exile_server\code\ExileServer_object_vehicle_remove.sqf'], + ['ExileServer_object_vehicle_database_delete', 'exile_server\code\ExileServer_object_vehicle_database_delete.sqf'], + ['ExileServer_object_vehicle_database_insert', 'exile_server\code\ExileServer_object_vehicle_database_insert.sqf'], + ['ExileServer_object_vehicle_database_load', 'exile_server\code\ExileServer_object_vehicle_database_load.sqf'], + ['ExileServer_object_vehicle_database_resetCode', 'exile_server\code\ExileServer_object_vehicle_database_resetCode.sqf'], + ['ExileServer_object_vehicle_database_update', 'exile_server\code\ExileServer_object_vehicle_database_update.sqf'], + ['ExileServer_object_vehicle_event_onDamaged', 'exile_server\code\ExileServer_object_vehicle_event_onDamaged.sqf'], + ['ExileServer_object_vehicle_event_onGetIn', 'exile_server\code\ExileServer_object_vehicle_event_onGetIn.sqf'], + ['ExileServer_object_vehicle_event_onGetOut', 'exile_server\code\ExileServer_object_vehicle_event_onGetOut.sqf'], + ['ExileServer_object_vehicle_event_onMPKilled', 'exile_server\code\ExileServer_object_vehicle_event_onMPKilled.sqf'], + ['ExileServer_object_vehicle_network_flipVehRequest', 'exile_server\code\ExileServer_object_vehicle_network_flipVehRequest.sqf'], + ['ExileServer_object_vehicle_network_lockVehicleRequest', 'exile_server\code\ExileServer_object_vehicle_network_lockVehicleRequest.sqf'], + ['ExileServer_object_vehicle_network_pushVehicleRequest', 'exile_server\code\ExileServer_object_vehicle_network_pushVehicleRequest.sqf'], + ['ExileServer_object_vehicle_network_rekeyVehicleDialogRequest', 'exile_server\code\ExileServer_object_vehicle_network_rekeyVehicleDialogRequest.sqf'], + ['ExileServer_object_vehicle_network_rekeyVehicleRequest', 'exile_server\code\ExileServer_object_vehicle_network_rekeyVehicleRequest.sqf'], + ['ExileServer_object_vehicle_network_resetCodeDialogRequest', 'exile_server\code\ExileServer_object_vehicle_network_resetCodeDialogRequest.sqf'], + ['ExileServer_object_vehicle_network_resetCodeRequest', 'exile_server\code\ExileServer_object_vehicle_network_resetCodeRequest.sqf'], + ['ExileServer_object_vehicle_network_rotateVehicleRequest', 'exile_server\code\ExileServer_object_vehicle_network_rotateVehicleRequest.sqf'], + ['ExileServer_object_vehicle_network_setFuelRequest', 'exile_server\code\ExileServer_object_vehicle_network_setFuelRequest.sqf'], + ['ExileServer_object_vehicle_network_unlockVehicleRequest', 'exile_server\code\ExileServer_object_vehicle_network_unlockVehicleRequest.sqf'], + ['ExileServer_system_breaching_network_breachingCancel', 'exile_server\code\ExileServer_system_breaching_network_breachingCancel.sqf'], + ['ExileServer_system_breaching_network_breachingPlaceRequest', 'exile_server\code\ExileServer_system_breaching_network_breachingPlaceRequest.sqf'], + ['ExileServer_system_breaching_network_breachingStart', 'exile_server\code\ExileServer_system_breaching_network_breachingStart.sqf'], + ['ExileServer_system_breaching_network_chargePlanted', 'exile_server\code\ExileServer_system_breaching_network_chargePlanted.sqf'], + ['ExileServer_system_breaching_network_detonateAllCharges', 'exile_server\code\ExileServer_system_breaching_network_detonateAllCharges.sqf'], + ['ExileServer_system_clan_updateClients', 'exile_server\code\ExileServer_system_clan_updateClients.sqf'], + ['ExileServer_system_clan_updateMarkers', 'exile_server\code\ExileServer_system_clan_updateMarkers.sqf'], + ['ExileServer_system_clan_updatePolys', 'exile_server\code\ExileServer_system_clan_updatePolys.sqf'], + ['ExileServer_system_clan_database_load', 'exile_server\code\ExileServer_system_clan_database_load.sqf'], + ['ExileServer_system_clan_network_addMarkerRequest', 'exile_server\code\ExileServer_system_clan_network_addMarkerRequest.sqf'], + ['ExileServer_system_clan_network_addPolyRequest', 'exile_server\code\ExileServer_system_clan_network_addPolyRequest.sqf'], + ['ExileServer_system_clan_network_inviteToClanRequest', 'exile_server\code\ExileServer_system_clan_network_inviteToClanRequest.sqf'], + ['ExileServer_system_clan_network_inviteToClanRequestClientResponse', 'exile_server\code\ExileServer_system_clan_network_inviteToClanRequestClientResponse.sqf'], + ['ExileServer_system_clan_network_kickClanPlayerRequest', 'exile_server\code\ExileServer_system_clan_network_kickClanPlayerRequest.sqf'], + ['ExileServer_system_clan_network_leaveClanRequest', 'exile_server\code\ExileServer_system_clan_network_leaveClanRequest.sqf'], + ['ExileServer_system_clan_network_registerClanRequest', 'exile_server\code\ExileServer_system_clan_network_registerClanRequest.sqf'], + ['ExileServer_system_clan_network_removeMarkerRequest', 'exile_server\code\ExileServer_system_clan_network_removeMarkerRequest.sqf'], + ['ExileServer_system_database_connect', 'exile_server\code\ExileServer_system_database_connect.sqf'], + ['ExileServer_system_database_handleBig', 'exile_server\code\ExileServer_system_database_handleBig.sqf'], + ['ExileServer_system_database_query_fireAndForget', 'exile_server\code\ExileServer_system_database_query_fireAndForget.sqf'], + ['ExileServer_system_database_query_insertSingle', 'exile_server\code\ExileServer_system_database_query_insertSingle.sqf'], + ['ExileServer_system_database_query_selectFull', 'exile_server\code\ExileServer_system_database_query_selectFull.sqf'], + ['ExileServer_system_database_query_selectSingle', 'exile_server\code\ExileServer_system_database_query_selectSingle.sqf'], + ['ExileServer_system_database_query_selectSingleField', 'exile_server\code\ExileServer_system_database_query_selectSingleField.sqf'], + ['ExileServer_system_event_initialize', 'exile_server\code\ExileServer_system_event_initialize.sqf'], + ['ExileServer_system_event_abandonedSafe_start', 'exile_server\code\ExileServer_system_event_abandonedSafe_start.sqf'], + ['ExileServer_system_event_ambientFlyOver_start', 'exile_server\code\ExileServer_system_event_ambientFlyOver_start.sqf'], + ['ExileServer_system_event_earthQuake_start', 'exile_server\code\ExileServer_system_event_earthQuake_start.sqf'], + ['ExileServer_system_event_supplyBox_start', 'exile_server\code\ExileServer_system_event_supplyBox_start.sqf'], + ['ExileServer_system_event_thread_spawn', 'exile_server\code\ExileServer_system_event_thread_spawn.sqf'], + ['ExileServer_system_garbageCollector_cleanDatabase', 'exile_server\code\ExileServer_system_garbageCollector_cleanDatabase.sqf'], + ['ExileServer_system_garbageCollector_deleteObject', 'exile_server\code\ExileServer_system_garbageCollector_deleteObject.sqf'], + ['ExileServer_system_garbageCollector_start', 'exile_server\code\ExileServer_system_garbageCollector_start.sqf'], + ['ExileServer_system_garbageCollector_unscheduled_deleteAllDead', 'exile_server\code\ExileServer_system_garbageCollector_unscheduled_deleteAllDead.sqf'], + ['ExileServer_system_garbageCollector_unscheduled_deleteGroundWeaponHolders', 'exile_server\code\ExileServer_system_garbageCollector_unscheduled_deleteGroundWeaponHolders.sqf'], + ['ExileServer_system_garbageCollector_unscheduled_deleteGroups', 'exile_server\code\ExileServer_system_garbageCollector_unscheduled_deleteGroups.sqf'], + ['ExileServer_system_garbageCollector_unscheduled_deleteLoot', 'exile_server\code\ExileServer_system_garbageCollector_unscheduled_deleteLoot.sqf'], + ['ExileServer_system_garbageCollector_unscheduled_deleteWeaponHolderSimulated', 'exile_server\code\ExileServer_system_garbageCollector_unscheduled_deleteWeaponHolderSimulated.sqf'], + ['ExileServer_system_locker_network_lockerDepositRequest', 'exile_server\code\ExileServer_system_locker_network_lockerDepositRequest.sqf'], + ['ExileServer_system_locker_network_lockerWithdrawRequest', 'exile_server\code\ExileServer_system_locker_network_lockerWithdrawRequest.sqf'], + ['ExileServer_system_lootManager_dropItem', 'exile_server\code\ExileServer_system_lootManager_dropItem.sqf'], + ['ExileServer_system_lootManager_initialize', 'exile_server\code\ExileServer_system_lootManager_initialize.sqf'], + ['ExileServer_system_lootManager_spawnLootInBuilding', 'exile_server\code\ExileServer_system_lootManager_spawnLootInBuilding.sqf'], + ['ExileServer_system_lootManager_network_spawnLootRequest', 'exile_server\code\ExileServer_system_lootManager_network_spawnLootRequest.sqf'], + ['ExileServer_system_money_network_putMoneyRequest', 'exile_server\code\ExileServer_system_money_network_putMoneyRequest.sqf'], + ['ExileServer_system_money_network_takeMoneyRequest', 'exile_server\code\ExileServer_system_money_network_takeMoneyRequest.sqf'], + ['ExileServer_system_network_dispatchIncomingMessage', 'exile_server\code\ExileServer_system_network_dispatchIncomingMessage.sqf'], + ['ExileServer_system_network_setupEventHandlers', 'exile_server\code\ExileServer_system_network_setupEventHandlers.sqf'], + ['ExileServer_system_network_event_onHandleDisconnect', 'exile_server\code\ExileServer_system_network_event_onHandleDisconnect.sqf'], + ['ExileServer_system_network_event_onPlayerConnected', 'exile_server\code\ExileServer_system_network_event_onPlayerConnected.sqf'], + ['ExileServer_system_network_event_onPlayerDisconnected', 'exile_server\code\ExileServer_system_network_event_onPlayerDisconnected.sqf'], + ['ExileServer_system_network_send_broadcast', 'exile_server\code\ExileServer_system_network_send_broadcast.sqf'], + ['ExileServer_system_network_send_to', 'exile_server\code\ExileServer_system_network_send_to.sqf'], + ['ExileServer_system_party_network_inviteToPartyRequest', 'exile_server\code\ExileServer_system_party_network_inviteToPartyRequest.sqf'], + ['ExileServer_system_party_network_kickFromPartyRequest', 'exile_server\code\ExileServer_system_party_network_kickFromPartyRequest.sqf'], + ['ExileServer_system_party_network_updateMyPartyMarkerRequest', 'exile_server\code\ExileServer_system_party_network_updateMyPartyMarkerRequest.sqf'], + ['ExileServer_system_playerSaveQueue_initialize', 'exile_server\code\ExileServer_system_playerSaveQueue_initialize.sqf'], + ['ExileServer_system_playerSaveQueue_thread_savePlayer', 'exile_server\code\ExileServer_system_playerSaveQueue_thread_savePlayer.sqf'], + ['ExileServer_system_process_noobFilter', 'exile_server\code\ExileServer_system_process_noobFilter.sqf'], + ['ExileServer_system_process_postInit', 'exile_server\code\ExileServer_system_process_postInit.sqf'], + ['ExileServer_system_process_preInit', 'exile_server\code\ExileServer_system_process_preInit.sqf'], + ['ExileServer_system_rcon_initialize', 'exile_server\code\ExileServer_system_rcon_initialize.sqf'], + ['ExileServer_system_rcon_setupEvents', 'exile_server\code\ExileServer_system_rcon_setupEvents.sqf'], + ['ExileServer_system_rcon_event_clearBuffers', 'exile_server\code\ExileServer_system_rcon_event_clearBuffers.sqf'], + ['ExileServer_system_rcon_event_kickAll', 'exile_server\code\ExileServer_system_rcon_event_kickAll.sqf'], + ['ExileServer_system_rcon_event_kickAllrestart', 'exile_server\code\ExileServer_system_rcon_event_kickAllrestart.sqf'], + ['ExileServer_system_rcon_event_ready', 'exile_server\code\ExileServer_system_rcon_event_ready.sqf'], + ['ExileServer_system_rcon_event_sendCommand', 'exile_server\code\ExileServer_system_rcon_event_sendCommand.sqf'], + ['ExileServer_system_rcon_thread_check', 'exile_server\code\ExileServer_system_rcon_thread_check.sqf'], + ['ExileServer_system_russianRoulette_broadcastGameStatus', 'exile_server\code\ExileServer_system_russianRoulette_broadcastGameStatus.sqf'], + ['ExileServer_system_russianRoulette_initialize', 'exile_server\code\ExileServer_system_russianRoulette_initialize.sqf'], + ['ExileServer_system_russianRoulette_letNextPlayerFire', 'exile_server\code\ExileServer_system_russianRoulette_letNextPlayerFire.sqf'], + ['ExileServer_system_russianRoulette_startGame', 'exile_server\code\ExileServer_system_russianRoulette_startGame.sqf'], + ['ExileServer_system_russianRoulette_event_onPlayerDied', 'exile_server\code\ExileServer_system_russianRoulette_event_onPlayerDied.sqf'], + ['ExileServer_system_russianRoulette_event_onPlayerDisconnected', 'exile_server\code\ExileServer_system_russianRoulette_event_onPlayerDisconnected.sqf'], + ['ExileServer_system_russianRoulette_event_onPlayerJoined', 'exile_server\code\ExileServer_system_russianRoulette_event_onPlayerJoined.sqf'], + ['ExileServer_system_russianRoulette_event_onPlayerLeft', 'exile_server\code\ExileServer_system_russianRoulette_event_onPlayerLeft.sqf'], + ['ExileServer_system_russianRoulette_event_onPlayerWin', 'exile_server\code\ExileServer_system_russianRoulette_event_onPlayerWin.sqf'], + ['ExileServer_system_russianRoulette_network_fireRussianRouletteRevolverResponse', 'exile_server\code\ExileServer_system_russianRoulette_network_fireRussianRouletteRevolverResponse.sqf'], + ['ExileServer_system_russianRoulette_network_joinRussianRouletteRequest', 'exile_server\code\ExileServer_system_russianRoulette_network_joinRussianRouletteRequest.sqf'], + ['ExileServer_system_russianRoulette_network_leaveRussianRouletteRequest', 'exile_server\code\ExileServer_system_russianRoulette_network_leaveRussianRouletteRequest.sqf'], + ['ExileServer_system_russianRoulette_network_requestJoinRussianRouletteDialogRequest', 'exile_server\code\ExileServer_system_russianRoulette_network_requestJoinRussianRouletteDialogRequest.sqf'], + ['ExileServer_system_session_begin', 'exile_server\code\ExileServer_system_session_begin.sqf'], + ['ExileServer_system_session_createId', 'exile_server\code\ExileServer_system_session_createId.sqf'], + ['ExileServer_system_session_end', 'exile_server\code\ExileServer_system_session_end.sqf'], + ['ExileServer_system_session_getPlayerObject', 'exile_server\code\ExileServer_system_session_getPlayerObject.sqf'], + ['ExileServer_system_session_isRegisteredId', 'exile_server\code\ExileServer_system_session_isRegisteredId.sqf'], + ['ExileServer_system_session_update', 'exile_server\code\ExileServer_system_session_update.sqf'], + ['ExileServer_system_session_network_startSessionRequest', 'exile_server\code\ExileServer_system_session_network_startSessionRequest.sqf'], + ['ExileServer_system_session_network_updateSessionRequest', 'exile_server\code\ExileServer_system_session_network_updateSessionRequest.sqf'], + ['ExileServer_system_simulationMonitor_addVehicle', 'exile_server\code\ExileServer_system_simulationMonitor_addVehicle.sqf'], + ['ExileServer_system_simulationMonitor_initialize', 'exile_server\code\ExileServer_system_simulationMonitor_initialize.sqf'], + ['ExileServer_system_simulationMonitor_removeVehicle', 'exile_server\code\ExileServer_system_simulationMonitor_removeVehicle.sqf'], + ['ExileServer_system_simulationMonitor_network_enableSimulationRequest', 'exile_server\code\ExileServer_system_simulationMonitor_network_enableSimulationRequest.sqf'], + ['ExileServer_system_simulationMonitor_thread_toggleSimulation', 'exile_server\code\ExileServer_system_simulationMonitor_thread_toggleSimulation.sqf'], + ['ExileServer_system_slothMachine_network_slothMachineRequest', 'exile_server\code\ExileServer_system_slothMachine_network_slothMachineRequest.sqf'], + ['ExileServer_system_swapOwnershipQueue_add', 'exile_server\code\ExileServer_system_swapOwnershipQueue_add.sqf'], + ['ExileServer_system_swapOwnershipQueue_initialize', 'exile_server\code\ExileServer_system_swapOwnershipQueue_initialize.sqf'], + ['ExileServer_system_swapOwnershipQueue_thread_dispatchQueue', 'exile_server\code\ExileServer_system_swapOwnershipQueue_thread_dispatchQueue.sqf'], + ['ExileServer_system_territory_create', 'exile_server\code\ExileServer_system_territory_create.sqf'], + ['ExileServer_system_territory_updateNearConstructions', 'exile_server\code\ExileServer_system_territory_updateNearConstructions.sqf'], + ['ExileServer_system_territory_updateNearContainers', 'exile_server\code\ExileServer_system_territory_updateNearContainers.sqf'], + ['ExileServer_system_territory_updateNumberOfConstructions', 'exile_server\code\ExileServer_system_territory_updateNumberOfConstructions.sqf'], + ['ExileServer_system_territory_updateRights', 'exile_server\code\ExileServer_system_territory_updateRights.sqf'], + ['ExileServer_system_territory_database_insert', 'exile_server\code\ExileServer_system_territory_database_insert.sqf'], + ['ExileServer_system_territory_database_load', 'exile_server\code\ExileServer_system_territory_database_load.sqf'], + ['ExileServer_system_territory_maintenance_recalculateDueDate', 'exile_server\code\ExileServer_system_territory_maintenance_recalculateDueDate.sqf'], + ['ExileServer_system_territory_network_addToTerritoryRequest', 'exile_server\code\ExileServer_system_territory_network_addToTerritoryRequest.sqf'], + ['ExileServer_system_territory_network_flagStolenRequest', 'exile_server\code\ExileServer_system_territory_network_flagStolenRequest.sqf'], + ['ExileServer_system_territory_network_moderationTerritoryRequest', 'exile_server\code\ExileServer_system_territory_network_moderationTerritoryRequest.sqf'], + ['ExileServer_system_territory_network_payFlagRansomRequest', 'exile_server\code\ExileServer_system_territory_network_payFlagRansomRequest.sqf'], + ['ExileServer_system_territory_network_payTerritoryProtectionMoneyRequest', 'exile_server\code\ExileServer_system_territory_network_payTerritoryProtectionMoneyRequest.sqf'], + ['ExileServer_system_territory_network_purchaseTerritory', 'exile_server\code\ExileServer_system_territory_network_purchaseTerritory.sqf'], + ['ExileServer_system_territory_network_removeFromTerritoryRequest', 'exile_server\code\ExileServer_system_territory_network_removeFromTerritoryRequest.sqf'], + ['ExileServer_system_territory_network_requestTerritoryUpgradeDialog', 'exile_server\code\ExileServer_system_territory_network_requestTerritoryUpgradeDialog.sqf'], + ['ExileServer_system_territory_network_restoreFlagRequest', 'exile_server\code\ExileServer_system_territory_network_restoreFlagRequest.sqf'], + ['ExileServer_system_territory_network_territoryUpgradeRequest', 'exile_server\code\ExileServer_system_territory_network_territoryUpgradeRequest.sqf'], + ['ExileServer_system_thread_addTask', 'exile_server\code\ExileServer_system_thread_addTask.sqf'], + ['ExileServer_system_thread_initialize', 'exile_server\code\ExileServer_system_thread_initialize.sqf'], + ['ExileServer_system_thread_removeTask', 'exile_server\code\ExileServer_system_thread_removeTask.sqf'], + ['ExileServer_system_thread_threadAdjust', 'exile_server\code\ExileServer_system_thread_threadAdjust.sqf'], + ['ExileServer_system_trading_network_purchaseItemRequest', 'exile_server\code\ExileServer_system_trading_network_purchaseItemRequest.sqf'], + ['ExileServer_system_trading_network_purchaseVehicleRequest', 'exile_server\code\ExileServer_system_trading_network_purchaseVehicleRequest.sqf'], + ['ExileServer_system_trading_network_purchaseVehicleSkinRequest', 'exile_server\code\ExileServer_system_trading_network_purchaseVehicleSkinRequest.sqf'], + ['ExileServer_system_trading_network_sellItemRequest', 'exile_server\code\ExileServer_system_trading_network_sellItemRequest.sqf'], + ['ExileServer_system_trading_network_wasteDumpRequest', 'exile_server\code\ExileServer_system_trading_network_wasteDumpRequest.sqf'], + ['ExileServer_system_vehicleSaveQueue_addVehicle', 'exile_server\code\ExileServer_system_vehicleSaveQueue_addVehicle.sqf'], + ['ExileServer_system_vehicleSaveQueue_initialize', 'exile_server\code\ExileServer_system_vehicleSaveQueue_initialize.sqf'], + ['ExileServer_system_vehicleSaveQueue_removeVehicle', 'exile_server\code\ExileServer_system_vehicleSaveQueue_removeVehicle.sqf'], + ['ExileServer_system_vehicleSaveQueue_network_vehicleSaveRequest', 'exile_server\code\ExileServer_system_vehicleSaveQueue_network_vehicleSaveRequest.sqf'], + ['ExileServer_system_vehicleSaveQueue_thread_saveVehicles', 'exile_server\code\ExileServer_system_vehicleSaveQueue_thread_saveVehicles.sqf'], + ['ExileServer_system_weather_initialize', 'exile_server\code\ExileServer_system_weather_initialize.sqf'], + ['ExileServer_system_weather_thread_weatherSimulation', 'exile_server\code\ExileServer_system_weather_thread_weatherSimulation.sqf'], + ['ExileServer_system_xm8_send', 'exile_server\code\ExileServer_system_xm8_send.sqf'], + ['ExileServer_system_xm8_sendBaseRaid', 'exile_server\code\ExileServer_system_xm8_sendBaseRaid.sqf'], + ['ExileServer_system_xm8_sendFlagRestored', 'exile_server\code\ExileServer_system_xm8_sendFlagRestored.sqf'], + ['ExileServer_system_xm8_sendFlagStolen', 'exile_server\code\ExileServer_system_xm8_sendFlagStolen.sqf'], + ['ExileServer_system_xm8_sendProtectionMoneyDue', 'exile_server\code\ExileServer_system_xm8_sendProtectionMoneyDue.sqf'], + ['ExileServer_system_xm8_sendProtectionMoneyPaid', 'exile_server\code\ExileServer_system_xm8_sendProtectionMoneyPaid.sqf'], + ['ExileServer_util_getFragKiller', 'exile_server\code\ExileServer_util_getFragKiller.sqf'], + ['ExileServer_util_getFragPerks', 'exile_server\code\ExileServer_util_getFragPerks.sqf'], + ['ExileServer_util_getFragType', 'exile_server\code\ExileServer_util_getFragType.sqf'], + ['ExileServer_util_getItemCargo', 'exile_server\code\ExileServer_util_getItemCargo.sqf'], + ['ExileServer_util_getObjectContainerCargo', 'exile_server\code\ExileServer_util_getObjectContainerCargo.sqf'], + ['ExileServer_util_log', 'exile_server\code\ExileServer_util_log.sqf'], + ['ExileServer_util_setDamageTexture', 'exile_server\code\ExileServer_util_setDamageTexture.sqf'], + ['ExileServer_util_extDB2_createMessage', 'exile_server\code\ExileServer_util_extDB2_createMessage.sqf'], + ['ExileServer_util_fill_fillContainers', 'exile_server\code\ExileServer_util_fill_fillContainers.sqf'], + ['ExileServer_util_fill_fillItems', 'exile_server\code\ExileServer_util_fill_fillItems.sqf'], + ['ExileServer_util_fill_fillMagazines', 'exile_server\code\ExileServer_util_fill_fillMagazines.sqf'], + ['ExileServer_util_fill_fillWeapons', 'exile_server\code\ExileServer_util_fill_fillWeapons.sqf'], + ['ExileServer_util_time_addTime', 'exile_server\code\ExileServer_util_time_addTime.sqf'], + ['ExileServer_util_time_currentTime', 'exile_server\code\ExileServer_util_time_currentTime.sqf'], + ['ExileServer_util_time_toArma', 'exile_server\code\ExileServer_util_time_toArma.sqf'], + ['ExileServer_util_time_toMinutes', 'exile_server\code\ExileServer_util_time_toMinutes.sqf'], + ['ExileServer_util_time_uptime', 'exile_server\code\ExileServer_util_time_uptime.sqf'], + ['ExileServer_world_calculateVehicleGrid', 'exile_server\code\ExileServer_world_calculateVehicleGrid.sqf'], + ['ExileServer_world_initialize', 'exile_server\code\ExileServer_world_initialize.sqf'], + ['ExileServer_world_loadAllClans', 'exile_server\code\ExileServer_world_loadAllClans.sqf'], + ['ExileServer_world_loadAllDatabaseConstructions', 'exile_server\code\ExileServer_world_loadAllDatabaseConstructions.sqf'], + ['ExileServer_world_loadAllDatabaseContainers', 'exile_server\code\ExileServer_world_loadAllDatabaseContainers.sqf'], + ['ExileServer_world_loadAllDatabaseVehicles', 'exile_server\code\ExileServer_world_loadAllDatabaseVehicles.sqf'], + ['ExileServer_world_loadAllTerritories', 'exile_server\code\ExileServer_world_loadAllTerritories.sqf'], + ['ExileServer_world_spawnSpawnZoneVehicles', 'exile_server\code\ExileServer_world_spawnSpawnZoneVehicles.sqf'], + ['ExileServer_world_spawnVehicles', 'exile_server\code\ExileServer_world_spawnVehicles.sqf'] +]; + +call ExileServer_system_process_preInit; + +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_object_bush_network_chopBushRequest.sqf b/@exileserver/addons/exile_server/code/ExileServer_object_bush_network_chopBushRequest.sqf new file mode 100644 index 0000000..439edf2 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_object_bush_network_chopBushRequest.sqf @@ -0,0 +1,50 @@ +/** + * ExileServer_object_bush_network_chopBushRequest + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_sessionId","_parameters","_bushNetId","_bush","_isBush","_bushModelNames","_newDamage","_weaponHolderPosition","_weaponHolder"]; +_sessionId = _this select 0; +_parameters = _this select 1; +_bushNetId = _parameters select 0; +_bush = objectFromNetId _bushNetId; +if (!isNull _bush) then +{ + _isBush = false; + _bushModelNames = getArray(missionConfigFile >> "CfgInteractionModels" >> "BushSource" >> "models"); + { + if !(((str _bush) find _x) isEqualTo -1)exitWith {_isBush = true}; + } + forEach _bushModelNames; + if (_isBush) then + { + if (alive _bush) then + { + _newDamage = ((damage _bush) + 0.1) min 1; + _bush setDamage _newDamage; + if (_newDamage isEqualTo 1) then + { + _bush setDamage 999; + _weaponHolderPosition = [getPosATL _bush, 3] call ExileClient_util_math_getRandomPositionInCircle; + _weaponHolderPosition set [2, 0]; + _weaponHolder = createVehicle ["GroundWeaponHolder", _weaponHolderPosition, [], 0, "CAN_COLLIDE"]; + _weaponHolder setPosATL _weaponHolderPosition; + if ((random 100) < 50) then + { + _weaponHolder addMagazineCargoGlobal ["Exile_Item_WoodSticks", 1]; + } + else + { + _weaponHolder addMagazineCargoGlobal ["Exile_Item_Leaves", 1]; + }; + }; + }; + }; +}; +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_object_concreteMixer_mixingProcess.sqf b/@exileserver/addons/exile_server/code/ExileServer_object_concreteMixer_mixingProcess.sqf new file mode 100644 index 0000000..f9c8831 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_object_concreteMixer_mixingProcess.sqf @@ -0,0 +1,32 @@ +/** + * ExileServer_object_concreteMixer_mixingProcess + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_concreteMixer","_recipeClassName","_weaponHolderPosition","_weaponHolder"]; +_concreteMixer = _this select 0; +_recipeClassName = _this select 1; +playSound3D ["exile_assets\sound\Exile_ConcreteMixer01.wss", _concreteMixer, false, getPosASL _concreteMixer, 4, 1, 50]; +_concreteMixer setVariable ["IsMixing", true]; +_concreteMixer animateSource ["SpinSource", 0, true]; +_concreteMixer animateSource ["SpinSource", 1, false]; +uiSleep 5; +["concreteMixerAddSmokeRequest", [netId _concreteMixer]] call ExileServer_system_network_send_broadcast; +uisleep 50; +["concreteMixerRemoveSmokeRequest", [netId _concreteMixer]] call ExileServer_system_network_send_broadcast; +uiSleep 5; +_weaponHolderPosition = _concreteMixer modelToWorld [1, 0, 0]; +_weaponHolderPosition set [2, 0]; +_weaponHolder = createVehicle ["GroundWeaponHolder", _weaponHolderPosition, [], 0, "CAN_COLLIDE"]; +_weaponHolder setPosATL _weaponHolderPosition; +{ + _weaponHolder addMagazineCargoGlobal [_x select 1, _x select 0]; +} +forEach getArray (missionConfigFile >> "CfgCraftingRecipes" >> _recipeClassName >> "returnedItems"); +_concreteMixer setVariable ["IsMixing", false]; diff --git a/@exileserver/addons/exile_server/code/ExileServer_object_concreteMixer_network_concreteMixerStartRequest.sqf b/@exileserver/addons/exile_server/code/ExileServer_object_concreteMixer_network_concreteMixerStartRequest.sqf new file mode 100644 index 0000000..cbe25f8 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_object_concreteMixer_network_concreteMixerStartRequest.sqf @@ -0,0 +1,77 @@ +/** + * ExileServer_object_concreteMixer_network_concreteMixerStartRequest + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_sessionID","_parameters","_concreteMixerNetID","_recipeClassName","_player","_concreteMixer","_recipeConfig","_components","_equippedMagazines","_hasAllComponents","_componentQuantity","_componentItemClassName","_equippedComponentQuantity","_i"]; +_sessionID = _this select 0; +_parameters = _this select 1; +_concreteMixerNetID = _parameters select 0; +_recipeClassName = _parameters select 1; +try +{ + _player = _sessionID call ExileServer_system_session_getPlayerObject; + if (isNull _player) then + { + throw "Unknown player!"; + }; + if !(alive _player) then + { + throw "The dead cannot use the concrete mixer!"; + }; + _concreteMixer = objectFromNetid _concreteMixerNetID; + if (isNull _concreteMixer) then + { + throw "Unknown concrete mixer!"; + }; + if (_concreteMixer getVariable ["IsMixing", false]) then + { + throw "Concrete mixer is already in use!"; + }; + if ((_player distance _concreteMixer) > 10) then + { + throw "No long distance mixing!"; + }; + if !(isClass (missionConfigFile >> "CfgCraftingRecipes" >> _recipeClassName)) then + { + throw "Invalid mixing recipe!"; + }; + _recipeConfig = missionConfigFile >> "CfgCraftingRecipes" >> _recipeClassName; + _components = getArray(_recipeConfig >> "components"); + _equippedMagazines = magazines _player; + _hasAllComponents = true; + { + _componentQuantity = _x select 0; + _componentItemClassName = _x select 1; + _equippedComponentQuantity = { _x == _componentItemClassName } count _equippedMagazines; + if (_equippedComponentQuantity < _componentQuantity ) then + { + _hasAllComponents = false; + }; + } + forEach _components; + if !(_hasAllComponents) then + { + throw "Missing components!"; + }; + { + _componentQuantity = _x select 0; + _componentItemClassName = _x select 1; + for "_i" from 1 to _componentQuantity do + { + _player removeItem _componentItemClassName; + }; + } + forEach _components; + [_concreteMixer, _recipeClassName] spawn ExileServer_object_concreteMixer_mixingProcess; +} +catch +{ + [_sessionID, "toastRequest", ["ErrorTitleOnly", [_exception]]] call ExileServer_system_network_send_to; +}; \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_object_construction_database_delete.sqf b/@exileserver/addons/exile_server/code/ExileServer_object_construction_database_delete.sqf new file mode 100644 index 0000000..f14e0c8 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_object_construction_database_delete.sqf @@ -0,0 +1,19 @@ +/** + * ExileServer_object_construction_database_delete + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_constructionObject","_constructionID"]; +_constructionObject = _this; +_constructionID = _constructionObject getVariable ["ExileDatabaseID", -1]; +if (_constructionID > -1) then +{ + format ["deleteConstruction:%1", _constructionID] call ExileServer_system_database_query_fireAndForget; +}; +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_object_construction_database_insert.sqf b/@exileserver/addons/exile_server/code/ExileServer_object_construction_database_insert.sqf new file mode 100644 index 0000000..bcfd34a --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_object_construction_database_insert.sqf @@ -0,0 +1,38 @@ +/** + * ExileServer_object_construction_database_insert + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_constructionObject","_position","_vectorDirection","_vectorUp","_territoryFlag","_territoryID","_data","_extDB2Message","_constructionID"]; +_constructionObject = _this; +_position = getPosATL _constructionObject; +_vectorDirection = vectorDir _constructionObject; +_vectorUp = vectorUp _constructionObject; +_territoryFlag = _constructionObject call ExileClient_util_world_getTerritoryAtPosition; +_territoryID = if (isNull _territoryFlag) then { 'NULL' } else { _territoryFlag getVariable ["ExileDatabaseID", 'NULL']}; +_data = +[ + typeOf _constructionObject, + _constructionObject getVariable ["ExileOwnerUID", ""], + _position select 0, + _position select 1, + _position select 2, + _vectorDirection select 0, + _vectorDirection select 1, + _vectorDirection select 2, + _vectorUp select 0, + _vectorUp select 1, + _vectorUp select 2, + _territoryID +]; +_extDB2Message = ["insertConstruction", _data] call ExileServer_util_extDB2_createMessage; +_constructionID = _extDB2Message call ExileServer_system_database_query_insertSingle; +_constructionObject setVariable ["ExileDatabaseID", _constructionID]; +_constructionObject setVariable ["ExileTerritoryID", _territoryID]; +_constructionID \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_object_construction_database_load.sqf b/@exileserver/addons/exile_server/code/ExileServer_object_construction_database_load.sqf new file mode 100644 index 0000000..182d204 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_object_construction_database_load.sqf @@ -0,0 +1,52 @@ +/** + * ExileServer_object_construction_database_load + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_constructionID","_data","_position","_vectorDirection","_vectorUp","_constructionObject","_damageLevel","_public","_pinCode"]; +_constructionID = _this; +_data = format ["loadConstruction:%1", _constructionID] call ExileServer_system_database_query_selectSingle; +_position = [_data select 4, _data select 5, _data select 6]; +_vectorDirection = [_data select 7, _data select 8, _data select 9]; +_vectorUp = [_data select 10, _data select 11, _data select 12]; +_constructionObject = createVehicle [(_data select 1), _position, [], 0, "CAN_COLLIDE"]; +_constructionObject setPosATL _position; +_constructionObject setVectorDirAndUp [_vectorDirection, _vectorUp]; +_constructionObject setVariable ["ExileDatabaseID", (_data select 0)]; +_constructionObject setVariable ["ExileOwnerUID", (_data select 2)]; +_constructionObject setVariable ["ExileIsPersistent", true]; +_constructionObject setVariable ["ExileTerritoryID", (_data select 15)]; +_damageLevel = (_data select 17); +_public = _damageLevel > 0; +_constructionObject setVariable ["ExileConstructionDamage",_damageLevel,_public]; +if(_public)then +{ + _constructionObject call ExileServer_util_setDamageTexture; +}; +_pinCode = _data select 14; +if !(_pinCode isEqualTo "000000") then +{ + _constructionObject setVariable ["ExileAccessCode", _pinCode]; + _constructionObject setVariable ["ExileIsLocked", (_data select 13), true]; +}; +if (getNumber(configFile >> "CfgVehicles" >> (_data select 1) >> "exileRequiresSimulation") isEqualTo 1) then +{ + _constructionObject enableSimulationGlobal true; + _constructionObject call ExileServer_system_simulationMonitor_addVehicle; +} +else +{ + _constructionObject enableSimulationGlobal false; +}; +_constructionObject setVelocity [0, 0, 0]; +_constructionObject setPosATL _position; +_constructionObject setVelocity [0, 0, 0]; +_constructionObject setVectorDirAndUp [_vectorDirection, _vectorUp]; +_constructionObject setVelocity [0, 0, 0]; +_constructionObject diff --git a/@exileserver/addons/exile_server/code/ExileServer_object_construction_database_lockUpdate.sqf b/@exileserver/addons/exile_server/code/ExileServer_object_construction_database_lockUpdate.sqf new file mode 100644 index 0000000..e7db22c --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_object_construction_database_lockUpdate.sqf @@ -0,0 +1,17 @@ +/** + * ExileServer_object_construction_database_lockUpdate + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_door","_databaseID","_lock"]; +_door = _this; +_databaseID = _door getVariable ["ExileDatabaseID",0]; +_lock = _door getVariable ["ExileIsLocked",1]; +format ["updateLock:%1:%2",_lock,_databaseID] call ExileServer_system_database_query_fireAndForget; +true diff --git a/@exileserver/addons/exile_server/code/ExileServer_object_construction_event_onMpKilled.sqf b/@exileserver/addons/exile_server/code/ExileServer_object_construction_event_onMpKilled.sqf new file mode 100644 index 0000000..fcecb60 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_object_construction_event_onMpKilled.sqf @@ -0,0 +1,15 @@ +/** + * ExileServer_object_construction_event_onMpKilled + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_object"]; +_object = _this; +_object call ExileServer_object_construction_database_delete; +deleteVehicle _object; \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_object_construction_network_addLockRequest.sqf b/@exileserver/addons/exile_server/code/ExileServer_object_construction_network_addLockRequest.sqf new file mode 100644 index 0000000..5ca51ea --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_object_construction_network_addLockRequest.sqf @@ -0,0 +1,54 @@ +/** + * ExileServer_object_construction_network_addLockRequest + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_sessionID","_paramaters","_door","_pincode","_playerObject","_databaseID"]; +_sessionID = _this select 0; +_paramaters = _this select 1; +_door = _paramaters select 0; +_pincode = _paramaters select 1; +try +{ + _playerObject = _sessionID call ExileServer_system_session_getPlayerObject; + if !("Exile_Item_Codelock" in (magazines _playerObject)) then + { + throw "No can do."; + }; + if !(isNumber(configFile >> "CfgVehicles" >> (typeOf _door) >> "exileIsDoor")) then + { + throw "Really no can do."; + }; + if !((_door getVariable ["ExileIsLocked",""]) isEqualTo "") then + { + throw "Really really no can do."; + }; + if !((count _pincode) isEqualTo 4) then + { + throw "Invalid PIN. Please try again."; + }; + if ((_door animationPhase 'DoorRotation') > 0.5) then + { + throw "Please close the door first."; + }; + _databaseID = _door getVariable ["ExileDatabaseID",0]; + if(_databaseID isEqualTo 0) then + { + throw "Smt went goof"; + }; + _door setVariable ["ExileIsLocked",-1,true]; + _door setVariable ["ExileAccessCode",_pincode]; + format ["addDoorLock:%1:%2",_pincode,_databaseID] call ExileServer_system_database_query_fireAndForget; + [_sessionID,"addLockResponse",[_pincode]] call ExileServer_system_network_send_to; +} +catch +{ + [_sessionID, "toastRequest", ["ErrorTitleAndText", ["Failed to add lock!", _exception]]] call ExileServer_system_network_send_to; + _exception call ExileServer_util_log; +}; \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_object_construction_network_buildConstructionRequest.sqf b/@exileserver/addons/exile_server/code/ExileServer_object_construction_network_buildConstructionRequest.sqf new file mode 100644 index 0000000..d55af9c --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_object_construction_network_buildConstructionRequest.sqf @@ -0,0 +1,83 @@ +/** + * ExileServer_object_construction_network_buildConstructionRequest + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_sessionID","_parameters","_objectClassName","_objectPosition","_playerObject","_constructionConfig","_canBuildHereResult","_object"]; +_sessionID = _this select 0; +_parameters = _this select 1; +_objectClassName = _parameters select 0; +_objectPosition = _parameters select 1; +try +{ + _playerObject = _sessionID call ExileServer_system_session_getPlayerObject; + if (isNull _playerObject) then + { + throw "Player object is null!"; + }; + _constructionConfig = ("getText(_x >> 'previewObject') == _objectClassName" configClasses(configFile >> "CfgConstruction")) select 0; + _canBuildHereResult = [configName _constructionConfig, (ASLtoAGL (ATLtoASL _objectPosition)), getPlayerUID _playerObject] call ExileClient_util_world_canBuildHere; + switch (_canBuildHereResult) do + { + case 1: + { + throw "You are not in your territory."; + }; + case 11: + { + throw "You are too close to a concrete mixer."; + }; + case 10: + { + throw "Building is blocked here."; + }; + case 2: + { + throw "You are inside enemy territory."; + }; + case 8: + { + throw "You are in a contaminated zone."; + }; + case 3: + { + throw "This cannot be placed on roads."; + }; + case 5: + { + throw "You are too close to a spawn zone."; + }; + case 4: + { + throw "You are too close to traders."; + }; + case 6: + { + throw "Maximum number of objects reached."; + }; + case 7: + { + throw "This snap location is already being used."; + }; + }; + _object = createVehicle[_objectClassName, _objectPosition, [], 0, "CAN_COLLIDE"]; + _object setPosATL _objectPosition; + _object setVariable ["BIS_enableRandomization", false]; + _object setOwner (owner _playerObject); + _object enableSimulationGlobal false; + _object setVariable ["ExileOwnerUID", getPlayerUID _playerObject]; + _playerObject setVariable ["ExileConstructionObject", _object]; + [_object, _playerObject] call ExileServer_system_swapOwnershipQueue_add; + [_sessionID, "constructionResponse", [netid _object]] call ExileServer_system_network_send_to; +} +catch +{ + [_sessionID, "toastRequest", ["ErrorTitleAndText", ["Construction aborted!", _exception]]] call ExileServer_system_network_send_to; +}; +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_object_construction_network_buildTerritoryRequest.sqf b/@exileserver/addons/exile_server/code/ExileServer_object_construction_network_buildTerritoryRequest.sqf new file mode 100644 index 0000000..569e474 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_object_construction_network_buildTerritoryRequest.sqf @@ -0,0 +1,75 @@ +/** + * ExileServer_object_construction_network_buildTerritoryRequest + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_sessionID","_paramaters","_objectClassName","_objectPosition","_flag","_territoryName","_alphabet","_forbiddenCharacter","_playerObject","_minimumDistanceToTraderZones","_minimumDistanceToSpawnZones","_maximumTerritoryRadius","_object"]; +_sessionID = _this select 0; +_paramaters = _this select 1; +_objectClassName = _paramaters select 0; +_objectPosition = _paramaters select 1; +_flag = _paramaters select 2; +_territoryName = _paramaters select 3; +try +{ + _territoryName = _territoryName call ExileClient_util_string_trim; + _alphabet = getText (missionConfigFile >> "CfgClans" >> "clanNameAlphabet"); + _forbiddenCharacter = [_territoryName, _alphabet] call ExileClient_util_string_containsForbiddenCharacter; + if !(_forbiddenCharacter isEqualTo -1) then + { + throw "Forbidden Character"; + }; + if !(_objectClassName isEqualTo "Exile_Construction_Flag_Preview") then + { + throw "What a hell are you doing"; + }; + _playerObject = _sessionID call ExileServer_system_session_getPlayerObject; + if (isNull _playerObject) then + { + throw "Invalid Player Object"; + }; + _minimumDistanceToTraderZones = getNumber (missionConfigFile >> "CfgTerritories" >> "minimumDistanceToTraderZones"); + if ([_objectPosition, _minimumDistanceToTraderZones] call ExileClient_util_world_isTraderZoneInRange) then + { + throw "You cannot build close to trader zones."; + }; + _minimumDistanceToSpawnZones = getNumber (missionConfigFile >> "CfgTerritories" >> "minimumDistanceToSpawnZones"); + if ([_objectPosition, _minimumDistanceToSpawnZones] call ExileClient_util_world_isSpawnZoneInRange) then + { + throw "You cannot build close to spawn zones."; + }; + _maximumTerritoryRadius = getNumber (missionConfigFile >> "CfgTerritories" >> "minimumDistanceToOtherTerritories"); + if ([_objectPosition, _maximumTerritoryRadius] call ExileClient_util_world_isTerritoryInRange) then + { + throw "You are too close to enemy territory."; + }; + _object = createVehicle[_objectClassName, _objectPosition, [], 0, "CAN_COLLIDE"]; + _object setPos _objectPosition; + _object enableSimulationGlobal true; + if (isClass (configFile >> "CfgFlagsNative" >> _flag)) then + { + _flag = getText(configFile >> "CfgFlagsNative" >> _flag >> "texture"); + } + else + { + _flag = getText(missionConfigFile >> "CfgFlags" >> _flag >> "texture"); + }; + _object setVariable ["ExileFlagTexture",_flag]; + _object setFlagTexture _flag; + _object setVariable ["ExileTerritoryName",_territoryName]; + _object setVariable ["ExileOwnerUID",getPlayerUID _playerObject,true]; + [_object, _playerObject] call ExileServer_system_swapOwnershipQueue_add; + [_sessionID, "constructionResponse", [netid _object]] call ExileServer_system_network_send_to; +} +catch +{ + [_sessionID, "toastRequest", ["ErrorTitleAndText", ["Construction aborted!", _exception]]] call ExileServer_system_network_send_to; + _exception call ExileServer_util_log; +}; +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_object_construction_network_deconstructConstructionRequest.sqf b/@exileserver/addons/exile_server/code/ExileServer_object_construction_network_deconstructConstructionRequest.sqf new file mode 100644 index 0000000..5e5d223 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_object_construction_network_deconstructConstructionRequest.sqf @@ -0,0 +1,96 @@ +/** + * ExileServer_object_construction_network_deconstructConstructionRequest + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_sessionID","_parameters","_objectNetID","_object","_playerObject","_playerUID","_objectID","_ownerUID","_canDeconstruct","_flag","_buildRights","_message","_constructionConfig","_holderPosition","_holder"]; +_sessionID = _this select 0; +_parameters = _this select 1; +_objectNetID = _parameters select 0; +try +{ + _object = objectFromNetId _objectNetID; + if (isNull _object) then + { + throw "Construction object is null."; + }; + if (_object isKindOf "Exile_Construction_Abstract_Physics") then + { + throw "You can only deconstruct static objects."; + }; + _playerObject = _sessionID call ExileServer_system_session_getPlayerObject; + if (isNull _playerObject) then + { + throw "Player object is null."; + }; + _playerUID = getPlayerUID _playerObject; + _objectID = _object getVariable ["ExileDatabaseID", -1]; + if (_objectID isEqualTo -1) then + { + throw "Construction object is not saved in database."; + }; + _ownerUID = _object getVariable ["ExileOwnerUID", -1]; + if (_ownerUID isEqualTo -1) then + { + throw "Object has no owner."; + }; + _canDeconstruct = false; + _flag = _object call ExileClient_util_world_getTerritoryAtPosition; + if (_playerUID isEqualTo _ownerUID) then + { + _canDeconstruct = true; + } + else + { + if !(isNull _flag) then + { + _buildRights = _flag getVariable ["ExileTerritoryBuildRights",[]]; + if (_playerUID in _buildRights) then + { + _canDeconstruct = true; + }; + }; + }; + if (_canDeconstruct) then + { + _object call ExileServer_object_construction_database_delete; + _message = "The object was not refunded, since it was damaged."; + if (_object getVariable ["ExileConstructionDamage",0] isEqualTo 0)then + { + _constructionConfig = ("(getText(_x >> 'staticObject') isEqualTo (typeOf _object))" configClasses (configFile >> "CfgConstruction")) select 0; + _holderPosition = getPosATL _playerObject; + _holder = createVehicle ["GroundWeaponHolder", _holderPosition, [], 0, "CAN_COLLIDE"]; + _holder setPosATL _holderPosition; + { + _holder addMagazineCargoGlobal [_x, 1]; + } + forEach getArray (_constructionConfig >> "refundObjects"); + if !((_object getVariable ["ExileAccessCode", -1]) isEqualTo -1) then + { + _holder addMagazineCargoGlobal ["Exile_Item_Codelock", 1]; + }; + _message = "Aaaand, it's gone!"; + }; + deleteVehicle _object; + if !(isNull _flag) then + { + _flag call ExileServer_system_territory_updateNumberOfConstructions; + }; + [_sessionID, "toastRequest", ["SuccessTitleAndText", ["Object deconstructed!", _message]]] call ExileServer_system_network_send_to; + } + else + { + throw "You have no permission to deconstruct this."; + }; +} +catch +{ + [_sessionID, "toastRequest", ["ErrorTitleAndText", ["Failed to deconstruct!", _exception]]] call ExileServer_system_network_send_to; +}; +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_object_construction_network_moveConstructionRequest.sqf b/@exileserver/addons/exile_server/code/ExileServer_object_construction_network_moveConstructionRequest.sqf new file mode 100644 index 0000000..e05c146 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_object_construction_network_moveConstructionRequest.sqf @@ -0,0 +1,108 @@ +/** + * ExileServer_object_construction_network_moveConstructionRequest + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_sessionID","_parameters","_objectNetID","_object","_objectClassname","_isContainer","_playerObject","_playerUID","_objectID","_ownerUID","_canMove","_flag","_buildRights","_money","_holderPosition","_holder"]; +_sessionID = _this select 0; +_parameters = _this select 1; +_objectNetID = _parameters select 0; +try +{ + _object = objectFromNetId _objectNetID; + _objectClassname = typeOf _object; + _isContainer = isNumber(configFile >> "CfgVehicles" >> _objectClassname >> "exileContainer"); + if (isNull _object) then + { + throw "Construction object is null!"; + }; + if (_object isKindOf "Exile_Construction_Abstract_Physics") then + { + throw "You can only move static objects!"; + }; + _playerObject = _sessionID call ExileServer_system_session_getPlayerObject; + if (isNull _playerObject) then + { + throw "Player object is null!"; + }; + if (_object getVariable ["ExileConstructionDamage",0] > 0)then + { + throw "You cant move Damaged objects, repair it first"; + }; + _playerUID = getPlayerUID _playerObject; + _objectID = _object getVariable ["ExileDatabaseID", -1]; + if (_objectID isEqualTo -1) then + { + throw "Construction object is not saved in database!"; + }; + _ownerUID = _object getVariable ["ExileOwnerUID", -1]; + if (_ownerUID isEqualTo -1) then + { + throw "Object has no owner!"; + }; + _canMove = false; + _flag = _object call ExileClient_util_world_getTerritoryAtPosition; + if ((_flag getVariable ["ExileFlagStolen", 0]) isEqualTo 1) then + { + throw "You cannot move parts while your flag is stolen."; + }; + if (_playerUID isEqualTo _ownerUID) then + { + _canMove = true; + } + else + { + if !(isNull _flag) then + { + _buildRights = _flag getVariable ["ExileTerritoryBuildRights",[]]; + if (_playerUID in _buildRights) then + { + _canMove = true; + }; + }; + }; + if !(_canMove) then + { + throw "You have no permission to move this!"; + }; + if (_isContainer) then + { + _money = _object getVariable ["ExileMoney", 0]; + ExileContainerCargo = + [ + _object call ExileServer_util_getItemCargo, + magazinesAmmoCargo _object, + weaponsItemsCargo _object, + _object call ExileServer_util_getObjectContainerCargo, + _money + ]; + _object call ExileServer_object_container_database_delete; + } else + { + if !((_object getVariable ["ExileAccessCode", -1]) isEqualTo -1) then + { + _holderPosition = getPosATL _playerObject; + _holder = createVehicle ["GroundWeaponHolder", _holderPosition, [], 0, "CAN_COLLIDE"]; + _holder setPosATL _holderPosition; + _holder addMagazineCargoGlobal ["Exile_Item_Codelock", 1]; + }; + _object call ExileServer_object_construction_database_delete; + }; + deleteVehicle _object; + if !(isNull _flag) then + { + _flag call ExileServer_system_territory_updateNumberOfConstructions; + }; + [_sessionID, "constructionMoveResponse", [true, typeOf _object]] call ExileServer_system_network_send_to; +} +catch +{ + [_sessionID, "constructionMoveResponse", [false, _exception]] call ExileServer_system_network_send_to; +}; +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_object_construction_network_repairConstructionRequest.sqf b/@exileserver/addons/exile_server/code/ExileServer_object_construction_network_repairConstructionRequest.sqf new file mode 100644 index 0000000..facfd6c --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_object_construction_network_repairConstructionRequest.sqf @@ -0,0 +1,50 @@ +/** + * ExileServer_object_construction_network_repairConstructionRequest + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_sessionID","_parameters","_constructionObject","_object","_requestingPlayer","_repairKitClass","_databaseId"]; +_sessionID = _this select 0; +_parameters = _this select 1; +_constructionObject = _parameters select 0; +try +{ + if (isNull _object) then + { + throw "Construction object is null!"; + }; + _requestingPlayer = _sessionID call ExileServer_system_session_getPlayerObject; + if (isNull _requestingPlayer)then + { + throw "Player null"; + }; + _repairKitClass = _constructionObject call ExileClient_util_breaching_getRepairMag; + if(_repairKitClass isEqualTo "")then + { + throw "Invalid repair kit."; + }; + if!(_repairKitClass in (magazines _requestingPlayer))then + { + throw "You do not have a repair kit."; + }; + _databaseId = _constructionObject getVariable ["ExileDatabaseID",-1]; + if(_databaseId isEqualTo -1)then + { + Throw "database ID null"; + }; + _constructionObject setVariable ["ExileConstructionDamage",0,true]; + format ["updateDamage:0:%1",_databaseId] call ExileServer_system_database_query_fireAndForget; + _constructionObject call ExileServer_util_setDamageTexture; + [_requestingPlayer,"repairConstructionResponse",[_repairKitClass]] call ExileServer_system_network_send_to; +} +catch +{ + [_sessionID, "toastRequest", ["ErrorTitleAndText", ["Failed to repair!", _exception]]] call ExileServer_system_network_send_to; + _exception call ExileServer_util_log; +}; \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_object_construction_network_swapConstructionRequest.sqf b/@exileserver/addons/exile_server/code/ExileServer_object_construction_network_swapConstructionRequest.sqf new file mode 100644 index 0000000..120c9cd --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_object_construction_network_swapConstructionRequest.sqf @@ -0,0 +1,57 @@ +/** + * ExileServer_object_construction_network_swapConstructionRequest + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_sessionID","_paramaters","_fromVehicleNetID","_toVehicleClassName","_objectProperties","_position","_vectorDirection","_vectorUp","_velocity","_fromVehicle","_flagTexture","_territoryName","_isContainer","_alphabet","_forbiddenCharacter","_toVehicle","_playerObject","_flag"]; +_sessionID = _this select 0; +_paramaters = _this select 1; +_fromVehicleNetID = _paramaters select 0; +_toVehicleClassName = _paramaters select 1; +_objectProperties = _paramaters select 2; +_position = _objectProperties select 0; +_vectorDirection = _objectProperties select 1; +_vectorUp = _objectProperties select 2; +_velocity = _objectProperties select 3; +_fromVehicle = objectFromNetId _fromVehicleNetID; +_flagTexture = _fromVehicle getVariable ["ExileFlagTexture","Kappa"]; +_territoryName = _fromVehicle getVariable ["ExileTerritoryName","Kappa"]; +_isContainer = isNumber(configFile >> "CfgVehicles" >> _toVehicleClassName >> "exileContainer"); +_territoryName = _territoryName call ExileClient_util_string_trim; +_alphabet = getText (missionConfigFile >> "CfgClans" >> "clanNameAlphabet"); +_forbiddenCharacter = [_territoryName, _alphabet] call ExileClient_util_string_containsForbiddenCharacter; +if!(_forbiddenCharacter isEqualTo -1)exitWith{format ["Invalid teritory name: %1",_territoryName] call ExileServer_util_log;}; +deleteVehicle _fromVehicle; +_toVehicle = createVehicle[_toVehicleClassName, _position, [], 0, "CAN_COLLIDE"]; +_toVehicle setVelocity _velocity; +_toVehicle setVectorDirAndUp [_vectorDirection, _vectorUp]; +_toVehicle setPosATL _position; +_playerObject = _sessionID call ExileServer_system_session_getPlayerObject; +_toVehicle setVariable ["ExileOwnerUID",getPlayerUID _playerObject,true]; +_toVehicle setVariable ["ExileIsPersistent",true]; +_toVehicle call ExileServer_util_vehicle_enableSimulationIfRequired; +switch (true) do +{ + case (!(_flagTexture isEqualTo "Kappa")) : + { + [_toVehicle,_territoryName,_flagTexture] call ExileServer_system_territory_create; + [_toVehicle,_territoryName,_flagTexture] call ExileServer_system_territory_database_insert; + _toVehicle call ExileServer_system_territory_updateNearContainers; + _toVehicle call ExileServer_system_territory_updateNearConstructions; + }; + case (_isContainer) : { _toVehicle call ExileServer_object_container_database_insert; }; + default { _toVehicle call ExileServer_object_construction_database_insert; }; +}; +_flag = _toVehicle call ExileClient_util_world_getTerritoryAtPosition; +if !(isNull _flag) then +{ + _flag call ExileServer_system_territory_updateNumberOfConstructions; +}; +_playerObject setVariable ["ExileConstructionObject", nil]; +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_object_construction_network_upgradeConstructionRequest.sqf b/@exileserver/addons/exile_server/code/ExileServer_object_construction_network_upgradeConstructionRequest.sqf new file mode 100644 index 0000000..301e29d --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_object_construction_network_upgradeConstructionRequest.sqf @@ -0,0 +1,85 @@ +/** + * ExileServer_object_construction_network_upgradeConstructionRequest + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_sessionID","_parameters","_object","_playerObject","_maxRange","_flags","_buildRights","_objectConfig","_objectClass","_position","_vectorUp","_vectorDir","_objectDatabaseID","_objectOwner","_accessCode","_newObject"]; +_sessionID = _this select 0; +_parameters = _this select 1; +_object = _parameters select 0; +try +{ + _playerObject = _sessionID call ExileServer_system_session_getPlayerObject; + _maxRange = getArray(missionConfigFile >> "CfgTerritories" >> "prices"); + _maxRange = (_maxRange select ((count _maxRange) -1)) select 1; + _flags = nearestObjects [_playerObject,["Exile_Construction_Flag_Static"],_maxRange]; + if (_flags isEqualTo []) then + { + throw "You are retarded!"; + }; + _flags = _flags select 0; + _buildRights = _flags getVariable ["ExileTerritoryBuildRights",[]]; + if !((getPlayerUID _playerObject) in _buildRights) then + { + throw "No territory access!"; + }; + if !("Exile_Item_FortificationUpgrade" in (magazines _playerObject)) then + { + throw "Really?"; + }; + if !(_object getVariable ["ExileConstructionDamage",0] isEqualTo 0)then + { + throw "Please repair the object first."; + }; + _objectConfig = + " + isText(_x >> 'upgradeObject') + && + getText(_x >> 'staticObject') isEqualTo (typeOf _object) + " + configClasses + (configFile >> 'CfgConstruction'); + if (_objectConfig isEqualTo []) then + { + throw "Invalid Upgrade"; + }; + _objectConfig = _objectConfig select 0; + _objectClass = getText (_objectConfig >> "upgradeObject"); + _position = getPosATL _object; + _vectorUp = vectorUp _object; + _vectorDir = vectorDir _object; + _objectDatabaseID = _object getVariable ["ExileDatabaseID",0]; + _objectOwner = _object getVariable ["ExileOwnerUID",""]; + if (_objectDatabaseID isEqualTo 0) then + { + throw "Invalid Database ID"; + }; + _accessCode = _object getVariable ["ExileAccessCode","000000"]; + deleteVehicle _object; + format ["upgradeObject:%1:%2",_objectClass,_objectDatabaseID] call ExileServer_system_database_query_fireAndForget; + _newObject = createVehicle [_objectClass,_position,[],0,"CAN_COLIDE"]; + _newObject setVariable ["ExileDatabaseID",_objectDatabaseID]; + _newObject setVariable ["ExileOwnerUID",_objectOwner]; + _newObject setVariable ["ExileIsPersistent",true]; + _newObject setPosATL _position; + _newObject setVectorDirAndUp [_vectorDir,_vectorUp]; + if !(_accessCode isEqualTo "000000") then + { + _newObject setVariable ["ExileAccessCode",_accessCode]; + _newObject setVariable ["ExileIsLocked",0,true]; + }; + _newObject call ExileServer_util_vehicle_enableSimulationIfRequired; + [_sessionID,"upgradeConstructionResponse",[_newObject]] call ExileServer_system_network_send_to; +} +catch +{ + [_sessionID, "toastRequest", ["ErrorTitleAndText", ["Failed to upgrade!", _exception]]] call ExileServer_system_network_send_to; + _exception call ExileServer_util_log; +}; +true diff --git a/@exileserver/addons/exile_server/code/ExileServer_object_container_createContainer.sqf b/@exileserver/addons/exile_server/code/ExileServer_object_container_createContainer.sqf new file mode 100644 index 0000000..762f558 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_object_container_createContainer.sqf @@ -0,0 +1,30 @@ +/** + * ExileServer_object_container_createContainer + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_className","_position","_direction","_containerObject"]; +_className = _this select 0; +_position = _this select 1; +_direction = _this select 2; +_containerObject = createVehicle [_className, _position, [], 0, "CAN_COLLIDE"]; +clearBackpackCargoGlobal _containerObject; +clearItemCargoGlobal _containerObject; +clearMagazineCargoGlobal _containerObject; +clearWeaponCargoGlobal _containerObject; +_containerObject setDir _direction; +_containerObject setPosATL _position; +_containerObject setVariable ["ExileIsPersistent", true]; +_containerObject setVariable ["ExileIsContainer", true]; +if(getNumber(configFile >> "CfgVehicles" >> typeOf _containerObject >> "exileIsLockable") isEqualTo 1)then +{ + _containerObject setVariable ["ExileIsLocked", -1,true]; +}; +_containerObject call ExileServer_system_simulationMonitor_addVehicle; +_containerObject \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_object_container_database_delete.sqf b/@exileserver/addons/exile_server/code/ExileServer_object_container_database_delete.sqf new file mode 100644 index 0000000..79f0d42 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_object_container_database_delete.sqf @@ -0,0 +1,19 @@ +/** + * ExileServer_object_container_database_delete + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_containerObject","_containerID"]; +_containerObject = _this; +_containerID = _containerObject getVariable ["ExileDatabaseID", -1]; +if !(_containerID isEqualTo -1) then +{ + format ["deleteContainer:%1", _containerID] call ExileServer_system_database_query_fireAndForget; +}; +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_object_container_database_insert.sqf b/@exileserver/addons/exile_server/code/ExileServer_object_container_database_insert.sqf new file mode 100644 index 0000000..2a8d16a --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_object_container_database_insert.sqf @@ -0,0 +1,91 @@ +/** + * ExileServer_object_container_database_insert + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_containerObject","_position","_vectorDirection","_vectorUp","_territoryFlag","_territoryID","_data","_extDB2Message","_containerID","_cargoContainers"]; +_containerObject = _this; +_position = getPosATL _containerObject; +_vectorDirection = vectorDir _containerObject; +_vectorUp = vectorUp _containerObject; +_territoryFlag = _containerObject call ExileClient_util_world_getTerritoryAtPosition; +_territoryID = if (isNull _territoryFlag) then { 'NULL' } else { _territoryFlag getVariable ["ExileDatabaseID", 'NULL']}; +if !(ExileContainerCargo isEqualTo []) then +{ + _data = + [ + typeOf _containerObject, + _containerObject getVariable ["ExileOwnerUID", ""], + _position select 0, + _position select 1, + _position select 2, + _vectorDirection select 0, + _vectorDirection select 1, + _vectorDirection select 2, + _vectorUp select 0, + _vectorUp select 1, + _vectorUp select 2, + ExileContainerCargo select 0, + ExileContainerCargo select 1, + ExileContainerCargo select 2, + ExileContainerCargo select 3, + ExileContainerCargo select 4, + "0000", + _territoryID + ]; +} else +{ + _data = + [ + typeOf _containerObject, + _containerObject getVariable ["ExileOwnerUID", ""], + _position select 0, + _position select 1, + _position select 2, + _vectorDirection select 0, + _vectorDirection select 1, + _vectorDirection select 2, + _vectorUp select 0, + _vectorUp select 1, + _vectorUp select 2, + [], + [], + [], + [], + 0, + "0000", + _territoryID + ]; +}; +_extDB2Message = ["insertContainer", _data] call ExileServer_util_extDB2_createMessage; +_containerID = _extDB2Message call ExileServer_system_database_query_insertSingle; +if !(ExileContainerCargo isEqualTo []) then +{ + [_containerObject, (_data select 11)] call ExileServer_util_fill_fillItems; + [_containerObject, (_data select 12)] call ExileServer_util_fill_fillMagazines; + [_containerObject, (_data select 13)] call ExileServer_util_fill_fillWeapons; + _cargoContainers = format ["loadContainerCargo:%1", _containerID] call ExileServer_system_database_query_selectSingle; + if !(_cargoContainers isEqualTo []) then + { + [_containerObject, (_cargoContainers select 0)] call ExileServer_util_fill_fillContainers; + }; + ExileContainerCargo = []; +}; +_containerObject setVariable ["ExileDatabaseID", _containerID]; +_containerObject setVariable ["ExileIsPersistent", true]; +_containerObject setVariable ["ExileIsContainer", true]; +_containerObject setVariable ["ExileAccessCode","0000"]; +_containerObject setVariable ["ExileTerritoryID", _territoryID]; +_containerObject setVariable ["ExileMoney", parseNumber (_data select 15), true]; +_containerObject addMPEventHandler ["MPKilled", { if !(isServer) exitWith {}; (_this select 0) call ExileServer_object_container_event_onMpKilled; }]; +if(getNumber(configFile >> "CfgVehicles" >> typeOf _containerObject >> "exileIsLockable") isEqualTo 1)then +{ + _containerObject setVariable ["ExileIsLocked",-1,true]; +}; +_containerID \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_object_container_database_load.sqf b/@exileserver/addons/exile_server/code/ExileServer_object_container_database_load.sqf new file mode 100644 index 0000000..621ed86 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_object_container_database_load.sqf @@ -0,0 +1,46 @@ +/** + * ExileServer_object_container_database_load + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_containerID","_data","_position","_vectorDirection","_vectorUp","_abandoned","_containerObject","_cargoContainers"]; +_containerID = _this; +_data = format ["loadContainer:%1", _containerID] call ExileServer_system_database_query_selectSingle; +_position = [_data select 4, _data select 5, _data select 6]; +_vectorDirection = [_data select 7, _data select 8, _data select 9]; +_vectorUp = [_data select 10, _data select 11, _data select 12]; +_abandoned = _data select 18; +_containerObject = [(_data select 1), _position, 0] call ExileServer_object_container_createContainer; +_containerObject setVectorDirAndUp [_vectorDirection, _vectorUp]; +_containerObject setVariable ["ExileDatabaseID", _containerID]; +_containerObject setVariable ["ExileOwnerUID", (_data select 2),true]; +_containerObject setVariable ["ExileAccessCode",(_data select 16)]; +_containerObject setVariable ["ExileTerritoryID", (_data select 17)]; +_containerObject setVariable ["ExileMoney", (_data select 20), true]; +if(getNumber(configFile >> "CfgVehicles" >> typeOf _containerObject >> "exileIsLockable") isEqualTo 1)then +{ + _containerObject setVariable ["ExileIsLocked",(_data select 3),true]; +}; +[_containerObject, (_data select 13)] call ExileServer_util_fill_fillItems; +[_containerObject, (_data select 14)] call ExileServer_util_fill_fillMagazines; +[_containerObject, (_data select 15)] call ExileServer_util_fill_fillWeapons; +_cargoContainers = format ["loadContainerCargo:%1", _containerID] call ExileServer_system_database_query_selectSingle; +if !(_cargoContainers isEqualTo []) then +{ + [_containerObject, (_cargoContainers select 0)] call ExileServer_util_fill_fillContainers; +}; +if !(_abandoned isEqualTo "") then +{ + format ["ExileServer - Adding Container %1 to Abandonded Safes", _containerID] call ExileClient_util_log; + ExileAbandondedSafes pushBack _containerObject; +}; +_containerObject enableSimulationGlobal false; +_containerObject call ExileServer_system_simulationMonitor_addVehicle; +_containerObject addMPEventHandler ["MPKilled", { if !(isServer) exitWith {}; (_this select 0) call ExileServer_object_container_event_onMpKilled; }]; +_containerObject diff --git a/@exileserver/addons/exile_server/code/ExileServer_object_container_database_setPin.sqf b/@exileserver/addons/exile_server/code/ExileServer_object_container_database_setPin.sqf new file mode 100644 index 0000000..a1be586 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_object_container_database_setPin.sqf @@ -0,0 +1,20 @@ +/** + * ExileServer_object_container_database_setPin + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_object","_newPin","_databaseID"]; +_object = _this select 0; +_newPin = _this select 1; +_databaseID = _object getVariable ["ExileDatabaseID",-1]; +if!(_databaseID isEqualTo -1)then +{ + format ["containerSetPinCode:%1:%2",_newPin,_databaseID] call ExileServer_system_database_query_fireAndForget; +}; +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_object_container_database_update.sqf b/@exileserver/addons/exile_server/code/ExileServer_object_container_database_update.sqf new file mode 100644 index 0000000..de93f48 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_object_container_database_update.sqf @@ -0,0 +1,46 @@ +/** + * ExileServer_object_container_database_update + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_containerObject","_containerID","_position","_vectorDirection","_vectorUp","_territoryFlag","_territoryID","_data","_extDB2Message"]; +_containerObject= _this; +_containerID = _containerObject getVariable ["ExileDatabaseID", -1]; +if (_containerID > -1) then +{ + _position = getPosATL _containerObject; + _vectorDirection = vectorDir _containerObject; + _vectorUp = vectorUp _containerObject; + _territoryFlag = _containerObject call ExileClient_util_world_getTerritoryAtPosition; + _territoryID = if (isNull _territoryFlag) then { 'NULL' } else { _territoryFlag getVariable ["ExileDatabaseID", 'NULL']}; + _containerObject setVariable ["ExileTerritoryID", _territoryID]; + _data = + [ + _containerObject getVariable ["ExileIsLocked",-1], + _position select 0, + _position select 1, + _position select 2, + _vectorDirection select 0, + _vectorDirection select 1, + _vectorDirection select 2, + _vectorUp select 0, + _vectorUp select 1, + _vectorUp select 2, + _containerObject call ExileServer_util_getItemCargo, + magazinesAmmoCargo _containerObject, + weaponsItemsCargo _containerObject, + _containerObject call ExileServer_util_getObjectContainerCargo, + _territoryID, + _containerObject getVariable ["ExileMoney", 0], + _containerID + ]; + _extDB2Message = ["updateContainer", _data] call ExileServer_util_extDB2_createMessage; + _extDB2Message call ExileServer_system_database_query_fireAndForget; +}; +true diff --git a/@exileserver/addons/exile_server/code/ExileServer_object_container_event_onMpKilled.sqf b/@exileserver/addons/exile_server/code/ExileServer_object_container_event_onMpKilled.sqf new file mode 100644 index 0000000..d861521 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_object_container_event_onMpKilled.sqf @@ -0,0 +1,15 @@ +/** + * ExileServer_object_container_event_onMpKilled + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_object"]; +_object = _this; +_object call ExileServer_object_container_database_delete; +deleteVehicle _object; \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_object_container_network_packRequest.sqf b/@exileserver/addons/exile_server/code/ExileServer_object_container_network_packRequest.sqf new file mode 100644 index 0000000..5874c30 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_object_container_network_packRequest.sqf @@ -0,0 +1,35 @@ +/** + * ExileServer_object_container_network_packRequest + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_sessionID","_parameters","_object","_pincode","_objectPinCode"]; +_sessionID = _this select 0; +_parameters = _this select 1; +_object = objectFromNetId (_parameters select 0); +_pincode = _parameters select 1; +if!(getNumber(configFile >> "CfgVehicles" >> typeOf _object >> "exileIsLockable") isEqualTo 1)then +{ + _object call ExileServer_object_container_packContainer; + [_sessionID,"systemChatRequest",["Container Packed!"]] call ExileServer_system_network_send_to; +} +else +{ + _objectPinCode = _object getVariable ["ExileAccessCode","000000"]; + if(_objectPinCode isEqualTo _pincode)then + { + _object call ExileServer_object_container_packContainer; + [_sessionID,"systemChatRequest",["Container Packed!"]] call ExileServer_system_network_send_to; + } + else + { + [_sessionID,"systemChatRequest",["Wrong PIN code! "]] call ExileServer_system_network_send_to; + }; +}; +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_object_container_packContainer.sqf b/@exileserver/addons/exile_server/code/ExileServer_object_container_packContainer.sqf new file mode 100644 index 0000000..7c01d90 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_object_container_packContainer.sqf @@ -0,0 +1,37 @@ +/** + * ExileServer_object_container_packContainer + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_object","_objectpos","_items","_magazines","_weapons","_containers","_popTabs","_typeof","_groundHolder","_popTabsObject","_filter","_kitMagazine"]; +_object = _this; +_objectpos = getPosATL _object; +_items = _object call ExileServer_util_getItemCargo; +_magazines = magazinesAmmoCargo _object; +_weapons = weaponsItemsCargo _object; +_containers =_object call ExileServer_util_getObjectContainerCargo; +_popTabs = _object getVariable ["ExileMoney",0]; +_typeof = typeOf _object; +deleteVehicle _object; +_object call ExileServer_object_container_database_delete; +_groundHolder = createVehicle ["GroundWeaponHolder",_objectpos, [], 0, "CAN_COLLIDE"]; +_groundHolder setPosATL _objectpos; +if (_popTabs > 0 ) then +{ + _popTabsObject = createVehicle ["Exile_PopTabs", _objectpos, [], 0, "CAN_COLLIDE"]; + _popTabsObject setVariable ["ExileMoney", _popTabs, true]; +}; +_filter = ("getText(_x >> 'staticObject') == _typeof" configClasses(configFile >> "CfgConstruction")) select 0; +_kitMagazine = getText(_filter >> "kitMagazine"); +_groundHolder addItemCargoGlobal [_kitMagazine,1]; +[_groundHolder,_items] call ExileServer_util_fill_fillItems; +[_groundHolder,_magazines] call ExileServer_util_fill_fillMagazines; +[_groundHolder,_weapons] call ExileServer_util_fill_fillWeapons; +[_groundHolder,_containers] call ExileServer_util_fill_fillContainers; +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_object_flies_spawn.sqf b/@exileserver/addons/exile_server/code/ExileServer_object_flies_spawn.sqf new file mode 100644 index 0000000..8ae83f8 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_object_flies_spawn.sqf @@ -0,0 +1,19 @@ +/** + * ExileServer_object_flies_spawn + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_deadEntity","_fliesSound","_fliesParticles"]; +_deadEntity = _this; +_fliesSound = createSoundSource ["Exile_Sound_Flies", getPos _deadEntity, [], 0]; +_fliesSound attachTo [_deadEntity, [0, 0, 0]]; +_fliesParticles = createVehicle ["Exile_Effect_Flies", getPos _deadEntity, [], 0, "CAN_COLLIDE"]; +_fliesParticles attachTo [_deadEntity, [0, 0, 0]]; +_deadEntity setVariable ["ExileFliesSound", _fliesSound]; +_deadEntity setVariable ["ExileFliesParticles", _fliesParticles]; \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_object_floodLight_network_toggleFloodLightRequest.sqf b/@exileserver/addons/exile_server/code/ExileServer_object_floodLight_network_toggleFloodLightRequest.sqf new file mode 100644 index 0000000..bf1b88d --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_object_floodLight_network_toggleFloodLightRequest.sqf @@ -0,0 +1,28 @@ +/** + * ExileServer_object_floodLight_network_toggleFloodLightRequest + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_sessionID","_parameters","_floodLightNetID","_damage","_floodLight","_player"]; +_sessionID = _this select 0; +_parameters = _this select 1; +_floodLightNetID = _parameters select 0; +_damage = _parameters select 1; +_floodLight = objectFromNetId _floodLightNetID; +if (local _floodLight) then +{ + _floodLight setHit ["light_1_hitpoint", _damage]; +} +else +{ + _player = _sessionID call ExileServer_system_session_getPlayerObject; + _floodLight setOwner (owner _player); + [_sessionID, "toggleFloodLightRequest", [_floodLightNetID, _damage]] call ExileServer_system_network_send_to; +}; +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_object_handcuffs_network_breakFreeRequest.sqf b/@exileserver/addons/exile_server/code/ExileServer_object_handcuffs_network_breakFreeRequest.sqf new file mode 100644 index 0000000..2abef0e --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_object_handcuffs_network_breakFreeRequest.sqf @@ -0,0 +1,56 @@ +/** + * ExileServer_object_handcuffs_network_breakFreeRequest + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_sessionID","_victim","_hostageTakerNetID","_hostageTaker","_respect","_newScore"]; +_sessionID = _this select 0; +try +{ + _victim = _sessionID call ExileServer_system_session_getPlayerObject; + if (isNull _victim) then + { + throw "Unknown player cannot break free!"; + }; + if !(alive _victim) then + { + throw "The dead cannot break free!"; + }; + if !(_victim getVariable ["ExileIsHandcuffed", false]) then + { + throw "Cannot break free if not handcuffed!"; + }; + if !(_victim call ExileClient_object_handcuffs_hasFreeItems) then + { + throw "Missing tools to break free!"; + }; + _hostageTakerNetID = _victim getVariable ["ExileHostageTakerNetID", ""]; + _hostageTaker = objectFromNetId _hostageTakerNetID; + if !(isNull _hostageTaker) then + { + if ((_victim distance _hostageTaker) < 20) then + { + throw "Hostage taker is too close!"; + }; + }; + _victim setVariable ["ExileIsHandcuffed", false, true]; + _victim setVariable ["ExileHostageTakerNetID", nil]; + _victim setVariable ["ExileHostageTakerUID", nil]; + ["switchMoveRequest", [netId _victim, "Acts_AidlPsitMstpSsurWnonDnon_out"]] call ExileServer_system_network_send_broadcast; + _respect = getNumber (configFile >> "CfgSettings" >> "Respect" >> "Handcuffs" >> "breakingFree"); + [_victim, "breakFreeResponse", [str _respect]] call ExileServer_system_network_send_to; + _newScore = _victim getVariable ["ExileScore", 0]; + _newScore = _newScore + _respect; + _victim setVariable ["ExileScore", _newScore]; + format["setAccountScore:%1:%2", _newScore, getPlayerUID _victim] call ExileServer_system_database_query_fireAndForget; +} +catch +{ + _exception call ExileServer_util_log; +}; \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_object_handcuffs_network_freeRequest.sqf b/@exileserver/addons/exile_server/code/ExileServer_object_handcuffs_network_freeRequest.sqf new file mode 100644 index 0000000..82c606e --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_object_handcuffs_network_freeRequest.sqf @@ -0,0 +1,62 @@ +/** + * ExileServer_object_handcuffs_network_freeRequest + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_sessionID","_parameters","_victimNetID","_player","_victim","_respect","_newScore"]; +_sessionID = _this select 0; +_parameters = _this select 1; +_victimNetID = _parameters select 0; +try +{ + _player = _sessionID call ExileServer_system_session_getPlayerObject; + if (isNull _player) then + { + throw "Unknown player cannot free someone!"; + }; + if !(alive _player) then + { + throw "The dead cannot free others!"; + }; + _victim = objectFromNetID _victimNetID; + if (isNull _victim) then + { + throw "Cannot free unknown victim!"; + }; + if !(_victim getVariable ["ExileIsHandcuffed", false]) then + { + throw "Cannot free not-handcuffed ones!"; + }; + if !(_player call ExileClient_object_handcuffs_hasFreeItems) then + { + throw "Missing tools to break free!"; + }; + ["switchMoveRequest", [netId _victim, "Acts_AidlPsitMstpSsurWnonDnon_out"]] call ExileServer_system_network_send_broadcast; + if ((getPlayerUID _player) isEqualTo (_victim getVariable ["ExileHostageTakerUID", ""])) then + { + _respect = getNumber (configFile >> "CfgSettings" >> "Respect" >> "Handcuffs" >> "releasedByHostageTaker"); + } + else + { + _respect = getNumber (configFile >> "CfgSettings" >> "Respect" >> "Handcuffs" >> "releasedByHero"); + }; + [_victim, "freeRequest", [""]] call ExileServer_system_network_send_to; + [_player, "freeResponse", [str _respect]] call ExileServer_system_network_send_to; + _newScore = _player getVariable ["ExileScore", 0]; + _newScore = _newScore + _respect; + _player setVariable ["ExileScore", _newScore]; + format["setAccountScore:%1:%2", _newScore, getPlayerUID _player] call ExileServer_system_database_query_fireAndForget; + _victim setVariable ["ExileIsHandcuffed", false, true]; + _victim setVariable ["ExileHostageTakerNetID", nil]; + _victim setVariable ["ExileHostageTakerUID", nil]; +} +catch +{ + _exception call ExileServer_util_log; +}; \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_object_handcuffs_network_handcuffRequest.sqf b/@exileserver/addons/exile_server/code/ExileServer_object_handcuffs_network_handcuffRequest.sqf new file mode 100644 index 0000000..601249b --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_object_handcuffs_network_handcuffRequest.sqf @@ -0,0 +1,71 @@ +/** + * ExileServer_object_handcuffs_network_handcuffRequest + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_sessionID","_parameters","_victimNetID","_hostageTaker","_victim","_respect","_newScore"]; +_sessionID = _this select 0; +_parameters = _this select 1; +_victimNetID = _parameters select 0; +try +{ + _hostageTaker = _sessionID call ExileServer_system_session_getPlayerObject; + _victim = objectFromNetID _victimNetID; + if (isNull _hostageTaker) then + { + throw "Unknown player cannot handcuff someone!"; + }; + if !(alive _hostageTaker) then + { + throw "The dead cannot handcuff others!"; + }; + if (isNull _victim) then + { + throw "Cannot handcuff unknown victim!"; + }; + if !(isPlayer _victim) then + { + throw "Cannot handcuff bots!"; + }; + if !(_victim isKindOf "Exile_Unit_Player") then + { + throw "Can only handcuff players!"; + }; + if !(alive _victim) then + { + throw "Dead people cannot be handcuffed!"; + }; + if !("Exile_Item_ZipTie" in (magazines _hostageTaker)) then + { + throw "Cannot handcuff others without handcuffs!"; + }; + if (_victim getVariable ["ExileIsHandcuffed", false]) then + { + throw "Cannot double handcuff someone!"; + }; + if ((_hostageTaker distance _victim) > 2) then + { + throw "No long distance bondage!"; + }; + _victim setVariable ["ExileIsHandcuffed", true, true]; + _victim setVariable ["ExileHostageTakerNetID", netId _hostageTaker]; + _victim setVariable ["ExileHostageTakerUID", getPlayerUID _hostageTaker]; + ["switchMoveRequest", [_victimNetID, "Acts_AidlPsitMstpSsurWnonDnon_loop"]] call ExileServer_system_network_send_broadcast; + [_victim, "handcuffRequest", [netId _hostageTaker]] call ExileServer_system_network_send_to; + _respect = getNumber (configFile >> "CfgSettings" >> "Respect" >> "Handcuffs" >> "trapping"); + [_hostageTaker, "handcuffResponse", [str _respect]] call ExileServer_system_network_send_to; + _newScore = _hostageTaker getVariable ["ExileScore", 0]; + _newScore = _newScore + _respect; + _hostageTaker setVariable ["ExileScore", _newScore]; + format["setAccountScore:%1:%2", _newScore, getPlayerUID _hostageTaker] call ExileServer_system_database_query_fireAndForget; +} +catch +{ + _exception call ExileServer_util_log; +}; \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_object_lock_network_hotwireLockRequest.sqf b/@exileserver/addons/exile_server/code/ExileServer_object_lock_network_hotwireLockRequest.sqf new file mode 100644 index 0000000..dfbd945 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_object_lock_network_hotwireLockRequest.sqf @@ -0,0 +1,61 @@ +/** + * ExileServer_object_lock_network_hotwireLockRequest + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_sessionID","_parameters","_object","_player"]; +_sessionID = _this select 0; +_parameters = _this select 1; +try +{ + _object = objectFromNetId (_parameters select 0); + if (isNull _object) then + { + throw "Vehicle object is null."; + }; + _player = _sessionID call ExileServer_system_session_getPlayerObject; + if (isNull _player) then + { + throw "Player is null."; + }; + if ((_player distance _object) > 10) then + { + throw "You are too far away."; + }; + if !("Exile_Item_Knife" in (magazines _player)) then + { + throw "You do not have a knife."; + }; + if (isNumber(configFile >> "CfgVehicles" >> typeOf _object >> "exileIsLockable")) then + { + _object setVariable ["ExileIsLocked", 0, true]; + } + else + { + if (local _object) then + { + _object lock 0; + } + else + { + [owner _object, "hotwireLockRequest", [netId _object]] call ExileServer_system_network_send_to; + }; + _object setVariable ["ExileIsLocked", 0]; + _object call ExileServer_system_vehicleSaveQueue_addVehicle; + }; + _object enableRopeAttach true; + _object setVariable ["ExileLastLockToggleAt", time]; + _object setVariable ["ExileAccessDenied", false]; + _object setVariable ["ExileAccessDeniedExpiresAt", 0]; + [_sessionID, "toastRequest", ["SuccessTitleOnly", ["Vehicle hotwired!"]]] call ExileServer_system_network_send_to; +} +catch +{ + [_sessionID, "toastRequest", ["ErrorTitleAndText", ["Failed to hotwire!", _exception]]] call ExileServer_system_network_send_to; +}; diff --git a/@exileserver/addons/exile_server/code/ExileServer_object_lock_network_lockToggle.sqf b/@exileserver/addons/exile_server/code/ExileServer_object_lock_network_lockToggle.sqf new file mode 100644 index 0000000..e017024 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_object_lock_network_lockToggle.sqf @@ -0,0 +1,131 @@ +/** + * ExileServer_object_lock_network_lockToggle + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_sessionID","_paramaters","_object","_pincode","_state","_objectPinCode","_type","_accessDenied","_accessDenialExpiresAt","_numberOfFails"]; +_sessionID = _this select 0; +_paramaters = _this select 1; +_object = objectFromNetId (_paramaters select 0); +_pincode = _paramaters select 1; +_state = _paramaters select 2; +_objectPinCode = _object getVariable ["ExileAccessCode","000000"]; +_type = typeOf _object; +_accessDenied = false; +if (_object getVariable ["ExileAccessDenied", false]) then +{ + _accessDenialExpiresAt = _object getVariable ["ExileAccessDeniedExpiresAt", 0]; + if (time > _accessDenialExpiresAt) then + { + _object setVariable ["ExileAccessDenied", false]; + _object setVariable ["ExileAccessDeniedExpiresAt", 0]; + } + else + { + _accessDenied = true; + }; +}; +if (_accessDenied) then +{ + [_sessionID,"lockResponse",["Access denied!", false, "", "", -1]] call ExileServer_system_network_send_to; +} +else +{ + if((count _pincode) isEqualTo (count _objectPinCode))then + { + if(_pincode isEqualTo _objectPinCode)then + { + if!(_state)then + { + if(isNumber(configFile >> "CfgVehicles" >> _type >> "exileIsLockable"))then + { + _object setVariable ["ExileIsLocked",0,true]; + } + else + { + if(local _object)then + { + _object lock 0; + } + else + { + [owner _object,"LockVehicleRequest",[netId _object,false]] call ExileServer_system_network_send_to; + }; + _object setVariable ["ExileIsLocked",0]; + }; + if (_object isKindOf "Exile_Container_Safe") then + { + _object animate ['DoorRotation', 1]; + }; + [_sessionID,"lockResponse",["Unlocked!", true , netId _object , _objectPinCode, 0]] call ExileServer_system_network_send_to; + _object enableRopeAttach true; + } + else + { + if(isNumber(configFile >> "CfgVehicles" >> _type >> "exileIsLockable"))then + { + _object setVariable ["ExileIsLocked",-1,true]; + } + else + { + if(local _object)then + { + _object lock 2; + } + else + { + [owner _object,"LockVehicleRequest",[netId _object,true]] call ExileServer_system_network_send_to; + }; + _object setVariable ["ExileIsLocked",-1]; + }; + if (_object isKindOf "Exile_Container_Safe") then + { + _object animate ['DoorRotation', 0]; + }; + [_sessionID,"lockResponse",["Locked!",true, netId _object, _objectPinCode, 2]] call ExileServer_system_network_send_to; + _object enableRopeAttach false; + }; + _object setVariable ["ExileLastLockToggleAt", time]; + _object setVariable ["ExileAccessDenied", false]; + _object setVariable ["ExileAccessDeniedExpiresAt", 0]; + _object call ExileServer_system_vehicleSaveQueue_addVehicle; + } + else + { + if (_object call ExileClient_util_world_isInTraderZone) then + { + [_sessionID,"lockResponse",["Wrong PIN!", false, "", "", -1]] call ExileServer_system_network_send_to; + } + else + { + _numberOfFails = _object getVariable ["ExileNumberOfFailedLocks", 0]; + _numberOfFails = _numberOfFails + 1; + _object setVariable ["ExileNumberOfFailedLocks", _numberOfFails]; + switch (_numberOfFails) do + { + case 1: + { + [_sessionID,"lockResponse",["Wrong PIN! Two tries remaining.", false, "", "", -1]] call ExileServer_system_network_send_to; + }; + case 2: + { + [_sessionID,"lockResponse",["Wrong PIN! One try remaining.", false, "", "", -1]] call ExileServer_system_network_send_to; + }; + default + { + [_sessionID,"lockResponse",["Wrong PIN! Access denied for five minutes.", false, "", "", -1]] call ExileServer_system_network_send_to; + _object setVariable ["ExileAccessDenied", true]; + _object setVariable ["ExileAccessDeniedExpiresAt", time + (5 * 60)]; + }; + }; + }; + }; + }; +}; +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_object_lock_network_scanCodeLockRequest.sqf b/@exileserver/addons/exile_server/code/ExileServer_object_lock_network_scanCodeLockRequest.sqf new file mode 100644 index 0000000..6129e75 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_object_lock_network_scanCodeLockRequest.sqf @@ -0,0 +1,55 @@ +/** + * ExileServer_object_lock_network_scanCodeLockRequest + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_sessionID","_parameters","_object","_player","_lastToggleAt","_pinCode","_signature"]; +_sessionID = _this select 0; +_parameters = _this select 1; +try +{ + _object = objectFromNetId (_parameters select 0); + if (isNull _object) then + { + throw "NOPE"; + }; + _player = _sessionID call ExileServer_system_session_getPlayerObject; + if (isNull _player) then + { + throw "NOPE"; + }; + if ((_player distance _object) > 5) then + { + throw "NOPE"; + }; + if !("Exile_Item_ThermalScannerPro" in (magazines _player)) then + { + throw "NOPE"; + }; + if (_object call ExileClient_util_world_isInTraderZone) then + { + throw "NOPE"; + }; + _lastToggleAt = _object getVariable ["ExileLastLockToggleAt", -1]; + if (_lastToggleAt isEqualTo -1) then + { + throw "NOPE"; + }; + if ((time - _lastToggleAt) > (15 * 60)) then + { + throw "NOPE"; + }; + _pinCode = _object getVariable ["ExileAccessCode", "0000"]; + _signature = _pinCode select [1, 3]; + throw _signature; +} +catch +{ + [_sessionID, "scanCodeLockResponse", [_exception]] call ExileServer_system_network_send_to; +}; \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_object_lock_network_setPin.sqf b/@exileserver/addons/exile_server/code/ExileServer_object_lock_network_setPin.sqf new file mode 100644 index 0000000..73dff81 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_object_lock_network_setPin.sqf @@ -0,0 +1,29 @@ +/** + * ExileServer_object_lock_network_setPin + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_sessionID","_parameters","_object","_pincode","_newPinCode","_objectPinCode"]; +_sessionID = _this select 0; +_parameters = _this select 1; +_object = objectFromNetId (_parameters select 0); +_pincode = _parameters select 1; +_newPinCode = _parameters select 2; +_objectPinCode = _object getVariable ["ExileAccessCode", "000000"]; +if(_pincode isEqualTo _objectPinCode)then +{ + _object setVariable ["ExileAccessCode",_newPinCode]; + [_sessionID, "setPinResponse", [["SuccessTitleOnly", ["PIN changed successfully!"]], netId _object, _newPinCode]] call ExileServer_system_network_send_to; + [_object,_newPinCode] call ExileServer_object_container_database_setpin; +} +else +{ + [_sessionID, "setPinResponse", [["ErrorTitleAndText", ["Wrong PIN!", "Please try again."]], "", ""]] call ExileServer_system_network_send_to; +}; +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_object_player_createBambi.sqf b/@exileserver/addons/exile_server/code/ExileServer_object_player_createBambi.sqf new file mode 100644 index 0000000..2a824ec --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_object_player_createBambi.sqf @@ -0,0 +1,149 @@ +/** + * ExileServer_object_player_createBambi + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_sessionID","_requestingPlayer","_spawnLocationMarkerName","_bambiPlayer","_accountData","_direction","_position","_spawnAreaPosition","_spawnAreaRadius","_clanID","_clanData","_clanGroup","_player","_devFriendlyMode","_devs","_parachuteNetID","_spawnType","_parachuteObject"]; +_sessionID = _this select 0; +_requestingPlayer = _this select 1; +_spawnLocationMarkerName = _this select 2; +_bambiPlayer = _this select 3; +_accountData = _this select 4; +_direction = random 360; +if ((count ExileSpawnZoneMarkerPositions) isEqualTo 0) then +{ + _position = call ExileClient_util_world_findCoastPosition; + if ((toLower worldName) isEqualTo "namalsk") then + { + while {(_position distance2D [76.4239, 107.141, 0]) < 100} do + { + _position = call ExileClient_util_world_findCoastPosition; + }; + }; +} +else +{ + _spawnAreaPosition = getMarkerPos _spawnLocationMarkerName; + _spawnAreaRadius = getNumber(configFile >> "CfgSettings" >> "BambiSettings" >> "spawnZoneRadius"); + _position = [_spawnAreaPosition, _spawnAreaRadius] call ExileClient_util_math_getRandomPositionInCircle; + while {surfaceIsWater _position} do + { + _position = [_spawnAreaPosition, _spawnAreaRadius] call ExileClient_util_math_getRandomPositionInCircle; + }; +}; +_name = name _requestingPlayer; +_clanID = (_accountData select 3); +if !((typeName _clanID) isEqualTo "SCALAR") then +{ + _clanID = -1; + _clanData = []; +} +else +{ + _clanData = missionNamespace getVariable [format ["ExileServer_clan_%1",_clanID],[]]; + if(isNull (_clanData select 5))then + { + _clanGroup = createGroup independent; + _clanData set [5,_clanGroup]; + _clanGroup setGroupIdGlobal [_clanData select 0]; + missionNameSpace setVariable [format ["ExileServer_clan_%1",_clanID],_clanData]; + } + else + { + _clanGroup = (_clanData select 5); + }; + [_player] joinSilent _clanGroup; +}; +_bambiPlayer setPosATL [_position select 0,_position select 1,0]; +_bambiPlayer disableAI "FSM"; +_bambiPlayer disableAI "MOVE"; +_bambiPlayer disableAI "AUTOTARGET"; +_bambiPlayer disableAI "TARGET"; +_bambiPlayer disableAI "CHECKVISIBLE"; +_bambiPlayer setDir _direction; +_bambiPlayer setName _name; +_bambiPlayer setVariable ["ExileMoney", 0, true]; +_bambiPlayer setVariable ["ExileScore", (_accountData select 0)]; +_bambiPlayer setVariable ["ExileKills", (_accountData select 1)]; +_bambiPlayer setVariable ["ExileDeaths", (_accountData select 2)]; +_bambiPlayer setVariable ["ExileClanID", _clanID]; +_bambiPlayer setVariable ["ExileClanData", _clanData]; +_bambiPlayer setVariable ["ExileHunger", 100]; +_bambiPlayer setVariable ["ExileThirst", 100]; +_bambiPlayer setVariable ["ExileTemperature", 37]; +_bambiPlayer setVariable ["ExileWetness", 0]; +_bambiPlayer setVariable ["ExileAlcohol", 0]; +_bambiPlayer setVariable ["ExileName", _name]; +_bambiPlayer setVariable ["ExileOwnerUID", getPlayerUID _requestingPlayer]; +_bambiPlayer setVariable ["ExileIsBambi", true]; +_bambiPlayer setVariable ["ExileXM8IsOnline", false, true]; +_bambiPlayer setVariable ["ExileLocker", (_accountData select 4), true]; +_devFriendlyMode = getNumber (configFile >> "CfgSettings" >> "ServerSettings" >> "devFriendyMode"); +if (_devFriendlyMode isEqualTo 1) then +{ + _devs = getArray (configFile >> "CfgSettings" >> "ServerSettings" >> "devs"); + { + if ((getPlayerUID _requestingPlayer) isEqualTo (_x select 0))exitWith + { + if((name _requestingPlayer) isEqualTo (_x select 1))then + { + _bambiPlayer setVariable ["ExileMoney", 500000, true]; + _bambiPlayer setVariable ["ExileScore", 100000]; + }; + }; + } + forEach _devs; +}; +_parachuteNetID = ""; +if ((getNumber(configFile >> "CfgSettings" >> "BambiSettings" >> "parachuteSpawning")) isEqualTo 1) then +{ + _position set [2, getNumber(configFile >> "CfgSettings" >> "BambiSettings" >> "parachuteDropHeight")]; + if ((getNumber(configFile >> "CfgSettings" >> "BambiSettings" >> "haloJump")) isEqualTo 1) then + { + _bambiPlayer addBackpackGlobal "B_Parachute"; + _bambiPlayer setPosATL _position; + _spawnType = 2; + } + else + { + _parachuteObject = createVehicle ["Steerable_Parachute_F", _position, [], 0, "CAN_COLLIDE"]; + _parachuteObject setDir _direction; + _parachuteObject setPosATL _position; + _parachuteObject enableSimulationGlobal true; + _parachuteNetID = netId _parachuteObject; + _spawnType = 1; + }; +} +else +{ + _spawnType = 0; +}; +_bambiPlayer addMPEventHandler ["MPKilled", {_this call ExileServer_object_player_event_onMpKilled}]; +_bambiPlayer call ExileServer_object_player_database_insert; +_bambiPlayer call ExileServer_object_player_database_update; +[ + _sessionID, + "createPlayerResponse", + [ + _bambiPlayer, + _parachuteNetID, + str (_accountData select 0), + (_accountData select 1), + (_accountData select 2), + 100, + 100, + 0, + (getNumber (configFile >> "CfgSettings" >> "BambiSettings" >> "protectionDuration")) * 60, + _clanData, + _spawnType + ] +] +call ExileServer_system_network_send_to; +[_sessionID, _bambiPlayer] call ExileServer_system_session_update; +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_object_player_database_insert.sqf b/@exileserver/addons/exile_server/code/ExileServer_object_player_database_insert.sqf new file mode 100644 index 0000000..cd009a4 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_object_player_database_insert.sqf @@ -0,0 +1,16 @@ +/** + * ExileServer_object_player_database_insert + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_player","_playerID"]; +_player = _this; +_playerID = format["createPlayer:%1:%2", _player getVariable ["ExileOwnerUID", "SomethingWentWrong"], _player getVariable ["ExileName", "SomethingWentWrong"]] call ExileServer_system_database_query_insertSingle; +_player setVariable ["ExileDatabaseID", _playerID]; +_playerID \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_object_player_database_load.sqf b/@exileserver/addons/exile_server/code/ExileServer_object_player_database_load.sqf new file mode 100644 index 0000000..f8828c4 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_object_player_database_load.sqf @@ -0,0 +1,246 @@ +/** + * ExileServer_object_player_database_load + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_data","_oldPlayerObject","_playerUID","_sessionID","_position","_direction","_player","_clanID","_clanName","_clanData","_clanGroup","_devFriendlyMode","_devs","_requestingPlayer","_bambiPlayer","_headgear","_goggles","_binocular","_primaryWeapon","_handgunWeapon","_secondaryWeapon","_currentWeapon","_uniform","_vest","_backpack","_uniformContainer","_vestContainer","_backpackContainer","_assignedItems"]; +_data = _this select 0; +_oldPlayerObject = _this select 1; +_playerUID = _this select 2; +_sessionID = _this select 3; +_name = name _oldPlayerObject; +_position = [_data select 11, _data select 12, _data select 13]; +_direction = _data select 10; +_player = (createGroup independent) createUnit ["Exile_Unit_Player", _position, [], 0, "CAN_COLLIDE"]; +_player setDir _direction; +_player setPosATL _position; +_player disableAI "FSM"; +_player disableAI "MOVE"; +_player disableAI "AUTOTARGET"; +_player disableAI "TARGET"; +_player disableAI "CHECKVISIBLE"; +_clanID = (_data select 42); +_clanName = (_data select 43); +if !((typeName _clanID) isEqualTo "SCALAR") then +{ + _clanID = -1; + _clanData = []; +} +else +{ + _clanData = missionnamespace getVariable [format ["ExileServer_clan_%1",_clanID],[]]; + if(isNull (_clanData select 5))then + { + _clanGroup = createGroup independent; + _clanData set [5,_clanGroup]; + _clanGroup setGroupIdGlobal [_clanData select 0]; + missionNameSpace setVariable [format ["ExileServer_clan_%1",_clanID],_clanData]; + } + else + { + _clanGroup = (_clanData select 5); + }; + [_player] joinSilent _clanGroup; +}; +_player setDamage (_data select 3); +_player setName _name; +_player setVariable ["ExileMoney", (_data select 38), true]; +_player setVariable ["ExileScore", (_data select 39)]; +_player setVariable ["ExileKills", (_data select 40)]; +_player setVariable ["ExileDeaths", (_data select 41)]; +_player setVariable ["ExileClanID", _clanID]; +_player setVariable ["ExileClanData", _clanData]; +_player setVariable ["ExileName", _name]; +_player setVariable ["ExileOwnerUID", _playerUID]; +_player setVariable ["ExileDatabaseID", _data select 0]; +_player setVariable ["ExileHunger", _data select 4]; +_player setVariable ["ExileThirst", _data select 5]; +_player setVariable ["ExileAlcohol", _data select 6]; +_player setVariable ["ExileTemperature", _data select 44]; +_player setVariable ["ExileWetness", _data select 45]; +_player setVariable ["ExileIsBambi", false]; +_player setVariable ["ExileXM8IsOnline", false, true]; +_player setOxygenRemaining (_data select 7); +_player setBleedingRemaining (_data select 8); +_player setVariable ["ExileLocker", (_data select 46), true]; +[_player, _data select 9] call ExileClient_util_player_applyHitPointMap; +_devFriendlyMode = getNumber (configFile >> "CfgSettings" >> "ServerSettings" >> "devFriendyMode"); +if (_devFriendlyMode isEqualTo 1) then +{ + _devs = getArray (configFile >> "CfgSettings" >> "ServerSettings" >> "devs"); + { + if ((getPlayerUID _requestingPlayer) isEqualTo (_x select 0))exitWith + { + if((name _requestingPlayer) isEqualTo (_x select 1))then + { + _bambiPlayer setVariable ["ExileMoney", 500000, true]; + _bambiPlayer setVariable ["ExileScore", 100000]; + }; + }; + } + forEach _devs; +}; +_player call ExileClient_util_playerCargo_clear; +_headgear = _data select 23; +if (_headgear != "") then +{ + _player addHeadgear _headgear; +}; +_goggles = _data select 20; +if (_goggles != "") then +{ + _player addGoggles _goggles; +}; +_binocular = _data select 24; +if (_binocular != "") then +{ + _player addWeaponGlobal _binocular; +}; +_primaryWeapon = _data select 26; +if (_primaryWeapon != "") then +{ + _player addWeaponGlobal _primaryWeapon; + removeAllPrimaryWeaponItems _player; + { + if (_x != "") then + { + _player addPrimaryWeaponItem _x; + }; + } + forEach (_data select 27); +}; +_handgunWeapon = _data select 22; +if (_handgunWeapon != "") then +{ + _player addWeaponGlobal _handgunWeapon; + removeAllHandgunItems _player; + { + if (_x != "") then + { + _player addHandgunItem _x; + }; + } + forEach (_data select 21); +}; +_secondaryWeapon = _data select 28; +if (_secondaryWeapon != "") then +{ + _player addWeaponGlobal _secondaryWeapon; + { + if (_x != "") then + { + _player addSecondaryWeaponItem _x; + }; + } + forEach (_data select 29); +}; + _currentWeapon = _data select 19; +if (_currentWeapon != "") then +{ + _player selectWeapon _currentWeapon; +}; +{ + _player addWeaponItem [_x select 0, [_x select 1, _x select 2, _x select 3]]; +} +forEach (_data select 25); +_uniform = _data select 30; +_vest = _data select 34; +_backpack = _data select 15; +if (_uniform != "") then +{ + _player forceAddUniform _uniform; +}; +if (_vest != "") then +{ + _player addVest _vest; +}; +if (_backpack != "") then +{ + _player addBackpackGlobal _backpack; +}; +_uniformContainer = uniformContainer _player; +if !(isNil "_uniformContainer") then +{ + { + _uniformContainer addWeaponCargoGlobal _x; + } + forEach (_data select 33); + { + _uniformContainer addMagazineAmmoCargo [_x select 0, 1, _x select 1]; + } + forEach (_data select 32); + { + _uniformContainer addItemCargoGlobal _x; + } + forEach (_data select 31); +}; +_vestContainer = vestContainer _player; +if !(isNil "_vestContainer") then +{ + { + _vestContainer addWeaponCargoGlobal _x; + } + forEach (_data select 37); + { + _vestContainer addMagazineAmmoCargo [_x select 0, 1, _x select 1]; + } + forEach (_data select 36); + { + _vestContainer addItemCargoGlobal _x; + } + forEach (_data select 35); +}; +_backpackContainer = backpackContainer _player; +if !(isNil "_backpackContainer") then +{ + { + _backpackContainer addWeaponCargoGlobal _x; + } + forEach (_data select 18); + { + _backpackContainer addMagazineAmmoCargo [_x select 0, 1, _x select 1]; + } + forEach (_data select 17); + { + _backpackContainer addItemCargoGlobal _x; + } + forEach (_data select 16); +}; +_assignedItems = _data select 14; +if !(_assignedItems isEqualTo []) then +{ + { + _player linkItem _x; + } + forEach _assignedItems; +}; +_player addMPEventHandler ["MPKilled", {_this call ExileServer_object_player_event_onMpKilled}]; +if (getNumber (configFile >> "CfgSettings" >> "VehicleSpawn" >> "thermalVision") isEqualTo 0) then +{ + _player addEventHandler ["WeaponAssembled", {(_this select 1) disableTIEquipment true;}]; +}; +[ + _sessionID, + "loadPlayerResponse", + [ + (netId _player), + str (_player getVariable ["ExileScore", 0]), + (_player getVariable ["ExileKills", 0]), + (_player getVariable ["ExileDeaths", 0]), + (_player getVariable ["ExileHunger", 100]), + (_player getVariable ["ExileThirst", 100]), + (_player getVariable ["ExileAlcohol", 0]), + (_player getVariable ["ExileClanData", []]), + (_player getVariable ["ExileTemperature", 0]), + (_player getVariable ["ExileWetness", 0]) + ] +] +call ExileServer_system_network_send_to; +[_sessionID, _player] call ExileServer_system_session_update; +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_object_player_database_update.sqf b/@exileserver/addons/exile_server/code/ExileServer_object_player_database_update.sqf new file mode 100644 index 0000000..e3cc508 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_object_player_database_update.sqf @@ -0,0 +1,60 @@ +/** + * ExileServer_object_player_database_update + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_player","_playerID","_playerPos","_data","_extDB2Message"]; +_player = _this; +_playerID = _player getVariable["ExileDatabaseID", -1]; +_playerPos = getPosATL _player; +_data = +[ + _player getVariable ["ExileName",""], + damage _player, + _player getVariable ["ExileHunger", 100], + _player getVariable ["ExileThirst", 100], + _player getVariable ["ExileAlcohol", 0], + getOxygenRemaining _player, + getBleedingRemaining _player, + _player call ExileClient_util_player_getHitPointMap, + getDir _player, + _playerPos select 0, + _playerPos select 1, + _playerPos select 2, + assignedItems _player, + backpack _player, + (getItemCargo backpackContainer _player) call ExileClient_util_cargo_getMap, + (backpackContainer _player) call ExileClient_util_cargo_getMagazineMap, + (getWeaponCargo backpackContainer _player) call ExileClient_util_cargo_getMap, + currentWeapon _player, + goggles _player, + handgunItems _player, + handgunWeapon _player, + headgear _player, + binocular _player, + _player call ExileClient_util_inventory_getLoadedMagazinesMap, + primaryWeapon _player, + primaryWeaponItems _player, + secondaryWeapon _player, + secondaryWeaponItems _player, + uniform _player, + (getItemCargo uniformContainer _player) call ExileClient_util_cargo_getMap, + (uniformContainer _player) call ExileClient_util_cargo_getMagazineMap, + (getWeaponCargo uniformContainer _player) call ExileClient_util_cargo_getMap, + vest _player, + (getItemCargo vestContainer _player) call ExileClient_util_cargo_getMap, + (vestContainer _player) call ExileClient_util_cargo_getMagazineMap, + (getWeaponCargo vestContainer _player) call ExileClient_util_cargo_getMap, + _player getVariable ["ExileTemperature", 0], + _player getVariable ["ExileWetness", 0], + _playerID +]; +_extDB2Message = ["updatePlayer", _data] call ExileServer_util_extDB2_createMessage; +_extDB2Message call ExileServer_system_database_query_fireAndForget; +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_object_player_event_onMpKilled.sqf b/@exileserver/addons/exile_server/code/ExileServer_object_player_event_onMpKilled.sqf new file mode 100644 index 0000000..70d163e --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_object_player_event_onMpKilled.sqf @@ -0,0 +1,194 @@ +/** + * ExileServer_object_player_event_onMpKilled + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_victim","_killer","_countDeath","_countKill","_killSummary","_killingPlayer","_killType","_oldVictimRespect","_newVictimRespect","_oldKillerRespect","_newKillerRespect","_systemChat","_modifyVictimRespect","_respectLoss","_perks","_minRespectTransfer","_respectTransfer","_perkNames","_killerStatsNeedUpdate","_newKillerFrags","_victimStatsNeedUpdate","_newVictimDeaths","_victimPosition"]; +_victim = _this select 0; +_killer = _this select 1; +if (!isServer || hasInterface || isNull _victim) exitWith {}; +_victim setVariable ["ExileDiedAt", time]; +if !(isPlayer _victim) exitWith {}; +_victim setVariable ["ExileIsDead", true]; +_victim setVariable ["ExileName", name _victim, true]; +_countDeath = false; +_countKill = false; +_killSummary = []; +_killingPlayer = _killer call ExileServer_util_getFragKiller; +_killType = [_victim, _killer, _killingPlayer] call ExileServer_util_getFragType; +_oldVictimRespect = _victim getVariable ["ExileScore", 0]; +_newVictimRespect = _oldVictimRespect; +_oldKillerRespect = 0; +if !(isNull _killingPlayer) then +{ + _oldKillerRespect = _killingPlayer getVariable ["ExileScore", 0]; +}; +_newKillerRespect = _oldKillerRespect; +switch (_killType) do +{ + default + { + _countDeath = true; + _systemChat = format ["%1 died for an unknown reason!", name _victim]; + _newVictimRespect = _oldVictimRespect - round ((abs _oldVictimRespect) / 100 * (getNumber (configFile >> "CfgSettings" >> "Respect" >> "Percentages" >> "unlucky"))); + }; + case 1: + { + _countDeath = true; + _modifyVictimRespect = true; + _systemChat = format ["%1 commited suicide!", name _victim]; + _newVictimRespect = _oldVictimRespect - round ((abs _oldVictimRespect) / 100 * (getNumber (configFile >> "CfgSettings" >> "Respect" >> "Percentages" >> "suicide"))); + }; + case 2: + { + _countDeath = true; + _countKill = false; + _systemChat = format ["%1 died while playing Russian Roulette!", name _victim]; + _newVictimRespect = _oldVictimRespect; + _victim call ExileServer_system_russianRoulette_event_onPlayerDied; + }; + case 3: + { + _countDeath = true; + _countKill = false; + _systemChat = format ["%1 crashed to death!", name _victim]; + _newVictimRespect = _oldVictimRespect - round ((abs _oldVictimRespect) / 100 * (getNumber (configFile >> "CfgSettings" >> "Respect" >> "Percentages" >> "crash"))); + }; + case 4: + { + _countDeath = true; + _countKill = false; + _systemChat = format ["%1 was killed by an NPC!", name _victim]; + _newVictimRespect = _oldVictimRespect - round ((abs _oldVictimRespect) / 100 * (getNumber (configFile >> "CfgSettings" >> "Respect" >> "Percentages" >> "npc"))); + }; + case 5: + { + _countDeath = false; + _countKill = false; + _systemChat = format ["%1 was team-killed by %2!", name _victim, name _killingPlayer]; + _respectLoss = round ((abs _oldKillerRespect) / 100 * (getNumber (configFile >> "CfgSettings" >> "Respect" >> "Percentages" >> "friendyFire"))); + _newKillerRespect = _oldKillerRespect - _respectLoss; + _killSummary pushBack ["FRIENDLY FIRE", -1 * _respectLoss]; + }; + case 6: + { + _countDeath = false; + _countKill = false; + _systemChat = format ["%1 was killed by %2! (BAMBI SLAYER)", name _victim, name _killingPlayer]; + _respectLoss = round ((abs _oldKillerRespect) / 100 * (getNumber (configFile >> "CfgSettings" >> "Respect" >> "Percentages" >> "bambiKill"))); + _newKillerRespect = _oldKillerRespect - _respectLoss; + _killSummary pushBack ["BAMBI SLAYER", -1 * _respectLoss]; + }; + case 7: + { + _countDeath = true; + _countKill = true; + _perks = [_victim, _killer, _killingPlayer] call ExileServer_util_getFragPerks; + _minRespectTransfer = getNumber (configFile >> "CfgSettings" >> "Respect" >> "minRespectTransfer"); + _respectTransfer = round ((abs _oldVictimRespect) / 100 * (getNumber (configFile >> "CfgSettings" >> "Respect" >> "Percentages" >> "frag"))); + if (_respectTransfer < _minRespectTransfer) then + { + _respectTransfer = _minRespectTransfer; + }; + _newVictimRespect = _oldVictimRespect - _respectTransfer; + _newKillerRespect = _oldKillerRespect + _respectTransfer; + _killSummary pushBack ["ENEMY FRAGGED", _respectTransfer]; + if (_perks isEqualTo []) then + { + _systemChat = format ["%1 was killed by %2!", name _victim, name _killingPlayer]; + } + else + { + _perkNames = []; + { + _perkNames pushBack (_x select 0); + _killSummary pushBack _x; + _newKillerRespect = _newKillerRespect + (_x select 1); + } + forEach _perks; + _systemChat = format ["%1 was killed by %2! (%3)", name _victim, name _killingPlayer, _perkNames joinString ", "]; + }; + }; +}; +if !(isNull _killingPlayer) then +{ + if !(_killSummary isEqualTo []) then + { + [_killingPlayer, "showFragRequest", [_killSummary]] call ExileServer_system_network_send_to; + }; +}; +if !(isNull _killingPlayer) then +{ + _killerStatsNeedUpdate = false; + if (_countKill) then + { + _newKillerFrags = _killingPlayer getVariable ["ExileKills", 0]; + _newKillerFrags = _newKillerFrags + 1; + _killerStatsNeedUpdate = true; + _killingPlayer setVariable ["ExileKills", _newKillerFrags]; + format["addAccountKill:%1", getPlayerUID _killingPlayer] call ExileServer_system_database_query_fireAndForget; + }; + if !(_newKillerRespect isEqualTo _oldKillerRespect) then + { + _killingPlayer setVariable ["ExileScore", _newKillerRespect]; + _killerStatsNeedUpdate = true; + format["setAccountScore:%1:%2", _newKillerRespect, getPlayerUID _killingPlayer] call ExileServer_system_database_query_fireAndForget; + }; + if (_killerStatsNeedUpdate) then + { + _killingPlayer call ExileServer_object_player_sendStatsUpdate; + }; +}; +_victimStatsNeedUpdate = false; +if (_countDeath) then +{ + _newVictimDeaths = _victim getVariable ["ExileDeaths", 0]; + _newVictimDeaths = _newVictimDeaths + 1; + _victim setVariable ["ExileDeaths", _newVictimDeaths]; + _victimStatsNeedUpdate = true; + format["addAccountDeath:%1", getPlayerUID _victim] call ExileServer_system_database_query_fireAndForget; +}; +if !(_newVictimRespect isEqualTo _oldVictimRespect) then +{ + _victim setVariable ["ExileScore", _newVictimRespect]; + _victimStatsNeedUpdate = true; + format["setAccountScore:%1:%2", _newVictimRespect, getPlayerUID _victim] call ExileServer_system_database_query_fireAndForget; +}; +if (_victimStatsNeedUpdate) then +{ + _victim call ExileServer_object_player_sendStatsUpdate; +}; +if ((vehicle _victim) isEqualTo _victim) then +{ + if !(underwater _victim) then + { + if !(_victim call ExileClient_util_world_isInTraderZone) then + { + _victim call ExileServer_object_flies_spawn; + }; + }; +}; +if !(_systemChat isEqualTo "") then +{ + if ((getNumber (configFile >> "CfgSettings" >> "KillFeed" >> "showKillFeed")) isEqualTo 1) then + { + ["systemChatRequest", [_systemChat]] call ExileServer_system_network_send_broadcast; + }; +}; +if !(_systemChat isEqualTo "") then +{ + if ((getNumber (configFile >> "CfgSettings" >> "Logging" >> "deathLogging")) isEqualTo 1) then + { + "extDB3" callExtension format["1:DEATH:%1", _systemChat]; + }; +}; +_victimPosition = getPos _victim; +format["insertPlayerHistory:%1:%2:%3:%4:%5", getPlayerUID _victim, name _victim, _victimPosition select 0, _victimPosition select 1, _victimPosition select 2] call ExileServer_system_database_query_fireAndForget; +format["deletePlayer:%1", _victim getVariable ["ExileDatabaseId", -1]] call ExileServer_system_database_query_fireAndForget; +true diff --git a/@exileserver/addons/exile_server/code/ExileServer_object_player_network_beginTakeAllRequest.sqf b/@exileserver/addons/exile_server/code/ExileServer_object_player_network_beginTakeAllRequest.sqf new file mode 100644 index 0000000..fcb9854 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_object_player_network_beginTakeAllRequest.sqf @@ -0,0 +1,24 @@ +/** + * ExileServer_object_player_network_beginTakeAllRequest + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_sessionID","_parameters","_objectNetID","_object"]; +_sessionID = _this select 0; +_parameters = _this select 1; +_objectNetID = _parameters select 0; +_object = objectFromNetId _objectNetID; +if !(isNull _object) then +{ + if ((_object getVariable ["ExileTakeAllLock", ""]) isEqualTo "") then + { + _object setVariable ["ExileTakeAllLock", _sessionID]; + [_sessionID, "beginTakeAllResponse", [_objectNetID]] call ExileServer_system_network_send_to; + }; +}; \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_object_player_network_connectionTest.sqf b/@exileserver/addons/exile_server/code/ExileServer_object_player_network_connectionTest.sqf new file mode 100644 index 0000000..03b4f44 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_object_player_network_connectionTest.sqf @@ -0,0 +1,15 @@ +/** + * ExileServer_object_player_network_connectionTest + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_sessionID"]; +_sessionID = _this select 0; +[_sessionID, "connectionTest", [true]] call ExileServer_system_network_send_to; +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_object_player_network_createPlayerRequest.sqf b/@exileserver/addons/exile_server/code/ExileServer_object_player_network_createPlayerRequest.sqf new file mode 100644 index 0000000..07ea4ef --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_object_player_network_createPlayerRequest.sqf @@ -0,0 +1,48 @@ +/** + * ExileServer_object_player_network_createPlayerRequest + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_sessionID","_parameters","_requestingPlayer","_spawnLocationMarkerName","_playerUID","_accountData","_bambiPlayer","_cargoType"]; +_sessionID = _this select 0; +_parameters = _this select 1; +_requestingPlayer = _sessionID call ExileServer_system_session_getPlayerObject; +try +{ + if (isNull _requestingPlayer) then + { + throw format ["Session %1 requested a bambi character, but doesn't have a player object. Hacker or Monday?", _sessionID]; + }; + _spawnLocationMarkerName = _parameters select 0; + _playerUID = getPlayerUID _requestingPlayer; + if(_playerUID isEqualTo "")then + { + throw format ["Player: '%1' has no player UID. Arma/Steam sucks!.",name _requestingPlayer]; + }; + _accountData = format["getAccountStats:%1", _playerUID] call ExileServer_system_database_query_selectSingle; + _bambiPlayer = (createGroup independent) createUnit ["Exile_Unit_Player", [0,0,0], [], 0, "CAN_COLLIDE"]; + removeHeadgear _bambiPlayer; + { + _cargoType = _x call ExileClient_util_cargo_getType; + switch (_cargoType) do + { + case 1: { _bambiPlayer addItem _x; }; + case 2: { _bambiPlayer addWeaponGlobal _x; }; + case 3: { _bambiPlayer addBackpackGlobal _x; }; + case 4: { _bambiPlayer linkItem _x; }; + default { _bambiPlayer addItem _x; }; + }; + } + forEach getArray(configFile >> "CfgSettings" >> "BambiSettings" >> "loadOut"); + [_sessionID, _requestingPlayer, _spawnLocationMarkerName, _bambiPlayer, _accountData] call ExileServer_object_player_createBambi; +} +catch +{ + _exception call ExileServer_util_log; +}; \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_object_player_network_endBambiStateRequest.sqf b/@exileserver/addons/exile_server/code/ExileServer_object_player_network_endBambiStateRequest.sqf new file mode 100644 index 0000000..4470bf3 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_object_player_network_endBambiStateRequest.sqf @@ -0,0 +1,15 @@ +/** + * ExileServer_object_player_network_endBambiStateRequest + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_sessionID","_playerObject"]; +_sessionID = _this select 0; +_playerObject = _sessionID call ExileServer_system_session_getPlayerObject; +_playerObject setVariable["ExileIsBambi", false]; \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_object_player_network_endTakeAllRequest.sqf b/@exileserver/addons/exile_server/code/ExileServer_object_player_network_endTakeAllRequest.sqf new file mode 100644 index 0000000..a97808a --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_object_player_network_endTakeAllRequest.sqf @@ -0,0 +1,23 @@ +/** + * ExileServer_object_player_network_endTakeAllRequest + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_sessionID","_parameters","_objectNetID","_object"]; +_sessionID = _this select 0; +_parameters = _this select 1; +_objectNetID = _parameters select 0; +_object = objectFromNetId _objectNetID; +if !(isNull _object) then +{ + if ((_object getVariable ["ExileTakeAllLock", ""]) isEqualTo _sessionID) then + { + _object setVariable ["ExileTakeAllLock", nil]; + }; +}; \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_object_player_network_hasPlayerRequest.sqf b/@exileserver/addons/exile_server/code/ExileServer_object_player_network_hasPlayerRequest.sqf new file mode 100644 index 0000000..ecda875 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_object_player_network_hasPlayerRequest.sqf @@ -0,0 +1,39 @@ +/** + * ExileServer_object_player_network_hasPlayerRequest + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_sessionID","_player","_hasAlivePlayer"]; +_sessionID = _this select 0; +_player = _sessionID call ExileServer_system_session_getPlayerObject; +try +{ + format ["Dispatching hasPlayerRequest for session '%1'...", _sessionID] call ExileServer_util_log; + if (isNull _player) then + { + throw "Player object is null!"; + }; + _uid = getPlayerUID _player; + if (isNil "_uid") then + { + throw "getPlayerUID returned nil!"; + }; + if (_uid isEqualTo "") then + { + throw "getPlayerUID returned an empty string!"; + }; + _hasAlivePlayer = format["hasAlivePlayer:%1", _uid] call ExileServer_system_database_query_selectSingleField; + [_sessionID, "hasPlayerResponse", [_hasAlivePlayer]] call ExileServer_system_network_send_to; +} +catch +{ + "hasPlayerRequest failed!" call ExileServer_util_log; + _exception call ExileServer_util_log; +}; +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_object_player_network_hideBodyRequest.sqf b/@exileserver/addons/exile_server/code/ExileServer_object_player_network_hideBodyRequest.sqf new file mode 100644 index 0000000..8a09a4f --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_object_player_network_hideBodyRequest.sqf @@ -0,0 +1,50 @@ +/** + * ExileServer_object_player_network_hideBodyRequest + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_sessionId","_parameters","_corpse","_player","_sessionID"]; +_sessionId = _this select 0; +_parameters = _this select 1; +_corpse = _parameters select 0; +try +{ + _player = _sessionID call ExileServer_system_session_getPlayerObject; + if(isNull _player)then + { + throw "player NULL"; + }; + if(isNull _corpse)then + { + throw "corpse NULL"; + }; + if !('Exile_Melee_Shovel' isEqualTo (currentWeapon _player)) then + { + throw "You need a shovel to do that."; + }; + if !((typeOf _corpse) isEqualTo "Exile_Unit_Player") then + { + throw "You can only bury players."; + }; + if !(_corpse getVariable ["ExileIsDead", false]) then + { + throw "You can only bury the dead."; + }; + if (_player getVariable ["ExileIsDead", false]) then + { + throw "You are too dead for this."; + }; + deleteVehicle _corpse; + [_sessionID, "toastRequest", ["SuccessTitleOnly", ["Corpse hidden!"]]] call ExileServer_system_network_send_to; +} +catch +{ + [_sessionID, "toastRequest", ["ErrorTitleAndText", ["Failed to bury corpse!", _exception]]] call ExileServer_system_network_send_to; +}; +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_object_player_network_loadPlayerRequest.sqf b/@exileserver/addons/exile_server/code/ExileServer_object_player_network_loadPlayerRequest.sqf new file mode 100644 index 0000000..b4487cd --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_object_player_network_loadPlayerRequest.sqf @@ -0,0 +1,37 @@ +/** + * ExileServer_object_player_network_loadPlayerRequest + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_sessionID","_playerObject","_playerUID","_playerData"]; +_sessionID = _this select 0; +try +{ + _playerObject = _sessionID call ExileServer_system_session_getPlayerObject; + if (isNull _playerObject) then + { + throw "Player object is null!"; + }; + _playerUID = getPlayerUID _playerObject; + if (isNil "_playerUID") then + { + throw "Player UID is nil!"; + }; + if (_playerUID isEqualTo "") then + { + throw "Player UID is an empty string!"; + }; + _playerData = format["loadPlayer:%1", _playerUID] call ExileServer_system_database_query_selectSingle; + [_playerData, _playerObject, _playerUID, _sessionID] call ExileServer_object_player_database_load; +} +catch +{ + "loadPlayerRequest failed!" call ExileServer_util_log; + _exception call ExileServer_util_log; +}; \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_object_player_network_resetPlayerRequest.sqf b/@exileserver/addons/exile_server/code/ExileServer_object_player_network_resetPlayerRequest.sqf new file mode 100644 index 0000000..efa6f4f --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_object_player_network_resetPlayerRequest.sqf @@ -0,0 +1,19 @@ +/** + * ExileServer_object_player_network_resetPlayerRequest + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_sessionID","_player"]; +_sessionID = _this select 0; +_player = _sessionID call ExileServer_system_getPlayerObject; +if (!isNull _player) then +{ + deleteVehicle _player; +}; +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_object_player_network_savePlayerRequest.sqf b/@exileserver/addons/exile_server/code/ExileServer_object_player_network_savePlayerRequest.sqf new file mode 100644 index 0000000..dd334e2 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_object_player_network_savePlayerRequest.sqf @@ -0,0 +1,33 @@ +/** + * ExileServer_object_player_network_savePlayerRequest + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_sessionID","_parameters","_hunger","_thirst","_alcohol","_temperature","_wetness","_player"]; +_sessionID = _this select 0; +_parameters = _this select 1; +_hunger = _parameters select 0; +_thirst = _parameters select 1; +_alcohol = _parameters select 2; +_temperature = _parameters select 3; +_wetness = _parameters select 4; +_player = _sessionID call ExileServer_system_session_getPlayerObject; +if (!isNull _player) then +{ + _player setVariable["ExileHunger", _hunger]; + _player setVariable["ExileThirst", _thirst]; + _player setVariable["ExileAlcohol", _alcohol]; + _player setVariable["ExileTemperature", _temperature]; + _player setVariable["ExileWetness", _wetness]; + if !(_player in ExileSystemPlayerSaveASYNC) then + { + ExileSystemPlayerSaveASYNC pushBack _player; + }; +}; +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_object_player_network_setPlayerMoneyRequest.sqf b/@exileserver/addons/exile_server/code/ExileServer_object_player_network_setPlayerMoneyRequest.sqf new file mode 100644 index 0000000..f7fd8d5 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_object_player_network_setPlayerMoneyRequest.sqf @@ -0,0 +1,15 @@ +/** + * ExileServer_object_player_network_setPlayerMoneyRequest + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_sessionId","_parameters"]; +_sessionId = _this select 0; +_parameters = _this select 1; +// TODO: Honey pot, ban the idiot \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_object_player_network_switchMoveRequest.sqf b/@exileserver/addons/exile_server/code/ExileServer_object_player_network_switchMoveRequest.sqf new file mode 100644 index 0000000..9d02451 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_object_player_network_switchMoveRequest.sqf @@ -0,0 +1,21 @@ +/** + * ExileServer_object_player_network_switchMoveRequest + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_sessionId","_parameters","_playerNetID","_move","_player"]; +_sessionId = _this select 0; +_parameters = _this select 1; +_playerNetID = _parameters select 0; +_move = _parameters select 1; +_player = objectFromNetId _playerNetID; +if !(isNull _player) then +{ + ["switchMoveRequest", _parameters, _sessionId] call ExileServer_system_network_send_broadcast; +}; diff --git a/@exileserver/addons/exile_server/code/ExileServer_object_player_network_updatePlayerIncapacitatedRequest.sqf b/@exileserver/addons/exile_server/code/ExileServer_object_player_network_updatePlayerIncapacitatedRequest.sqf new file mode 100644 index 0000000..6925574 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_object_player_network_updatePlayerIncapacitatedRequest.sqf @@ -0,0 +1,20 @@ +/** + * ExileServer_object_player_network_updatePlayerIncapacitatedRequest + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_sessionID","_parameters","_isIncapacitated","_player"]; +_sessionID = _this select 0; +_parameters = _this select 1; +_isIncapacitated = _parameters select 0; +_player = _sessionID call ExileServer_system_session_getPlayerObject; +if !(isNull _player) then +{ + _player setVariable ["ExilePlayerIsIncapacitated", _isIncapacitated]; +}; \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_object_player_sendStatsUpdate.sqf b/@exileserver/addons/exile_server/code/ExileServer_object_player_sendStatsUpdate.sqf new file mode 100644 index 0000000..4bd3a18 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_object_player_sendStatsUpdate.sqf @@ -0,0 +1,21 @@ +/** + * ExileServer_object_player_sendStatsUpdate + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +[ + _this, + "updateStatsRequest", + [ + str (_this getVariable ["ExileScore", 0]), + _this getVariable ["ExileKills", 0], + _this getVariable ["ExileDeaths", 0] + ] +] +call ExileServer_system_network_send_to; \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_object_shippingContainer_network_smashShippingContainerRequest.sqf b/@exileserver/addons/exile_server/code/ExileServer_object_shippingContainer_network_smashShippingContainerRequest.sqf new file mode 100644 index 0000000..7fc3e96 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_object_shippingContainer_network_smashShippingContainerRequest.sqf @@ -0,0 +1,70 @@ +/** + * ExileServer_object_shippingContainer_network_smashShippingContainerRequest + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_sessionId","_parameters","_shippingContainer","_player","_shippingContainerVolume","_damagePerHit","_newDamage","_shippingContainerPosition","_numberOfItems","_weaponHolder"]; +_sessionId = _this select 0; +_parameters = _this select 1; +_shippingContainer = _parameters select 0; +try +{ + if (isNull _shippingContainer) then + { + throw format ["Cannot smash unknown shipping container!"]; + }; + if !(alive _shippingContainer) then + { + throw "Cannot smash destroyed shipping container!"; + }; + if !([_shippingContainer, "ShippingContainerSource"] call ExileClient_util_model_isInteraction) then + { + throw "Can only smash shipping containers!"; + }; + _player = _sessionId call ExileServer_system_session_getPlayerObject; + if (isNull _player) then + { + throw "Unknown players cannot smash shipping containers!"; + }; + if !(alive _player) then + { + throw "The dead cannot smash shipping containers!"; + }; + if ((_player distance _shippingContainer) > 30) then + { + throw "No long distance shipping container smashing! Nope!"; + }; + _shippingContainerVolume = _shippingContainer call ExileClient_util_model_getBoundingBoxVolume; + if (_shippingContainerVolume < 1) then + { + _shippingContainerVolume = 1; + }; + _damagePerHit = (1 / (_shippingContainerVolume * 0.5)) min 0.2; + _newDamage = ((damage _shippingContainer) + _damagePerHit) min 1; + if (_newDamage isEqualTo 1) then + { + _shippingContainerPosition = getPosATL _shippingContainer; + _shippingContainerPosition set [2, 0]; + _shippingContainer setDamage 999; + _numberOfItems = (ceil (_shippingContainerVolume / 10)) max 1; + format ["Spawning %1 junk metal at %2", _numberOfItems, _shippingContainerPosition] call ExileServer_util_log; + _weaponHolder = createVehicle ["GroundWeaponHolder", _shippingContainerPosition, [], 0, "CAN_COLLIDE"]; + _weaponHolder setPosATL _shippingContainerPosition; + _weaponHolder addMagazineCargoGlobal ["Exile_Item_JunkMetal", _numberOfItems]; + } + else + { + _shippingContainer setDamage _newDamage; + }; +} +catch +{ + _exception call ExileServer_util_log; +}; +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_object_supplyBox_network_attachSupplyBoxRequest.sqf b/@exileserver/addons/exile_server/code/ExileServer_object_supplyBox_network_attachSupplyBoxRequest.sqf new file mode 100644 index 0000000..a9b7277 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_object_supplyBox_network_attachSupplyBoxRequest.sqf @@ -0,0 +1,73 @@ +/** + * ExileServer_object_supplyBox_network_attachSupplyBoxRequest + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_sessionId","_parameters","_boxNetId","_box","_boxConfig","_vehicleTypes","_vehicles","_vehicle","_attachedObjects","_vehicleConfig","_cargoIndizes","_crew"]; +_sessionId = _this select 0; +_parameters = _this select 1; +_boxNetId = _parameters select 0; +try +{ + _box = objectFromNetId _boxNetId; + if (isNull _box) then + { + throw "Invalid box."; + }; + if !(isNull (attachedTo _box)) then + { + throw "Box already mounted."; + }; + _boxConfig = missionConfigFile >> "CfgVehicleTransport" >> typeOf _box; + _vehicleTypes = getArray (_boxConfig >> "vehicles"); + _vehicles = nearestObjects [_box, _vehicleTypes, 15]; + if (_vehicles isEqualTo []) then + { + throw "No transport vehicle nearby."; + }; + _vehicle = _vehicles select 0; + _attachedObjects = attachedObjects _vehicle; + { + if ((typeOf _x) isEqualTo (typeOf _box)) then + { + throw "Vehicle already transports a supply box."; + }; + } + forEach _attachedObjects; + _vehicleConfig = -1; + { + if ((typeOf _vehicle) isKindOf _x) exitWith + { + _vehicleConfig = _boxConfig >> _x; + }; + } + forEach _vehicleTypes; + if (_vehicleConfig isEqualTo -1) then + { + throw "Broken CfgVehicleTransport :("; + }; + _cargoIndizes = getArray (_vehicleConfig >> "cargoIndizes"); + _crew = fullCrew _vehicle; + { + if ((_x select 2) in _cargoIndizes) then + { + throw "Passengers are blocking cargo area." + }; + } + forEach _crew; + { + _vehicle lockCargo [_x, true]; + } + forEach _cargoIndizes; + _box attachTo [_vehicle, getArray (_vehicleConfig >> "attachPosition")]; + throw "Supply box mounted!" +} +catch +{ +}; \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_object_supplyBox_network_detachSupplyBoxRequest.sqf b/@exileserver/addons/exile_server/code/ExileServer_object_supplyBox_network_detachSupplyBoxRequest.sqf new file mode 100644 index 0000000..553bda7 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_object_supplyBox_network_detachSupplyBoxRequest.sqf @@ -0,0 +1,48 @@ +/** + * ExileServer_object_supplyBox_network_detachSupplyBoxRequest + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_sessionId","_parameters","_boxNetId","_box","_vehicle","_boxConfig","_vehicleConfig","_modelSpacePosition","_worldSpacePosition"]; +_sessionId = _this select 0; +_parameters = _this select 1; +_boxNetId = _parameters select 0; +try +{ + _box = objectFromNetId _boxNetId; + if (isNull _box) then + { + throw "Invalid box."; + }; + _vehicle = attachedTo _box; + if (isNull _vehicle) then + { + throw "Box not mounted."; + }; + _boxConfig = missionConfigFile >> "CfgVehicleTransport" >> typeOf _box; + _vehicleConfig = -1; + { + if (_vehicle isKindOf _x) exitWith + { + _vehicleConfig = _boxConfig >> _x; + }; + } + forEach getArray (_boxConfig >> "vehicles"); + _modelSpacePosition = getArray (_vehicleConfig >> "detachPosition"); + _modelSpacePosition pushBack 0; + _worldSpacePosition = _vehicle modelToWorld _modelSpacePosition; + _worldSpacePosition set [2, 0]; + detach _box; + _box setPosATL _worldSpacePosition; + _box setVelocity [0, 0, 0]; + throw "Crate unmounted!"; +} +catch +{ +}; \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_object_supplyBox_network_installSupplyBoxRequest.sqf b/@exileserver/addons/exile_server/code/ExileServer_object_supplyBox_network_installSupplyBoxRequest.sqf new file mode 100644 index 0000000..71bdd34 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_object_supplyBox_network_installSupplyBoxRequest.sqf @@ -0,0 +1,50 @@ +/** + * ExileServer_object_supplyBox_network_installSupplyBoxRequest + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_sessionId","_parameters","_boxNetId","_box","_territory","_playerObject","_sessionID","_access","_containerID"]; +_sessionId = _this select 0; +_parameters = _this select 1; +_boxNetId = _parameters select 0; +try +{ + _box = objectFromNetId _boxNetId; + if (isNull _box) then + { + throw "Box null"; + }; + if !((typeOf _box) isEqualTo "Exile_Container_SupplyBox") then + { + throw "Fuck off"; + }; + if!((_box getVariable ["ExileDatabaseID", -1]) isEqualTo -1)then + { + throw "Container already installed."; + }; + _territory = _box call ExileClient_util_world_getTerritoryAtPosition; + if (isNull _territory) then + { + throw "Only allowed to install in a territory."; + }; + _playerObject = _sessionID call ExileServer_system_session_getPlayerObject; + _access = [_territory,getPlayerUID _playerObject] call ExileClient_util_territory_getAccessLevel; + if (_access select 0 isEqualTo 0) then + { + throw "Not allowed to install in this territory."; + }; + _box setVariable ["ExileOwnerUID", getPlayerUID _playerObject,true]; + _containerID = _box call ExileServer_object_container_database_insert; + [_sessionID, "toastRequest", ["SuccessTitleOnly", ["Supply box installed!"]]] call ExileServer_system_network_send_to; +} +catch +{ + [_sessionID, "toastRequest", ["ErrorTitleAndText", ["Failed to install!", _exception]]] call ExileServer_system_network_send_to; +}; +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_object_tree_network_chopTreeRequest.sqf b/@exileserver/addons/exile_server/code/ExileServer_object_tree_network_chopTreeRequest.sqf new file mode 100644 index 0000000..a796356 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_object_tree_network_chopTreeRequest.sqf @@ -0,0 +1,74 @@ +/** + * ExileServer_object_tree_network_chopTreeRequest + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_sessionId","_parameters","_treeNetId","_tree","_isTree","_player","_treeHeight","_newDamage","_treePosition","_spawnRadius","_weaponHolders","_weaponHolder","_weaponHolderPosition"]; +_sessionId = _this select 0; +_parameters = _this select 1; +_treeNetId = _parameters select 0; +try +{ + _tree = objectFromNetId _treeNetId; + if (isNull _tree) then + { + throw format ["Cannot chop unknown tree! %1", _treeNetId]; + }; + if !(alive _tree) then + { + throw "Cannot chop already chopped tree!"; + }; + _isTree = [_tree, "WoodSource"] call ExileClient_util_model_isInteraction; + if !(_isTree) then + { + throw "Can only chop down trees, you twat!"; + }; + _player = _sessionId call ExileServer_system_session_getPlayerObject; + if (isNull _player) then + { + throw "Unknown players cannot chop trees!"; + }; + if !(alive _player) then + { + throw "The dead cannot chop down trees!"; + }; + if ((_player distance _tree) > 30) then + { + throw "No long distance tree chopping! Nope!"; + }; + _treeHeight = _tree call ExileClient_util_model_getHeight; + _treeHeight = _treeHeight max 1; + _newDamage = ((damage _tree) + (1 / (floor _treeHeight) )) min 1; + _tree setDamage _newDamage; + if (_newDamage isEqualTo 1) then + { + _tree setDamage 999; + }; + _treePosition = getPosATL _tree; + _treePosition set[2, 0]; + _spawnRadius = 3; + _weaponHolders = nearestObjects[_treePosition, ["GroundWeaponHolder"], _spawnRadius]; + _weaponHolder = objNull; + if (_weaponHolders isEqualTo []) then + { + _weaponHolderPosition = getPosATL _player; + _weaponHolder = createVehicle ["GroundWeaponHolder", _weaponHolderPosition, [], 0, "CAN_COLLIDE"]; + _weaponHolder setPosATL _weaponHolderPosition; + } + else + { + _weaponHolder = _weaponHolders select 0; + }; + _weaponHolder addMagazineCargoGlobal ["Exile_Item_WoodLog", 1]; +} +catch +{ + _exception call ExileServer_util_log; +}; +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_object_vehicle_carefulCreateVehicle.sqf b/@exileserver/addons/exile_server/code/ExileServer_object_vehicle_carefulCreateVehicle.sqf new file mode 100644 index 0000000..18639d8 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_object_vehicle_carefulCreateVehicle.sqf @@ -0,0 +1,64 @@ +/** + * ExileServer_object_vehicle_carefulCreateVehicle + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_vehicleClassName","_position","_direction","_usePositionATL","_temporaryPositionInOuterSpace","_vehicleObject"]; +_vehicleClassName = _this select 0; +_position = _this select 1; +_direction = _this select 2; +_usePositionATL = _this select 3; +_temporaryPositionInOuterSpace = +[ + (_position select 0) - 250 + (random 500), + (_position select 1) - 250 + (random 500), + 1000 + (random 1000) +]; +_vehicleObject = createVehicle [_vehicleClassName, _temporaryPositionInOuterSpace, [], 0, "CAN_COLLIDE"]; +_vehicleObject allowDamage false; +_vehicleObject removeAllEventHandlers "HandleDamage"; +_vehicleObject addEventHandler["HandleDamage", {false}]; +_vehicleObject setVelocity [0, 0, 0]; +if ((typeName _direction) isEqualTo "ARRAY") then +{ + _vehicleObject setVectorDirAndUp _direction; +} +else +{ + _vehicleObject setDir _direction; +}; +if (_usePositionATL) then +{ + _vehicleObject setPosATL _position; +} +else +{ + _vehicleObject setPosASL _position; +}; +_vehicleObject setVelocity [0, 0, 0]; +_vehicleObject allowDamage true; +_vehicleObject removeAllEventHandlers "HandleDamage"; +_vehicleObject setDamage 0; +clearBackpackCargoGlobal _vehicleObject; +clearItemCargoGlobal _vehicleObject; +clearMagazineCargoGlobal _vehicleObject; +clearWeaponCargoGlobal _vehicleObject; +if (_vehicleClassName isKindOf "I_UGV_01_F") then +{ + createVehicleCrew _vehicleObject; +}; +if (getNumber (configFile >> "CfgSettings" >> "VehicleSpawn" >> "nightVision") isEqualTo 0) then +{ + _vehicleObject disableNVGEquipment true; +}; +if (getNumber (configFile >> "CfgSettings" >> "VehicleSpawn" >> "thermalVision") isEqualTo 0) then +{ + _vehicleObject disableTIEquipment true; +}; +_vehicleObject \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_object_vehicle_createNonPersistentVehicle.sqf b/@exileserver/addons/exile_server/code/ExileServer_object_vehicle_createNonPersistentVehicle.sqf new file mode 100644 index 0000000..99d60bb --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_object_vehicle_createNonPersistentVehicle.sqf @@ -0,0 +1,22 @@ +/** + * ExileServer_object_vehicle_createNonPersistentVehicle + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_className","_position","_direction","_usePositionATL","_vehicleObject"]; +_className = _this select 0; +_position = _this select 1; +_direction = _this select 2; +_usePositionATL = _this select 3; +_vehicleObject = [_className, _position, _direction, _usePositionATL] call ExileServer_object_vehicle_carefulCreateVehicle; +_vehicleObject setVariable ["ExileIsPersistent", false]; +_vehicleObject addEventHandler ["GetIn", {_this call ExileServer_object_vehicle_event_onGetIn}]; +_vehicleObject addMPEventHandler ["MPKilled", { if !(isServer) exitWith {}; _this call ExileServer_object_vehicle_event_onMPKilled;}]; +_vehicleObject call ExileServer_system_simulationMonitor_addVehicle; +_vehicleObject \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_object_vehicle_createPersistentVehicle.sqf b/@exileserver/addons/exile_server/code/ExileServer_object_vehicle_createPersistentVehicle.sqf new file mode 100644 index 0000000..17f3c44 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_object_vehicle_createPersistentVehicle.sqf @@ -0,0 +1,25 @@ +/** + * ExileServer_object_vehicle_createPersistentVehicle + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_className","_position","_direction","_usePositionATL","_pinCode","_vehicleObject"]; +_className = _this select 0; +_position = _this select 1; +_direction = _this select 2; +_usePositionATL = _this select 3; +_pinCode = _this select 4; +_vehicleObject = [_className, _position, _direction, _usePositionATL] call ExileServer_object_vehicle_carefulCreateVehicle; +_vehicleObject setVariable ["ExileIsPersistent", true]; +_vehicleObject setVariable ["ExileAccessCode", _pinCode]; +_vehicleObject addEventHandler ["GetOut", {_this call ExileServer_object_vehicle_event_onGetOut}]; +_vehicleObject addEventHandler ["GetIn", {_this call ExileServer_object_vehicle_event_onGetIn}]; +_vehicleObject addMPEventHandler ["MPKilled", { if !(isServer) exitWith {}; _this call ExileServer_object_vehicle_event_onMPKilled;}]; +_vehicleObject call ExileServer_system_simulationMonitor_addVehicle; +_vehicleObject \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_object_vehicle_database_delete.sqf b/@exileserver/addons/exile_server/code/ExileServer_object_vehicle_database_delete.sqf new file mode 100644 index 0000000..035df24 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_object_vehicle_database_delete.sqf @@ -0,0 +1,19 @@ +/** + * ExileServer_object_vehicle_database_delete + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_vehicleObject","_vehicleID"]; +_vehicleObject = _this; +_vehicleID = _vehicleObject getVariable ["ExileDatabaseID", -1]; +if (_vehicleID > -1) then +{ + format ["deleteVehicle:%1", _vehicleID] call ExileServer_system_database_query_fireAndForget; +}; +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_object_vehicle_database_insert.sqf b/@exileserver/addons/exile_server/code/ExileServer_object_vehicle_database_insert.sqf new file mode 100644 index 0000000..8460f4e --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_object_vehicle_database_insert.sqf @@ -0,0 +1,37 @@ +/** + * ExileServer_object_vehicle_database_insert + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_vehicleObject","_position","_vectorDirection","_vectorUp","_data","_extDB2Message","_vehicleID"]; +_vehicleObject = _this; +_position = getPosATL _vehicleObject; +_vectorDirection = vectorDir _vehicleObject; +_vectorUp = vectorUp _vehicleObject; +_data = +[ + typeOf _vehicleObject, + _vehicleObject getVariable ["ExileOwnerUID", ""], + locked _vehicleObject, + _position select 0, + _position select 1, + _position select 2, + _vectorDirection select 0, + _vectorDirection select 1, + _vectorDirection select 2, + _vectorUp select 0, + _vectorUp select 1, + _vectorUp select 2, + _vehicleObject getVariable ["ExileAccessCode",""] +]; +_extDB2Message = ["insertVehicle", _data] call ExileServer_util_extDB2_createMessage; +_vehicleID = _extDB2Message call ExileServer_system_database_query_insertSingle; +_vehicleObject setVariable["ExileDatabaseID", _vehicleID]; +_vehicleObject setVariable["ExileIsPersistent", true]; +_vehicleID \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_object_vehicle_database_load.sqf b/@exileserver/addons/exile_server/code/ExileServer_object_vehicle_database_load.sqf new file mode 100644 index 0000000..d77b7cc --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_object_vehicle_database_load.sqf @@ -0,0 +1,83 @@ +/** + * ExileServer_object_vehicle_database_load + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_vehicleID","_data","_position","_vectorDirection","_vectorUp","_pinCode","_texture","_vehicleObject","_lock","_unlockInSafeZonesAfterRestart","_isLocked","_hitpoints","_cargoContainers"]; +_vehicleID = _this; +_data = format ["loadVehicle:%1", _vehicleID] call ExileServer_system_database_query_selectSingle; +_position = [_data select 8, _data select 9, _data select 10]; +_vectorDirection = [_data select 11, _data select 12, _data select 13]; +_vectorUp = [_data select 14, _data select 15, _data select 16]; +_pinCode = _data select 20; +_texture = _data select 21; +_vehicleObject = [(_data select 1), _position, [_vectorDirection, _vectorUp], true,_pinCode] call ExileServer_object_vehicle_createPersistentVehicle; +_vehicleObject setVariable ["ExileDatabaseID", _vehicleID]; +_vehicleObject setVariable ["ExileOwnerUID", (_data select 3)]; +_vehicleObject setVariable ["ExileMoney", (_data select 23), true]; +_lock = (_data select 4); +_unlockInSafeZonesAfterRestart = (getNumber (configFile >> "CfgSettings" >> "VehicleSpawn" >> "unlockInSafeZonesAfterRestart")) isEqualTo 1; +_isLocked = (_lock isEqualTo -1); +if (_isLocked) then +{ + if (_unlockInSafeZonesAfterRestart) then + { + if (_position call ExileClient_util_world_isInTraderZone) then + { + _isLocked = false; + }; + }; +}; +if (_isLocked) then +{ + _vehicleObject setVariable ["ExileIsLocked", -1]; + _vehicleObject lock 2; + _vehicleObject enableRopeAttach false; +} +else +{ + _vehicleObject setVariable ["ExileIsLocked", 0]; + _vehicleObject lock 0; + _vehicleObject enableRopeAttach true; +}; +_vehicleObject setFuel (_data select 5); +_vehicleObject setDamage (_data select 6); +_hitpoints = _data select 7; +if ((typeName _hitpoints) isEqualTo "ARRAY") then +{ + { + _vehicleObject setHitPointDamage [_x select 0, _x select 1]; + } + forEach _hitpoints; +}; +[_vehicleObject, (_data select 17)] call ExileServer_util_fill_fillItems; +[_vehicleObject, (_data select 18)] call ExileServer_util_fill_fillMagazines; +[_vehicleObject, (_data select 19)] call ExileServer_util_fill_fillWeapons; +_cargoContainers = format ["loadVehicleContainer:%1", _vehicleID] call ExileServer_system_database_query_selectSingle; +if ((typeName _cargoContainers) isEqualTo "ARRAY") then +{ + if !(_cargoContainers isEqualTo []) then + { + [_vehicleObject, (_cargoContainers select 0)] call ExileServer_util_fill_fillContainers; + }; +}; +if !(_texture isEqualTo "") then +{ + { + _vehicleObject setObjectTextureGlobal [_forEachIndex, _texture select _forEachIndex]; + } + forEach _texture; +}; +_vehicleObject enableSimulationGlobal false; +_vehicleObject call ExileServer_system_simulationMonitor_addVehicle; +if (_vehicleObject call ExileClient_util_world_isInTraderZone) then +{ + _vehicleObject allowDamage false; +}; +_vehicleObject \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_object_vehicle_database_resetCode.sqf b/@exileserver/addons/exile_server/code/ExileServer_object_vehicle_database_resetCode.sqf new file mode 100644 index 0000000..3e42e64 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_object_vehicle_database_resetCode.sqf @@ -0,0 +1,20 @@ +/** + * ExileServer_object_vehicle_database_resetCode + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_vehicle","_newPin","_databaseID"]; +_vehicle = _this select 0; +_newPin = _this select 1; +_databaseID = _vehicle getVariable ["ExileDatabaseID",-1]; +if!(_databaseID isEqualTo -1)then +{ + format ["vehicleSetPinCode:%1:%2",_newPin,_databaseID] call ExileServer_system_database_query_fireAndForget; +}; +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_object_vehicle_database_update.sqf b/@exileserver/addons/exile_server/code/ExileServer_object_vehicle_database_update.sqf new file mode 100644 index 0000000..b3c27a6 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_object_vehicle_database_update.sqf @@ -0,0 +1,54 @@ +/** + * ExileServer_object_vehicle_database_update + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_vehicleObject","_vehicleID","_position","_vectorDirection","_vectorUp","_availableHitpoints","_vehicleHitpoints","_data","_extDB2Message"]; +_vehicleObject = _this; +_vehicleID = _vehicleObject getVariable ["ExileDatabaseID", -1]; +if (_vehicleID > -1) then +{ + _position = getPosATL _vehicleObject; + _vectorDirection = vectorDir _vehicleObject; + _vectorUp = vectorUp _vehicleObject; + _availableHitpoints = getAllHitPointsDamage _vehicleObject; + _vehicleHitpoints = []; + if!(_availableHitpoints isEqualTo [])then + { + { + _vehicleHitpoints pushBack [_x ,_vehicleObject getHitPointDamage _x]; + } + forEach (_availableHitpoints select 0); + }; + _data = + [ + _vehicleObject getVariable ["ExileIsLocked",-1], + fuel _vehicleObject, + damage _vehicleObject, + _vehicleHitpoints, + _position select 0, + _position select 1, + _position select 2, + _vectorDirection select 0, + _vectorDirection select 1, + _vectorDirection select 2, + _vectorUp select 0, + _vectorUp select 1, + _vectorUp select 2, + _vehicleObject call ExileServer_util_getItemCargo, + magazinesAmmoCargo _vehicleObject, + weaponsItemsCargo _vehicleObject, + _vehicleObject call ExileServer_util_getObjectContainerCargo, + _vehicleObject getVariable ["ExileMoney", 0], + _vehicleID + ]; + _extDB2Message = ["updateVehicle", _data] call ExileServer_util_extDB2_createMessage; + _extDB2Message call ExileServer_system_database_query_fireAndForget; +}; +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_object_vehicle_event_onDamaged.sqf b/@exileserver/addons/exile_server/code/ExileServer_object_vehicle_event_onDamaged.sqf new file mode 100644 index 0000000..4ab33e6 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_object_vehicle_event_onDamaged.sqf @@ -0,0 +1,18 @@ +/** + * ExileServer_object_vehicle_event_onDamaged + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_vehicleObject"]; +_vehicleObject = _this select 0; +if (_vehicleObject getVariable ["ExileIsPersistent", false]) then +{ + _vehicleObject call ExileServer_system_vehicleSaveQueue_addVehicle; +}; +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_object_vehicle_event_onGetIn.sqf b/@exileserver/addons/exile_server/code/ExileServer_object_vehicle_event_onGetIn.sqf new file mode 100644 index 0000000..cdce8df --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_object_vehicle_event_onGetIn.sqf @@ -0,0 +1,18 @@ +/** + * ExileServer_object_vehicle_event_onGetIn + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_vehicleObject"]; +_vehicleObject = _this select 0; +if !(simulationEnabled _vehicleObject) then +{ + _vehicleObject enableSimulationGlobal true; +}; +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_object_vehicle_event_onGetOut.sqf b/@exileserver/addons/exile_server/code/ExileServer_object_vehicle_event_onGetOut.sqf new file mode 100644 index 0000000..d18bea6 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_object_vehicle_event_onGetOut.sqf @@ -0,0 +1,18 @@ +/** + * ExileServer_object_vehicle_event_onGetOut + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_vehicleObject"]; +_vehicleObject = _this select 0; +if (_vehicleObject getVariable ["ExileIsPersistent", false]) then +{ + _vehicleObject call ExileServer_system_vehicleSaveQueue_addVehicle; +}; +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_object_vehicle_event_onMPKilled.sqf b/@exileserver/addons/exile_server/code/ExileServer_object_vehicle_event_onMPKilled.sqf new file mode 100644 index 0000000..5fc6fc6 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_object_vehicle_event_onMPKilled.sqf @@ -0,0 +1,17 @@ +/** + * ExileServer_object_vehicle_event_onMPKilled + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_vehicleObject"]; +if !(isServer) exitWith {true}; +_vehicleObject = _this select 0; +_vehicleObject call ExileServer_object_vehicle_remove; +_vehicleObject setVariable ["ExileDiedAt", time]; +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_object_vehicle_network_flipVehRequest.sqf b/@exileserver/addons/exile_server/code/ExileServer_object_vehicle_network_flipVehRequest.sqf new file mode 100644 index 0000000..4c4931d --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_object_vehicle_network_flipVehRequest.sqf @@ -0,0 +1,45 @@ +/** + * ExileServer_object_vehicle_network_flipVehRequest + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_sessionID","_parameters","_vehicleID","_vehicle","_player","_pos"]; +_sessionID = _this select 0; +_parameters = _this select 1; +_vehicleID = _parameters select 0; +_vehicle = objectFromNetId _vehicleID; +_player = _sessionID call ExileServer_system_session_getPlayerObject; +try +{ + if (_vehicle distance _player > 7) then + { + throw "Player to far"; + }; + if !((crew _vehicle) isEqualTo []) then + { + throw "Vehicle not empty"; + }; + if (local _vehicle) then + { + _pos = getPosATL _vehicle; + _pos set [2,(_pos select 2) + 0.1]; + _vehicle setPosATL _pos; + _vehicle setVectorUp [0, 0, 1]; + } + else + { + _vehicle setOwner (owner _player); + [_sessionID,"flipVehRequest",[_vehicleID]] call ExileServer_system_network_send_to; + }; +} +catch +{ + format["FlipVehicleRequest: %1", _exception] call ExileServer_util_log; +}; +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_object_vehicle_network_lockVehicleRequest.sqf b/@exileserver/addons/exile_server/code/ExileServer_object_vehicle_network_lockVehicleRequest.sqf new file mode 100644 index 0000000..310a512 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_object_vehicle_network_lockVehicleRequest.sqf @@ -0,0 +1,12 @@ +/** + * ExileServer_object_vehicle_network_lockVehicleRequest + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_object_vehicle_network_pushVehicleRequest.sqf b/@exileserver/addons/exile_server/code/ExileServer_object_vehicle_network_pushVehicleRequest.sqf new file mode 100644 index 0000000..c4abe39 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_object_vehicle_network_pushVehicleRequest.sqf @@ -0,0 +1,45 @@ +/** + * ExileServer_object_vehicle_network_pushVehicleRequest + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_sessionID","_parameters","_vehicleID","_vehicle","_direction","_magnitude","_callerID","_caller","_actualCaller"]; +_sessionID = _this select 0; +_parameters = _this select 1; +_vehicleID = _parameters select 0; +_vehicle = objectFromNetId _vehicleID; +_direction = _parameters select 1; +_magnitude = _parameters select 2; +_callerID = _parameters select 3; +_caller = objectFromNetId _caller; +_actualCaller = _sessionID call ExileServer_system_session_getPlayerObject; +try +{ + if!(_caller isEqualTo _actualCaller)then + { + throw format ["Caller Sppofing: %1 tryied to spoof %2!",_actualCaller, _caller]; + }; + if(_magnitude > 15)then + { + throw format ["To high magnitude(%1) by %2",_magnitude, _caller]; + }; + if(local _vehicle)then + { + [_vehicle,_direction,_magnitude,_caller] call ExileClient_util_vehicle_push; + } + else + { + _vehicle setOwner (owner _caller); + [_sessionID,"pushVehicleRequest",[netId _vehicle,_direction,_magnitude,netId _caller]] call ExileServer_system_network_send_to; + }; +} +catch +{ + format["PushVehicleRequest: %1", _exception] call ExileServer_util_log; +}; \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_object_vehicle_network_rekeyVehicleDialogRequest.sqf b/@exileserver/addons/exile_server/code/ExileServer_object_vehicle_network_rekeyVehicleDialogRequest.sqf new file mode 100644 index 0000000..cec9e98 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_object_vehicle_network_rekeyVehicleDialogRequest.sqf @@ -0,0 +1,48 @@ +/** + * ExileServer_object_vehicle_network_rekeyVehicleDialogRequest + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_sessionID","_parameters","_vehicle","_rekeyCost","_player","_vehiclePinCode","_playerMoney","_responseCode"]; +_sessionID = _this select 0; +_parameters = _this select 1; +_vehicle = objectFromNetId (_parameters select 0); +_rekeyCost = _parameters select 1; +try +{ + _player = _sessionID call ExileServer_system_session_getPlayerObject; + if (isNull _player) then + { + throw "Invalid player."; + }; + if !(alive _player) then + { + throw "Dead player."; + }; + _vehiclePinCode = _vehicle getVariable ["ExileAccessCode","000000"]; + if (_vehiclePinCode isEqualTo "000000") then + { + throw "Non-persistent vehicle." + }; + _playerMoney = _player getVariable ["ExileMoney", 0]; + if (_rekeyCost > _playerMoney) then + { + throw "Player does not have enough money."; + }; + _responseCode = "Rekey successful"; + _playerMoney = _playerMoney - _rekeyCost; + _player setVariable ["ExileMoney", _playerMoney, true]; + format["setPlayerMoney:%1:%2", _playerMoney, _player getVariable ["ExileDatabaseID", 0]] call ExileServer_system_database_query_fireAndForget; + [_sessionID,"rekeyVehicleDialogResponse",[_responseCode, netId _vehicle,_rekeyCost]] call ExileServer_system_network_send_to; +} +catch +{ + [_sessionID,"rekeyVehicleDialogResponse",[_exception,"",0]] call ExileServer_system_network_send_to; +}; +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_object_vehicle_network_rekeyVehicleRequest.sqf b/@exileserver/addons/exile_server/code/ExileServer_object_vehicle_network_rekeyVehicleRequest.sqf new file mode 100644 index 0000000..b3035a2 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_object_vehicle_network_rekeyVehicleRequest.sqf @@ -0,0 +1,32 @@ +/** + * ExileServer_object_vehicle_network_rekeyVehicleRequest + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_sessionID","_parameters","_vehicle","_newPinCode","_alphabet","_forbiddenCharacter"]; +_sessionID = _this select 0; +_parameters = _this select 1; +try +{ + _vehicle = objectFromNetId (_parameters select 0); + _newPinCode = _parameters select 1; + _alphabet = getText (missionConfigFile >> "CfgClans" >> "clanNameAlphabet"); + _forbiddenCharacter = [_newPinCode, _alphabet] call ExileClient_util_string_containsForbiddenCharacter; + if !(_forbiddenCharacter isEqualTo -1) then + { + throw format ["Fuuck you!", _forbiddenCharacter]; + }; + _vehicle setVariable ["ExileAccessCode", _newPinCode]; + [_sessionID, "resetCodeResponse", [["SuccessTitleOnly", ["PIN changed successfully!"]], netId _vehicle,_newPinCode]] call ExileServer_system_network_send_to; + [_vehicle, _newPinCode] call ExileServer_object_vehicle_database_resetCode; +} +catch +{ +}; +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_object_vehicle_network_resetCodeDialogRequest.sqf b/@exileserver/addons/exile_server/code/ExileServer_object_vehicle_network_resetCodeDialogRequest.sqf new file mode 100644 index 0000000..fd0b86a --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_object_vehicle_network_resetCodeDialogRequest.sqf @@ -0,0 +1,34 @@ +/** + * ExileServer_object_vehicle_network_resetCodeDialogRequest + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_sessionID","_parameters","_vehicle","_player","_responseCode"]; +_sessionID = _this select 0; +_parameters = _this select 1; +_vehicle = objectFromNetId (_parameters select 0); +try +{ + _player = _sessionID call ExileServer_system_session_getPlayerObject; + if (isNull _player) then + { + throw "Invalid player."; + }; + if !(alive _player) then + { + throw "Dead player."; + }; + _responseCode = "Reset Code"; + [_sessionID,"resetCodeDialogResponse",[_responseCode, netId _vehicle]] call ExileServer_system_network_send_to; +} +catch +{ + [_sessionID,"resetCodeDialogResponse",[_exception,""]] call ExileServer_system_network_send_to; +}; +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_object_vehicle_network_resetCodeRequest.sqf b/@exileserver/addons/exile_server/code/ExileServer_object_vehicle_network_resetCodeRequest.sqf new file mode 100644 index 0000000..edded01 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_object_vehicle_network_resetCodeRequest.sqf @@ -0,0 +1,39 @@ +/** + * ExileServer_object_vehicle_network_resetCodeRequest + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_sessionID","_parameters","_vehicle","_pincode","_newPinCode","_alphabet","_forbiddenCharacter","_vehiclePinCode"]; +_sessionID = _this select 0; +_parameters = _this select 1; +try +{ + _vehicle = objectFromNetId (_parameters select 0); + _pincode = _parameters select 1; + _newPinCode = _parameters select 2; + _alphabet = getText (missionConfigFile >> "CfgClans" >> "clanNameAlphabet"); + _forbiddenCharacter = [_newPinCode, _alphabet] call ExileClient_util_string_containsForbiddenCharacter; + if !(_forbiddenCharacter isEqualTo -1) then + { + throw format ["Fuuck you!", _forbiddenCharacter]; + }; + _vehiclePinCode = _vehicle getVariable ["ExileAccessCode","000000"]; + if(_pincode isEqualTo _vehiclePinCode)then + { + _vehicle setVariable ["ExileAccessCode",_newPinCode]; + [_sessionID, "resetCodeResponse", [["SuccessTitleOnly", ["PIN changed successfully!"]], netId _vehicle,_newPinCode]] call ExileServer_system_network_send_to; + [_vehicle, _newPinCode] call ExileServer_object_vehicle_database_resetCode; + } + else + { + [_sessionID, "resetCodeResponse", [["ErrorTitleOnly", ["Wrong PIN!"]],"",""]] call ExileServer_system_network_send_to; + }; +} +catch{}; +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_object_vehicle_network_rotateVehicleRequest.sqf b/@exileserver/addons/exile_server/code/ExileServer_object_vehicle_network_rotateVehicleRequest.sqf new file mode 100644 index 0000000..8631b70 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_object_vehicle_network_rotateVehicleRequest.sqf @@ -0,0 +1,28 @@ +/** + * ExileServer_object_vehicle_network_rotateVehicleRequest + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_sessionID","_parameters","_vehicleID","_vehicle","_rotation","_player"]; +_sessionID = _this select 0; +_parameters = _this select 1; +_vehicleID = _parameters select 0; +_vehicle = objectFromNetId _vehicleID; +_rotation = _parameters select 1; +if(local _vehicle)then +{ + [_vehicle,_rotation] call ExileClient_object_vehicle_rotate; +} +else +{ + _player = _sessionID call ExileServer_system_session_getPlayerObject; + _vehicle setOwner (owner _player); + [_sessionID,"rotateVehicleRequest",[_vehicleID,_rotation]] call ExileServer_system_network_send_to; +}; +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_object_vehicle_network_setFuelRequest.sqf b/@exileserver/addons/exile_server/code/ExileServer_object_vehicle_network_setFuelRequest.sqf new file mode 100644 index 0000000..7fe9744 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_object_vehicle_network_setFuelRequest.sqf @@ -0,0 +1,32 @@ +/** + * ExileServer_object_vehicle_network_setFuelRequest + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_sessionID","_parameters","_vehicleID","_ammount","_vehicle","_crew","_sessionIDcrew"]; +_sessionID = _this select 0; +_parameters = _this select 1; +_vehicleID = _parameters select 0; +_ammount = _parameters select 1; +_vehicle = objectFromNetId _vehicleID; +if(local _vehicle)then +{ + [_vehicle,_ammount] call ExileClient_util_fuel_setFuel; +} +else +{ + _crew = crew _vehicle; + if!(_crew isEqualTo [])then + { + _crew = _crew select 0; + _sessionIDcrew = _crew getVariable ["ExileSessionID", ""]; + [_sessionIDcrew, "setFuelRequest", [_vehicleID,_ammount]] call ExileServer_system_network_send_to; + }; +}; +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_object_vehicle_network_unlockVehicleRequest.sqf b/@exileserver/addons/exile_server/code/ExileServer_object_vehicle_network_unlockVehicleRequest.sqf new file mode 100644 index 0000000..31302ca --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_object_vehicle_network_unlockVehicleRequest.sqf @@ -0,0 +1,11 @@ +/** + * ExileServer_object_vehicle_network_unlockVehicleRequest + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + diff --git a/@exileserver/addons/exile_server/code/ExileServer_object_vehicle_remove.sqf b/@exileserver/addons/exile_server/code/ExileServer_object_vehicle_remove.sqf new file mode 100644 index 0000000..d4125ec --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_object_vehicle_remove.sqf @@ -0,0 +1,20 @@ +/** + * ExileServer_object_vehicle_remove + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_vehicleObject"]; +_vehicleObject = _this; +if (_vehicleObject getVariable ["ExileIsPersistent", false]) then +{ + _vehicleObject call ExileServer_object_vehicle_database_delete; + _vehicleObject call ExileServer_system_vehicleSaveQueue_removeVehicle; +}; +_vehicleObject call ExileServer_system_simulationMonitor_removeVehicle; +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_breaching_network_breachingCancel.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_breaching_network_breachingCancel.sqf new file mode 100644 index 0000000..b879945 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_breaching_network_breachingCancel.sqf @@ -0,0 +1,40 @@ +/** + * ExileServer_system_breaching_network_breachingCancel + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_sessionID","_parameters","_charge","_player","_constructionObject"]; +_sessionID = _this select 0; +_parameters = _this select 1; +_charge = _parameters select 0; +try +{ + _player = _sessionID call ExileServer_system_session_getPlayerObject; + if(isNull _player)then + { + throw "You do not exist! :)"; + }; + if(isNull _charge)then + { + throw "Charge is null"; + }; + _constructionObject = _player getVariable ["ExileBreachingObject",objNull]; + if(isNull _constructionObject)then + { + throw "Breaching object is null"; + }; + _constructionObject setVariable ["ExileBreaching",false,true]; + _player setVariable ["ExileBreachingObject",objNull]; + _player setVariable ["ExileBreachingCharge",objNull]; + deleteVehicle _charge; +} +catch +{ + [_sessionID, "toastRequest", ["ErrorTitleAndText", ["Failed to breach!", _exception]]] call ExileServer_system_network_send_to; +}; \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_breaching_network_breachingPlaceRequest.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_breaching_network_breachingPlaceRequest.sqf new file mode 100644 index 0000000..0664e5b --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_breaching_network_breachingPlaceRequest.sqf @@ -0,0 +1,58 @@ +/** + * ExileServer_system_breaching_network_breachingPlaceRequest + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_sessionID","_parameters","_position","_vectorUP","_charge","_player","_constructionObject","_explosiveClassName"]; +_sessionID = _this select 0; +_parameters = _this select 1; +_position = _parameters select 0; +_vectorUP = _parameters select 1; +_charge = _parameters select 2; +try +{ + _player = _sessionID call ExileServer_system_session_getPlayerObject; + if(isNull _player)then + { + throw "You do not exist! :)"; + }; + _constructionObject = _player getVariable ["ExileBreachingObject",objNull]; + if(isNull _constructionObject)then + { + throw "Construction object null"; + }; + _explosiveClassName = _constructionObject call ExileClient_util_breaching_getBreachingMag; + if(_explosiveClassName isEqualTo -1)then + { + throw "Invalid placing object"; + }; + if((_explosiveClassName select 0) isEqualTo 0)then + { + if!((_explosiveClassName select 1) in (magazines _player))then + { + throw (format ["You dont have: %1",_explosiveClassName select 1]); + }; + } + else + { + if!((backpack _player) isEqualTo (_explosiveClassName select 1))then + { + throw (format ["You dont have: %1",_explosiveClassName select 1]); + }; + }; + if(isNull _charge)then + { + throw "charge null"; + }; + [_sessionID,"breachingPlaceResponse",[_charge]] call ExileServer_system_network_send_to; +} +catch +{ + [_sessionID, "toastRequest", ["ErrorTitleAndText", ["Failed to breach!", _exception]]] call ExileServer_system_network_send_to; +}; diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_breaching_network_breachingStart.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_breaching_network_breachingStart.sqf new file mode 100644 index 0000000..028e229 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_breaching_network_breachingStart.sqf @@ -0,0 +1,73 @@ +/** + * ExileServer_system_breaching_network_breachingStart + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_sessionID","_parameters","_constructionObject","_player","_explosiveClassName","_breachingClassname","_territory","_charge","_Veh"]; +_sessionID = _this select 0; +_parameters = _this select 1; +_constructionObject = _parameters select 0; +try +{ + _player = _sessionID call ExileServer_system_session_getPlayerObject; + if(isNull _player)then + { + throw "You do not exist! :)"; + }; + _explosiveClassName = _constructionObject call ExileClient_util_breaching_getBreachingMag; + if(_explosiveClassName isEqualTo -1)then + { + throw "Invalid placing object"; + }; + _breachingClassname = (_explosiveClassName select 1); + if((_explosiveClassName select 0) isEqualTo 0)then + { + if!(_breachingClassname in (magazines _player))then + { + throw (format ["You dont have: %1",_breachingClassname]); + }; + } + else + { + if!((backpack _player) isEqualTo (_breachingClassname))then + { + throw (format ["You dont have: %1",_breachingClassname]); + }; + }; + if((_constructionObject getVariable ["ExileDatabaseID",-1]) isEqualTo -1)then + { + throw "Not a persistant?"; + }; + if(_constructionObject getVariable ["ExileBreachingActive",false])then + { + throw "You can only place one charge at a time."; + }; + _territory = _player call ExileClient_util_world_getTerritoryAtPosition; + if(isNull _territory)then + { + throw "Invalid Territory?"; + }; + if((getPlayerUID _player) in (_territory getVariable ["ExileTerritoryBuildRights",[]]))then + { + throw "You cannot breach through your own walls!"; + }; + _charge = createVehicle [((_explosiveClassName select 2) + "_Veh"), [0,0,0], [], 0, "CAN_COLLIDE"]; + _player setVariable ["ExileBreachingObject",_constructionObject]; + _player setVariable ["ExileBreachingCharge",_charge]; + _constructionObject setVariable ["ExileBreaching",true,true]; + if!(_charge setOwner (owner _player))then + { + [_charge, _player] call ExileServer_system_swapOwnershipQueue_add; + }; + [_sessionID,"breachingResponse",[_charge,_constructionObject]] call ExileServer_system_network_send_to; +} +catch +{ + [_sessionID, "toastRequest", ["ErrorTitleAndText", ["Failed to breach!", _exception]]] call ExileServer_system_network_send_to; +}; \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_breaching_network_chargePlanted.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_breaching_network_chargePlanted.sqf new file mode 100644 index 0000000..417144f --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_breaching_network_chargePlanted.sqf @@ -0,0 +1,36 @@ +/** + * ExileServer_system_breaching_network_chargePlanted + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_sessionID","_player","_constructionObject","_charge"]; +_sessionID = _this select 0; +try +{ + _player = _sessionID call ExileServer_system_session_getPlayerObject; + if (isNull _player) then + { + throw "You do not exist! :)"; + }; + _constructionObject = _player getVariable ["ExileBreachingObject",objNull]; + if (isNull _constructionObject) then + { + throw "Construction null!"; + }; + _charge = _player getVariable ["ExileBreachingCharge",objNull]; + if (isNull _charge) then + { + throw "Charge null!"; + }; + ExileServerBreachingCharges pushBack [_charge, _constructionObject, getPlayerUID _player]; +} +catch +{ + [_sessionID, "toastRequest", ["ErrorTitleAndText", ["Failed to breach!", _exception]]] call ExileServer_system_network_send_to; +}; \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_breaching_network_detonateAllCharges.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_breaching_network_detonateAllCharges.sqf new file mode 100644 index 0000000..02b5b35 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_breaching_network_detonateAllCharges.sqf @@ -0,0 +1,86 @@ +/** + * ExileServer_system_breaching_network_detonateAllCharges + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_sessionID","_player","_chargesDetonated","_playerUID","_charge","_constructionObject","_owner","_explosiveClassName","_chargePosition","_ammo","_weaponHolderPosition","_weaponHolder","_territory","_serverTime","_currentDamage","_newDamage"]; +_sessionID = _this select 0; +_player = _sessionID call ExileServer_system_session_getPlayerObject; +_chargesDetonated = 0; +if !(isNull _player) then +{ + _playerUID = getPlayerUID _player; + if !(ExileServerBreachingCharges isEqualTo []) then + { + { + _charge = _x select 0; + _constructionObject = _x select 1; + _owner = _x select 2; + if (_owner isEqualTo _playerUID) then + { + if !(isNull _constructionObject) then + { + if !(isNull _charge) then + { + _explosiveClassName = getText (configFile >> "CfgVehicles" >> (typeOf _charge) >> "ammo"); + _chargePosition = getPosATL _charge; + deleteVehicle _charge; + _ammo = createVehicle [_explosiveClassName, _chargePosition, [], 0, "CAN_COLLIDE"]; + _ammo setPosATL _chargePosition; + _ammo setDamage 1; + if (_explosiveClassName isEqualTo "Exile_Ammo_BreachingCharge_BigMomma") then + { + _weaponHolderPosition = + [ + _chargePosition select 0, + _chargePosition select 1, + (getPosATL _constructionObject) select 2 + ]; + _weaponHolder = createVehicle ["GroundWeaponHolder", _weaponHolderPosition, [], 0, "CAN_COLLIDE"]; + _weaponHolder setPosATL _weaponHolderPosition; + _weaponHolder addMagazineCargoGlobal ["Exile_Item_MobilePhone", 1]; + }; + _territory = _constructionObject call ExileClient_util_world_getTerritoryAtPosition; + _serverTime = time; + if(_serverTime > ((_territory getVariable ["ExileXM8MobileNotifiedTime",-1800]) + 1800))then + { + _territory call ExileServer_system_xm8_sendBaseRaid; + _territory setVariable ["ExileXM8MobileNotifiedTime", _serverTime]; + }; + _currentDamage = _constructionObject getVariable ["ExileConstructionDamage", 0]; + _newDamage = _currentDamage + 1; + if (_newDamage > 2) then + { + _constructionObject call ExileServer_object_construction_database_delete; + deleteVehicle _constructionObject; + } + else + { + _constructionObject setVariable ["ExileConstructionDamage", _newDamage, true]; + _constructionObject setVariable ["ExileBreaching", false, true]; + (format [ + "updateDamage:%1:%2", + _newDamage, + _constructionObject getVariable ["ExileDatabaseID",-1] + ]) call ExileServer_system_database_query_fireAndForget; + _constructionObject call ExileServer_util_setDamageTexture; + }; + }; + }; + _chargesDetonated = _chargesDetonated + 1; + ExileServerBreachingCharges deleteAt _forEachIndex; + }; + } + forEach ExileServerBreachingCharges; + }; +}; +if (_chargesDetonated isEqualTo 0) then +{ + [_sessionID, "toastRequest", ["InfoTitleOnly", ["There are no breaching charges to detonate."]]] call ExileServer_system_network_send_to; +}; \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_clan_database_load.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_clan_database_load.sqf new file mode 100644 index 0000000..5f9c5f1 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_clan_database_load.sqf @@ -0,0 +1,56 @@ +/** + * ExileServer_system_clan_database_load + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_clanID","_clanInfo","_clanMembers","_allMarkers","_markers","_polys","_markerID","_markerType","_position","_color","_icon","_iconSize","_text","_textSize","_marker","_poly","_hashValue"]; +_clanID = _this; +_clanInfo = format ["getClanInfo:%1",_clanID] call ExileServer_system_database_query_selectSingle; +_clanMembers = format ["getClanMembers:%1",_clanID] call ExileServer_system_database_query_selectFull; +_allMarkers = format ["getClanMarkers:%1",_clanID] call ExileServer_system_database_query_selectFull; +_markers = []; +_polys = []; +{ + _markerID = _x select 0; + _markerType = _x select 1; + _position = _x select 2; + _color = _x select 3; + switch _markerType do + { + case 0 : + { + _icon = _x select 4; + _iconSize = _x select 5; + _text = _x select 6; + _textSize = _x select 7; + _marker = [_icon,_color,_position,_iconSize,_text,_textSize,_markerID]; + _markers pushback _marker; + }; + case 1 : + { + _poly = [_position,_color,_markerID]; + _polys pushback _poly; + }; + default + { + }; + }; +} +forEach _allMarkers; +_hashValue = +[ + _clanInfo select 0, + _clanInfo select 1, + _clanMembers, + _markers, + _polys, + grpNull +]; +missionNamespace setVariable [format ["ExileServer_clan_%1",_clanID],_hashValue]; +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_clan_network_addMarkerRequest.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_clan_network_addMarkerRequest.sqf new file mode 100644 index 0000000..e72bec2 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_clan_network_addMarkerRequest.sqf @@ -0,0 +1,82 @@ +/** + * ExileServer_system_clan_network_addMarkerRequest + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_sessionID","_parameters","_player","_clanID","_clanHash","_icon","_color","_position","_iconSize","_text","_textSize","_maxChars","_alphabet","_forbiddenCharacter","_maxAmountOfMarkers","_data","_extDB2Message","_markerID","_markers"]; +_sessionID = _this select 0; +_parameters = _this select 1; +try +{ + _player = _sessionID call ExileServer_system_session_getPlayerObject; + if(isNull _player)then + { + throw "You do not exist! :)"; + }; + _clanID = _player getVariable ["ExileClanID",-1]; + if(_clanID isEqualTo -1)then + { + throw "You are not in a family!"; + }; + _clanHash = missionNameSpace getVariable [format["ExileServer_clan_%1",_clanID],[]]; + if(_clanHash isEqualTo [])then + { + throw "Family data is broken!"; + }; + _icon = _parameters select 0; + _color = _parameters select 1; + _position = _parameters select 2; + _iconSize = _parameters select 3; + _text = _parameters select 4; + _textSize = _parameters select 5; + _maxChars = getNumber (missionConfigFile >> "CfgClans" >> "maximumIconText"); + if((count _text) > _maxChars)then + { + throw format ["To big marker text MAX : %1",_maxChars]; + }; + _alphabet = getText (missionConfigFile >> "CfgClans" >> "clanNameAlphabet"); + _forbiddenCharacter = [_text, _alphabet] call ExileClient_util_string_containsForbiddenCharacter; + if !(_forbiddenCharacter isEqualTo -1) then + { + throw "Invalid character in input!"; + }; + if!((count _color) isEqualTo 4)then + { + throw "FuckOff and die in fire!"; + }; + if!((count _position) isEqualTo 2)then + { + throw "FuckOff and die in fire! #2"; + }; + _forbiddenCharacter = [_icon, _alphabet] call ExileClient_util_string_containsForbiddenCharacter; + if !(_forbiddenCharacter isEqualTo -1) then + { + throw "FuckOff and die in fire! #3"; + }; + _maxAmountOfMarkers = getNumber(missionConfigFile >> "CfgClans" >> "maximumIcons"); + if(count(_clanHash select 3) >= _maxAmountOfMarkers)then + { + throw "Maximum markers reached for family!"; + }; + _data = [_clanID,_position,_color,_icon,_iconSize,_text,_textSize]; + _extDB2Message = ["addMarker", _data] call ExileServer_util_extDB2_createMessage; + _markerID = _extDB2Message call ExileServer_system_database_query_insertSingle; + _markers = _clanHash select 3; + _parameters pushback _markerID; + _markers pushback _parameters; + _clanHash set [3,_markers]; + missionNameSpace setVariable [format["ExileServer_clan_%1",_clanID],_clanHash]; + _clanID call ExileServer_system_clan_updateMarkers; + [_sessionID, "toastRequest", ["SuccessTitleOnly", ["Added a family marker!"]]] call ExileServer_system_network_send_to; +} +catch +{ + _exception call ExileServer_system_util_log; + [_sessionID, "toastRequest", ["ErrorTitleAndText", ["Failed to add marker!", _exception]]] call ExileServer_system_network_send_to; +}; \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_clan_network_addPolyRequest.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_clan_network_addPolyRequest.sqf new file mode 100644 index 0000000..a2bd7cc --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_clan_network_addPolyRequest.sqf @@ -0,0 +1,63 @@ +/** + * ExileServer_system_clan_network_addPolyRequest + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_sessionID","_parameters","_player","_clanID","_clanHash","_positions","_color","_maxAmountOfPolys","_maxAmountOfPolyLines","_data","_extDB2Message","_polyID","_polys"]; +_sessionID = _this select 0; +_parameters = _this select 1; +try +{ + _player = _sessionID call ExileServer_system_session_getPlayerObject; + if(isNull _player)then + { + throw "You do not exist! :)"; + }; + _clanID = _player getVariable ["ExileClanID",-1]; + if(_clanID isEqualTo -1)then + { + throw "You are not in a family!"; + }; + _clanHash = missionNameSpace getVariable [format["ExileServer_clan_%1",_clanID],[]]; + if(_clanHash isEqualTo [])then + { + throw "Family data is broken!"; + }; + _positions = _parameters select 0; + _color = _parameters select 1; + if!((count _color) isEqualTo 4)then + { + throw "FuckOff and burn in fire #5"; + }; + _maxAmountOfPolys = getNumber(missionConfigFile >> "CfgClans" >> "maximumPolys"); + if(count(_clanHash select 4) >= _maxAmountOfPolys)then + { + throw "Maximum polys reached for family!"; + }; + _maxAmountOfPolyLines = getNumber(missionConfigFile >> "CfgClans" >> "maximumPolyNode"); + if(count _positions > _maxAmountOfPolyLines)then + { + throw "Too many poly nodes!"; + }; + _data = [_clanID,_positions,_color]; + _extDB2Message = ["addPoly", _data] call ExileServer_util_extDB2_createMessage; + _polyID = _extDB2Message call ExileServer_system_database_query_insertSingle; + _polys = _clanHash select 4; + _parameters pushback _polyID; + _polys pushback _parameters; + _clanHash set [4,_polys]; + missionNameSpace setVariable [format["ExileServer_clan_%1",_clanID],_clanHash]; + _clanID call ExileServer_system_clan_updatePolys; + [_sessionID, "toastRequest", ["SuccessTitleOnly", ["Added a family polygon!", _exception]]] call ExileServer_system_network_send_to; +} +catch +{ + _exception call ExileServer_system_util_log; + [_sessionID, "toastRequest", ["ErrorTitleAndText", ["Failed to add polygon!", _exception]]] call ExileServer_system_network_send_to; +}; \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_clan_network_inviteToClanRequest.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_clan_network_inviteToClanRequest.sqf new file mode 100644 index 0000000..1d44c59 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_clan_network_inviteToClanRequest.sqf @@ -0,0 +1,59 @@ +/** + * ExileServer_system_clan_network_inviteToClanRequest + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_sessionID","_playerNetID","_invitedPlayer","_player","_clanID","_clanHash"]; +_sessionID = _this select 0; +_playerNetID = (_this select 1) select 0; +_invitedPlayer = objectFromNetId _playerNetID; +try +{ + _player = _sessionID call ExileServer_system_session_getPlayerObject; + if(isNull _player)then + { + throw "You do not exist! :)"; + }; + _clanID = _player getVariable ["ExileClanID",-1]; + if(_clanID isEqualTo -1)then + { + throw "You are not in a family!"; + }; + _clanHash = missionNameSpace getVariable [format["ExileServer_clan_%1",_clanID],[]]; + if(_clanHash isEqualTo [])then + { + throw "Family data is broken!"; + }; + if!(getPlayerUID _player isEqualTo (_clanHash select 1))then + { + throw "You are not the papa!"; + }; + if(isNull _invitedPlayer)then + { + throw "Cannot invite unknown player!"; + }; + if!(_invitedPlayer getVariable ["ExileClanID",-1] isEqualTo -1)then + { + throw "That player is already in a family!"; + }; + if(_invitedPlayer getVariable ["ExileClanInvite",false])then + { + throw "That player already has a family invite!"; + }; + _invitedPlayer setVariable ["ExileClanInvite",true]; + _invitedPlayer setVariable ["ExileClanInviteID",_clanID]; + _invitedPlayer setVariable ["ExileClanInviteOwner",_player]; + [_invitedPlayer,"inviteToClanRequestClient",[name _player,_clanHash select 0]] call ExileServer_system_network_send_to; + [_sessionID, "toastRequest", ["SuccessTitleOnly", ["Family invite sent!"]]] call ExileServer_system_network_send_to; +} +catch +{ + _exception call ExileServer_system_util_log; + [_sessionID, "toastRequest", ["ErrorTitleAndText", ["Failed to invite!", _exception]]] call ExileServer_system_network_send_to; +}; \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_clan_network_inviteToClanRequestClientResponse.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_clan_network_inviteToClanRequestClientResponse.sqf new file mode 100644 index 0000000..705fd34 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_clan_network_inviteToClanRequestClientResponse.sqf @@ -0,0 +1,67 @@ +/** + * ExileServer_system_clan_network_inviteToClanRequestClientResponse + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_sessionID","_accepted","_player","_clanID","_invitedClanID","_inviteOwner","_clanHash","_members"]; +_sessionID = _this select 0; +_accepted = (_this select 1) select 0; +try +{ + _player = _sessionID call ExileServer_system_session_getPlayerObject; + if(isNull _player)then + { + throw "Invalid player!"; + }; + _clanID = _player getVariable ["ExileClanID",-1]; + if !(_clanID isEqualTo -1) then + { + throw "You are already in a family!"; + }; + if!(_player getVariable ["ExileClanInvite",false])then + { + throw "No pending family invites!"; + }; + _invitedClanID = _player getVariable ["ExileClanInviteID",-1]; + if(_invitedClanID isEqualTo -1)then + { + throw "Invalid family invite!"; + }; + _inviteOwner = _player getVariable ["ExileClanInviteOwner",objNull]; + if(_accepted)then + { + _clanHash = missionNameSpace getVariable [format["ExileServer_clan_%1",_invitedClanID],[]]; + if(_clanHash isEqualTo [])then + { + throw "Family hash is NULL!"; + }; + _members = _clanHash select 2; + _members pushback [getPlayerUID _player,name _player]; + _clanHash set [2,_members]; + format["setAccountClanLink:%1:%2", _invitedClanID, getPlayerUID _player] call ExileServer_system_database_query_fireAndForget; + missionNameSpace setVariable [format["ExileServer_clan_%1",_invitedClanID],_clanHash]; + _player setVariable ["ExileClanID", _invitedClanID]; + _player setVariable ["ExileClanData", _clanHash]; + _invitedClanID call ExileServer_system_clan_updateClients; + [_inviteOwner, "toastRequest", ["InfoTitleOnly", [format ["%1 joined your family!", name _player]]]] call ExileServer_system_network_send_to; + } + else + { + [_inviteOwner, "toastRequest", ["InfoTitleOnly", [format ["%1 declined your family invite!", name _player]]]] call ExileServer_system_network_send_to; + }; + _player setVariable ["ExileClanInvite",false]; + _player setVariable ["ExileClanInviteID",-1]; + _player setVariable ["ExileClanInviteOwner",objNull]; + [_sessionID,"clanInviteServerResponse",[_accepted]] call ExileServer_system_network_send_to; +} +catch +{ + _exception call ExileServer_util_log; + [_sessionID, "toastRequest", ["ErrorTitleAndText", ["Failed to join!", _exception]]] call ExileServer_system_network_send_to; +}; \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_clan_network_kickClanPlayerRequest.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_clan_network_kickClanPlayerRequest.sqf new file mode 100644 index 0000000..ba91c31 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_clan_network_kickClanPlayerRequest.sqf @@ -0,0 +1,62 @@ +/** + * ExileServer_system_clan_network_kickClanPlayerRequest + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_sessionID","_requestedKickPlayerUID","_player","_clanID","_clanHash","_clanMembers","_index","_memberName","_kickPlayer"]; +_sessionID = _this select 0; +_requestedKickPlayerUID = (_this select 1) select 0; +try +{ + _player = _sessionID call ExileServer_system_session_getPlayerObject; + if(isNull _player)then + { + throw "You do not exist! :)"; + }; + _clanID = _player getVariable ["ExileClanID",-1]; + if(_clanID isEqualTo -1)then + { + throw "You are not in a family!"; + }; + _clanHash = missionNameSpace getVariable [format["ExileServer_clan_%1",_clanID],[]]; + if(_clanHash isEqualTo [])then + { + throw "Family data is broken!"; + }; + if!((getPlayerUID _player) isEqualTo (_clanHash select 1))then + { + throw "You are not the papa!"; + }; + _clanMembers = _clanHash select 2; + _index = [_clanMembers,_requestedKickPlayerUID] call ExileClient_util_find; + if(_index isEqualTo -1)then + { + throw "You are not in a family!"; + }; + _memberName = (_clanMembers select _index) select 1; + _clanMembers deleteAt _index; + _clanHash set [2,_clanMembers]; + format["unLinkClanLink:%1", _requestedKickPlayerUID] call ExileServer_system_database_query_fireAndForget; + missionNameSpace setVariable [format["ExileServer_clan_%1",_clanID],_clanHash]; + _clanID call ExileServer_system_clan_updateClients; + _kickPlayer = _requestedKickPlayerUID call ExileClient_util_player_objectFromPlayerUid; + if!(isNull _kickPlayer)then + { + _memberName = name _kickPlayer; + _kickPlayer setVariable ["ExileClanID",-1]; + _kickPlayer setVariable ["ExileData",[]]; + [_kickPlayer, "updateClanGotKicked", ["ErrorTitleOnly",["You have been kicked from your family!"]]] call ExileServer_system_network_send_to; + }; + [_sessionID, "toastRequest", ["SuccessTitleOnly", [format["%1 was kicked from the family!", _memberName]]]] call ExileServer_system_network_send_to; +} +catch +{ + _exception call ExileServer_util_log; + [_sessionID, "toastRequest", ["ErrorTitleAndText", ["Failed to kick!", _exception]]] call ExileServer_system_network_send_to; +}; \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_clan_network_leaveClanRequest.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_clan_network_leaveClanRequest.sqf new file mode 100644 index 0000000..2a55e5b --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_clan_network_leaveClanRequest.sqf @@ -0,0 +1,74 @@ +/** + * ExileServer_system_clan_network_leaveClanRequest + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_sessionID","_player","_clanID","_clanHash","_playerUID","_isLeader","_leaderUID","_clanMembers","_clanMembersCount","_index","_message"]; +_sessionID = _this select 0; +try +{ + _player = _sessionID call ExileServer_system_session_getPlayerObject; + if(isNull _player)then + { + throw "You do not exist!"; + }; + _clanID = _player getVariable ["ExileClanID",-1]; + if(_clanID isEqualTo -1)then + { + throw "You are not in a family!"; + }; + _clanHash = missionNameSpace getVariable [format["ExileServer_clan_%1",_clanID],[]]; + if(_clanHash isEqualTo [])then + { + throw "Broken family data!"; + }; + _playerUID = (getPlayerUID _player); + _isLeader = _playerUID isEqualTo (_clanHash select 1); + _leaderUID = _clanHash select 1; + _clanMembers = _clanHash select 2; + _clanMembersCount = count _clanMembers; + if(_clanMembersCount > 1)then + { + _index = [_clanMembers,_playerUID] call ExileClient_util_find; + if(_index isEqualTo -1)then + { + throw "Something is really wrong! Contact an admin!"; + }; + _clanMembers deleteAt _index; + _clanHash set [2,_clanMembers]; + if(_isLeader)then + { + _leaderUID = ((_clanMembers select 0) select 0); + _clanHash set [1,_leaderUID]; + format["updateClanLeader:%1:%2",_leaderUID,_clanID] call ExileServer_system_database_query_fireAndForget; + _message = format ["You have left the family. %1 has been promoted to be the new papa.",(_clanMembers select 0) select 1]; + } + else + { + _message = "You have left the family."; + }; + format["unLinkClanLink:%1", _playerUID] call ExileServer_system_database_query_fireAndForget; + missionNameSpace setVariable [format["ExileServer_clan_%1",_clanID],_clanHash]; + _clanID call ExileServer_system_clan_updateClients; + } + else + { + missionNameSpace setVariable [format["ExileServer_clan_%1",_clanID],nil]; + format["deleteClan:%1",_clanID] call ExileServer_system_database_query_fireAndForget; + _message = "The family has been disbanded."; + }; + _player setVariable ["ExileClanID", -1]; + _player setVariable ["ExileData", []]; + [_sessionID,"leaveClanResponse",[_clanMembersCount > 1,_message]] call ExileServer_system_network_send_to; +} +catch +{ + _exception call ExileServer_util_log; + [_sessionID, "toastRequest", ["ErrorTitleAndText", ["Failed to leave!", _exception]]] call ExileServer_system_network_send_to; +}; \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_clan_network_registerClanRequest.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_clan_network_registerClanRequest.sqf new file mode 100644 index 0000000..c7246c6 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_clan_network_registerClanRequest.sqf @@ -0,0 +1,72 @@ +/** + * ExileServer_system_clan_network_registerClanRequest + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_sessionID","_parameters","_clanName","_player","_alphabet","_forbiddenCharacter","_registrationFee","_playerMoney","_playerUid","_clanID","_hashValue"]; +_sessionID = _this select 0; +_parameters = _this select 1; +_clanName = _parameters select 0; +try +{ + _player = _sessionID call ExileServer_system_session_getPlayerObject; + _alphabet = getText (missionConfigFile >> "CfgClans" >> "clanNameAlphabet"); + _forbiddenCharacter = [_clanName, _alphabet] call ExileClient_util_string_containsForbiddenCharacter; + if !(_forbiddenCharacter isEqualTo -1) then + { + throw 5; + }; + if (_player isEqualTo objNull) then + { + throw 1; + }; + if !(alive _player) then + { + throw 2; + }; + _registrationFee = getNumber (missionConfigFile >> "CfgClans" >> "registrationFee"); + _playerMoney = _player getVariable ["ExileMoney", 0]; + if (_playerMoney < _registrationFee) then + { + throw 3; + }; + if !((_player getVariable ["ExileClanID", -1]) isEqualTo -1) then + { + throw 4; + }; + _playerMoney = _playerMoney - _registrationFee; + _player setVariable ["ExileMoney", _playerMoney, true]; + format["setPlayerMoney:%1:%2", _playerMoney, _player getVariable ["ExileDatabaseID", 0]] call ExileServer_system_database_query_fireAndForget; + _playerUid = getPlayerUID _player; + _clanID = format["createClan:%1:%2", _playerUid, _clanName] call ExileServer_system_database_query_insertSingle; + _hashValue = + [ + _clanName, + _playerUid, + [ + [ + _playerUid, + _player getVariable ["ExileName",""] + ] + ], + [], + [], + grpNull + ]; + missionNameSpace setVariable [format ["ExileServer_clan_%1",_clanID],_hashValue]; + format["setAccountClanLink:%1:%2", _clanID, getPlayerUID _player] call ExileServer_system_database_query_fireAndForget; + _player setVariable ["ExileClanID", _clanID]; + _player setVariable ["ExileData", _hashValue]; + [_sessionID, "registerClanResponse", [0, _registrationFee,_hashValue]] call ExileServer_system_network_send_to; +} +catch +{ + [_sessionID, "registerClanResponse", [_exception, 0, []]] call ExileServer_system_network_send_to; +}; +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_clan_network_removeMarkerRequest.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_clan_network_removeMarkerRequest.sqf new file mode 100644 index 0000000..498c779 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_clan_network_removeMarkerRequest.sqf @@ -0,0 +1,58 @@ +/** + * ExileServer_system_clan_network_removeMarkerRequest + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_sessionID","_parameters","_player","_clanID","_clanHash","_array","_markerID","_markerArray","_index"]; +_sessionID = _this select 0; +_parameters = _this select 1; +try +{ + _player = _sessionID call ExileServer_system_session_getPlayerObject; + if(isNull _player)then + { + throw "You do not exist! :)"; + }; + _clanID = _player getVariable ["ExileClanID",-1]; + if(_clanID isEqualTo -1)then + { + throw "You are not in a family!"; + }; + _clanHash = missionNameSpace getVariable [format["ExileServer_clan_%1",_clanID],[]]; + if(_clanHash isEqualTo [])then + { + throw "Family data is broken!"; + }; + _array = _parameters select 0; + _markerID = _parameters select 1; + _markerArray = _clanHash select _array; + _index = [_markerArray,_markerID] call ExileClient_util_find; + if(_index isEqualTo -1)then + { + throw "Marker not owned by your family!"; + }; + format["deleteMarker:%1",_markerID] call ExileServer_system_database_query_fireAndForget; + _markerArray deleteAt _index; + _clanHash set [_array,_markerArray]; + missionNameSpace setVariable [format ["ExileServer_clan_%1",_clanID],_clanHash]; + if(_array isEqualTo 3)then + { + _clanID call ExileServer_system_clan_updateMarkers; + } + else + { + _clanID call ExileServer_system_clan_updatePolys; + }; + [_sessionID, "toastRequest", ["SuccessTitleOnly", ["Marker has been removed!"]]] call ExileServer_system_network_send_to; +} +catch +{ + _exception call ExileServer_system_util_log; + [_sessionID, "toastRequest", ["ErrorTitleAndText", ["Failed to remove!", _exception]]] call ExileServer_system_network_send_to; +}; \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_clan_updateClients.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_clan_updateClients.sqf new file mode 100644 index 0000000..de8dbfb --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_clan_updateClients.sqf @@ -0,0 +1,29 @@ +/** + * ExileServer_system_clan_updateClients + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_clanID","_hash","_members"]; +_clanID = _this; +_hash = missionNameSpace getVariable [format["ExileServer_clan_%1",_clanID],[]]; +if!(_hash isEqualTo [])then +{ + _members = _hash call ExileClient_util_clan_getClanMembers; + if(!(_members isEqualTo []))then + { + { + if(!(isNull _x))then + { + [_x,"updateClanInfoFull",_hash] call ExileServer_system_network_send_to; + }; + } + forEach _members; + }; +}; +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_clan_updateMarkers.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_clan_updateMarkers.sqf new file mode 100644 index 0000000..22d8192 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_clan_updateMarkers.sqf @@ -0,0 +1,30 @@ +/** + * ExileServer_system_clan_updateMarkers + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_clanID","_hash","_markers","_members"]; +_clanID = _this; +_hash = missionNameSpace getVariable [format["ExileServer_clan_%1",_clanID],[]]; +_markers = _hash select 3; +if!(_hash isEqualTo [])then +{ + _members = _hash call ExileClient_util_clan_getClanMembers; + if(!(_members isEqualTo []))then + { + { + if(!(isNull _x))then + { + [_x,"updateMarkers",[_markers]] call ExileServer_system_network_send_to; + }; + } + forEach _members; + }; +}; +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_clan_updatePolys.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_clan_updatePolys.sqf new file mode 100644 index 0000000..71ca630 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_clan_updatePolys.sqf @@ -0,0 +1,30 @@ +/** + * ExileServer_system_clan_updatePolys + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_clanID","_hash","_polys","_members"]; +_clanID = _this; +_hash = missionNameSpace getVariable [format["ExileServer_clan_%1",_clanID],[]]; +_polys = _hash select 4; +if!(_hash isEqualTo [])then +{ + _members = _hash call ExileClient_util_clan_getClanMembers; + if(!(_members isEqualTo []))then + { + { + if(!(isNull _x))then + { + [_x,"updatePolys",[_polys]] call ExileServer_system_network_send_to; + }; + } + forEach _members; + }; +}; +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_database_connect.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_database_connect.sqf new file mode 100644 index 0000000..8c10c08 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_database_connect.sqf @@ -0,0 +1,57 @@ +/** + * ExileServer_system_database_connect + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_isConnected","_error","_result"]; +_isConnected = false; +_error_locked = false; +ExileServerDatabaseSessionId = ""; +ExileServerRconSessionID = ""; +try +{ + _result = "extDB3" callExtension "9:VERSION"; + format ["Installed extDB2 version: %1", _result] call ExileServer_util_log; + _result = call compile ("extDB3" callExtension "9:ADD_DATABASE:exile"); + if (_result select 0 isEqualTo 0) then + { + throw format ["Could not add database: %1", _result]; + }; + "Connected to database!" call ExileServer_util_log; + ExileServerDatabaseSessionId = str(round(random(999999))); + _result = call compile ("extDB3" callExtension "9:ADD_DATABASE_PROTOCOL:exile:SQL_CUSTOM:SQL:exile.ini"); + if ((_result select 0) isEqualTo 0) then + { + throw format ["Failed to initialize database protocol: %1", _result]; + }; + ExileServerStartTime = (call compile ("extDB3" callExtension "9:LOCAL_TIME")) select 1; + "Database protocol initialized!" call ExileServer_util_log; + "extDB3" callExtension "9:ADD_PROTOCOL:LOG:TRADING:Exile_TradingLog"; + "extDB3" callExtension "9:ADD_PROTOCOL:LOG:DEATH:Exile_DeathLog"; + "extDB3" callExtension "9:ADD_PROTOCOL:LOG:TERRITORY:Exile_TerritoryLog"; + "extDB3" callExtension "9:LOCK"; + _isConnected = true; +} +catch +{ + if (!_error_locked) then + { + "MySQL connection error!" call ExileServer_util_log; + "Please have a look at @ExileServer/logs/ to find out what went wrong." call ExileServer_util_log; + format ["MySQL Error: %1", _exception] call ExileServer_util_log; + "Server will shutdown now :(" call ExileServer_util_log; + //"extDB3" callExtension "9:SHUTDOWN"; Not implemented in extDB3 + } + else + { + format ["extDB3: %1", _exception] call ExileServer_util_log; + "Check your server rpt for errors, your mission might be stuck a loop restarting" call ExileServer_util_log; + }; +}; +_isConnected diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_database_handleBig.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_database_handleBig.sqf new file mode 100644 index 0000000..46eff40 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_database_handleBig.sqf @@ -0,0 +1,21 @@ +/** + * ExileServer_system_database_handleBig + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_key","_result","_pipe"]; +_key = _this; +_result = ""; +while{true} do +{ + _pipe = "extDB3" callExtension format["5:%1", _key]; + if(_pipe isEqualTo "") exitWith {}; + _result = _result + _pipe; +}; +call (compile _result) diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_database_query_fireAndForget.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_database_query_fireAndForget.sqf new file mode 100644 index 0000000..329f0d8 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_database_query_fireAndForget.sqf @@ -0,0 +1,16 @@ +/** + * ExileServer_system_database_query_fireAndForget + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_parameters","_query"]; +_parameters = _this; +_query = [1, "SQL",_parameters] joinString ":"; +"extDB3" callExtension _query; +true diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_database_query_insertSingle.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_database_query_insertSingle.sqf new file mode 100644 index 0000000..22e8630 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_database_query_insertSingle.sqf @@ -0,0 +1,16 @@ +/** + * ExileServer_system_database_query_insertSingle + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_parameters","_query","_result"]; +_parameters = _this; +_query = [0, "SQL",_parameters] joinString ":"; +_result = call compile ("extDB3" callExtension _query); +(_result select 1) select 0 diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_database_query_selectFull.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_database_query_selectFull.sqf new file mode 100644 index 0000000..ca8e3e5 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_database_query_selectFull.sqf @@ -0,0 +1,27 @@ +/** + * ExileServer_system_database_query_selectFull + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_parameters","_query","_result"]; +_parameters = _this; +_query = [0, "SQL",_parameters] joinString ":"; +_result = call compile ("extDB3" callExtension _query); +switch (_result select 0) do +{ + case 0: + { + (format["Database Error: %1", (_result select 1)]) call ExileServer_util_log; + }; + case 2: + { + _result = (_result select 1) call ExileServer_system_database_handleBig; + }; +}; +_result select 1 diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_database_query_selectSingle.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_database_query_selectSingle.sqf new file mode 100644 index 0000000..d8da9ca --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_database_query_selectSingle.sqf @@ -0,0 +1,27 @@ +/** + * ExileServer_system_database_query_selectSingle + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_parameters","_query","_result"]; +_parameters = _this; +_query = [0, "SQL",_parameters] joinString ":"; +_result = call compile ("extDB3" callExtension _query); +switch (_result select 0) do +{ + case 0: + { + (format["Database Error: %1", (_result select 1)]) call ExileServer_util_log; + }; + case 2: + { + _result = (_result select 1) call ExileServer_system_database_handleBig; + }; +}; +(_result select 1) select 0 diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_database_query_selectSingleField.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_database_query_selectSingleField.sqf new file mode 100644 index 0000000..02b2891 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_database_query_selectSingleField.sqf @@ -0,0 +1,27 @@ +/** + * ExileServer_system_database_query_selectSingleField + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_parameters","_query","_result"]; +_parameters = _this; +_query = [0,"SQL",_parameters] joinString ":"; +_result = call compile ("extDB3" callExtension _query); +switch (_result select 0) do +{ + case 0: + { + (format["Database Error: %1", (_result select 1)]) call ExileServer_util_log; + }; + case 2: + { + _result = (_result select 1) call ExileServer_system_database_handleBig; + }; +}; +((_result select 1) select 0) select 0 diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_event_abandonedSafe_start.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_event_abandonedSafe_start.sqf new file mode 100644 index 0000000..586e71d --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_event_abandonedSafe_start.sqf @@ -0,0 +1,28 @@ +/** + * ExileServer_system_event_abandonedSafe_start + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_config","_markerTime","_abandonedSafes","_randomNumber","_safe","_position","_marker"]; +_config = configFile >> "CfgSettings" >> "Events" >> "AbandonedSafe"; +_markerTime = getNumber (_config >> "markerTime"); +_abandonedSafes = ExileAbandondedSafes; +if (_abandonedSafes isEqualTo []) exitWith +{ + "There are no abandoned safes. Skipping abandoned safe event." call ExileServer_util_log; +}; +_randomNumber = (floor (random (count _abandonedSafes))); +_safe = _abandonedSafes select _randomNumber; +_position = getPosATL _safe; +["toastRequest", ["InfoTitleAndText", ["Abandoned safe located!", "PIN has been changed to 0000. Check your map for the location."]]] call ExileServer_system_network_send_broadcast; +_marker = createMarker [ format["ExileAbandonedSafe%1", diag_tickTime], _position]; +_marker setMarkerType "ExileSafe"; +_marker setMarkerText "Abandoned Safe - Code '0000'"; +uiSleep (60 * _markerTime); +deleteMarker _marker; \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_event_ambientFlyOver_start.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_event_ambientFlyOver_start.sqf new file mode 100644 index 0000000..6030e83 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_event_ambientFlyOver_start.sqf @@ -0,0 +1,79 @@ +/** + * ExileServer_system_event_ambientFlyOver_start + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_targetPlayer","_flyHeight","_speed","_direction","_targetPosition","_distance","_endPosition","_planeClass","_i","_startPosition","_pilot","_plane","_waypoint"]; +_group = createGroup independent; +_targetPlayer = selectRandom allPlayers; +format ["Ambient Fly Over - Heading to %1...", _targetPlayer] call ExileServer_util_log; +_flyHeight = 125; +_speed = 250; +_direction = random 360; +_targetPosition = +[ + (getPos _targetPlayer) select 0, + (getPos _targetPlayer) select 1, + _flyHeight +]; +_distance = worldSize * 0.75; +_endPosition = +[ + (_targetPosition select 0) - (sin _direction) * _distance, + (_targetPosition select 1) - (cos _direction) * _distance, + _flyHeight +]; +_planeClass = selectRandom +[ + "B_Plane_CAS_01_F", + "O_Plane_CAS_02_F", + "I_Plane_Fighter_03_CAS_F" +]; +for "_i" from 1 to (1 + (floor (random 3))) do +{ + _distance = 4000 + (_i * 400); + _startPosition = + [ + (_targetPosition select 0) + (sin _direction) * _distance, + (_targetPosition select 1) + (cos _direction) * _distance, + 800 + ]; + _pilot = _group createUnit ["I_helicrew_F", _startPosition, [], 100, "PRIVATE"]; + _pilot setSkill 1; + [_pilot] joinSilent _group; + _plane = createVehicle [_planeClass, _startPosition, [], 100, "FLY"]; + clearBackpackCargoGlobal _plane; + clearWeaponCargoGlobal _plane; + clearMagazineCargoGlobal _plane; + clearItemCargoGlobal _plane; + _plane setVehicleAmmo 0; + _plane setFuel 0.1; + _pilot assignAsDriver _plane; + _pilot moveInDriver _plane; + _pilot allowDamage false; + _plane allowDamage false; + _plane flyInHeight _flyHeight; + _plane disableAI "TARGET"; + _plane disableAI "AUTOTARGET"; + _plane setDir _direction; + _plane setVelocity [(sin _direction) * _speed, (cos _direction) * _speed, 0]; +}; +_group allowFleeing 0; +_group setBehaviour "CARELESS"; +_group setSpeedMode "FULL"; +_group setFormation "WEDGE"; +_group setCombatMode "BLUE"; +_waypoint = _group addWaypoint [getPos _targetPlayer, 0]; +_waypoint setWaypointType "MOVE"; +_waypoint setWaypointCompletionRadius 800; +_waypoint setWaypointStatements ["true", "'Ambient Fly Over - Reached player...' call ExileServer_util_log;"]; +_waypoint = _group addWaypoint [_endPosition, 0]; +_waypoint setWaypointType "MOVE"; +_waypoint setWaypointCompletionRadius 800; +_waypoint setWaypointStatements ["true", "'Ambient Fly Over - Reached end...' call ExileServer_util_log; { deleteVehicle (vehicle _x); deleteVehicle _x; } forEach thisList;"]; \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_event_earthQuake_start.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_event_earthQuake_start.sqf new file mode 100644 index 0000000..3ccff2b --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_event_earthQuake_start.sqf @@ -0,0 +1,46 @@ +/** + * ExileServer_system_event_earthQuake_start + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_i","_magnitude","_maxPlayers","_n","_player","_buildings","_building"]; +for "_i" from 1 to 4 do +{ + format ["Earth Quake - Rumble %1...", _i] call ExileServer_util_log; + _magnitude = 5 - _i; + ["playEarthQuakeEffectRequest", [_magnitude]] call ExileServer_system_network_send_broadcast; + uiSleep 4; + _maxPlayers = (random (count allPlayers)) max 1; + for "_n" from 1 to _maxPlayers do + { + _player = selectRandom allPlayers; + if !(isNull _player) then + { + _buildings = _player nearObjects ["Building", 300]; + if !(_buildings isEqualTo []) then + { + { + _building = _x; + if ((random 100) < ([6, 3, 2, 1] select (_i - 1))) then + { + if !((getPos _building) call ExileClient_util_world_isInTraderZone) then + { + _building setDamage 1; + }; + }; + } + forEach _buildings; + }; + }; + }; + if (_i < 4) then + { + uiSleep 25 + (random (_i * 30)); + }; +}; diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_event_initialize.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_event_initialize.sqf new file mode 100644 index 0000000..aa67f2f --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_event_initialize.sqf @@ -0,0 +1,18 @@ +/** + * ExileServer_system_event_initialize + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_events"]; +_events = getArray (configFile >> "CfgSettings" >> "Events" >> "enabledEvents"); +{ + missionNamespace setVariable [format ["ExileServerEvent%1LastExecutedAt", _x], 0]; +} +forEach _events; +[60, ExileServer_system_event_thread_spawn, [], true] call ExileServer_system_thread_addtask; \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_event_supplyBox_start.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_event_supplyBox_start.sqf new file mode 100644 index 0000000..573d5f7 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_event_supplyBox_start.sqf @@ -0,0 +1,80 @@ +/** + * ExileServer_system_event_supplyBox_start + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_airportPositions","_config","_markerTime","_filteredAirportPositions","_dropAltitude","_dropRadius","_boxType","_airportPosition","_position","_marker","_box","_itemClassName","_itemCount","_i","_supplySmoke","_parachute"]; +_airportPositions = call ExileClient_util_world_getAllAirportPositions; +_config = configFile >> "CfgSettings" >> "Events" >> "SupplyBox"; +_markerTime = getNumber (_config >> "markerTime"); +if (_airportPositions isEqualTo []) exitWith +{ + "The current map has no airports. Skipping supply box drop event." call ExileServer_util_log; +}; +_filteredAirportPositions = []; +{ + if !([_x, 1000] call ExileClient_util_world_isTraderZoneInRange) then + { + _filteredAirportPositions pushBack _x; + }; +} +forEach _airportPositions; +if (_filteredAirportPositions isEqualTo []) exitWith +{ + "The current map has airports, but they are too close to traders. Skipping supply box drop event." call ExileServer_util_log; +}; +_config = configFile >> "CfgSettings" >> "Events" >> "SupplyBox"; +_dropAltitude = getNumber (_config >> "dropAltitude"); +_dropRadius = getNumber (_config >> "dropRadius"); +_boxType = selectRandom (getArray (_config >> "types")); +_airportPosition = selectRandom _filteredAirportPositions; +_airportPosition set [2, 0]; +_position = [_airportPosition, _dropRadius] call ExileClient_util_math_getRandomPositionInCircle; +_position set [2, _dropAltitude]; +["toastRequest", ["InfoTitleAndText", ["Supply drop incoming!", "A Heart for Inmates is going to drop a supply crate in about ten minutes. Check your map for the location."]]] call ExileServer_system_network_send_broadcast; +_marker = createMarker [ format["ExileSupplyBox%1", diag_tickTime], _position]; +_marker setMarkerType "ExileHeart"; +uiSleep (60 * 5); +["toastRequest", ["InfoTitleAndText", ["Supply drop incoming!", "A Heart for Inmates is going to drop a supply crate in about five minutes. Check your map for the location."]]] call ExileServer_system_network_send_broadcast; +uiSleep (60 * 4); +["toastRequest", ["InfoTitleAndText", ["Supply drop incoming!", "A Heart for Inmates is going to drop a supply crate in a minute. Check your map for the location."]]] call ExileServer_system_network_send_broadcast; +uiSleep (60 * 1); +_box = createVehicle ["Exile_Container_SupplyBox", [0, 0, 0], [], 0, "CAN_COLLIDE"]; +_box setPosATL _position; +_box setDir (random 360); +clearBackpackCargoGlobal _box; +clearWeaponCargoGlobal _box; +clearMagazineCargoGlobal _box; +clearItemCargoGlobal _box; +{ + _itemClassName = _x select 0; + _itemCount = _x select 1; + for "_i" from 1 to _itemCount do + { + [_box, _itemClassName] call ExileClient_util_containerCargo_add; + }; +} +forEach (getArray (_config >> "BoxTypes" >> _boxType >> "items")); +_supplySmoke = createVehicle ["Exile_Ammo_SmokeShellOrange", getPos _box, [], 0, "CAN_COLLIDE"]; +_supplySmoke attachTo [_box, [0, 0, 0.5]]; +_parachute = createVehicle ["O_Parachute_02_F", getPos _box, [], 0, "FLY"]; +_parachute setPosATL _position; +_parachute setDir (getDir _box); +_box attachTo [_parachute, [0, 0, -1.2]]; +waitUntil { ((getPos _box) select 2) < 1.5 }; +detach _supplySmoke; +detach _box; +_parachute disableCollisionWith _box; +_box disableCollisionWith _parachute; +_position = getPos _box; +_position set [2, 0]; +_box setPos _position; +_box setVelocity [0, 0, 0]; +uiSleep (60 * _markerTime); +deleteMarker _marker; \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_event_thread_spawn.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_event_thread_spawn.sqf new file mode 100644 index 0000000..55216ff --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_event_thread_spawn.sqf @@ -0,0 +1,43 @@ +/** + * ExileServer_system_event_thread_spawn + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_events","_eventKey","_config","_minTime","_maxTime","_randomTime","_lastExecutedAt","_minimumPlayersOnline","_type","_function","_functionCode"]; +_events = getArray (configFile >> "CfgSettings" >> "Events" >> "enabledEvents"); +{ + _eventKey = format ["ExileServerEvent%1LastExecutedAt", _x]; + _config = configFile >> "CfgSettings" >> "Events" >> _x; + _minTime = getNumber (_config >> "minTime") * 60; + _maxTime = getNumber (_config >> "maxTime") * 60; + _randomTime = (_minTime max (random _maxTime)); + _lastExecutedAt = missionNamespace getVariable [_eventKey, 0]; + if (time - _lastExecutedAt >= _randomTime) then + { + _minimumPlayersOnline = getNumber (_config >> "minimumPlayersOnline"); + if ((count allPlayers) >= _minimumPlayersOnline) then + { + _type = getText (_config >> "type"); + _function = getText (_config >> "function"); + _functionCode = call compile _function; + if (_type isEqualTo "spawn") then + { + format ["Spawning %1...", _function] call ExileServer_util_log; + [] spawn _functionCode; + } + else + { + format ["Calling %1...", _function] call ExileServer_util_log; + [] call _functionCode; + }; + missionNamespace setVariable [_eventKey, time]; + }; + }; +} +forEach _events; \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_garbageCollector_cleanDatabase.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_garbageCollector_cleanDatabase.sqf new file mode 100644 index 0000000..e60d0b8 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_garbageCollector_cleanDatabase.sqf @@ -0,0 +1,31 @@ +/** + * ExileServer_system_garbageCollector_cleanDatabase + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_permanentlyDeleteTime","_territoryLifeTime","_containerLifeTime","_constructionLifeTime","_vehicleLifeTime","_abandonedSafeTime","_stolenFlagLifeTime","_unlockLifeTime"]; +_permanentlyDeleteTime = getNumber (configFile >> "CfgSettings" >> "GarbageCollector" >> "Database" >> "permanentlyDeleteTime"); +_territoryLifeTime = getNumber (configFile >> "CfgSettings" >> "GarbageCollector" >> "Database" >> "territoryLifeTime"); +_containerLifeTime = getNumber (configFile >> "CfgSettings" >> "GarbageCollector" >> "Database" >> "containerLifeTime"); +_constructionLifeTime = getNumber (configFile >> "CfgSettings" >> "GarbageCollector" >> "Database" >> "constructionLifeTime"); +_vehicleLifeTime = getNumber (configFile >> "CfgSettings" >> "GarbageCollector" >> "Database" >> "vehicleLifeTime"); +_abandonedSafeTime = getNumber (configFile >> "CfgSettings" >> "GarbageCollector" >> "Database" >> "abandonedTime"); +_stolenFlagLifeTime = getNumber (configFile >> "CfgSettings" >> "GarbageCollector" >> "Database" >> "stolenFlagLifeTime"); +_unlockLifeTime = getNumber (configFile >> "CfgSettings" >> "GarbageCollector" >> "Database" >> "unlockLifeTime"); +format ["setAbandonedUnlocked:%1", _unlockLifeTime] call ExileServer_system_database_query_fireAndForget; +format ["markDeleteOldConstructions:%1", _constructionLifeTime] call ExileServer_system_database_query_fireAndForget; +format ["markDeleteUnpaidTerritories:%1", _territoryLifeTime] call ExileServer_system_database_query_fireAndForget; +format ["markDeleteOldContainers:%1", _containerLifeTime] call ExileServer_system_database_query_fireAndForget; +format ["markDeleteOldVehicles:%1", _vehicleLifeTime] call ExileServer_system_database_query_fireAndForget; +format ["deleteUnpaidTerritories:%1", _permanentlyDeleteTime] call ExileServer_system_database_query_fireAndForget; +format ["deleteOldContainers:%1", _permanentlyDeleteTime] call ExileServer_system_database_query_fireAndForget; +format ["deleteOldConstructions:%1", _permanentlyDeleteTime] call ExileServer_system_database_query_fireAndForget; +format ["deleteOldVehicles:%1", _permanentlyDeleteTime] call ExileServer_system_database_query_fireAndForget; +format ["deleteBaseFlagStolen:%1", _stolenFlagLifeTime] call ExileServer_system_database_query_fireAndForget; +format ["addAbandonedSafes:%1", _abandonedSafeTime] call ExileServer_system_database_query_fireAndForget; \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_garbageCollector_deleteObject.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_garbageCollector_deleteObject.sqf new file mode 100644 index 0000000..fd26405 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_garbageCollector_deleteObject.sqf @@ -0,0 +1,46 @@ +/** + * ExileServer_system_garbageCollector_deleteObject + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_object","_fliesSound","_fliesParticles"]; +_object = _this; +if (_object getVariable ["ExileIsSimulationMonitored", false]) then +{ + _object call ExileServer_system_simulationMonitor_removeVehicle; +}; +_object removeAllEventHandlers "MPKilled"; +_object removeAllEventHandlers "Damaged"; +_object removeAllEventHandlers "GetIn"; +_object removeAllEventHandlers "GetOut"; +removeAllActions _object; +clearBackpackCargoGlobal _object; +clearWeaponCargoGlobal _object; +clearItemCargoGlobal _object; +clearMagazineCargoGlobal _object; +removeAllContainers _object; +if !(isNull (attachedTo _object)) then +{ + detach _object; +}; +_fliesSound = _object getVariable ["ExileFliesSound", objNull]; +if !(isNull _fliesSound) then +{ + deleteVehicle _fliesSound; +}; +_fliesParticles = _object getVariable ["ExileFliesParticles", objNull]; +if !(isNull _fliesParticles) then +{ + _fliesParticles setDamage 999; +}; +{ + _x call ExileServer_system_garbageCollector_deleteObject; +} +forEach (attachedObjects _object); +deleteVehicle _object; \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_garbageCollector_start.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_garbageCollector_start.sqf new file mode 100644 index 0000000..4734c21 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_garbageCollector_start.sqf @@ -0,0 +1,12 @@ +/** + * ExileServer_system_garbageCollector_start + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +[] execFSM (getText (configFile >> "CfgSettings" >> "ServerSettings" >> "serverFSM")); \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_garbageCollector_unscheduled_deleteAllDead.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_garbageCollector_unscheduled_deleteAllDead.sqf new file mode 100644 index 0000000..9db03b5 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_garbageCollector_unscheduled_deleteAllDead.sqf @@ -0,0 +1,31 @@ +/** + * ExileServer_system_garbageCollector_unscheduled_deleteAllDead + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_lifeTime","_diedAt"]; +_lifeTime = 60 * getNumber (configFile >> "CfgSettings" >> "GarbageCollector" >> "Ingame" >> "AllDead" >> "lifeTime"); +{ + _diedAt = _x getVariable ["ExileDiedAt", -1]; + if (_diedAt isEqualTo -1) then + { + _x setVariable ["ExileDiedAt", time]; + } + else + { + if ((time - _diedAt) >= _lifeTime) then + { + if !(isPlayer _x) then + { + _x call ExileServer_system_garbageCollector_deleteObject; + }; + }; + }; +} +forEach allDead; diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_garbageCollector_unscheduled_deleteGroundWeaponHolders.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_garbageCollector_unscheduled_deleteGroundWeaponHolders.sqf new file mode 100644 index 0000000..964bd95 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_garbageCollector_unscheduled_deleteGroundWeaponHolders.sqf @@ -0,0 +1,28 @@ +/** + * ExileServer_system_garbageCollector_unscheduled_deleteGroundWeaponHolders + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_lifeTime","_diedAt"]; +_lifeTime = 60 * getNumber (configFile >> "CfgSettings" >> "GarbageCollector" >> "Ingame" >> "GroundWeaponHolder" >> "lifeTime"); +{ + _diedAt = _x getVariable ["ExileDiedAt", -1]; + if (_diedAt isEqualTo -1) then + { + _x setVariable ["ExileDiedAt", time]; + } + else + { + if ((time - _diedAt) >= _lifeTime) then + { + deleteVehicle _x; + }; + }; +} +forEach (allMissionObjects "GroundWeaponHolder"); diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_garbageCollector_unscheduled_deleteGroups.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_garbageCollector_unscheduled_deleteGroups.sqf new file mode 100644 index 0000000..b9e4da2 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_garbageCollector_unscheduled_deleteGroups.sqf @@ -0,0 +1,56 @@ +/** + * ExileServer_system_garbageCollector_unscheduled_deleteGroups + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_deleteGroup","_units","_unit"]; +{ + if !(_x isEqualTo ExileServerGraveyardGroup) then + { + _deleteGroup = false; + _group = _x; + _units = units _group; + switch (count _units) do + { + case 0: + { + _deleteGroup = true; + }; + case 1: + { + _unit = _units select 0; + if !(_unit isKindOf "Exile_Unit_GhostPlayer") then + { + if !(alive _unit) then + { + if (isNull ExileServerGraveyardGroup) then + { + ExileServerGraveyardGroup = createGroup independent; + ExileServerGraveyardGroup setGroupIdGlobal ["Graveyard"]; + }; + [_unit] joinSilent ExileServerGraveyardGroup; + _deleteGroup = true; + }; + }; + }; + }; + if (_deleteGroup) then + { + if (local _group) then + { + deleteGroup _group; + } + else + { + [groupOwner _group, "DeleteGroupPlz", [_group]] call ExileServer_system_network_send_to; + }; + }; + }; +} +forEach allGroups; \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_garbageCollector_unscheduled_deleteLoot.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_garbageCollector_unscheduled_deleteLoot.sqf new file mode 100644 index 0000000..e6355cd --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_garbageCollector_unscheduled_deleteLoot.sqf @@ -0,0 +1,33 @@ +/** + * ExileServer_system_garbageCollector_unscheduled_deleteLoot + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_lifeTime","_index","_building","_lootWeaponHolderNetIDs","_lootWeaponHolder"]; +_lifeTime = 60 * getNumber (configFile >> "CfgSettings" >> "GarbageCollector" >> "Ingame" >> "Loot" >> "lifeTime"); +_index = -1; +{ + _building = objectFromNetId _x; + if ((time - (_building getVariable ["ExileLootSpawnedAt", 0])) < _lifeTime) exitWith {}; + _lootWeaponHolderNetIDs = _building getVariable ["ExileLootWeaponHolderNetIDs", []]; + { + _lootWeaponHolder = objectFromNetId _x; + if !(isNull _lootWeaponHolder) then + { + deleteVehicle _lootWeaponHolder; + }; + } + forEach _lootWeaponHolderNetIDs; + _building setVariable ["ExileLootSpawnedAt", nil]; + _building setVariable ["ExileHasLoot", false]; + _building setVariable ["ExileLootWeaponHolderNetIDs", []]; + _index = _forEachIndex; +} +forEach ExileServerBuildingNetIdsWithLoot; +ExileServerBuildingNetIdsWithLoot deleteRange [0,(_index+1)]; diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_garbageCollector_unscheduled_deleteWeaponHolderSimulated.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_garbageCollector_unscheduled_deleteWeaponHolderSimulated.sqf new file mode 100644 index 0000000..4eaef8f --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_garbageCollector_unscheduled_deleteWeaponHolderSimulated.sqf @@ -0,0 +1,28 @@ +/** + * ExileServer_system_garbageCollector_unscheduled_deleteWeaponHolderSimulated + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_lifeTime","_diedAt"]; +_lifeTime = 60 * getNumber (configFile >> "CfgSettings" >> "GarbageCollector" >> "Ingame" >> "WeaponHolderSimulated" >> "lifeTime"); +{ + _diedAt = _x getVariable ["ExileDiedAt", -1]; + if (_diedAt isEqualTo -1) then + { + _x setVariable ["ExileDiedAt", time]; + } + else + { + if ((time - _diedAt) >= _lifeTime) then + { + deleteVehicle _x; + }; + }; +} +forEach (allMissionObjects "WeaponHolderSimulated"); \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_locker_network_lockerDepositRequest.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_locker_network_lockerDepositRequest.sqf new file mode 100644 index 0000000..1a423e5 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_locker_network_lockerDepositRequest.sqf @@ -0,0 +1,52 @@ +/** + * ExileServer_system_locker_network_lockerDepositRequest + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_sessionID","_parameters","_deposit","_player","_depositAmount","_playerMoney","_lockerLimit","_lockerAmount","_newLockerAmount","_newPlayerMoney"]; +_sessionID = _this select 0; +_parameters = _this select 1; +_deposit = _parameters select 0; +try +{ + _player = _sessionID call ExileServer_system_session_getPlayerObject; + if (isNull _player) then + { + throw "Null player"; + }; + if !(alive _player) then + { + throw "Dead player"; + }; + _depositAmount = parseNumber _deposit; + _playerMoney = _player getVariable ["ExileMoney",0]; + if (_playerMoney < _depositAmount) then + { + throw "Not enough pop tabs"; + }; + _lockerLimit = (getNumber(missionConfigFile >> "CfgLocker" >> "maxDeposit")); + _lockerAmount = _player getVariable ["ExileLocker", 0]; + _newLockerAmount = _depositAmount + _lockerAmount; + if (_lockerLimit < _newLockerAmount) then + { + throw "Not enough space in locker"; + }; + _player setVariable ["ExileLocker", _newLockerAmount, true]; + format["updateLocker:%1:%2", _newLockerAmount, getPlayerUID _player] call ExileServer_system_database_query_fireAndForget; + _newPlayerMoney = _playerMoney - _depositAmount; + _player setVariable ["ExileMoney", _newPlayerMoney, true]; + format["setPlayerMoney:%1:%2", _newPlayerMoney, _player getVariable ["ExileDatabaseID", 0]] call ExileServer_system_database_query_fireAndForget; + [_sessionID, "toastRequest", ["SuccessTitleOnly", ["Deposited!"]]] call ExileServer_system_network_send_to; + [_sessionID, "lockerResponse", []] call ExileServer_system_network_send_to; +} +catch +{ + _exception call ExileServer_util_log; +}; +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_locker_network_lockerWithdrawRequest.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_locker_network_lockerWithdrawRequest.sqf new file mode 100644 index 0000000..33ebdca --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_locker_network_lockerWithdrawRequest.sqf @@ -0,0 +1,47 @@ +/** + * ExileServer_system_locker_network_lockerWithdrawRequest + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_sessionID","_parameters","_withdraw","_player","_lockerAmount","_withdrawAmount","_newLockerAmount","_playerMoney","_newPlayerMoney"]; +_sessionID = _this select 0; +_parameters = _this select 1; +_withdraw = _parameters select 0; +try +{ + _player = _sessionID call ExileServer_system_session_getPlayerObject; + if (isNull _player) then + { + throw "Null player"; + }; + if !(alive _player) then + { + throw "Dead player"; + }; + _lockerAmount = _player getVariable ["ExileLocker",0]; + _withdrawAmount = parseNumber _withdraw; + if (_lockerAmount < _withdrawAmount) then + { + throw "Not enough pop tabs"; + }; + _newLockerAmount = _lockerAmount - _withdrawAmount; + _player setVariable ["ExileLocker", _newLockerAmount, true]; + format["updateLocker:%1:%2", _newLockerAmount, getPlayerUID _player] call ExileServer_system_database_query_fireAndForget; + _playerMoney = _player getVariable ["ExileMoney",0]; + _newPlayerMoney = _playerMoney + _withdrawAmount; + _player setVariable ["ExileMoney", _newPlayerMoney, true]; + format["setPlayerMoney:%1:%2", _newPlayerMoney, _player getVariable ["ExileDatabaseID", 0]] call ExileServer_system_database_query_fireAndForget; + [_sessionID, "toastRequest", ["SuccessTitleOnly", ["Withdrawn!"]]] call ExileServer_system_network_send_to; + [_sessionID, "lockerResponse", []] call ExileServer_system_network_send_to; +} +catch +{ + _exception call ExileServer_util_log; +}; +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_lootManager_dropItem.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_lootManager_dropItem.sqf new file mode 100644 index 0000000..20536b9 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_lootManager_dropItem.sqf @@ -0,0 +1,45 @@ +/** + * ExileServer_system_lootManager_dropItem + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_lootTableName","_itemClassName","_lootTableConfig","_sum","_count","_half","_halfIndex","_lootTableEntries","_maxPossible","_chance","_startIndex","_endIndex","_i","_entry"]; +_lootTableName = _this; +_itemClassName = ""; +_lootTableConfig = configFile >> "CfgLootTables" >> _lootTableName; +_sum = getNumber(_lootTableConfig >> "sum"); +_count = getNumber(_lootTableConfig >> "count"); +_half = getNumber(_lootTableConfig >> "half"); +_halfIndex = getNumber(_lootTableConfig >> "halfIndex"); +_lootTableEntries = getArray(_lootTableConfig >> "items"); +_maxPossible = (count _lootTableEntries)-1; +_chance = random(_sum); +if (_chance >= _half) then +{ + _startIndex = _halfIndex; + _endIndex = _count - 1; +} +else +{ + _startIndex = 0; + _endIndex = _halfIndex + 1; +}; +if (_endIndex > _maxPossible) then +{ + _endIndex = _maxPossible; +}; +for "_i" from _startIndex to _endIndex do +{ + _entry = _lootTableEntries select _i; + if (_chance <= (_entry select 0)) exitWith + { + _itemClassName = _entry select 1; + }; +}; +_itemClassName \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_lootManager_initialize.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_lootManager_initialize.sqf new file mode 100644 index 0000000..38c6c08 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_lootManager_initialize.sqf @@ -0,0 +1,13 @@ +/** + * ExileServer_system_lootManager_initialize + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +ExileServerBuildingNetIdsWithLoot = []; +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_lootManager_network_spawnLootRequest.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_lootManager_network_spawnLootRequest.sqf new file mode 100644 index 0000000..f8863c9 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_lootManager_network_spawnLootRequest.sqf @@ -0,0 +1,30 @@ +/** + * ExileServer_system_lootManager_network_spawnLootRequest + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_sessionID","_parameters","_buildingNetIDs","_building"]; +_sessionID = _this select 0; +_parameters = _this select 1; +_buildingNetIDs = _parameters select 0; +{ + _building = objectFromNetId _x; + try + { + if (isNull _building) throw false; + if (isObjectHidden _building) throw false; + if !(isClass(configFile >> "CfgBuildings" >> typeOf _building)) throw false; + if (_building getVariable ["ExileHasLoot", false]) throw false; + _building call ExileServer_system_lootManager_spawnLootInBuilding; + } + catch + { + }; +} +forEach _buildingNetIDs; \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_lootManager_spawnLootInBuilding.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_lootManager_spawnLootInBuilding.sqf new file mode 100644 index 0000000..e831578 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_lootManager_spawnLootInBuilding.sqf @@ -0,0 +1,98 @@ +/** + * ExileServer_system_lootManager_spawnLootInBuilding + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_building","_buildingConfig","_lootTableName","_localPositions","_lootConfig","_maximumNumberOfLootPositions","_maximumPositionCoverage","_maximumNumberOfItemsPerLootSpot","_numberOfPositionsToUse","_lootPositions","_spawnedItemClassNames","_lootWeaponHolderNetIDs","_lootPosition","_lootHolder","_numberOfItemsToSpawn","_n","_itemClassName","_cargoType","_magazineClassNames","_magazineClassName","_numberOfMagazines"]; +_building = _this; +_building setVariable ["ExileLootSpawnedAt", time]; +_building setVariable ["ExileHasLoot", true]; +_buildingConfig = configFile >> "CfgBuildings" >> typeOf _building; +_lootTableName = getText (_buildingConfig >> "table"); +_localPositions = getArray (_buildingConfig >> "positions"); +if ((getPosATL _building) call ExileClient_util_world_isInRadiatedZone) then +{ + _lootTableName = "Radiation"; +}; +_lootConfig = missionConfigFile >> "CfgExileLootSettings"; +_maximumNumberOfLootPositions = getNumber (_lootConfig >> "maximumNumberOfLootSpotsPerBuilding"); +_maximumPositionCoverage = getNumber (_lootConfig >> "maximumPositionCoverage"); +_maximumNumberOfItemsPerLootSpot = getNumber (_lootConfig >> "maximumNumberOfItemsPerLootSpot"); +_numberOfPositionsToUse = 1 max (((count _localPositions) * _maximumPositionCoverage / 100) min _maximumNumberOfLootPositions); +_localPositions = _localPositions call ExileClient_util_array_shuffle; +_lootPositions = _localPositions select [0, _numberOfPositionsToUse]; +_spawnedItemClassNames = []; +_lootWeaponHolderNetIDs = []; +{ + _lootPosition = ASLToATL (AGLToASL (_building modelToWorld _x)); + if (_lootPosition select 2 < 0.05) then + { + _lootPosition set [2, 0.05]; + }; + _lootHolder = objNull; + _numberOfItemsToSpawn = (floor (random _maximumNumberOfItemsPerLootSpot)) + 1; + for "_n" from 1 to _numberOfItemsToSpawn do + { + _itemClassName = _lootTableName call ExileServer_system_lootManager_dropItem; + if !(_itemClassName in _spawnedItemClassNames) then + { + if (isNull _lootHolder) then + { + _lootHolder = createVehicle ["LootWeaponHolder", _lootPosition, [], 0, "CAN_COLLIDE"]; + _lootHolder setDir (random 360); + _lootHolder setPosATL _lootPosition; + _lootHolder setVariable ["ExileSpawnedAt", time]; + _lootWeaponHolderNetIDs pushBack (netId _lootHolder); + }; + _cargoType = _itemClassName call ExileClient_util_cargo_getType; + switch (_cargoType) do + { + case 1: + { + if (_itemClassName isEqualTo "Exile_Item_MountainDupe") then + { + _lootHolder addMagazineCargoGlobal [_itemClassName, 2]; + } + else + { + _lootHolder addMagazineCargoGlobal [_itemClassName, 1]; + }; + }; + case 3: + { + _lootHolder addBackpackCargoGlobal [_itemClassName, 1]; + }; + case 2: + { + _lootHolder addWeaponCargoGlobal [_itemClassName, 1]; + if !(_itemClassName isKindOf ["Exile_Melee_Abstract", configFile >> "CfgWeapons"]) then + { + _magazineClassNames = getArray(configFile >> "CfgWeapons" >> _itemClassName >> "magazines"); + if (count(_magazineClassNames) > 0) then + { + _magazineClassName = selectRandom _magazineClassNames; + _numberOfMagazines = 2 + floor(random 3); + _lootHolder addMagazineCargoGlobal [_magazineClassName, _numberOfMagazines]; + _spawnedItemClassNames pushBack _magazineClassName; + }; + }; + _numberOfItemsToSpawn = -1; + }; + default + { + _lootHolder addItemCargoGlobal [_itemClassName, 1]; + }; + }; + _spawnedItemClassNames pushBack _itemClassName; + }; + }; +} +forEach _lootPositions; +_building setVariable ["ExileLootWeaponHolderNetIDs", _lootWeaponHolderNetIDs]; +ExileServerBuildingNetIdsWithLoot pushBack (netId _building); \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_money_network_putMoneyRequest.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_money_network_putMoneyRequest.sqf new file mode 100644 index 0000000..1bf5908 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_money_network_putMoneyRequest.sqf @@ -0,0 +1,102 @@ +/** + * ExileServer_system_money_network_putMoneyRequest + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_sessionID","_parameters","_objectNetID","_amount","_newContainerNetID","_player","_playerMoney","_container","_containerMoney","_nearbyPopTabs","_maximumLoad","_maximumPoptabsLoad","_maximumAmmountToAdd","_containerID"]; +_sessionID = _this select 0; +_parameters = _this select 1; +_objectNetID = _parameters select 0; +_amount = _parameters select 1; +_newContainerNetID = ""; +try +{ + _player = _sessionID call ExileServer_system_session_getPlayerObject; + if (isNull _player) then + { + throw "Non-existent players cannot put money somewhere!"; + }; + if !(alive _player) then + { + throw "The dead cannot put money somewhere!"; + }; + if (_amount < 1) then + { + throw "Invalid money parameter!"; + }; + _playerMoney = _player getVariable ["ExileMoney", 0]; + if (_amount > _playerMoney) then + { + throw "Cannot store money that this player does not have!"; + }; + _container = objectFromNetId _objectNetID; + if (isNull _container) then + { + throw "Cannot store money in non-existent container!"; + }; + if ((_player distance _container) > 10) then + { + throw "Cannot store money over long distances!"; + }; + _containerMoney = _container getVariable ["ExileMoney", 0]; + if (_container isKindOf "GroundWeaponHolder") then + { + _nearbyPopTabs = nearestObjects [_player, ["Exile_PopTabs"], 3]; + if (_nearbyPopTabs isEqualTo []) then + { + _container = createVehicle ["Exile_PopTabs", (getPos _player), [], 0, "CAN_COLLIDE"]; + _container setPosASL (getPosASL _player); + } + else + { + _container = _nearbyPopTabs select 0; + }; + _newContainerNetID = netID _container; + } + else + { + if!(_container isKindOf "man")then + { + _maximumLoad = getNumber (configFile >> "CfgVehicles" >> typeOf _container >> "maximumLoad"); + if(_maximumLoad isEqualTo 0)then + { + throw "Invalid container load"; + }; + _maximumPoptabsLoad = _maximumLoad * 10; + _maximumAmmountToAdd = _maximumPoptabsLoad - _containerMoney; + if(_amount > _maximumAmmountToAdd)then + { + _amount = _maximumAmmountToAdd; + }; + }; + }; + _playerMoney = _playerMoney - _amount; + _player setVariable ["ExileMoney", _playerMoney, true]; + format["setPlayerMoney:%1:%2", _playerMoney, _player getVariable ["ExileDatabaseID", 0]] call ExileServer_system_database_query_fireAndForget; + _containerMoney = _container getVariable ["ExileMoney", 0]; + _containerMoney = _containerMoney + _amount; + _container setVariable ["ExileMoney", _containerMoney, true]; + _containerID = _container getVariable ["ExileDatabaseID", -1]; + if (_containerID > -1) then + { + if ((getNumber (configFile >> "CfgVehicles" >> (typeOf _container) >> "exileContainer")) isEqualTo 1) then + { + format["setContainerMoney:%1:%2", _containerMoney, _containerID] call ExileServer_system_database_query_fireAndForget; + } + else + { + format["setVehicleMoney:%1:%2", _containerMoney, _containerID] call ExileServer_system_database_query_fireAndForget; + }; + }; +} +catch +{ + _exception call ExileServer_util_log; +}; +[_sessionID, "moneyTransactionResponse", [_newContainerNetID, -1 * _amount]] call ExileServer_system_network_send_to; \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_money_network_takeMoneyRequest.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_money_network_takeMoneyRequest.sqf new file mode 100644 index 0000000..60f3d0f --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_money_network_takeMoneyRequest.sqf @@ -0,0 +1,73 @@ +/** + * ExileServer_system_money_network_takeMoneyRequest + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_sessionID","_parameters","_objectNetID","_amount","_player","_container","_containerMoney","_containerID","_playerMoney"]; +_sessionID = _this select 0; +_parameters = _this select 1; +_objectNetID = _parameters select 0; +_amount = _parameters select 1; +try +{ + _player = _sessionID call ExileServer_system_session_getPlayerObject; + if (isNull _player) then + { + throw "Non-existent players cannot take money!"; + }; + if !(alive _player) then + { + throw "The dead cannot take money!"; + }; + _container = objectFromNetId _objectNetID; + if (isNull _container) then + { + throw "Cannot take money from non-existent container!"; + }; + if ((_player distance _container) > 10) then + { + throw "Cannot take money over long distances!"; + }; + _containerMoney = _container getVariable ["ExileMoney", 0]; + if (_containerMoney < 1) then + { + throw "Cannot take money from an empty container!"; + }; + if (_amount isEqualTo 0) then + { + _amount = _containerMoney; + }; + if (_amount > _containerMoney) then + { + throw "Cannot take more money than the container has!"; + }; + _containerMoney = _containerMoney - _amount; + _containerID = _container getVariable ["ExileDatabaseID", -1]; + _container setVariable ["ExileMoney", _containerMoney, true]; + if (_containerID > -1) then + { + format["setContainerMoney:%1:%2", _containerMoney, _containerID] call ExileServer_system_database_query_fireAndForget; + }; + if (_containerMoney isEqualTo 0) then + { + if (_container isKindOf "Exile_PopTabs") then + { + deleteVehicle _container; + }; + }; + _playerMoney = _player getVariable ["ExileMoney", 0]; + _playerMoney = _playerMoney + _amount; + _player setVariable ["ExileMoney", _playerMoney, true]; + format["setPlayerMoney:%1:%2", _playerMoney, _player getVariable ["ExileDatabaseID", 0]] call ExileServer_system_database_query_fireAndForget; +} +catch +{ + _exception call ExileServer_util_log; +}; +[_sessionID, "moneyTransactionResponse", ["", _amount]] call ExileServer_system_network_send_to; \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_network_dispatchIncomingMessage.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_network_dispatchIncomingMessage.sqf new file mode 100644 index 0000000..8efe180 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_network_dispatchIncomingMessage.sqf @@ -0,0 +1,92 @@ +/** + * ExileServer_system_network_dispatchIncomingMessage + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_payload","_sessionId","_messageName","_messageParameters","_playerBySessionId","_sessionID","_ExileSessionID","_config","_allowedParameters","_moduleName","_functionName","_functionCode"]; +_payload = _this; +try +{ + if (isNil "_payload") then + { + throw "Message payload is not defined!"; + }; + if (typeName _payload != "ARRAY") then + { + throw "Message payload is not a array!"; + }; + if (count _payload != 3) then + { + throw format ["Wrong envelope field count! Payload: %1", _payload]; + }; + _sessionId = _payload select 0; + _messageName = _payload select 1; + _messageParameters = _payload select 2; + if (_messageName isEqualTo "startSessionRequest") then + { + _playerBySessionId = _sessionID call ExileServer_system_session_getPlayerObject; + _ExileSessionID = _playerBySessionId getVariable ["ExileSessionID", -1]; + if !(_ExileSessionID isEqualTo -1) then + { + throw "Trying to get a second session ID!"; + }; + } + else + { + if (count _sessionId != 8) then + { + throw format ["Invalid session ID found! Payload: %1", _payload]; + }; + if !(_sessionId call ExileServer_system_session_isRegisteredId) then + { + throw format ["Unknown session ID found! Payload: %1", _payload]; + }; + }; + if (isClass (missionConfigFile >> "CfgNetworkMessages" >> _messageName)) then + { + _config = missionConfigFile >> "CfgNetworkMessages" >> _messageName; + } + else + { + if (isClass (configFile >> "CfgNetworkMessages" >> _messageName)) then + { + _config = configFile >> "CfgNetworkMessages" >> _messageName; + } + else + { + throw format ["Forbidden message name! Payload: %1", _payload]; + }; + }; + _allowedParameters = getArray (_config >> "parameters"); + if (count _messageParameters != count _allowedParameters) then + { + throw format ["Parameter count mismatch! Payload: %1", _payload]; + }; + { + if (_x != typeName (_messageParameters select _forEachIndex)) then + { + throw format ["Parameter type mismatch! Index %1, Required %2, Found %3, Payload: %4", _forEachIndex, _x, (typeName (_messageParameters select _forEachIndex)), _payload]; + }; + } + forEach _allowedParameters; + _moduleName = getText (_config >> "module"); + _functionName = format ["ExileServer_%1_network_%2", _moduleName, _messageName]; + _functionCode = missionNamespace getVariable [_functionName, ""]; + if (_functionCode isEqualTo "") then + { + throw format ["Invalid function call! Called: %1", _functionName]; + }; + [_sessionId, _messageParameters] call _functionCode; +} +catch +{ + format["Network message dispatch failed: %1", _exception] call ExileServer_util_log; +}; +PublicMessage = nil; +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_network_event_onHandleDisconnect.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_network_event_onHandleDisconnect.sqf new file mode 100644 index 0000000..57cd618 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_network_event_onHandleDisconnect.sqf @@ -0,0 +1,63 @@ +/** + * ExileServer_system_network_event_onHandleDisconnect + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_unit","_id","_pos","_newUnitDeaths","_constructionObject","_sessionID"]; +_unit = _this select 0; +_id = _this select 1; +_uid = _this select 2; +_name = _this select 3; +_pos = getPos _unit; +_newUnitDeaths = _unit getVariable ["ExileDeaths", 0]; +if !(_uid in ["", "__SERVER__", "__HEADLESS__"]) then +{ + _constructionObject = _unit getVariable ["ExileConstructionObject", objNull]; + if !(isNull _constructionObject) then + { + deleteVehicle _constructionObject; + }; + if (_unit getVariable ["IsPlayingRussianRoulette", false]) then + { + _unit call ExileServer_system_russianRoulette_event_onPlayerDisconnected; + _unit setVariable ["ExileIsDead", false]; + }; + format["endAccountSession:%1", _uid] call ExileServer_system_database_query_fireAndForget; + _sessionID = _unit getVariable ["ExileSessionID", ""]; + _sessionID call ExileServer_system_session_end; + _unit setVariable ["ExileSessionID", nil]; + if !(_unit getVariable ["ExileIsDead", false]) then + { + if (_unit getVariable ["ExileIsHandcuffed", false]) then + { + _unit setDamage 999; + format["insertPlayerHistory:%1:%2:%3:%4:%5", _uid, _name, _pos select 0, _pos select 1, _pos select 2] call ExileServer_system_database_query_fireAndForget; + format["deletePlayer:%1", _unit getVariable ["ExileDatabaseId", -1]] call ExileServer_system_database_query_fireAndForget; + _unit setVariable ["ExileIsDead", true]; + _unit setVariable ["ExileName", _name, true]; + _unit call ExileServer_object_flies_spawn; + _newUnitDeaths = _newUnitDeaths + 1; + _unit setVariable ["ExileDeaths", _newUnitDeaths]; + format["addAccountDeath:%1", _uid] call ExileServer_system_database_query_fireAndForget; + _unit call ExileServer_object_player_sendStatsUpdate; + ["systemChatRequest", [format["HANDCUFF LOGOUT: %1 has been killed.", name _unit]]] call ExileServer_system_network_send_broadcast; + } + else + { + _unit call ExileServer_object_player_database_update; + deleteVehicle _unit; + _unit = objNull; + }; + }; +}; +if !(isNull _unit) then +{ + [_unit] joinSilent (createGroup independent); +}; +false \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_network_event_onPlayerConnected.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_network_event_onPlayerConnected.sqf new file mode 100644 index 0000000..24b97dd --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_network_event_onPlayerConnected.sqf @@ -0,0 +1,28 @@ +/** + * ExileServer_system_network_event_onPlayerConnected + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_isKnownAccount"]; +_uid = _this select 0; +_name = _this select 1; +if !(_uid in ["", "__SERVER__", "__HEADLESS__"]) then +{ + format["Player %1 (UID %2) connected!", _name, _uid] call ExileServer_util_log; + _isKnownAccount = format["isKnownAccount:%1", _uid] call ExileServer_system_database_query_selectSingleField; + if (_isKnownAccount) then + { + format["startAccountSession:%1:%2", _uid, _name] call ExileServer_system_database_query_fireAndForget; + } + else + { + format["createAccount:%1:%2", _uid, _name] call ExileServer_system_database_query_fireAndForget; + }; +}; +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_network_event_onPlayerDisconnected.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_network_event_onPlayerDisconnected.sqf new file mode 100644 index 0000000..75aa510 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_network_event_onPlayerDisconnected.sqf @@ -0,0 +1,12 @@ +/** + * ExileServer_system_network_event_onPlayerDisconnected + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_network_send_broadcast.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_network_send_broadcast.sqf new file mode 100644 index 0000000..aa5e3e7 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_network_send_broadcast.sqf @@ -0,0 +1,16 @@ +/** + * ExileServer_system_network_send_broadcast + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_messageName","_messageParameters","_publicMessage"]; +params ["_messageName", "_messageParameters"]; +_publicMessage = [_messageName, _messageParameters]; +_publicMessage remoteExecCall ["ExileClient_system_network_dispatchIncomingMessage", -2]; +_publicMessage = nil; \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_network_send_to.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_network_send_to.sqf new file mode 100644 index 0000000..17de4ca --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_network_send_to.sqf @@ -0,0 +1,36 @@ +/** + * ExileServer_system_network_send_to + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_recipient","_messageName","_messageParameters","_owner","_publicMessage"]; +_recipient = _this select 0; +_messageName = _this select 1; +_messageParameters = _this select 2; +switch (typeName _recipient) do +{ + case "OBJECT": + { + _owner = owner _recipient; + }; + case "STRING": + { + _owner = owner (_recipient call ExileServer_system_session_getPlayerObject); + }; + default + { + _owner = _recipient; + }; +}; +if (_owner > 0) then +{ + _publicMessage = [_messageName, _messageParameters]; + _publicMessage remoteExecCall ["ExileClient_system_network_dispatchIncomingMessage", _owner]; +}; +_publicMessage = nil; \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_network_setupEventHandlers.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_network_setupEventHandlers.sqf new file mode 100644 index 0000000..f88a250 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_network_setupEventHandlers.sqf @@ -0,0 +1,32 @@ +/** + * ExileServer_system_network_setupEventHandlers + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +if(getNumber(configFile >> "CfgSettings" >> "CBA" >> "useStackedEH") isEqualTo 1)then +{ + ["ExileOnPlayerConnected", "onPlayerConnected", { [_uid, _name] call ExileServer_system_network_event_onPlayerConnected; }] call BIS_fnc_addStackedEventHandler; + ["ExileOnPlayerDisconnected", "onPlayerDisconnected", { [_uid, _name] call ExileServer_system_network_event_onPlayerDisconnected; }] call BIS_fnc_addStackedEventHandler; + "Added STACKED EH!" call ExileServer_util_log; + if (getNumber(configFile >> "CfgSettings" >> "CBA" >> "iReallyWantToGetHackedAndImRetarded") isEqualTo 1)then + { + "Full retard mode active." call ExileServer_util_log; + } + else + { + CBAr = compileFinal "format['CBAr called with: %1 ¯\_(ツ)_/¯',_this] call ExileServer_util_log;"; + CBAt = compileFinal "format['CBAt called with: %1 ¯\_(ツ)_/¯',_this] call ExileServer_util_log;"; + }; +} +else +{ + onPlayerConnected {[_uid, _name] call ExileServer_system_network_event_onPlayerConnected}; + onPlayerDisconnected {[_uid, _name] call ExileServer_system_network_event_onPlayerDisconnected}; +}; +addMissionEventHandler ["HandleDisconnect", { _this call ExileServer_system_network_event_onHandleDisconnect; }]; \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_party_network_inviteToPartyRequest.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_party_network_inviteToPartyRequest.sqf new file mode 100644 index 0000000..0cc7b9d --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_party_network_inviteToPartyRequest.sqf @@ -0,0 +1,19 @@ +/** + * ExileServer_system_party_network_inviteToPartyRequest + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_sessionID","_parameters","_playerToInvite","_partyLeader"]; +_sessionID = _this select 0; +_parameters = _this select 1; +_playerToInvite = objectFromNetId (_parameters select 0); +_partyLeader = _sessionID call ExileServer_system_session_getPlayerObject; +format ["%1 (%2) has invited %3 (%4) to his party.", name _partyLeader, netId _partyLeader, name _playerToInvite, _parameters select 0] call ExileServer_util_log; +[_playerToInvite, "inviteToPartyRequest", [netId _partyLeader]] call ExileServer_system_network_send_to; +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_party_network_kickFromPartyRequest.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_party_network_kickFromPartyRequest.sqf new file mode 100644 index 0000000..455baed --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_party_network_kickFromPartyRequest.sqf @@ -0,0 +1,17 @@ +/** + * ExileServer_system_party_network_kickFromPartyRequest + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_sessionID","_parameters","_playerToKick"]; +_sessionID = _this select 0; +_parameters = _this select 1; +_playerToKick = objectFromNetId (_parameters select 0); +[_playerToKick, "kickFromPartyRequest", [""]] call ExileServer_system_network_send_to; +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_party_network_updateMyPartyMarkerRequest.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_party_network_updateMyPartyMarkerRequest.sqf new file mode 100644 index 0000000..f8d816c --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_party_network_updateMyPartyMarkerRequest.sqf @@ -0,0 +1,43 @@ +/** + * ExileServer_system_party_network_updateMyPartyMarkerRequest + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_sessionID","_parameters","_update","_position","_sendingPlayer"]; +_sessionID = _this select 0; +_parameters = _this select 1; +_update = _parameters select 0; +_position = _parameters select 1; +try +{ + _sendingPlayer = _sessionID call ExileServer_system_session_getPlayerObject; + if (isNull _sendingPlayer) then + { + throw "Invalid player object while updating party marker."; + }; + if (_update) then + { + _sendingPlayer setVariable ["ExilePartyMarker", _position]; + } + else + { + _sendingPlayer setVariable ["ExilePartyMarker", -1]; + }; + { + if !(_x isEqualTo _sendingPlayer) then + { + [_x, "updatePartyMarkerRequest", [netId _sendingPlayer, _update, _position]] call ExileServer_system_network_send_to; + }; + } + forEach (units (group _sendingPlayer)); +} +catch +{ + _x call ExileServer_util_log; +}; \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_playerSaveQueue_initialize.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_playerSaveQueue_initialize.sqf new file mode 100644 index 0000000..e10f8ca --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_playerSaveQueue_initialize.sqf @@ -0,0 +1,14 @@ +/** + * ExileServer_system_playerSaveQueue_initialize + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +ExileSystemPlayerSaveASYNC = []; +[30, ExileServer_system_playerSaveQueue_thread_savePlayer, [], true] call ExileServer_system_thread_addtask; +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_playerSaveQueue_thread_savePlayer.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_playerSaveQueue_thread_savePlayer.sqf new file mode 100644 index 0000000..693bf1d --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_playerSaveQueue_thread_savePlayer.sqf @@ -0,0 +1,24 @@ +/** + * ExileServer_system_playerSaveQueue_thread_savePlayer + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_playerObject"]; +if !(ExileSystemPlayerSaveASYNC isEqualTo []) then +{ + { + _playerObject = _x; + if (!isNull _playerObject) then + { + _playerObject call ExileServer_object_player_database_update; + }; + } + forEach ExileSystemPlayerSaveASYNC; + ExileSystemPlayerSaveASYNC = []; +}; \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_process_noobFilter.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_process_noobFilter.sqf new file mode 100644 index 0000000..53b9711 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_process_noobFilter.sqf @@ -0,0 +1,51 @@ +/** + * ExileServer_system_process_noobFilter + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_arsenal","_weaponClassNames","_className","_linkedItems","_i"]; +_arsenal = "true" configClasses (missionConfigFile >> "CfgExileArsenal"); +_weaponClassNames = []; +{ + _className = configName _x; + try + { + if (isClass (configFile >> "CfgWeapons" >> _className >> "LinkedItems")) then + { + _linkedItems = "true" configClasses (configFile >> "CfgWeapons" >> _className >> "LinkedItems"); + { + if (isText(_x >> "item")) then + { + if !((getText (_x >> "item")) isEqualTo "") then + { + throw true; + }; + }; + } + forEach _linkedItems; + }; + } + catch + { + _weaponClassNames pushBack _className; + }; +} +forEach _arsenal; +if ((count _weaponClassNames) > 0) then +{ + for "_i" from 0 to 100 do + { + "ERROR! ERROR! ERROR! ERROR! ERROR! ERROR!" call ExileServer_util_log; + }; + "You have added weapons to your server that spawn in with attachments." call ExileServer_util_log; + "This will allow duping and money farming!" call ExileServer_util_log; + "To solve this, please remove the following weapons from your loot tables and trader config OR replace them with their non-attachment equivalent:" call ExileServer_util_log; + format ["%1", _weaponClassNames] call ExileServer_util_log; + "Example: Use arifle_Katiba_F instead of arifle_Katiba_ACO_pointer_snds_F." call ExileServer_util_log; +}; diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_process_postInit.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_process_postInit.sqf new file mode 100644 index 0000000..c576024 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_process_postInit.sqf @@ -0,0 +1,31 @@ +/** + * ExileServer_system_process_postInit + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +if (!isNil "PublicServerVersion") then +{ + call ExileClient_system_map_initialize; + call ExileServer_system_thread_initialize; + call ExileServer_system_playerSaveQueue_initialize; + call ExileServer_system_swapOwnershipQueue_initialize; + call ExileServer_system_vehicleSaveQueue_initialize; + call ExileServer_system_simulationMonitor_initialize; + call ExileServer_system_lootManager_initialize; + call ExileServer_system_weather_initialize; + call ExileServer_system_garbageCollector_cleanDatabase; + call ExileServer_system_event_initialize; + call ExileServer_world_initialize; + call ExileServer_system_russianRoulette_initialize; + PublicServerIsLoaded = true; + publicVariable "PublicServerIsLoaded"; + format ["Server is up and running! Version: %1", PublicServerVersion] call ExileServer_util_log; + call ExileServer_system_garbageCollector_start; + call ExileServer_system_rcon_event_ready; +}; \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_process_preInit.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_process_preInit.sqf new file mode 100644 index 0000000..b783748 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_process_preInit.sqf @@ -0,0 +1,29 @@ +/** + * ExileServer_system_process_preInit + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_MySql"]; +"Server is loading..." call ExileServer_util_log; +call ExileServer_system_rcon_initialize; +finishMissionInit; +ExileSessionIDs = []; +ExileServerGraveyardGroup = grpNull; +ExileServerBreachingCharges = []; +independent setFriend [sideEnemy, 1]; +call ExileServer_system_process_noobFilter; +_MySql_connection = [] call ExileServer_system_database_connect; +call ExileServer_system_network_setupEventHandlers; +if !(getRemoteSensorsDisabled) then +{ + disableRemoteSensors true; +}; +PublicServerIsLoaded = false; +PublicServerVersion = getText(configFile >> "CfgMods" >> "Exile" >> "version"); +publicVariable "PublicServerVersion"; \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_rcon_event_clearBuffers.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_rcon_event_clearBuffers.sqf new file mode 100644 index 0000000..425e35d --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_rcon_event_clearBuffers.sqf @@ -0,0 +1,51 @@ +/** + * ExileServer_system_rcon_event_clearBuffers + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_playerObject","_vehicleObject"]; +if !(ExileSystemPlayerSaveASYNC isEqualTo []) then +{ + { + _playerObject = _x; + if (!isNull _playerObject) then + { + _playerObject call ExileServer_object_player_database_update; + }; + ExileSystemPlayerSaveASYNC deleteAt _forEachIndex; + } + forEach ExileSystemPlayerSaveASYNC; +}; +if !(ExileServerVehicleSaveQueue isEqualTo []) then +{ + { + _vehicleObject = _x; + if (!isNull _vehicleObject) then + { + if (_vehicleObject getVariable ["ExileIsContainer", false]) then + { + _vehicleObject call ExileServer_object_container_database_update; + } + else + { + if (isNumber(configFile >> "CfgVehicles" >> typeOf _vehicleObject >> "exileIsDoor")) then + { + _vehicleObject call ExileServer_object_construction_database_lockUpdate; + } + else + { + _vehicleObject call ExileServer_object_vehicle_database_update; + }; + }; + }; + ExileServerVehicleSaveQueue deleteAt _forEachIndex; + } + forEach ExileServerVehicleSaveQueue; +}; +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_rcon_event_kickAll.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_rcon_event_kickAll.sqf new file mode 100644 index 0000000..df003b2 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_rcon_event_kickAll.sqf @@ -0,0 +1,17 @@ +/** + * ExileServer_system_rcon_event_kickAll + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_i"]; +for "_i" from 0 to ((playableSlotsNumber independent) - 1) do +{ + format ["#kick %1", _i] call ExileServer_system_rcon_event_sendCommand; +}; +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_rcon_event_kickAllrestart.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_rcon_event_kickAllrestart.sqf new file mode 100644 index 0000000..92c3d4c --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_rcon_event_kickAllrestart.sqf @@ -0,0 +1,18 @@ +/** + * ExileServer_system_rcon_event_kickAllrestart + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_i"]; +for "_i" from 0 to ((playableSlotsNumber independent) - 1) do +{ + format ["#kick %1", _i] call ExileServer_system_rcon_event_sendCommand; + uiSleep 0.2; +}; +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_rcon_event_ready.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_rcon_event_ready.sqf new file mode 100644 index 0000000..352a813 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_rcon_event_ready.sqf @@ -0,0 +1,20 @@ +/** + * ExileServer_system_rcon_event_ready + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +if (ExileServerIsLocked) then +{ + call ExileServer_system_rcon_setupEvents; + "Rcon events initialized!" call ExileServer_util_log; + "#unlock" call ExileServer_system_rcon_event_sendCommand; + ExileServerIsLocked = false; + "Server unlocked and accepting players. Have fun! :)" call ExileServer_util_log; +}; +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_rcon_event_sendCommand.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_rcon_event_sendCommand.sqf new file mode 100644 index 0000000..9adc766 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_rcon_event_sendCommand.sqf @@ -0,0 +1,17 @@ +/** + * ExileServer_system_rcon_event_sendCommand + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_command","_password","_return"]; +_command = _this; +_password = getText(configFile >> "CfgSettings" >> "RCON" >> "serverPassword"); +if(_password isEqualTo "")then{_password = "empty";}; +_return = _password serverCommand _command; +_return \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_rcon_initialize.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_rcon_initialize.sqf new file mode 100644 index 0000000..b3fe85c --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_rcon_initialize.sqf @@ -0,0 +1,36 @@ +/** + * ExileServer_system_rcon_initialize + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_useAutoLock","_passwordCorrect"]; +_useAutoLock = getNumber(configFile >> "CfgSettings" >> "RCON" >> "useAutoLock"); +if (_useAutoLock isEqualTo 1) then +{ + _passwordCorrect = "#lock" call ExileServer_system_rcon_event_sendCommand; + if (_passwordCorrect) then + { + "ServerPassword MATCH! server locked for init" call ExileServer_util_log; + ExileServerIsLocked = true; + ExilePasswordMatch = true; + ExileServerRestartMode = false; + call ExileServer_system_rcon_event_kickAll; + } + else + { + "ServerPassword MISMATCH!!! rcon features DISABLED!" call ExileServer_util_log; + ExilePasswordMatch = false; + ExileServerIsLocked = false; + }; +} +else +{ + ExilePasswordMatch = false; + ExileServerIsLocked = false; +}; \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_rcon_setupEvents.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_rcon_setupEvents.sqf new file mode 100644 index 0000000..d7f203d --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_rcon_setupEvents.sqf @@ -0,0 +1,39 @@ +/** + * ExileServer_system_rcon_setupEvents + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_restartTime","_useRestartMessages"]; +_restartTime = getArray (configFile >> "CfgSettings" >> "RCON" >> "restartTimer"); +ExileServerRestartTime = ((_restartTime select 0) * 60) + (_restartTime select 1); +ExileServerKickTime = getNumber (configFile >> "CfgSettings" >> "RCON" >> "kickTime"); +ExileServerLockTime = getNumber (configFile >> "CfgSettings" >> "RCON" >> "restartAutoLock"); +ExileServerUseAutokick = getNumber (configFile >> "CfgSettings" >> "RCON" >> "useAutoKick"); +_useRestartMessages = getNumber (configFile >> "CfgSettings" >> "RCON" >> "useRestartMessages"); +if(_useRestartMessages isEqualTo 1)then +{ + ExileServerRestartMessages = getArray(configFile >> "CfgSettings" >> "RCON" >> "restartWarningTime"); +} +else +{ + ExileServerRestartMessages = false; +}; +[ + 30, + ExileServer_system_rcon_thread_check, + [ + ExileServerRestartTime, + ExileServerUseAutokick, + ExileServerKickTime, + ExileServerLockTime + ], + true +] +call ExileServer_system_thread_addTask; +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_rcon_thread_check.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_rcon_thread_check.sqf new file mode 100644 index 0000000..be7a702 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_rcon_thread_check.sqf @@ -0,0 +1,68 @@ +/** + * ExileServer_system_rcon_thread_check + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_restartTime","_useAutoKick","_kickTime","_lockTime","_uptime","_timeTilRestart","_time","_i"]; +_restartTime = _this select 0; +_useAutoKick = _this select 1; +_kickTime = _this select 2; +_lockTime = _this select 3; +_uptime = call ExileServer_util_time_uptime; +_timeTilRestart = _restartTime - _uptime; +if (typeName ExileServerRestartMessages isEqualTo "ARRAY") then +{ + if !(ExileServerRestartMessages isEqualTo []) then + { + { + _time = _x; + if (_timeTilRestart < _time) then + { + if (count ExileSessionIDs > 0) then + { + ["toastRequest", ["InfoTitleAndText", ["Restart incoming!", format["Server is going to restart in %1 min! Log out before the restart to prevent gear loss.", _time] ]]] call ExileServer_system_network_send_broadcast; + }; + ExileServerRestartMessages deleteAt _forEachIndex; + format ["Restart Warnings for %1min sent",_time] call ExileServer_util_log; + }; + } + forEach ExileServerRestartMessages; + }; +}; +if (_timeTilRestart < _lockTime) then +{ + if !(ExileServerIsLocked) then + { + "#lock" call ExileServer_system_rcon_event_sendCommand; + "Server locked for restart" call ExileServer_util_log; + ["toastRequest", ["ErrorTitleAndText", ["Server will restart now!", "You will be kicked off the server due to a restart."]]] call ExileServer_system_network_send_broadcast; + ExileServerIsLocked = true; + }; + if (_timeTilRestart < _kickTime) then + { + if !(ExileServerRestartMode) then + { + call ExileServer_system_rcon_event_kickAllrestart; + "Everyone kicked for restart" call ExileServer_util_log; + ExileSystemSpawnThread = []; + call ExileServer_system_rcon_event_clearBuffers; + "Buffers cleared!" call ExileServer_util_log; + for "_i" from 0 to 49 do + { + "SERVER READY FOR RESTART!!" call ExileServer_util_log; + }; + ExileServerRestartMode = true; + if(getNumber(configFile >> "CfgSettings" >> "RCON" >> "useShutdown") isEqualTo 1)then + { + '#shutdown' call ExileServer_system_rcon_event_sendCommand; + }; + }; + }; +}; +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_russianRoulette_broadcastGameStatus.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_russianRoulette_broadcastGameStatus.sqf new file mode 100644 index 0000000..4b01924 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_russianRoulette_broadcastGameStatus.sqf @@ -0,0 +1,43 @@ +/** + * ExileServer_system_russianRoulette_broadcastGameStatus + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_playerInfo","_player","_currentShot"]; +_playerInfo = []; +{ + _player = objectFromNetid (_x select 0); + _currentShot = 0; + if !(isNull _player) then + { + _currentShot = (_player getVariable ["RussianRouletteCurrentShot", 0]) + 1; + }; + _playerInfo pushBack + [ + _x select 0, + _x select 1, + _currentShot + ]; +} +forEach ExileServerRussianRoulettePlayers; +{ + [ + _x, + "updateRussianRouletteGameStatusRequest", + [ + ExileServerRussianRouletteStatus, + ExileServerRussianRoulettePotValue, + _playerInfo, + ExileServerRussianRouletteCurrentPlayerNetId, + ExileServerRussianRouletteCurrentShot, + ExileServerRussianRouletteCountDownEndTime + ] + ] call ExileServer_system_network_send_to; +} +forEach ExileServerRussianRouletteAlivePlayers; \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_russianRoulette_event_onPlayerDied.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_russianRoulette_event_onPlayerDied.sqf new file mode 100644 index 0000000..074606f --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_russianRoulette_event_onPlayerDied.sqf @@ -0,0 +1,29 @@ +/** + * ExileServer_system_russianRoulette_event_onPlayerDied + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_playerObject"]; +_playerObject = _this; +format ["Russian Roulette: %1 died!", name _playerObject] call ExileServer_util_log; +{ + if (_x isEqualTo _playerObject) exitWith + { + ExileServerRussianRouletteAlivePlayers deleteAt _forEachIndex; + }; +} +forEach ExileServerRussianRouletteAlivePlayers; +if ((count ExileServerRussianRouletteAlivePlayers) isEqualTo 1) then +{ + (ExileServerRussianRouletteAlivePlayers select 0) call ExileServer_system_russianRoulette_event_onPlayerWin; +} +else +{ + call ExileServer_system_russianRoulette_letNextPlayerFire; +}; \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_russianRoulette_event_onPlayerDisconnected.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_russianRoulette_event_onPlayerDisconnected.sqf new file mode 100644 index 0000000..5aa66cb --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_russianRoulette_event_onPlayerDisconnected.sqf @@ -0,0 +1,23 @@ +/** + * ExileServer_system_russianRoulette_event_onPlayerDisconnected + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_playerObject"]; +format ["Russian Roulette: %1 disconnected while playing!", name _this] call ExileServer_util_log; +format ["Russian Roulette: Ending game..."] call ExileServer_util_log; +{ + _playerObject = objectFromNetid (_x select 0); + if !(isNull _playerObject) then + { + _playerObject call ExileServer_system_russianRoulette_event_onPlayerLeft; + }; +} +forEach ExileServerRussianRoulettePlayers; +call ExileServer_system_russianRoulette_initialize; \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_russianRoulette_event_onPlayerJoined.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_russianRoulette_event_onPlayerJoined.sqf new file mode 100644 index 0000000..df4fcf5 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_russianRoulette_event_onPlayerJoined.sqf @@ -0,0 +1,67 @@ +/** + * ExileServer_system_russianRoulette_event_onPlayerJoined + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_playerObject","_buyInAmount","_playerMoney","_chairIndex","_chairInfo","_chair","_probabilities"]; +_playerObject = _this; +_buyInAmount = getNumber (missionConfigFile >> "CfgExileRussianRoulette" >> "buyInAmount"); +_playerMoney = _playerObject getVariable ["ExileMoney", 0]; +_playerMoney = _playerMoney - _buyInAmount; +format["setPlayerMoney:%1:%2", _playerMoney, _playerObject getVariable ["ExileDatabaseID", 0]] call ExileServer_system_database_query_fireAndForget; +ExileServerRussianRoulettePotValue = ExileServerRussianRoulettePotValue + _buyInAmount; +_chairIndex = count ExileServerRussianRoulettePlayers; +_chairInfo = ExileRouletteChairPositions select _chairIndex; +_chair = ExileRouletteChairs select _chairIndex; +_chair setDir (deg (_chairInfo select 1)); +_chair setPosWorld (_chairInfo select 0); +_chair disableCollisionWith _playerObject; +_chair setOwner (owner _playerObject); +_probabilities = [false, false, false, false, false, true] call ExileClient_util_array_shuffle; +_playerObject setVariable ["SavedRussianRoulettePosition", getPosASL _playerObject]; +_playerObject setVariable ["SavedRussianRouletteDirection", getDir _playerObject]; +_playerObject setVariable ["IsPlayingRussianRoulette", true]; +_playerObject setVariable ["ExileMoney", _playerMoney, true]; +_playerObject setVariable ["RussianRouletteProbabilities", _probabilities]; +_playerObject setVariable ["RussianRouletteCurrentShot", -1]; +ExileServerRussianRoulettePlayers pushBack [netId _playerObject, name _playerObject]; +ExileServerRussianRouletteAlivePlayers pushBack _playerObject; +[_playerObject, "joinRussianRouletteResponse", [netID _chair]] call ExileServer_system_network_send_to; +format ["Russian Roulette: %1 joined the game.", name _playerObject] call ExileServer_util_log; +switch (count ExileServerRussianRoulettePlayers) do +{ + case 2: + { + ExileServerRussianRouletteCountDownEndTime = serverTime + 2*60; + ["systemChatRequest", ["A round of Russian Roulette starts in two minutes!"]] call ExileServer_system_network_send_broadcast; + "Russian Roulette: Game starts in two minutes." call ExileServer_util_log; + ExileServerRussianRouletteStartGameCountDownThread = [] spawn + { + while {serverTime < ExileServerRussianRouletteCountDownEndTime} do + { + uiSleep 1; + }; + call ExileServer_system_russianRoulette_startGame; + }; + call ExileServer_system_russianRoulette_broadcastGameStatus; + }; + case 6: + { + if !(isNil "ExileServerRussianRouletteStartGameCountDownThread") then + { + terminate ExileServerRussianRouletteStartGameCountDownThread; + ExileServerRussianRouletteStartGameCountDownThread = nil; + }; + call ExileServer_system_russianRoulette_startGame; + }; + default + { + call ExileServer_system_russianRoulette_broadcastGameStatus; + }; +}; diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_russianRoulette_event_onPlayerLeft.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_russianRoulette_event_onPlayerLeft.sqf new file mode 100644 index 0000000..bfeb9c3 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_russianRoulette_event_onPlayerLeft.sqf @@ -0,0 +1,30 @@ +/** + * ExileServer_system_russianRoulette_event_onPlayerLeft + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_playerObject","_buyInAmount","_playerMoney","_positionBefore","_directionBefore"]; +_playerObject = _this; +_buyInAmount = getNumber (missionConfigFile >> "CfgExileRussianRoulette" >> "buyInAmount"); +_playerMoney = _playerObject getVariable ["ExileMoney", 0]; +_playerMoney = _playerMoney + _buyInAmount; +_playerObject setVariable ["ExileMoney", _playerMoney, true]; +format["setPlayerMoney:%1:%2", _playerMoney, _playerObject getVariable ["ExileDatabaseID", 0]] call ExileServer_system_database_query_fireAndForget; +_positionBefore = _playerObject getVariable ["SavedRussianRoulettePosition", [0, 0, 0]]; +_directionBefore = _playerObject getVariable ["SavedRussianRouletteDirection", 0]; +_playerObject setVariable ["IsPlayingRussianRoulette", nil]; +_playerObject setVariable ["SavedRussianRoulettePosition", nil]; +_playerObject setVariable ["SavedRussianRouletteDirection", nil]; +_playerObject setVariable ["RussianRouletteProbabilities", nil]; +_playerObject setVariable ["RussianRouletteCurrentShot", nil]; +format ["Russian Roulette: %1 has left the game.", name _playerObject] call ExileServer_util_log; +if (alive _playerObject) then +{ + [_playerObject, "leaveRussianRouletteResponse", [_positionBefore, _directionBefore]] call ExileServer_system_network_send_to; +}; diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_russianRoulette_event_onPlayerWin.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_russianRoulette_event_onPlayerWin.sqf new file mode 100644 index 0000000..f5d5824 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_russianRoulette_event_onPlayerWin.sqf @@ -0,0 +1,28 @@ +/** + * ExileServer_system_russianRoulette_event_onPlayerWin + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_playerObject","_playerMoney","_positionBefore","_directionBefore"]; +_playerObject = _this; +["Russian Roulette: %1 has won the game and %2 pop tabs!", name _playerObject, ExileServerRussianRoulettePotValue] call ExileServer_util_log; +["systemChatRequest", [format ["%1 has won a round of Russian Roulette!", name _playerObject]]] call ExileServer_system_network_send_broadcast; +_playerMoney = _playerObject getVariable ["ExileMoney", 0]; +_playerMoney = _playerMoney + ExileServerRussianRoulettePotValue; +_playerObject setVariable ["ExileMoney", _playerMoney, true]; +format["setPlayerMoney:%1:%2", _playerMoney, _playerObject getVariable ["ExileDatabaseID", 0]] call ExileServer_system_database_query_fireAndForget; +_positionBefore = _playerObject getVariable ["SavedRussianRoulettePosition", [0, 0, 0]]; +_directionBefore = _playerObject getVariable ["SavedRussianRouletteDirection", 0]; +_playerObject setVariable ["IsPlayingRussianRoulette", nil]; +_playerObject setVariable ["SavedRussianRoulettePosition", nil]; +_playerObject setVariable ["SavedRussianRouletteDirection", nil]; +_playerObject setVariable ["RussianRouletteProbabilities", nil]; +_playerObject setVariable ["RussianRouletteCurrentShot", nil]; +[_playerObject, "winRussianRouletteRequest", [_positionBefore, _directionBefore, ExileServerRussianRoulettePotValue]] call ExileServer_system_network_send_to; +call ExileServer_system_russianRoulette_initialize; \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_russianRoulette_initialize.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_russianRoulette_initialize.sqf new file mode 100644 index 0000000..e3434f1 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_russianRoulette_initialize.sqf @@ -0,0 +1,38 @@ +/** + * ExileServer_system_russianRoulette_initialize + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_chair"]; +if !(isNil "ExileServerRussianRouletteStartGameCountDownThread") then +{ + terminate ExileServerRussianRouletteStartGameCountDownThread; + ExileServerRussianRouletteStartGameCountDownThread = nil; +}; +ExileServerRussianRouletteStatus = 0; +ExileServerRussianRoulettePlayers = []; +ExileServerRussianRouletteAlivePlayers = []; +ExileServerRussianRouletteCurrentShot = -1; +ExileServerRussianRoulettePotValue = 0; +ExileServerRussianRouletteCountDownEndTime = -1; +ExileServerRussianRouletteCurrentPlayerNetId = ""; +if (isNil "ExileRouletteChairPositions") exitWith +{ + "There are no Russian Roulette chairs defined. Russian Roulette will not work!" call ExileServer_util_log; + ExileServerRussianRouletteStatus = 1; + ExileRouletteChairs = []; + ExileRouletteChairPositions = []; +}; +{ + _chair = ExileRouletteChairs select _forEachIndex; + _chair setDir (deg (_x select 1)); + _chair setPosWorld (_x select 0); +} +forEach ExileRouletteChairPositions; +"Russian Roulette: Game initialized." call ExileServer_util_log; diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_russianRoulette_letNextPlayerFire.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_russianRoulette_letNextPlayerFire.sqf new file mode 100644 index 0000000..497463e --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_russianRoulette_letNextPlayerFire.sqf @@ -0,0 +1,26 @@ +/** + * ExileServer_system_russianRoulette_letNextPlayerFire + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_playerObject","_currentShot","_probabilities","_nextShotIsFatal"]; +_playerObject = ExileServerRussianRouletteAlivePlayers select 0; +ExileServerRussianRouletteAlivePlayers deleteAt 0; +ExileServerRussianRouletteAlivePlayers pushBack _playerObject; +format ["Russian Roulette: %1 is asked to fire next.", name _playerObject] call ExileServer_util_log; +ExileServerRussianRouletteCountDownEndTime = serverTime + 30; +ExileServerRussianRouletteCurrentPlayerNetId = netId _playerObject; +ExileServerRussianRouletteCurrentShot = ExileServerRussianRouletteCurrentShot + 1; +_currentShot = _playerObject getVariable ["RussianRouletteCurrentShot", -1]; +_currentShot = _currentShot + 1; +_playerObject setVariable ["RussianRouletteCurrentShot", _currentShot]; +_probabilities = _playerObject getVariable ["RussianRouletteProbabilities", [true, true, true, true, true, true]]; +_nextShotIsFatal = _probabilities select _currentShot; +call ExileServer_system_russianRoulette_broadcastGameStatus; +[_playerObject, "fireRussianRouletteRevolverRequest", [_nextShotIsFatal]] call ExileServer_system_network_send_to; \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_russianRoulette_network_fireRussianRouletteRevolverResponse.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_russianRoulette_network_fireRussianRouletteRevolverResponse.sqf new file mode 100644 index 0000000..d9a55b3 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_russianRoulette_network_fireRussianRouletteRevolverResponse.sqf @@ -0,0 +1,16 @@ +/** + * ExileServer_system_russianRoulette_network_fireRussianRouletteRevolverResponse + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_sessionID","_playerObject"]; +_sessionID = _this select 0; +_playerObject = _sessionID call ExileServer_system_session_getPlayerObject; +format ["Russian Roulette: %1 has fired a dry shot.", name _playerObject] call ExileServer_util_log; +call ExileServer_system_russianRoulette_letNextPlayerFire; \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_russianRoulette_network_joinRussianRouletteRequest.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_russianRoulette_network_joinRussianRouletteRequest.sqf new file mode 100644 index 0000000..f6bdd13 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_russianRoulette_network_joinRussianRouletteRequest.sqf @@ -0,0 +1,46 @@ +/** + * ExileServer_system_russianRoulette_network_joinRussianRouletteRequest + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_sessionID","_parameters","_playerObject","_buyInAmount","_playerMoney"]; +_sessionID = _this select 0; +_parameters = _this select 1; +try +{ + _playerObject = _sessionID call ExileServer_system_session_getPlayerObject; + if (isNull _playerObject) then + { + throw "Unknown player!"; + }; + if !(alive _playerObject) then + { + throw "The dead cannot play Russian Roulette!"; + }; + _buyInAmount = getNumber (missionConfigFile >> "CfgExileRussianRoulette" >> "buyInAmount"); + if (_buyInAmount < 1) then + { + throw "Invalid Buy-In amount in config!"; + }; + _playerMoney = _playerObject getVariable ["ExileMoney", 0]; + if (_playerMoney < _buyInAmount) then + { + throw "You are too poor!"; + }; + if !(ExileServerRussianRouletteStatus isEqualTo 0) then + { + throw "Game is already running!"; + }; + _playerObject call ExileServer_system_russianRoulette_event_onPlayerJoined; +} +catch +{ + [_sessionID, "toastRequest", ["ErrorTitleAndText", ["Failed to join!", _exception]]] call ExileServer_system_network_send_to; + _exception call ExileServer_util_log; +}; \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_russianRoulette_network_leaveRussianRouletteRequest.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_russianRoulette_network_leaveRussianRouletteRequest.sqf new file mode 100644 index 0000000..64ca67f --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_russianRoulette_network_leaveRussianRouletteRequest.sqf @@ -0,0 +1,37 @@ +/** + * ExileServer_system_russianRoulette_network_leaveRussianRouletteRequest + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_sessionID","_parameters","_playerObject"]; +_sessionID = _this select 0; +_parameters = _this select 1; +try +{ + _playerObject = _sessionID call ExileServer_system_session_getPlayerObject; + if (isNull _playerObject) then + { + throw "Unknown player!"; + }; + if !(_playerObject getVariable ["IsPlayingRussianRoulette", false]) then + { + throw "You are not playing!"; + }; + if ((count ExileServerRussianRoulettePlayers) > 1) then + { + throw "You cannot leave!"; + }; + _playerObject call ExileServer_system_russianRoulette_event_onPlayerLeft; + call ExileServer_system_russianRoulette_initialize; +} +catch +{ + [_sessionID, "toastRequest", ["ErrorTitleAndText", ["Failed to leave!", _exception]]] call ExileServer_system_network_send_to; + _exception call ExileServer_util_log; +}; \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_russianRoulette_network_requestJoinRussianRouletteDialogRequest.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_russianRoulette_network_requestJoinRussianRouletteDialogRequest.sqf new file mode 100644 index 0000000..55371ee --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_russianRoulette_network_requestJoinRussianRouletteDialogRequest.sqf @@ -0,0 +1,22 @@ +/** + * ExileServer_system_russianRoulette_network_requestJoinRussianRouletteDialogRequest + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_sessionID","_buyInAmount"]; +_sessionID = _this select 0; +_buyInAmount = getNumber (missionConfigFile >> "CfgExileRussianRoulette" >> "buyInAmount"); +if (serverTime > 1000000) then +{ + [_sessionID, "requestJoinRussianRouletteDialogResponse", [2, _buyInAmount]] call ExileServer_system_network_send_to; +} +else +{ + [_sessionID, "requestJoinRussianRouletteDialogResponse", [ExileServerRussianRouletteStatus, _buyInAmount]] call ExileServer_system_network_send_to; +}; \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_russianRoulette_startGame.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_russianRoulette_startGame.sqf new file mode 100644 index 0000000..847e823 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_russianRoulette_startGame.sqf @@ -0,0 +1,28 @@ +/** + * ExileServer_system_russianRoulette_startGame + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_chair","_deadBodies"]; +ExileServerRussianRouletteStatus = 1; +_chair = ExileRouletteChairs select 0; +_deadBodies = _chair nearObjects ["Exile_Unit_Player", 20]; +{ + if !(alive _x) then + { + deleteVehicle _x; + }; +} +forEach _deadBodies; +"Russian Roulette: Game starts!" call ExileServer_util_log; +["systemChatRequest", ["Russian Roulette starts!"]] call ExileServer_system_network_send_broadcast; +ExileServerRussianRouletteCurrentShot = 0; +ExileServerRussianRouletteAlivePlayers = ExileServerRussianRouletteAlivePlayers call ExileClient_util_array_shuffle; +call ExileServer_system_russianRoulette_letNextPlayerFire; +ExileServerRussianRouletteStartGameCountDownThread = nil; diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_session_begin.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_session_begin.sqf new file mode 100644 index 0000000..1a4d3f8 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_session_begin.sqf @@ -0,0 +1,17 @@ +/** + * ExileServer_system_session_begin + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_sessionId"]; +_sessionId = call ExileServer_system_session_createId; +ExileSessionIDs pushBack _sessionId; +[_sessionId, _this] call ExileServer_system_session_update; +format ["Starting session for '%1' with ID '%2'...", name _this, _sessionId] call ExileServer_util_log; +_sessionId \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_session_createId.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_session_createId.sqf new file mode 100644 index 0000000..6a3122e --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_session_createId.sqf @@ -0,0 +1,28 @@ +/** + * ExileServer_system_session_createId + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_alphabet","_generateNewSessionId","_sessionId","_i"]; +_alphabet = "zyxwvutsrqponmlkjihgfedcbaABCDEFGHIJKLMNOPQRSTUVWXYZ"; +_generateNewSessionId = true; +_sessionId = ""; +while {_generateNewSessionId} do +{ + _sessionId = ""; + for "_i" from 1 to 8 do + { + _sessionId = _sessionId + (_alphabet select [floor (random 51), 1]); + }; + if !(_sessionId call ExileServer_system_session_isRegisteredId) then + { + _generateNewSessionId = false; + }; +}; +_sessionId \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_session_end.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_session_end.sqf new file mode 100644 index 0000000..4fe37b9 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_session_end.sqf @@ -0,0 +1,18 @@ +/** + * ExileServer_system_session_end + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_index"]; +_index = ExileSessionIDs find _this; +if !(_index isEqualTo -1) then +{ + ExileSessionIDs deleteAt _index; + missionNamespace setVariable [format["ExileSessionPlayerObject%1", _this], nil]; +}; \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_session_getPlayerObject.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_session_getPlayerObject.sqf new file mode 100644 index 0000000..e3d23a3 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_session_getPlayerObject.sqf @@ -0,0 +1,12 @@ +/** + * ExileServer_system_session_getPlayerObject + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +missionNamespace getVariable [format["ExileSessionPlayerObject%1", _this], objNull] \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_session_isRegisteredId.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_session_isRegisteredId.sqf new file mode 100644 index 0000000..1fb4664 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_session_isRegisteredId.sqf @@ -0,0 +1,12 @@ +/** + * ExileServer_system_session_isRegisteredId + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +!((ExileSessionIDs find _this) isEqualTo -1) \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_session_network_startSessionRequest.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_session_network_startSessionRequest.sqf new file mode 100644 index 0000000..290ced6 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_session_network_startSessionRequest.sqf @@ -0,0 +1,34 @@ +/** + * ExileServer_system_session_network_startSessionRequest + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_parameters","_netId","_player","_existingSessionID","_sessionId"]; +_parameters = _this select 1; +_netId = _parameters select 0; +try +{ + _player = objectFromNetId _netId; + if (isNull _player) then + { + throw "Cannot start session for unknown network ID!"; + }; + _existingSessionID = _player getVariable ["ExileSessionID",-1]; + if !(_existingSessionID isEqualTo -1) then + { + throw "Trying to get a second session ID!"; + }; + _sessionId = _player call ExileServer_system_session_begin; + [_sessionId, "startSessionResponse", [_sessionId]] call ExileServer_system_network_send_to; +} +catch +{ + _exception call ExileServer_util_log; +}; +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_session_network_updateSessionRequest.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_session_network_updateSessionRequest.sqf new file mode 100644 index 0000000..2b6cd31 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_session_network_updateSessionRequest.sqf @@ -0,0 +1,25 @@ +/** + * ExileServer_system_session_network_updateSessionRequest + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_sessionID","_parameters","_netID","_player"]; +_sessionID = _this select 0; +_parameters = _this select 1; +_netID = _parameters select 0; +_player = objectFromNetId _netID; +if (isNull _player) then +{ + "Cannot update session for unknown network ID!" call ExileServer_util_log; +} +else +{ + [_sessionID, _player] call ExileServer_system_session_update; +}; +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_session_update.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_session_update.sqf new file mode 100644 index 0000000..f51745b --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_session_update.sqf @@ -0,0 +1,16 @@ +/** + * ExileServer_system_session_update + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_sessionId","_player"]; +_sessionId = _this select 0; +_player = _this select 1; +_player setVariable ["ExileSessionID", _sessionId]; +missionNamespace setVariable [format["ExileSessionPlayerObject%1", _sessionId], _player]; \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_simulationMonitor_addVehicle.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_simulationMonitor_addVehicle.sqf new file mode 100644 index 0000000..84316ce --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_simulationMonitor_addVehicle.sqf @@ -0,0 +1,22 @@ +/** + * ExileServer_system_simulationMonitor_addVehicle + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_vehicle"]; +_vehicle = _this; +if !(isNull _vehicle) then +{ + if !(_vehicle getVariable["ExileIsSimulationMonitored", false]) then + { + _vehicle setVariable ["ExileIsSimulationMonitored", true]; + ExileSimulationMonitoredVehicles pushBack _vehicle; + }; +}; +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_simulationMonitor_initialize.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_simulationMonitor_initialize.sqf new file mode 100644 index 0000000..c6957e2 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_simulationMonitor_initialize.sqf @@ -0,0 +1,14 @@ +/** + * ExileServer_system_simulationMonitor_initialize + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +ExileSimulationMonitoredVehicles = []; +[20, ExileServer_system_simulationMonitor_thread_toggleSimulation, [], true] call ExileServer_system_thread_addTask; +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_simulationMonitor_network_enableSimulationRequest.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_simulationMonitor_network_enableSimulationRequest.sqf new file mode 100644 index 0000000..8e2a43b --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_simulationMonitor_network_enableSimulationRequest.sqf @@ -0,0 +1,27 @@ +/** + * ExileServer_system_simulationMonitor_network_enableSimulationRequest + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_parameters","_netId","_object"]; +_parameters = _this select 1; +_netId = _parameters select 0; +_object = objectFromNetId _netId; +if (isNull _object) then +{ + "Cannot enable simulation for unknown network ID!" call ExileServer_util_log; +} +else +{ + if !(simulationEnabled _object) then + { + _object enableSimulationGlobal true; + }; +}; +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_simulationMonitor_removeVehicle.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_simulationMonitor_removeVehicle.sqf new file mode 100644 index 0000000..cdd0b46 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_simulationMonitor_removeVehicle.sqf @@ -0,0 +1,22 @@ +/** + * ExileServer_system_simulationMonitor_removeVehicle + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_vehicle"]; +_vehicle = _this; +if !(isNull _vehicle) then +{ + if (_vehicle getVariable["ExileIsSimulationMonitored", false]) then + { + _vehicle setVariable ["ExileIsSimulationMonitored", nil]; + ExileSimulationMonitoredVehicles deleteAt (ExileSimulationMonitoredVehicles find _vehicle); + }; +}; +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_simulationMonitor_thread_toggleSimulation.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_simulationMonitor_thread_toggleSimulation.sqf new file mode 100644 index 0000000..3b35596 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_simulationMonitor_thread_toggleSimulation.sqf @@ -0,0 +1,51 @@ +/** + * ExileServer_system_simulationMonitor_thread_toggleSimulation + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_vehicle","_simulationShouldBeEnabled","_position"]; +{ + _vehicle = _x; + _simulationShouldBeEnabled = false; + if !(crew _vehicle isEqualTo []) then + { + _simulationShouldBeEnabled = true; + } + else + { + _position = getPos _vehicle; + if (_position select 2 > 20) then + { + _simulationShouldBeEnabled = true; + } + else + { + if ([_position, 250] call ExileClient_util_world_isAlivePlayerInRange) then + { + _simulationShouldBeEnabled = true; + }; + }; + }; + if (_simulationShouldBeEnabled) then + { + if !(simulationEnabled _vehicle) then + { + _vehicle enableSimulationGlobal true; + }; + } + else + { + if (simulationEnabled _vehicle) then + { + _vehicle enableSimulationGlobal false; + }; + }; +} +forEach ExileSimulationMonitoredVehicles; +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_slothMachine_network_slothMachineRequest.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_slothMachine_network_slothMachineRequest.sqf new file mode 100644 index 0000000..4185cb6 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_slothMachine_network_slothMachineRequest.sqf @@ -0,0 +1,92 @@ +/** + * ExileServer_system_slothMachine_network_slothMachineRequest + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_sessionID","_player","_playerMoney","_spinCost","_dice","_prizeConfig","_chances","_prizeName","_gameTextOutput","_symbols","_allPrizes","_i","_randomPrizeConfig","_newSymbol","_prizeSymbol","_totalWinnings","_jackpotAmount","_playerMoneyAdjustment"]; +_sessionID = _this select 0; +try +{ + _player = _sessionID call ExileServer_system_session_getPlayerObject; + if (isNull _player) then + { + throw "Null player!"; + }; + if !(alive _player) then + { + throw "Dead player!"; + }; + _playerMoney = _player getVariable ["ExileMoney", 0]; + _spinCost = getNumber (missionConfigFile >> "CfgSlothMachine" >> "spinCost"); + if (_playerMoney < _spinCost) then + { + throw "Not enough pop tabs"; + }; + _dice = floor (random 100); + _prizeConfig = objNull; + _chances = getArray (missionConfigFile >> "CfgSlothMachine" >> "chances"); + _prizeName = ""; + _gameTextOutput = ""; + _symbols = []; + { + if (_dice <= (_x select 0)) exitWith + { + _prizeName = _x select 1; + }; + } + forEach _chances; + if (_prizeName isEqualTo "") then + { + _allPrizes = "true" configClasses (missionConfigFile >> "CfgSlothMachine" >> "Prizes"); + for "_i" from 0 to 2 do + { + _randomPrizeConfig = selectRandom _allPrizes; + _newSymbol = getText (_randomPrizeConfig >> "symbol"); + while {_newSymbol in _symbols} do + { + _randomPrizeConfig = selectRandom _allPrizes; + _newSymbol = getText (_randomPrizeConfig >> "symbol"); + }; + _symbols pushBack _newSymbol; + }; + } + else + { + _prizeConfig = missionConfigFile >> "CfgSlothMachine" >> "Prizes" >> _prizeName; + _prizeSymbol = getText (_prizeConfig >> "symbol"); + _symbols pushBack _prizeSymbol; + _symbols pushBack _prizeSymbol; + _symbols pushBack _prizeSymbol; + }; + if (_prizeName isEqualTo "") then + { + _totalWinnings = 0; + } + else + { + if (_prizeName isEqualTo "Jackpot") then + { + _jackpotAmount = getNumber (missionConfigFile >> "CfgSlothMachine" >> "Jackpot"); + _totalWinnings = _jackpotAmount; + } + else + { + _totalWinnings = getNumber (_prizeConfig >> "prize"); + }; + }; + _playerMoneyAdjustment = _totalWinnings - _spinCost; + _playerMoney = _playerMoney + _playerMoneyAdjustment; + _player setVariable ["ExileMoney", _playerMoney, true]; + format["setPlayerMoney:%1:%2", _playerMoney, _player getVariable ["ExileDatabaseID", 0]] call ExileServer_system_database_query_fireAndForget; + [_sessionID, "slothMachineResponse", [_prizeName,_totalWinnings,_playerMoneyAdjustment,_symbols]] call ExileServer_system_network_send_to; +} +catch +{ + _exception call ExileServer_util_log; +}; \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_swapOwnershipQueue_add.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_swapOwnershipQueue_add.sqf new file mode 100644 index 0000000..1cee38b --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_swapOwnershipQueue_add.sqf @@ -0,0 +1,27 @@ +/** + * ExileServer_system_swapOwnershipQueue_add + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_object","_entity","_localityChanged"]; +_object = _this select 0; +_entity = _this select 1; +_localityChanged = false; +if ((typeName _object) isEqualTo "GROUP") then +{ + _localityChanged = _object setGroupOwner (groupOwner _entity); +} +else +{ + _localityChanged = _object setOwner (owner _entity); +}; +if !(_localityChanged) then +{ + ExileServerOwnershipSwapQueue pushBack _this; +}; \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_swapOwnershipQueue_initialize.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_swapOwnershipQueue_initialize.sqf new file mode 100644 index 0000000..c879253 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_swapOwnershipQueue_initialize.sqf @@ -0,0 +1,14 @@ +/** + * ExileServer_system_swapOwnershipQueue_initialize + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +ExileServerOwnershipSwapQueue = []; +[5, ExileServer_system_swapOwnershipQueue_thread_dispatchQueue, [], true] call ExileServer_system_thread_addTask; +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_swapOwnershipQueue_thread_dispatchQueue.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_swapOwnershipQueue_thread_dispatchQueue.sqf new file mode 100644 index 0000000..9f9013e --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_swapOwnershipQueue_thread_dispatchQueue.sqf @@ -0,0 +1,69 @@ +/** + * ExileServer_system_swapOwnershipQueue_thread_dispatchQueue + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_removeEntryFromQueue","_entity","_player","_newOwner","_currentOwner","_localityChanged"]; +if !(ExileServerOwnershipSwapQueue isEqualTo []) then +{ + { + _removeEntryFromQueue = false; + _entity = _x select 0; + _player = _x select 1; + if (isNil "_player" || isNil "_entity" ) then + { + _removeEntryFromQueue = true; + } + else + { + _newOwner = owner _player; + if (typeName _entity == "GROUP") then + { + _currentOwner = objNull; + } + else + { + _currentOwner = owner _entity; + }; + if (isNull _entity || isNull _player) then + { + _removeEntryFromQueue = true; + } + else + { + if (_newOwner isEqualTo _currentOwner) then + { + _removeEntryFromQueue = true; + } + else + { + _localityChanged = false; + if (typeName _entity == "GROUP") then + { + _localityChanged = _entity setGroupOwner _newOwner; + } + else + { + _localityChanged = _entity setOwner _newOwner; + }; + if (_localityChanged) then + { + _removeEntryFromQueue = true; + }; + }; + }; + }; + if (_removeEntryFromQueue) then + { + ExileServerOwnershipSwapQueue deleteAt _forEachIndex; + }; + } + forEach ExileServerOwnershipSwapQueue; +}; +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_territory_create.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_territory_create.sqf new file mode 100644 index 0000000..ba9eefb --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_territory_create.sqf @@ -0,0 +1,31 @@ +/** + * ExileServer_system_territory_create + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_flagObject","_territoryName","_flagTexture","_territorySize","_owner","_currentTimestamp"]; +_flagObject = _this select 0; +_territoryName = _this select 1; +_flagTexture = _this select 2; +_territorySize = ((getArray(missionConfigFile >> "CfgTerritories" >> "prices")) select 0) select 1; +_flagObject setFlagTexture _flagTexture; +ExileLocations pushBack _flagObject; +_owner = _flagObject getVariable ["ExileOwnerUID", ""]; +_flagObject setVariable ["ExileOwnerUID",_owner,true]; +_flagObject setVariable ["ExileTerritorySize", _territorySize, true]; +_flagObject setVariable ["ExileTerritoryBuildRights", [_owner], true]; +_flagObject setVariable ["ExileTerritoryModerators", [_owner], true]; +_flagObject setVariable ["ExileTerritoryLevel", 1, true]; +_flagObject setVariable ["ExileTerritoryName", _territoryName, true]; +_flagObject setVariable ["ExileRadiusShown", false, true]; +_flagObject setVariable ["ExileFlagStolen", 0, true]; +_currentTimestamp = call ExileServer_util_time_currentTime; +_flagObject setVariable ["ExileTerritoryLastPayed", _currentTimestamp]; +_flagObject call ExileServer_system_territory_maintenance_recalculateDueDate; +["announceTerritoryRequest", [netId _flagObject]] call ExileServer_system_network_send_broadcast; diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_territory_database_insert.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_territory_database_insert.sqf new file mode 100644 index 0000000..b97dc93 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_territory_database_insert.sqf @@ -0,0 +1,39 @@ +/** + * ExileServer_system_territory_database_insert + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_flagObject","_territoryName","_flagTexture","_territorySize","_owner","_position","_build","_moderators","_data","_extDB2Message","_territoryID"]; +_flagObject = _this select 0; +_territoryName = _this select 1; +_flagTexture = _this select 2; +_territorySize = ((getArray(missionConfigFile >> "CfgTerritories" >> "prices")) select 0)select 1; +_owner = _flagObject getVariable ["ExileOwnerUID",""]; +_position = getPosATL _flagObject; +_build_rights = _flagObject getVariable ["ExileTerritoryBuildRights",[]]; +_moderators = _flagObject getVariable ["ExileTerritoryModerators",[]]; +_data = +[ + _owner, + _territoryName, + _position select 0, + _position select 1, + _position select 2, + _territorySize, + 1, + _flagTexture, + 0, + _build_rights, + _moderators +]; +_extDB2Message = ["createTerritory", _data] call ExileServer_util_extDB2_createMessage; +_territoryID = _extDB2Message call ExileServer_system_database_query_insertSingle; +_flagObject setVariable ["ExileDatabaseID",_territoryID]; +_flagObject setVariable ["ExileFlagTexture",_flagTexture]; +true diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_territory_database_load.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_territory_database_load.sqf new file mode 100644 index 0000000..4670473 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_territory_database_load.sqf @@ -0,0 +1,51 @@ +/** + * ExileServer_system_territory_database_load + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_territoryID","_data","_id","_owner","_position","_radius","_level","_flagTexture","_flagStolen","_flagStolenBy","_lastPayed","_buildRights","_moderators","_flagObject"]; +_territoryID = _this; +_data = format ["loadTerritory:%1", _territoryID] call ExileServer_system_database_query_selectSingle; +_id = _data select 0; +_owner = _data select 1; +_name = _data select 2; +_position = +[ + _data select 3, + _data select 4, + _data select 5 +]; +_radius = _data select 6; +_level = _data select 7; +_flagTexture = _data select 8; +_flagStolen = _data select 9; +_flagStolenBy = _data select 10; +_lastPayed = _data select 11; +_buildRights = _data select 12; +_moderators = _data select 13; +_flagObject = createVehicle ["Exile_Construction_Flag_Static",_position, [], 0, "CAN_COLLIDE"]; +if (_flagStolen isEqualTo 0) then +{ + _flagObject setFlagTexture _flagTexture; +}; +ExileLocations pushBack _flagObject; +_flagObject setVariable ["ExileTerritoryName", _name, true]; +_flagObject setVariable ["ExileDatabaseID", _id]; +_flagObject setVariable ["ExileOwnerUID", _owner, true]; +_flagObject setVariable ["ExileTerritorySize", _radius, true]; +_flagObject setVariable ["ExileTerritoryBuildRights", _buildRights, true]; +_flagObject setVariable ["ExileTerritoryModerators", _moderators, true]; +_flagObject setVariable ["ExileTerritoryLevel", _level, true]; +_flagObject setVariable ["ExileTerritoryLastPayed", _lastPayed]; +_flagObject call ExileServer_system_territory_maintenance_recalculateDueDate; +_flagObject setVariable ["ExileTerritoryNumberOfConstructions", _data select 15, true]; +_flagObject setVariable ["ExileRadiusShown", false, true]; +_flagObject setVariable ["ExileFlagStolen",_flagStolen,true]; +_flagObject setVariable ["ExileFlagTexture",_flagTexture]; +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_territory_maintenance_recalculateDueDate.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_territory_maintenance_recalculateDueDate.sqf new file mode 100644 index 0000000..69de2bc --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_territory_maintenance_recalculateDueDate.sqf @@ -0,0 +1,19 @@ +/** + * ExileServer_system_territory_maintenance_recalculateDueDate + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_flag","_currentTimestamp","_flagBuild","_maintenancePeriod","_maintenancePeriodDueDate"]; +_flag = _this; +_currentTimestamp = call ExileServer_util_time_currentTime; +_flagBuild = _flag getVariable ["ExileTerritoryLastPayed", _currentTimestamp]; +_maintenancePeriod = getNumber(configFile >> "CfgSettings" >> "GarbageCollector" >> "Database" >> "territoryLifeTime"); +_maintenancePeriodDueDate = call compile ("extDB3" callExtension format["9:DATEADD:%1:[%2,0,0,0]",_flagBuild,_maintenancePeriod]); +_flag setVariable ["ExileTerritoryMaintenanceDue", _maintenancePeriodDueDate select 1, true]; +true diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_territory_network_addToTerritoryRequest.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_territory_network_addToTerritoryRequest.sqf new file mode 100644 index 0000000..6da432e --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_territory_network_addToTerritoryRequest.sqf @@ -0,0 +1,65 @@ +/** + * ExileServer_system_territory_network_addToTerritoryRequest + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_sessionID","_parameters","_flagNetID","_playerToBeAddedNetID","_playerOwnerObject","_flagObject","_playerToBeAddedObject","_territoryOwnerUID","_currentBuildRights","_playerToBeAddedUID","_territoryID","_territoryName"]; +_sessionID = _this select 0; +_parameters = _this select 1; +_flagNetID = _parameters select 0; +_playerToBeAddedNetID = _parameters select 1; +try +{ + _playerOwnerObject = _sessionID call ExileServer_system_session_getPlayerObject; + if (isNull _playerOwnerObject) then + { + throw "Player (owner or moderator) object not found."; + }; + _flagObject = objectFromNetId _flagNetID; + if (isNull _flagObject) then + { + throw "Flag object not found."; + }; + _playerToBeAddedObject = objectFromNetId _playerToBeAddedNetID; + if (isNull _playerToBeAddedObject) then + { + throw "Player (to be added) object not found."; + }; + if (_playerOwnerObject isEqualTo _playerToBeAddedObject) then + { + throw "Trying to add yourself, huh?"; + }; + _territoryOwnerUID = _flagObject getVariable ["ExileOwnerUID", ""]; + if (_territoryOwnerUID isEqualTo (getPlayerUID _playerToBeAddedObject)) then + { + throw "The owner of this territory, you dont need build rights."; + }; + _currentBuildRights = _flagObject getVariable ["ExileTerritoryBuildRights", []]; + _playerToBeAddedUID = getPlayerUID _playerToBeAddedObject; + if (_playerToBeAddedUID in _currentBuildRights) then + { + throw "This player already has build rights."; + }; + _territoryID = _flagObject getVariable ["ExileDatabaseID", -1]; + _territoryName = _flagObject getVariable ["ExileTerritoryName", ""]; + if (_territoryID isEqualTo -1) then + { + throw "Territory has no database ID."; + }; + _currentBuildRights pushBack _playerToBeAddedUID; + _flagObject setVariable ["ExileTerritoryBuildRights", _currentBuildRights, true]; + format["updateTerritoryBuildRights:%1:%2", _currentBuildRights, _territoryID] call ExileServer_system_database_query_fireAndForget; + [_playerToBeAddedObject, "toastRequest", ["InfoTitleOnly", [ format ["You have been added to territory '%1'!", _territoryName] ]]] call ExileServer_system_network_send_to; +} +catch +{ + [_sessionID, "toastRequest", ["ErrorTitleAndText", ["Failed to add!", _exception]]] call ExileServer_system_network_send_to; + _exception call ExileServer_util_log; +}; +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_territory_network_flagStolenRequest.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_territory_network_flagStolenRequest.sqf new file mode 100644 index 0000000..f452aed --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_territory_network_flagStolenRequest.sqf @@ -0,0 +1,54 @@ +/** + * ExileServer_system_territory_network_flagStolenRequest + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_sessionID","_parameters","_flag","_playerObject","_databaseID","_level","_flagPosition","_spawnRadius","_weaponHolderPosition","_weaponHolder","_logging","_territoryLog"]; +_sessionID = _this select 0; +_parameters = _this select 1; +_flag = _parameters select 0; +try +{ + _playerObject = _sessionID call ExileServer_system_session_getPlayerObject; + if (isNull _playerObject) then + { + throw "Player Object NULL"; + }; + if ((_flag getVariable ["ExileFlagStolen", 0]) isEqualTo 1) then + { + throw "Flag already stolen!"; + }; + if ((_playerObject distance2D _flag) > 5) then + { + throw "You are too far away!"; + }; + _databaseID = _flag getVariable ["ExileDatabaseID",0]; + _level = _flag getVariable ["ExileTerritoryLevel",_level]; + _flagPosition = getPosATL _flag; + _flagPosition set[2, 0]; + _spawnRadius = 3; + _weaponHolderPosition = getPosATL _playerObject; + _weaponHolder = createVehicle ["GroundWeaponHolder", _weaponHolderPosition, [], 0, "CAN_COLLIDE"]; + _weaponHolder setPosATL _weaponHolderPosition; + _weaponHolder addMagazineCargoGlobal [format["Exile_Item_FlagStolen%1", _level], 1]; + _flag setVariable ["ExileFlagStolen", 1, true]; + format["flagStolen:%1:%2",getPlayerUID _playerObject,_databaseID] call ExileServer_system_database_query_fireAndForget; + _logging = getNumber(configFile >> "CfgSettings" >> "Logging" >> "territoryLogging"); + if (_logging isEqualTo 1) then + { + _territoryLog = format ["PLAYER ( %1 ) %2 STOLE A LEVEL %3 FLAG FROM TERRITORY #%4",getPlayerUID _playerObject,_playerObject,_level,_databaseID]; + "extDB3" callExtension format["1:TERRITORY:%1",_territoryLog]; + }; + _flag call ExileServer_system_xm8_sendFlagStolen; +} +catch +{ + [_sessionID, "toastRequest", ["ErrorTitleAndText", ["Failed to steal!", _exception]]] call ExileServer_system_network_send_to; +}; +true diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_territory_network_moderationTerritoryRequest.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_territory_network_moderationTerritoryRequest.sqf new file mode 100644 index 0000000..1b9adbd --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_territory_network_moderationTerritoryRequest.sqf @@ -0,0 +1,72 @@ +/** + * ExileServer_system_territory_network_moderationTerritoryRequest + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_sessionID","_paramaters","_flagNetID","_moderatedPlayerUID","_mode","_flag","_territoryName","_requestingPlayer","_moderatedPlayer","_moderatedPlayerAccess","_requestingPlayerAccess","_newUserLevel"]; +_sessionID = _this select 0; +_paramaters = _this select 1; +_flagNetID = _paramaters select 0; +_moderatedPlayerUID = _paramaters select 1; +_mode = _paramaters select 2; +try +{ + _flag = objectFromNetId _flagNetID; + _territoryName = _flag getVariable ["ExileTerritoryName",""]; + _requestingPlayer = _sessionID call ExileServer_system_session_getPlayerObject; + _moderatedPlayer = _moderatedPlayerUID call ExileClient_util_player_objectFromPlayerUid; + _moderatedPlayerAccess = [_flag,_moderatedPlayerUID] call ExileClient_util_territory_getAccessLevel; + _requestingPlayerAccess = [_flag,(getPlayerUID _requestingPlayer)] call ExileClient_util_territory_getAccessLevel; + if ((_moderatedPlayerAccess select 0) >= (_requestingPlayerAccess select 0))then + { + if (isNull _moderatedPlayer) then + { + throw format ["You do not have the required rights to moderate a %1.",_moderatedPlayerAccess select 1]; + } + else + { + throw format ["You do not have the required rights to moderate %1(%2).",name _moderatedPlayer,_moderatedPlayerAccess select 1]; + }; + }; + if (_mode) then + { + if !((_requestingPlayerAccess select 0) isEqualTo 3) then + { + throw "Only owners can promote to moderators!"; + }; + if ((_moderatedPlayerAccess select 0) isEqualTo 2) then + { + throw "Player is already a moderator!"; + }; + _newUserLevel = (_moderatedPlayerAccess select 0) + 1; + [_requestingPlayer, "toastRequest", ["InfoTitleAndText", ["Player has been promoted!", _territoryName]]] call ExileServer_system_network_send_to; + if !(isNull _moderatedPlayer) then + { + [_moderatedPlayer, "toastRequest", ["InfoTitleAndText", ["You have been promoted!", _territoryName]]] call ExileServer_system_network_send_to; + }; + } + else + { + if ((_moderatedPlayerAccess select 0) isEqualTo 1) then + { + throw format ["Player is already a %1",_moderatedPlayerAccess select 1]; + }; + _newUserLevel = (_moderatedPlayerAccess select 0) - 1; + [_requestingPlayer, "toastRequest", ["InfoTitleAndText", ["Player has been demoted!", _territoryName]]] call ExileServer_system_network_send_to; + if !(isNull _moderatedPlayer) then + { + [_moderatedPlayer, "toastRequest", ["InfoTitleAndText", ["You have been demoted!", _territoryName]]] call ExileServer_system_network_send_to; + }; + }; + [_flag,_moderatedPlayerUID,_newUserLevel] call ExileServer_system_territory_updateRights; +} +catch +{ + [_sessionID, "toastRequest", ["ErrorTitleAndText", ["Failed!", _exception]]] call ExileServer_system_network_send_to; +}; diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_territory_network_payFlagRansomRequest.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_territory_network_payFlagRansomRequest.sqf new file mode 100644 index 0000000..a91f1ba --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_territory_network_payFlagRansomRequest.sqf @@ -0,0 +1,79 @@ +/** + * ExileServer_system_territory_network_payFlagRansomRequest + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_sessionID","_parameters","_flagNetID","_flag","_playerObject","_buildRights","_playerUID","_level","_itemClassName","_flagFee","_playerMoney","_logging","_databaseID","_territoryLog"]; +_sessionID = _this select 0; +_parameters = _this select 1; +_flagNetID = _parameters select 0; +try +{ + _flag = objectFromNetid _flagNetID; + if (isNull _flag) then + { + throw "Territory not found!"; + }; + if ((_flag getVariable ["ExileFlagStolen", 1]) isEqualTo 0) then + { + throw "Flag not stolen!"; + }; + _playerObject = _sessionID call ExileServer_system_session_getPlayerObject; + if (isNull _playerObject) then + { + throw "You do not exist!"; + }; + if !(alive _playerObject) then + { + throw "You are dead!"; + }; + _buildRights = _flag getVariable ["ExileTerritoryBuildRights", []]; + _playerUID = getPlayerUID _playerObject; + if !(_playerUID in _buildRights) then + { + throw "Missing build rights!"; + }; + _level = _flag getVariable ["ExileTerritoryLevel", 0]; + _itemClassName = format["Exile_Item_FlagStolen%1", _level]; + if !(isClass (missionConfigFile >> "CfgExileArsenal" >> _itemClassName) ) then + { + throw "Flag price not found!"; + }; + _flagFee = getNumber (missionConfigFile >> "CfgExileArsenal" >> _itemClassName >> "price"); + if (_flagFee <= 0) then + { + throw "Invalid flag price!"; + }; + _playerMoney = _playerObject getVariable ["ExileMoney", 0]; + if (_playerMoney < _flagFee) then + { + throw "You are too poor!"; + }; + if !(_playerObject canAdd _itemClassName) then + { + throw "Inventory is full!"; + }; + _playerMoney = _playerMoney - _flagFee; + _playerObject setVariable ["ExileMoney", _playerMoney, true]; + format ["setPlayerMoney:%1:%2", _playerMoney, _playerObject getVariable ["ExileDatabaseID", 0]] call ExileServer_system_database_query_fireAndForget; + _playerObject addItem _itemClassName; + _logging = getNumber(configFile >> "CfgSettings" >> "Logging" >> "territoryLogging"); + if (_logging isEqualTo 1) then + { + _databaseID = _flag getVariable ["ExileDatabaseID",0]; + _territoryLog = format ["PLAYER ( %1 ) %2 PAID %3 POP TABS FOR THE RANSOM OF TERRITORY #%4 | PLAYER TOTAL POP TABS: %5", _playerUID, _playerObject, _flagFee, _databaseID, _playerMoney]; + "extDB3" callExtension format["1:TERRITORY:%1", _territoryLog]; + }; + [_sessionID, "toastRequest", ["SuccessTitleOnly", ["Random paid!"]]] call ExileServer_system_network_send_to; +} +catch +{ + [_sessionID, "toastRequest", ["ErrorTitleAndText", ["Failed to pay!", _exception]]] call ExileServer_system_network_send_to; +}; +true diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_territory_network_payTerritoryProtectionMoneyRequest.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_territory_network_payTerritoryProtectionMoneyRequest.sqf new file mode 100644 index 0000000..4b9ecae --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_territory_network_payTerritoryProtectionMoneyRequest.sqf @@ -0,0 +1,64 @@ +/** + * ExileServer_system_territory_network_payTerritoryProtectionMoneyRequest + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_sessionID","_parameters","_flagNetID","_playerObject","_flagObject","_flagStolen","_territoryDatabaseID","_radius","_level","_objectsInTerritory","_popTabAmountPerObject","_totalPopTabAmount","_playerPopTabs","_currentTimestamp","_logging","_territoryLog"]; +_sessionID = _this select 0; +_parameters = _this select 1; +_flagNetID = _parameters select 0; +try +{ + _playerObject = _sessionID call ExileServer_system_session_getPlayerObject; + if (isNull _playerObject) then + { + throw "Invalid player object"; + }; + _flagObject = objectFromNetId _flagNetID; + if (isNull _flagObject) then + { + throw "Invalid flag object"; + }; + _flagStolen = _flagObject getVariable ["ExileFlagStolen", 0]; + if (_flagStolen isEqualTo 1) then + { + throw "Flag stolen!"; + }; + _territoryDatabaseID = _flagObject getVariable ["ExileDatabaseID", 0]; + _radius = _flagObject getVariable ["ExileTerritorySize", 15]; + _level = _flagObject getVariable ["ExileTerritoryLevel", 1]; + _objectsInTerritory = _flagObject getVariable ["ExileTerritoryNumberOfConstructions", 0]; + _popTabAmountPerObject = getNumber (missionConfigFile >> "CfgTerritories" >> "popTabAmountPerObject"); + _totalPopTabAmount = _level * _popTabAmountPerObject * _objectsInTerritory; + _playerPopTabs = _playerObject getVariable ["ExileMoney", 0]; + if (_playerPopTabs < _totalPopTabAmount) then + { + throw "You do not have enough pop tabs!"; + }; + _playerPopTabs = _playerPopTabs - _totalPopTabAmount; + _playerObject setVariable ["ExileMoney", _playerPopTabs, true]; + format["setPlayerMoney:%1:%2", _playerPopTabs, _playerObject getVariable ["ExileDatabaseID", 0]] call ExileServer_system_database_query_fireAndForget; + _currentTimestamp = call ExileServer_util_time_currentTime; + _flagObject setVariable ["ExileTerritoryLastPayed", _currentTimestamp]; + _flagObject call ExileServer_system_territory_maintenance_recalculateDueDate; + format["maintainTerritory:%1", _territoryDatabaseID] call ExileServer_system_database_query_fireAndForget; + [_sessionID, "toastRequest", ["SuccessTitleOnly", ["Protection money paid!"]]] call ExileServer_system_network_send_to; + _logging = getNumber(configFile >> "CfgSettings" >> "Logging" >> "territoryLogging"); + if (_logging isEqualTo 1) then + { + _territoryLog = format ["PLAYER ( %1 ) %2 PAID %3 POP TABS TO PROTECT TERRITORY #%4 | PLAYER TOTAL POP TABS: %5",getPlayerUID _playerObject,_playerObject,_totalPopTabAmount,_territoryDatabaseID,_playerPopTabs]; + "extDB3" callExtension format["1:TERRITORY:%1",_territoryLog]; + }; + _flagObject call ExileServer_system_xm8_sendProtectionMoneyPaid; +} +catch +{ + [_sessionID, "toastRequest", ["ErrorTitleAndText", ["Failed to pay!", _exception]]] call ExileServer_system_network_send_to; + _exception call ExileServer_util_log; +}; diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_territory_network_purchaseTerritory.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_territory_network_purchaseTerritory.sqf new file mode 100644 index 0000000..27de463 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_territory_network_purchaseTerritory.sqf @@ -0,0 +1,46 @@ +/** + * ExileServer_system_territory_network_purchaseTerritory + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_sessionID","_player","_price","_playerMoney","_logging","_territoryLog"]; +_sessionID = _this select 0; +try +{ + _player = _sessionID call ExileServer_system_session_getPlayerObject; + if (isNull _player) then + { + throw 1; + }; + if !(alive _player) then + { + throw 2; + }; + _price = ((getArray(missionConfigFile >> "CfgTerritories" >> "prices")) select 0) select 0; + _playerMoney = _player getVariable ["ExileMoney", 0]; + if (_price > _playerMoney) then + { + throw 3; + }; + _playerMoney = _playerMoney - _price; + _player setVariable ["ExileMoney", _playerMoney, true]; + format["setPlayerMoney:%1:%2", _playerMoney, _player getVariable ["ExileDatabaseID", 0]] call ExileServer_system_database_query_fireAndForget; + [_sessionID, "purchaseTerritoryResponse" , [0]] call ExileServer_system_network_send_to; + _logging = getNumber(configFile >> "CfgSettings" >> "Logging" >> "territoryLogging"); + if (_logging isEqualTo 1) then + { + _territoryLog = format ["PLAYER ( %1 ) %2 PAID %3 POP TABS TO PURCHASE A TERRITORY FLAG | PLAYER TOTAL POP TABS: %4",getPlayerUID _player,_player,_price,_playerMoney]; + "extDB3" callExtension format["1:TERRITORY:%1",_territoryLog]; + }; +} +catch +{ + [_sessionID, "purchaseTerritoryResponse" , [_exception]] call ExileServer_system_network_send_to; +}; +true diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_territory_network_removeFromTerritoryRequest.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_territory_network_removeFromTerritoryRequest.sqf new file mode 100644 index 0000000..dde366c --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_territory_network_removeFromTerritoryRequest.sqf @@ -0,0 +1,62 @@ +/** + * ExileServer_system_territory_network_removeFromTerritoryRequest + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_sessionID","_parameters","_flagNetID","_playerToBeKickedUID","_playerObject","_flagObject","_territoryID","_ownerUID","_moderators","_buildRights"]; +_sessionID = _this select 0; +_parameters = _this select 1; +_flagNetID = _parameters select 0; +_playerToBeKickedUID = _parameters select 1; +try +{ + _playerObject = _sessionID call ExileServer_system_session_getPlayerObject; + if (isNull _playerObject) then + { + throw "Invalid player object"; + }; + _flagObject = objectFromNetId _flagNetID; + if (isNull _flagObject) then + { + throw "Invalid flag object."; + }; + _territoryID = _flagObject getVariable ["ExileDatabaseID", -1]; + if (_territoryID isEqualTo -1) then + { + throw "Territory has no database ID."; + }; + _ownerUID = _flagObject getVariable ["ExileOwnerUID", ""]; + if (_playerToBeKickedUID isEqualTo _ownerUID) then + { + throw "Owners cannot leave territories."; + }; + _moderators = _flagObject getVariable ["ExileTerritoryModerators", []]; + _buildRights = _flagObject getVariable ["ExileTerritoryBuildRights", []]; + if (_playerToBeKickedUID isEqualTo (getPlayerUID _playerObject)) then + { + } + else + { + if !((getPlayerUID _playerObject) in _moderators) then + { + throw "Only moderators can kick."; + }; + }; + _moderators = _moderators - [_playerToBeKickedUID]; + _buildRights = _buildRights - [_playerToBeKickedUID]; + _flagObject setVariable ["ExileTerritoryBuildRights", _buildRights, true]; + format["updateTerritoryBuildRights:%1:%2", _buildRights, _territoryID] call ExileServer_system_database_query_fireAndForget; + format["updateTerritoryModerators:%1:%2", _moderators, _territoryID] call ExileServer_system_database_query_fireAndForget; +} +catch +{ + [_sessionID, "toastRequest", ["ErrorTitleAndText", ["Failed to remove!", _exception]]] call ExileServer_system_network_send_to; + _exception call ExileServer_util_log; +}; +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_territory_network_requestTerritoryUpgradeDialog.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_territory_network_requestTerritoryUpgradeDialog.sqf new file mode 100644 index 0000000..8678c4d --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_territory_network_requestTerritoryUpgradeDialog.sqf @@ -0,0 +1,27 @@ +/** + * ExileServer_system_territory_network_requestTerritoryUpgradeDialog + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_sessionID","_parameters","_flag","_moderators","_playerObject","_level"]; +_sessionID = _this select 0; +_parameters = _this select 1; +_flag = _parameters select 0; +_moderators = _flag getVariable ["ExileTerritoryModerators",[]]; +_playerObject = _sessionID call ExileServer_system_session_getPlayerObject; +if((getPlayerUID _playerObject) in _moderators)then +{ + _level = _flag getVariable ["ExileTerritoryLevel",0]; + [_sessionID,"territoryUpgradeDialogResponse",[_level]] call ExileServer_system_network_send_to; +} +else +{ + [_sessionID, "toastRequest", ["ErrorTitleAndText", ["Failed to upgrade!", "You need to have moderator rights."]]] call ExileServer_system_network_send_to; +}; +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_territory_network_restoreFlagRequest.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_territory_network_restoreFlagRequest.sqf new file mode 100644 index 0000000..32d4973 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_territory_network_restoreFlagRequest.sqf @@ -0,0 +1,71 @@ +/** + * ExileServer_system_territory_network_restoreFlagRequest + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_sessionID","_parameters","_flagNetID","_flag","_playerObject","_buildRights","_playerUID","_level","_itemClassName","_territoryDatabaseID","_flagTexture","_logging"]; +_sessionID = _this select 0; +_parameters = _this select 1; +_flagNetID = _parameters select 0; +try +{ + _flag = objectFromNetid _flagNetID; + if (isNull _flag) then + { + throw "Territory not found!"; + }; + if ((_flag getVariable ["ExileFlagStolen", 1]) isEqualTo 0) then + { + throw "Flag is not stolen!"; + }; + _playerObject = _sessionID call ExileServer_system_session_getPlayerObject; + if (isNull _playerObject) then + { + throw "You do not exist!"; + }; + if !(alive _playerObject) then + { + throw "You are dead! Didn't you know that?"; + }; + if ((_playerObject distance2D _flag) > 4) then + { + throw "You are too far away."; + }; + _buildRights = _flag getVariable ["ExileTerritoryBuildRights", []]; + _playerUID = getPlayerUID _playerObject; + if !(_playerUID in _buildRights) then + { + throw "Missing build rights."; + }; + _level = _flag getVariable ["ExileTerritoryLevel", 0]; + _itemClassName = format["Exile_Item_FlagStolen%1", _level]; + if !(_itemClassName in (magazines _playerObject)) then + { + throw format ["You need a level %1 flag.", _level]; + }; + _playerObject removeItem _itemClassName; + _territoryDatabaseID = _flag getVariable ["ExileDatabaseID", 0]; + format["flagRestore:%1", _territoryDatabaseID] call ExileServer_system_database_query_fireAndForget; + _flag setVariable ["ExileFlagStolen", 0, true]; + _flag setFlagOwner objNull; + _flagTexture = _flag getVariable "ExileFlagTexture"; + _flag setFlagTexture _flagTexture; + _logging = getNumber(configFile >> "CfgSettings" >> "Logging" >> "territoryLogging"); + if (_logging isEqualTo 1) then + { + "extDB3" callExtension format ["1:TERRITORY:PLAYER ( %1 ) %2 RESTORED THE FLAG OF TERRITORY #%3", _playerUID, _playerObject, _territoryDatabaseID]; + }; + [_sessionID, "toastRequest", ["SuccessTitleAndText", ["Flag has been restored!", "You can now maintain and build on our territory again."]]] call ExileServer_system_network_send_to; + _flag call ExileServer_system_xm8_sendFlagRestored; +} +catch +{ + [_sessionID, "toastRequest", ["ErrorTitleAndText", ["Failed to restore!", _exception]]] call ExileServer_system_network_send_to; +}; +true diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_territory_network_territoryUpgradeRequest.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_territory_network_territoryUpgradeRequest.sqf new file mode 100644 index 0000000..b2c24a2 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_territory_network_territoryUpgradeRequest.sqf @@ -0,0 +1,72 @@ +/** + * ExileServer_system_territory_network_territoryUpgradeRequest + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_sessionID","_parameters","_flag","_playerObject","_databaseID","_moderators","_level","_territoryConfig","_territoryLevels","_territoryPrice","_territoryRange","_playerMoney","_logging","_territoryLog"]; +_sessionID = _this select 0; +_parameters = _this select 1; +_flag = _parameters select 0; +try +{ + if (isNull _flag) then + { + throw "Invalid flag object"; + }; + if ((_flag getVariable ["ExileFlagStolen", 0]) isEqualTo 1) then + { + throw "Flag is stolen!"; + }; + _playerObject = _sessionID call ExileServer_system_session_getPlayerObject; + if (isNull _playerObject) then + { + throw "Player Object NULL"; + }; + _databaseID = _flag getVariable ["ExileDatabaseID",0]; + _moderators = _flag getVariable ["ExileTerritoryModerators",[]]; + if !((getPlayerUID _playerObject) in _moderators) then + { + throw "No upgrade Access!"; + }; + _level = _flag getVariable ["ExileTerritoryLevel",_level]; + _territoryConfig = getArray(missionConfigFile >> "CfgTerritories" >> "Prices"); + _territoryLevels = count _territoryConfig; + if (_territoryLevels < (_level + 1)) then + { + throw "This territory has already the highest level."; + }; + _territoryPrice = (_territoryConfig select _level) select 0; + _territoryRange = (_territoryConfig select _level) select 1; + _playerMoney = _playerObject getVariable ["ExileMoney",0]; + if (_playerMoney < _territoryPrice) then + { + throw "Not enough pop tabs!"; + }; + _playerMoney = _playerMoney - _territoryPrice; + _playerObject setVariable ["ExileMoney", _playerMoney, true]; + format["setPlayerMoney:%1:%2", _playerMoney, _playerObject getVariable ["ExileDatabaseID", 0]] call ExileServer_system_database_query_fireAndForget; + _flag setVariable ["ExileTerritoryLevel",_level + 1, true]; + _flag setVariable ["ExileTerritorySize",_territoryRange, true]; + format ["setTerritoryLevel:%1:%2",_level + 1,_databaseID] call ExileServer_system_database_query_fireAndForget; + format ["setTerritorySize:%1:%2",_territoryRange,_databaseID] call ExileServer_system_database_query_fireAndForget; + _flag call ExileServer_system_territory_updateNearContainers; + _flag call ExileServer_system_territory_updateNearConstructions; + [_sessionID, "toastRequest", ["SuccessTitleAndText", ["Territory upgraded!", format ["Your territory has reached level %1 and now has a new radius of %2 meters.", _level + 1, _territoryRange]]]] call ExileServer_system_network_send_to; + _logging = getNumber(configFile >> "CfgSettings" >> "Logging" >> "territoryLogging"); + if (_logging isEqualTo 1) then + { + _territoryLog = format ["PLAYER ( %1 ) %2 PAID %3 POP TABS TO UPGRADE TERRITORY #%4 TO LEVEL %5 | PLAYER TOTAL POP TABS: %6",getPlayerUID _playerObject,_playerObject,_territoryPrice,_databaseID,(_level + 1),_playerMoney]; + "extDB3" callExtension format["1:TERRITORY:%1",_territoryLog]; + }; +} +catch +{ + [_sessionID, "toastRequest", ["ErrorTitleAndText", ["Failed to upgrade!", _exception]]] call ExileServer_system_network_send_to; +}; +true diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_territory_updateNearConstructions.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_territory_updateNearConstructions.sqf new file mode 100644 index 0000000..3083bc6 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_territory_updateNearConstructions.sqf @@ -0,0 +1,28 @@ +/** + * ExileServer_system_territory_updateNearConstructions + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_flag","_territoryDatabaseID","_territoryRange","_constructionDatabaseIDs","_constructionDatabaseID"]; +_flag = _this; +_territoryDatabaseID = _flag getVariable ["ExileDatabaseID", 0]; +_territoryRange = _flag getVariable ["ExileTerritorySize", 0]; +_constructionDatabaseIDs = []; +{ + _constructionDatabaseID = _x getVariable ["ExileDatabaseID", ""]; + if !(_constructionDatabaseID isEqualTo "") then + { + _constructionDatabaseIDs pushBack _constructionDatabaseID; + }; +} +forEach (_flag nearObjects ["Exile_Construction_Abstract", _territoryRange]); +if !(_constructionDatabaseIDs isEqualTo []) then +{ + (format ["updateConstructionTerritoryIDs:%1:%2", _territoryDatabaseID, _constructionDatabaseIDs joinString ',']) call ExileServer_system_database_query_fireAndForget; +}; \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_territory_updateNearContainers.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_territory_updateNearContainers.sqf new file mode 100644 index 0000000..b6e4d07 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_territory_updateNearContainers.sqf @@ -0,0 +1,28 @@ +/** + * ExileServer_system_territory_updateNearContainers + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_flag","_territoryDatabaseID","_territoryRange","_containerDatabaseIDs","_containerDatabaseID"]; +_flag = _this; +_territoryDatabaseID = _flag getVariable ["ExileDatabaseID", 0]; +_territoryRange = _flag getVariable ["ExileTerritorySize", 0]; +_containerDatabaseIDs = []; +{ + _containerDatabaseID = _x getVariable ["ExileDatabaseID", ""]; + if !(_containerDatabaseID isEqualTo "") then + { + _containerDatabaseIDs pushBack _containerDatabaseID; + }; +} +forEach (_flag nearObjects ["Exile_Container_Abstract", _territoryRange]); +if !(_containerDatabaseIDs isEqualTo []) then +{ + (format ["updateContainerTerritoryIDs:%1:%2", _territoryDatabaseID, _containerDatabaseIDs joinString ',']) call ExileServer_system_database_query_fireAndForget; +}; \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_territory_updateNumberOfConstructions.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_territory_updateNumberOfConstructions.sqf new file mode 100644 index 0000000..a813eed --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_territory_updateNumberOfConstructions.sqf @@ -0,0 +1,16 @@ +/** + * ExileServer_system_territory_updateNumberOfConstructions + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_flag","_territoryRange","_numberOfConstructions"]; +_flag = _this; +_territoryRange = _flag getVariable ["ExileTerritorySize", 0]; +_numberOfConstructions = count (_flag nearObjects ["Exile_Construction_Abstract_Static", _territoryRange]); +_flag setVariable ["ExileTerritoryNumberOfConstructions", _numberOfConstructions, true]; diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_territory_updateRights.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_territory_updateRights.sqf new file mode 100644 index 0000000..dd229e7 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_territory_updateRights.sqf @@ -0,0 +1,40 @@ +/** + * ExileServer_system_territory_updateRights + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_flag","_moderatedPlayerUID","_newUserLevel","_buildRights","_moderatorRights","_owner","_databaseID"]; +_flag = _this select 0; +_moderatedPlayerUID = _this select 1; +_newUserLevel = _this select 2; +_buildRights = _flag getVariable ["ExileTerritoryBuildRights",[]]; +_moderatorRights = _flag getVariable ["ExileTerritoryModerators",[]]; +_owner = _flag getVariable ["ExileOwnerUID",""]; +_databaseID = _flag getVariable ["ExileDatabaseID",0]; +switch (_newUserLevel) do +{ + case 1 : + { + if (_moderatedPlayerUID in _moderatorRights) then + { + _moderatorRights deleteAt (_moderatorRights find _moderatedPlayerUID); + }; + }; + case 2 : + { + if !(_moderatedPlayerUID in _moderatorRights) then + { + _moderatorRights pushBack _moderatedPlayerUID; + }; + }; + default {}; +}; +_flag setVariable ["ExileTerritoryModerators",_moderatorRights,true]; +format ["updateTerritoryModerators:%1:%2",_moderatorRights,_databaseID] call ExileServer_system_database_query_fireAndForget; +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_thread_addTask.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_thread_addTask.sqf new file mode 100644 index 0000000..124e4f0 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_thread_addTask.sqf @@ -0,0 +1,29 @@ +/** + * ExileServer_system_thread_addTask + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_delay","_function","_params","_persistance","_pushBackThreadID","_threadId"]; +_delay = _this select 0; +_function = _this select 1; +_params = _this select 2; +_persistance = _this select 3; +_pushBackThreadID = param [4, false]; +_threadId = ExileSystemThreadID; +if(_pushBackThreadID)then +{ + _params pushBack _threadId; +}; +ExileSystemSpawnThread pushBack [_delay, time, _function,_params, _threadId, _persistance]; +ExileSystemThreadDelays pushBack _delay; +[] call ExileServer_system_thread_threadAdjust; +ExileSystemSpawnThread = [ExileSystemSpawnThread, [], {_x select 4}, "ASCEND", {true}] call BIS_fnc_sortBy; +format ["Job with handle %1 added.", _threadId] call ExileServer_util_log; +ExileSystemThreadID = ExileSystemThreadID + 1; +_threadId \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_thread_initialize.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_thread_initialize.sqf new file mode 100644 index 0000000..ec7b179 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_thread_initialize.sqf @@ -0,0 +1,42 @@ +/** + * ExileServer_system_thread_initialize + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +scriptName 'ExileServer Main Thread'; +ExileSystemSpawnThread = []; +ExileSystemThreadDelays = []; +ExileSystemMainTimer = time; +ExileSystemThreadSleep = 0.01; +ExileSystemThreadID = 10000; +[] spawn +{ + waitUntil { (time > 0) && PublicServerIsLoaded }; + "Main thread started" call ExileServer_util_log; + while {true} do + { + if !(ExileSystemSpawnThread isEqualTo []) then + { + { + if (ExileSystemMainTimer > (((_x select 1) + (_x select 0)) - ExileSystemThreadSleep)) then + { + (_x select 3) call (_x select 2); + _x set [1, time]; + if !(_x select 5) then + { + [_x select 4] call ExileServer_system_thread_removeTask; + }; + }; + } + forEach ExileSystemSpawnThread; + }; + ExileSystemMainTimer = time; + uiSleep ExileSystemThreadSleep; + }; +}; \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_thread_removeTask.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_thread_removeTask.sqf new file mode 100644 index 0000000..6cf7e7e --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_thread_removeTask.sqf @@ -0,0 +1,23 @@ +/** + * ExileServer_system_thread_removeTask + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_threadID","_result","_threadIndex"]; +_threadID = _this select 0; +_result = false; +_threadIndex = [ExileSystemSpawnThread, _threadID] call ExileClient_util_find; +if (_threadIndex != -1) then +{ + ExileSystemThreadDelays deleteAt (ExileSystemThreadDelays find ((ExileSystemSpawnThread select _threadIndex) select 0)); + [] call ExileServer_system_thread_threadAdjust; + ExileSystemSpawnThread deleteAt _threadIndex; + _result = true; +}; +_result \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_thread_threadAdjust.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_thread_threadAdjust.sqf new file mode 100644 index 0000000..5b6ba73 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_thread_threadAdjust.sqf @@ -0,0 +1,18 @@ +/** + * ExileServer_system_thread_threadAdjust + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +if (ExileSystemThreadDelays isEqualTo []) then +{ + ExileSystemThreadDelays = [5]; +}; +ExileSystemThreadDelays = ExileSystemThreadDelays call BIS_fnc_sortNum; +ExileSystemThreadSleep = (((ExileSystemThreadDelays select 0) max 0.01) min 5); +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_trading_network_purchaseItemRequest.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_trading_network_purchaseItemRequest.sqf new file mode 100644 index 0000000..3a177bb --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_trading_network_purchaseItemRequest.sqf @@ -0,0 +1,82 @@ +/** + * ExileServer_system_trading_network_purchaseItemRequest + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_sessionID","_parameters","_itemClassName","_quantity","_containerType","_containerNetID","_playerObject","_vehicleObject","_salesPrice","_playerMoney","_playerRespect","_quality","_requiredRespect","_logging","_traderLog","_responseCode"]; +_sessionID = _this select 0; +_parameters = _this select 1; +_itemClassName = _parameters select 0; +_quantity = _parameters select 1; +_containerType = _parameters select 2; +_containerNetID = _parameters select 3; +try +{ + _playerObject = _sessionID call ExileServer_system_session_getPlayerObject; + if (_playerObject getVariable ["ExileMutex",false]) then + { + throw 12; + }; + _playerObject setVariable ["ExileMutex",true]; + _vehicleObject = objNull; + if (isNull _playerObject) then + { + throw 1; + }; + if !(alive _playerObject) then + { + throw 2; + }; + if !(isClass (missionConfigFile >> "CfgExileArsenal" >> _itemClassName) ) then + { + throw 3; + }; + _salesPrice = getNumber (missionConfigFile >> "CfgExileArsenal" >> _itemClassName >> "price"); + if (_salesPrice <= 0) then + { + throw 4; + }; + _playerMoney = _playerObject getVariable ["ExileMoney", 0]; + if (_playerMoney < _salesPrice) then + { + throw 5; + }; + _playerRespect = _playerObject getVariable ["ExileScore", 0]; + _quality = getNumber(missionConfigFile >> "CfgExileArsenal" >> _itemClassName >> "quality"); + _requiredRespect = getNumber(missionConfigFile >> "CfgTrading" >> "requiredRespect" >> format["Level%1",_quality]); + if (_playerRespect < _requiredRespect) then + { + throw 14; + }; + _playerMoney = _playerMoney - _salesPrice; + _playerObject setVariable ["ExileMoney", _playerMoney, true]; + format["setPlayerMoney:%1:%2", _playerMoney, _playerObject getVariable ["ExileDatabaseID", 0]] call ExileServer_system_database_query_fireAndForget; + [_sessionID, "purchaseItemResponse", [0, _salesPrice, _itemClassName, 1, _containerType, _containerNetID]] call ExileServer_system_network_send_to; + _logging = getNumber(configFile >> "CfgSettings" >> "Logging" >> "traderLogging"); + if (_logging isEqualTo 1) then + { + _traderLog = format ["PLAYER: ( %1 ) %2 PURCHASED ITEM %3 FOR %4 POPTABS | PLAYER TOTAL MONEY: %5",getPlayerUID _playerObject,_playerObject,_itemClassName,_salesPrice,_playerMoney]; + "extDB3" callExtension format["1:TRADING:%1",_traderLog]; + }; + if !(_vehicleObject isEqualTo objNull) then + { + _vehicleObject call ExileServer_object_vehicle_database_update; + } + else + { + _playerObject call ExileServer_object_player_database_update; + }; +} +catch +{ + _responseCode = _exception; + [_sessionID, "purchaseItemResponse", [_responseCode, 0, "", 0, 0, ""]] call ExileServer_system_network_send_to; +}; +_playerObject setVariable ["ExileMutex",false]; +true diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_trading_network_purchaseVehicleRequest.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_trading_network_purchaseVehicleRequest.sqf new file mode 100644 index 0000000..12b4dcd --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_trading_network_purchaseVehicleRequest.sqf @@ -0,0 +1,90 @@ +/** + * ExileServer_system_trading_network_purchaseVehicleRequest + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_sessionID","_parameters","_vehicleClass","_pinCode","_playerObject","_salesPrice","_playerMoney","_position","_vehicleObject","_logging","_traderLog","_responseCode"]; +_sessionID = _this select 0; +_parameters = _this select 1; +_vehicleClass = _parameters select 0; +_pinCode = _parameters select 1; +try +{ + _playerObject = _sessionID call ExileServer_system_session_getPlayerObject; + if (isNull _playerObject) then + { + throw 1; + }; + if !(alive _playerObject) then + { + throw 2; + }; + if (_playerObject getVariable ["ExileMutex",false]) then + { + throw 12; + }; + _playerObject setVariable ["ExileMutex", true]; + if !(isClass (missionConfigFile >> "CfgExileArsenal" >> _vehicleClass) ) then + { + throw 3; + }; + _salesPrice = getNumber (missionConfigFile >> "CfgExileArsenal" >> _vehicleClass >> "price"); + if (_salesPrice <= 0) then + { + throw 4; + }; + _playerMoney = _playerObject getVariable ["ExileMoney", 0]; + if (_playerMoney < _salesPrice) then + { + throw 5; + }; + if !((count _pinCode) isEqualTo 4) then + { + throw 11; + }; + if (_vehicleClass isKindOf "Ship") then + { + _position = [(getPosATL _playerObject), 100, 20] call ExileClient_util_world_findWaterPosition; + _vehicleObject = [_vehicleClass, _position, (random 360), false, _pinCode] call ExileServer_object_vehicle_createPersistentVehicle; + } + else + { + _position = (getPos _playerObject) findEmptyPosition [10, 250, _vehicleClass]; + if (_position isEqualTo []) then + { + throw 13; + }; + _vehicleObject = [_vehicleClass, _position, (random 360), true, _pinCode] call ExileServer_object_vehicle_createPersistentVehicle; + }; + _vehicleObject setVariable ["ExileOwnerUID", (getPlayerUID _playerObject)]; + _vehicleObject setVariable ["ExileIsLocked",0]; + _vehicleObject lock 0; + _vehicleObject call ExileServer_object_vehicle_database_insert; + _vehicleObject call ExileServer_object_vehicle_database_update; + _playerMoney = _playerMoney - _salesPrice; + _playerObject setVariable ["ExileMoney", _playerMoney, true]; + format["setPlayerMoney:%1:%2", _playerMoney, _playerObject getVariable ["ExileDatabaseID", 0]] call ExileServer_system_database_query_fireAndForget; + [_sessionID, "purchaseVehicleResponse", [0, netId _vehicleObject, _salesPrice]] call ExileServer_system_network_send_to; + _logging = getNumber(configFile >> "CfgSettings" >> "Logging" >> "traderLogging"); + if (_logging isEqualTo 1) then + { + _traderLog = format ["PLAYER: ( %1 ) %2 PURCHASED VEHICLE %3 FOR %4 POPTABS | PLAYER TOTAL MONEY: %5",getPlayerUID _playerObject,_playerObject,_vehicleClass,_salesPrice,_playerMoney]; + "extDB3" callExtension format["1:TRADING:%1",_traderLog]; + }; +} +catch +{ + _responseCode = _exception; + [_sessionID, "purchaseVehicleResponse", [_responseCode, "", 0]] call ExileServer_system_network_send_to; +}; +if !(isNull _playerObject) then +{ + _playerObject setVariable ["ExileMutex", false]; +}; +true diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_trading_network_purchaseVehicleSkinRequest.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_trading_network_purchaseVehicleSkinRequest.sqf new file mode 100644 index 0000000..13d375d --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_trading_network_purchaseVehicleSkinRequest.sqf @@ -0,0 +1,93 @@ +/** + * ExileServer_system_trading_network_purchaseVehicleSkinRequest + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_sessionID","_parameters","_vehicleNetID","_skinTextures","_playerObject","_vehicleObject","_vehicleParentClass","_salesPrice","_skinVariations","_availableSkinTexture","_playerMoney","_skinMaterials","_skinClassName","_vehicleID","_logging","_traderLog","_responseCode"]; +_sessionID = _this select 0; +_parameters = _this select 1; +_vehicleNetID = _parameters select 0; +_skinTextures = _parameters select 1; +try +{ + _playerObject = _sessionID call ExileServer_system_session_getPlayerObject; + if (isNull _playerObject) then + { + throw 1; + }; + if !(alive _playerObject) then + { + throw 2; + }; + if(_playerObject getVariable ["ExileMutex",false]) then + { + throw 12; + }; + _playerObject setVariable ["ExileMutex",true]; + _vehicleObject = objectFromNetId _vehicleNetID; + if (isNull _vehicleObject) then + { + throw 6; + }; + _vehicleParentClass = configName (inheritsFrom (configFile >> "CfgVehicles" >> (typeOf _vehicleObject))); + if !(isClass (missionConfigFile >> "CfgVehicleCustoms" >> _vehicleParentClass) ) then + { + throw 7; + }; + _salesPrice = -1; + _skinVariations = getArray(missionConfigFile >> "CfgVehicleCustoms" >> _vehicleParentClass >> "skins"); + { + _availableSkinTexture = _x select 3; + if (_availableSkinTexture isEqualTo _skinTextures) exitWith + { + _salesPrice = _x select 1; + }; + } + forEach _skinVariations; + if (_salesPrice <= 0) then + { + throw 4; + }; + _playerMoney = _playerObject getVariable ["ExileMoney", 0]; + if (_playerMoney < _salesPrice) then + { + throw 5; + }; + _skinMaterials = getArray(configFile >> "CfgVehicles" >> _skinClassName >> "hiddenSelectionsMaterials"); + { + _vehicleObject setObjectTextureGlobal [_forEachIndex, _skinTextures select _forEachIndex]; + } + forEach _skinTextures; + { + _vehicleObject setObjectMaterial [_forEachIndex, _x]; + } + forEach _skinMaterials; + _vehicleID = _vehicleObject getVariable ["ExileDatabaseID", -1]; + format["updateVehicleSkin:%1:%2", _skinTextures, _vehicleID] call ExileServer_system_database_query_fireAndForget; + _playerMoney = _playerMoney - _salesPrice; + _playerObject setVariable ["ExileMoney", _playerMoney, true]; + format["setPlayerMoney:%1:%2", _playerMoney, _playerObject getVariable ["ExileDatabaseID", 0]] call ExileServer_system_database_query_fireAndForget; + [_sessionID, "purchaseVehicleSkinResponse", [0, _salesPrice]] call ExileServer_system_network_send_to; + _logging = getNumber(configFile >> "CfgSettings" >> "Logging" >> "traderLogging"); + if (_logging isEqualTo 1) then + { + _traderLog = format ["PLAYER: ( %1 ) %2 PURCHASED VEHICLE SKIN %3 (%4) FOR %5 POPTABS | PLAYER TOTAL MONEY: %6",getPlayerUID _playerObject,_playerObject,_skinTextures,_vehicleParentClass,_salesPrice,_playerMoney]; + "extDB3" callExtension format["1:TRADING:%1",_traderLog]; + }; +} +catch +{ + _responseCode = _exception; + [_sessionID, "purchaseVehicleSkinResponse", [_responseCode, 0]] call ExileServer_system_network_send_to; +}; +if !(isNull _playerObject) then +{ + _playerObject setVariable ["ExileMutex", false]; +}; +true diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_trading_network_sellItemRequest.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_trading_network_sellItemRequest.sqf new file mode 100644 index 0000000..ed124bd --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_trading_network_sellItemRequest.sqf @@ -0,0 +1,133 @@ +/** + * ExileServer_system_trading_network_sellItemRequest + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_sessionID","_parameters","_itemClassName","_quantity","_containerType","_containerNetID","_playerObject","_vehicleObject","_sellPrice","_playerMoney","_noRespectItems","_playerRespect","_respectGain","_logging","_playerMoneyString","_traderLog","_responseCode"]; +_sessionID = _this select 0; +_parameters = _this select 1; +_itemClassName = _parameters select 0; +_quantity = _parameters select 1; +_containerType = _parameters select 2; +_containerNetID = _parameters select 3; +try +{ + _playerObject = _sessionID call ExileServer_system_session_getPlayerObject; + if (isNull _playerObject) then + { + throw 1; + }; + if !(alive _playerObject) then + { + throw 2; + }; + if(_playerObject getVariable ["ExileMutex",false]) then + { + throw 12; + }; + _playerObject setVariable ["ExileMutex",true]; + _vehicleObject = objNull; + if !(isClass (missionConfigFile >> "CfgExileArsenal" >> _itemClassName) ) then + { + throw 3; + }; + _sellPrice = _itemClassName call ExileClient_util_gear_calculateSellPrice; + if (_containerType isEqualTo 1) then + { + if (_itemClassName isEqualTo (primaryWeapon _playerObject)) then + { + { + { + if !(_x isEqualTo "") then + { + _sellPrice = _sellPrice + (_x call ExileClient_util_gear_calculateSellPrice); + }; + } + forEach _x; + } + forEach + [ + primaryWeaponItems _playerObject, + primaryWeaponMagazine _playerObject + ]; + }; + if (_itemClassName isEqualTo (handgunWeapon _playerObject)) then + { + { + { + if !(_x isEqualTo "") then + { + _sellPrice = _sellPrice + (_x call ExileClient_util_gear_calculateSellPrice); + }; + } + forEach _x; + } + forEach + [ + handgunItems _playerObject, + handgunMagazine _playerObject + ]; + }; + }; + if (_sellPrice <= 0) then + { + throw 4; + }; + _playerMoney = _playerObject getVariable ["ExileMoney", 0]; + _playerMoney = _playerMoney + _sellPrice; + _playerObject setVariable ["ExileMoney", _playerMoney, true]; + format["setPlayerMoney:%1:%2", _playerMoney, _playerObject getVariable ["ExileDatabaseID", 0]] call ExileServer_system_database_query_fireAndForget; + _noRespectItems = + [ + "Exile_Item_FlagStolen1", + "Exile_Item_FlagStolen2", + "Exile_Item_FlagStolen3", + "Exile_Item_FlagStolen4", + "Exile_Item_FlagStolen5", + "Exile_Item_FlagStolen6", + "Exile_Item_FlagStolen7", + "Exile_Item_FlagStolen8", + "Exile_Item_FlagStolen9", + "Exile_Item_FlagStolen10" + ]; + _playerRespect = _playerObject getVariable ["ExileScore", 0]; + if !(_itemClassName in _noRespectItems) then + { + _respectGain = _sellPrice * getNumber (configFile >> "CfgSettings" >> "Respect" >> "tradingRespectFactor"); + _playerRespect = floor (_playerRespect + _respectGain); + _playerObject setVariable ["ExileScore", _playerRespect]; + format["setAccountScore:%1:%2", _playerRespect, (getPlayerUID _playerObject)] call ExileServer_system_database_query_fireAndForget; + }; + [_sessionID, "sellItemResponse", [0, _sellPrice, _itemClassName, 1, _containerType, _containerNetID, str _playerRespect]] call ExileServer_system_network_send_to; + _logging = getNumber(configFile >> "CfgSettings" >> "Logging" >> "traderLogging"); + if (_logging isEqualTo 1) then + { + _playerMoneyString = _playerMoney call ExileClient_util_string_exponentToString; + _traderLog = format ["PLAYER: ( %1 ) %2 SOLD ITEM %3 FOR %4 POPTABS AND %5 RESPECT | PLAYER TOTAL MONEY: %6",getPlayerUID _playerObject,_playerObject,_itemClassName,_sellPrice,_respectGain,_playerMoneyString]; + "extDB3" callExtension format["1:TRADING:%1",_traderLog]; + }; + if !(_vehicleObject isEqualTo objNull) then + { + _vehicleObject call ExileServer_object_vehicle_database_update; + } + else + { + _playerObject call ExileServer_object_player_database_update; + }; +} +catch +{ + _responseCode = _exception; + [_sessionID, "sellItemResponse", [_responseCode, 0, "", 0, 0, "", ""]] call ExileServer_system_network_send_to; +}; +if !(isNull _playerObject) then +{ + _playerObject setVariable ["ExileMutex", false]; +}; +true diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_trading_network_wasteDumpRequest.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_trading_network_wasteDumpRequest.sqf new file mode 100644 index 0000000..a4781db --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_trading_network_wasteDumpRequest.sqf @@ -0,0 +1,85 @@ +/** + * ExileServer_system_trading_network_wasteDumpRequest + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_sessionID","_parameters","_vehicleNetID","_mode","_vehicleObject","_vehicleDBID","_playerObject","_cargo","_revenue","_playerMoney","_respectGain","_playerRespect","_logging","_traderLog","_responseCode"]; +_sessionID = _this select 0; +_parameters = _this select 1; +_vehicleNetID = _parameters select 0; +_mode = _parameters select 1; +try +{ + _vehicleObject = objectFromNetId _vehicleNetID; + _vehicleDBID = _vehicleObject getVariable "ExileDatabaseID"; + if (isNull _vehicleObject) then + { + throw 6; + }; + if (_vehicleObject getVariable ["ExileMutex", false]) then + { + throw 12; + }; + _vehicleObject setVariable ["ExileMutex", true]; + _playerObject = _sessionID call ExileServer_system_session_getPlayerObject; + if (isNull _playerObject) then + { + throw 1; + }; + if !(alive _playerObject) then + { + throw 2; + }; + if !((owner _vehicleObject) isEqualTo (owner _playerObject)) then + { + throw 6; + }; + _cargo = _vehicleObject call ExileClient_util_containerCargo_list; + _revenue = _cargo call ExileClient_util_gear_calculateTotalSellPrice; + clearBackpackCargoGlobal _vehicleObject; + clearItemCargoGlobal _vehicleObject; + clearMagazineCargoGlobal _vehicleObject; + clearWeaponCargoGlobal _vehicleObject; + if (_mode isEqualTo 2) then + { + _revenue = _revenue + ([(typeOf _vehicleObject)] call ExileClient_util_gear_calculateTotalSellPrice); + _vehicleObject call ExileServer_object_vehicle_remove; + deleteVehicle _vehicleObject; + } + else + { + _vehicleObject call ExileServer_object_vehicle_database_update; + }; + _playerMoney = _playerObject getVariable ["ExileMoney", 0]; + _playerMoney = _playerMoney + _revenue; + _playerObject setVariable ["ExileMoney", _playerMoney, true]; + format["setPlayerMoney:%1:%2", _playerMoney, _playerObject getVariable ["ExileDatabaseID", 0]] call ExileServer_system_database_query_fireAndForget; + _respectGain = _revenue * getNumber (configFile >> "CfgSettings" >> "Respect" >> "tradingRespectFactor"); + _playerRespect = _playerObject getVariable ["ExileScore", 0]; + _playerRespect = floor (_playerRespect + _respectGain); + _playerObject setVariable ["ExileScore", _playerRespect]; + format["setAccountScore:%1:%2", _playerRespect, (getPlayerUID _playerObject)] call ExileServer_system_database_query_fireAndForget; + [_sessionID, "wasteDumpResponse", [0, _revenue, str _playerRespect]] call ExileServer_system_network_send_to; + _logging = getNumber(configFile >> "CfgSettings" >> "Logging" >> "traderLogging"); + if (_logging isEqualTo 1) then + { + _traderLog = format ["PLAYER: ( %1 ) %2 SOLD ITEM: %3 (ID# %4) with Cargo %5 FOR %6 POPTABS AND %7 RESPECT | PLAYER TOTAL MONEY: %8",getPlayerUID _playerObject,_playerObject,typeOf _vehicleObject,_vehicleDBID,_cargo,_revenue,_respectGain,_playerMoney]; + "extDB3" callExtension format["1:TRADING:%1",_traderLog]; + }; +} +catch +{ + _responseCode = _exception; + [_sessionID, "wasteDumpResponse", [_responseCode, 0, ""]] call ExileServer_system_network_send_to; +}; +if (!isNull _vehicleObject) then +{ + _vehicleObject setVariable ["ExileMutex", false]; +}; +true diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_vehicleSaveQueue_addVehicle.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_vehicleSaveQueue_addVehicle.sqf new file mode 100644 index 0000000..8f10fce --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_vehicleSaveQueue_addVehicle.sqf @@ -0,0 +1,22 @@ +/** + * ExileServer_system_vehicleSaveQueue_addVehicle + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_vehicleObject"]; +_vehicleObject = _this; +if !(_vehicleObject in ExileServerVehicleSaveQueue) then +{ + if (_vehicleObject getVariable ["ExileIsPersistent", false]) then + { + _vehicleObject setVariable ["ExileVehicleSaveQueuedAt", time]; + ExileServerVehicleSaveQueue pushBack _vehicleObject; + }; +}; +true; \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_vehicleSaveQueue_initialize.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_vehicleSaveQueue_initialize.sqf new file mode 100644 index 0000000..f7153e5 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_vehicleSaveQueue_initialize.sqf @@ -0,0 +1,14 @@ +/** + * ExileServer_system_vehicleSaveQueue_initialize + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +ExileServerVehicleSaveQueue = []; +[15, ExileServer_system_vehicleSaveQueue_thread_saveVehicles, [], true] call ExileServer_system_thread_addTask; +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_vehicleSaveQueue_network_vehicleSaveRequest.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_vehicleSaveQueue_network_vehicleSaveRequest.sqf new file mode 100644 index 0000000..6a59483 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_vehicleSaveQueue_network_vehicleSaveRequest.sqf @@ -0,0 +1,20 @@ +/** + * ExileServer_system_vehicleSaveQueue_network_vehicleSaveRequest + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_parameters","_vehicleObjectNetId","_vehicleObject"]; +_parameters = _this select 1; +_vehicleObjectNetId = _parameters select 0; +_vehicleObject = objectFromNetId _vehicleObjectNetId; +if (_vehicleObject getVariable ["ExileIsPersistent", false]) then +{ + _vehicleObject call ExileServer_system_vehicleSaveQueue_addVehicle; +}; +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_vehicleSaveQueue_removeVehicle.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_vehicleSaveQueue_removeVehicle.sqf new file mode 100644 index 0000000..d965b83 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_vehicleSaveQueue_removeVehicle.sqf @@ -0,0 +1,20 @@ +/** + * ExileServer_system_vehicleSaveQueue_removeVehicle + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_vehicleObject","_vehicleNetId","_index"]; +_vehicleObject = _this; +_vehicleNetId = netID _vehicleObject; +_index = ExileServerVehicleSaveQueue find _vehicleNetId; +if (_index > -1) then +{ + ExileServerVehicleSaveQueue deleteAt _index; +}; +true; \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_vehicleSaveQueue_thread_saveVehicles.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_vehicleSaveQueue_thread_saveVehicles.sqf new file mode 100644 index 0000000..ecc1dd5 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_vehicleSaveQueue_thread_saveVehicles.sqf @@ -0,0 +1,49 @@ +/** + * ExileServer_system_vehicleSaveQueue_thread_saveVehicles + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_vehicleObject","_removeFromQueue"]; +{ + _vehicleObject = _x; + _removeFromQueue = false; + if (isNull _vehicleObject) then + { + _removeFromQueue = true; + } + else + { + if (diag_tickTime - (_vehicleObject getVariable ["ExileVehicleSaveQueuedAt", 30]) > 60) then + { + if(_vehicleObject getVariable ["ExileIsContainer",false])then + { + _vehicleObject call ExileServer_object_container_database_update; + } + else + { + if(isNumber(configFile >> "CfgVehicles" >> typeOf _vehicleObject >> "exileIsDoor"))then + { + _vehicleObject call ExileServer_object_construction_database_lockUpdate; + } + else + { + _vehicleObject call ExileServer_object_vehicle_database_update; + }; + }; + _vehicleObject setVariable ["ExileVehicleSaveQueuedAt", nil]; + _removeFromQueue = true; + }; + }; + if (_removeFromQueue) then + { + ExileServerVehicleSaveQueue deleteAt _forEachIndex; + }; +} +forEach ExileServerVehicleSaveQueue; +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_weather_initialize.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_weather_initialize.sqf new file mode 100644 index 0000000..26d2059 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_weather_initialize.sqf @@ -0,0 +1,31 @@ +/** + * ExileServer_system_weather_initialize + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_useRealTime","_useStaticTime","_staticTime","_changetime"]; +call ExileServer_system_weather_thread_weatherSimulation; +_useRealTime = getNumber (configFile >> "CfgSettings" >> "Time" >> "useRealTime"); +_useStaticTime = getNumber (configFile >> "CfgSettings" >> "Time" >> "useStaticTime"); +_staticTime = getArray (configFile >> "CfgSettings" >> "Time" >> "staticTime"); +if(_useStaticTime isEqualTo 1)then +{ + setDate _staticTime; +} +else +{ + if(_useRealTime isEqualTo 1)then + { + setDate ExileServerStartTime; + }; +}; +forceWeatherChange; +_changetime = round(getNumber (configFile >> "CfgSettings" >> "Weather" >> "interval") * 60); +[_changetime, ExileServer_system_weather_thread_weatherSimulation, [], true] call ExileServer_system_thread_addTask; +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_weather_thread_weatherSimulation.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_weather_thread_weatherSimulation.sqf new file mode 100644 index 0000000..550c8e7 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_weather_thread_weatherSimulation.sqf @@ -0,0 +1,31 @@ +/** + * ExileServer_system_weather_thread_weatherSimulation + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_interval","_keyframes","_keyframeName","_keyframeConfig"]; +_interval = round(getNumber (configFile >> "CfgSettings" >> "Weather" >> "interval") * 60); +_keyframes = getArray (configFile >> "CfgSettings" >> "Weather" >> "keyframes"); +_keyframeName = selectRandom _keyframes; +_keyframeConfig = configFile >> "CfgSettings" >> "Weather" >> _keyframeName; +_interval setFog getNumber (_keyframeConfig >> "fogValue"); +_interval setFog +[ + getNumber (_keyframeConfig >> "fogValue"), + getNumber (_keyframeConfig >> "fogDecay"), + getNumber (_keyframeConfig >> "fogBase") +]; +_interval setOvercast (getNumber (_keyframeConfig >> "overcast")); +_interval setWaves (getNumber (_keyframeConfig >> "waves")); +_interval setWindStr (getNumber (_keyframeConfig >> "wind")); +_interval setGusts (getNumber (_keyframeConfig >> "gusts")); +_interval setRain (getNumber (_keyframeConfig >> "rain")); +_interval setLightnings (getNumber (_keyframeConfig >> "lightnings")); +_interval setRainbow (getNumber (_keyframeConfig >> "rainbows")); +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_xm8_send.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_xm8_send.sqf new file mode 100644 index 0000000..64803ab --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_xm8_send.sqf @@ -0,0 +1,48 @@ +/** + * ExileServer_system_xm8_send + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_methodName","_recipients","_text","_allowedMethods","_escapedText","_message","_result"]; +_methodName = _this select 0; +_recipients = _this select 1; +_text = _this select 2; +_allowedMethods = ["base-raid", "flag-stolen", "flag-restored", "protection-money-due", "protection-money-paid"]; +try +{ + if !(_methodName in _allowedMethods) then + { + throw format ["Forbidden method name: %1!", _methodName]; + }; + if !(_recipients isEqualType []) then + { + throw "Broken recipient list!"; + }; + _recipients = _recipients call ExileClient_util_array_unique; + if ((count _recipients) isEqualTo 0) then + { + throw "No recipients!"; + }; + if ((count _recipients) > 30) then + { + throw "Too many recipients!"; + }; + _escapedText = _text call ExileClient_util_string_escapeJson; + if (_escapedText isEqualTo "") then + { + throw "Invalid text!"; + }; + _message = format ['{"r":%1,"m":"%2","t":"%3"}', _recipients, _methodName, _escapedText]; + _result = "XM8" callExtension _message; + format ["XM8 mesage sent: %1 (%2)", _message, _result] call ExileServer_util_log; +} +catch +{ + format ["XM8 message failed: %1", _exception] call ExileServer_util_log; +}; \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_xm8_sendBaseRaid.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_xm8_sendBaseRaid.sqf new file mode 100644 index 0000000..f7f0c87 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_xm8_sendBaseRaid.sqf @@ -0,0 +1,15 @@ +/** + * ExileServer_system_xm8_sendBaseRaid + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_recipients","_territoryName"]; +_recipients = _this getVariable ["ExileTerritoryBuildRights", []]; +_territoryName = _this getVariable ["ExileTerritoryName", ""]; +["base-raid", _recipients, _territoryName] call ExileServer_system_xm8_send; \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_xm8_sendFlagRestored.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_xm8_sendFlagRestored.sqf new file mode 100644 index 0000000..9f13e89 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_xm8_sendFlagRestored.sqf @@ -0,0 +1,15 @@ +/** + * ExileServer_system_xm8_sendFlagRestored + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_recipients","_territoryName"]; +_recipients = _this getVariable ["ExileTerritoryBuildRights", []]; +_territoryName = _this getVariable ["ExileTerritoryName", ""]; +["flag-restored", _recipients, _territoryName] call ExileServer_system_xm8_send; \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_xm8_sendFlagStolen.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_xm8_sendFlagStolen.sqf new file mode 100644 index 0000000..013174f --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_xm8_sendFlagStolen.sqf @@ -0,0 +1,15 @@ +/** + * ExileServer_system_xm8_sendFlagStolen + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_recipients","_territoryName"]; +_recipients = _this getVariable ["ExileTerritoryBuildRights", []]; +_territoryName = _this getVariable ["ExileTerritoryName", ""]; +["flag-stolen", _recipients, _territoryName] call ExileServer_system_xm8_send; \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_xm8_sendProtectionMoneyDue.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_xm8_sendProtectionMoneyDue.sqf new file mode 100644 index 0000000..556bb35 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_xm8_sendProtectionMoneyDue.sqf @@ -0,0 +1,37 @@ +/** + * ExileServer_system_xm8_sendProtectionMoneyDue + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_flags","_maintenancePeriod","_territoryIDs","_id","_flag","_recipients","_territoryName"]; +_flags = allMissionObjects "Exile_Construction_Flag_Static"; +_maintenancePeriod = getNumber(configFile >> "CfgSettings" >> "GarbageCollector" >> "Database" >> "territoryLifeTime"); +_territoryIDs = format ["getAllNotifTerritory:%1",_maintenancePeriod] call ExileServer_system_database_query_selectFull; +if!(_territoryIDs isEqualTo [])then +{ + if!(_flags isEqualTo [])then + { + { + _id = _x select 0; + { + _flag = _x; + if((_flag getVariable ["ExileDatabaseID",-1]) isEqualTo _id)exitWith + { + _recipients = _flag getVariable ["ExileTerritoryBuildRights", []]; + _territoryName = _flag getVariable ["ExileTerritoryName", ""]; + ["protection-money-due", _recipients, _territoryName] call ExileServer_system_xm8_send; + format ["setTerritoryNotified:1:%1",_id] call ExileServer_system_database_query_fireAndForget; + }; + } + forEach _flags; + } + forEach _territoryIDs; + }; +}; +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_system_xm8_sendProtectionMoneyPaid.sqf b/@exileserver/addons/exile_server/code/ExileServer_system_xm8_sendProtectionMoneyPaid.sqf new file mode 100644 index 0000000..d762892 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_system_xm8_sendProtectionMoneyPaid.sqf @@ -0,0 +1,16 @@ +/** + * ExileServer_system_xm8_sendProtectionMoneyPaid + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_recipients","_territoryName"]; +_recipients = _this getVariable ["ExileTerritoryBuildRights", []]; +_territoryName = _this getVariable ["ExileTerritoryName", ""]; +["protection-money-paid", _recipients, _territoryName] call ExileServer_system_xm8_send; +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_util_extDB2_createMessage.sqf b/@exileserver/addons/exile_server/code/ExileServer_util_extDB2_createMessage.sqf new file mode 100644 index 0000000..dcf1710 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_util_extDB2_createMessage.sqf @@ -0,0 +1,27 @@ +/** + * ExileServer_util_extDB2_createMessage + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_messageName","_fields","_numberOfFields","_i","_field","_message"]; +_messageName = _this select 0; +_fields = _this select 1; +_numberOfFields = count _fields; +for "_i" from 0 to _numberOfFields - 1 do +{ + _field = _fields select _i; + if ((typeName _field) isEqualTo "SCALAR") then + { + _fields set[_i, _field call ExileClient_util_string_scalarToString]; + }; +}; +_message = ""; +_message = _fields joinString ":"; +_message = [_messageName, _message] joinString ":"; +_message \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_util_fill_fillContainers.sqf b/@exileserver/addons/exile_server/code/ExileServer_util_fill_fillContainers.sqf new file mode 100644 index 0000000..8e59035 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_util_fill_fillContainers.sqf @@ -0,0 +1,59 @@ +/** + * ExileServer_util_fill_fillContainers + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_object","_containers","_current","_control","_container","_weapons","_magazines","_items","_type"]; +_object = _this select 0; +_containers = _this select 1; +if ((typeName _containers) isEqualTo "ARRAY") then +{ + if!(_containers isEqualTo [])then + { + _current_filled = []; + _control = []; + { + _container = _x select 0; + _weapons = _x select 1; + _magazines = _x select 2; + _items = _x select 3; + _type = [_container] call BIS_fnc_itemType; + if((_type select 1) isEqualTo "Backpack")then + { + _object addBackpackCargoGlobal [_container,1]; + } + else + { + _object addItemCargoGlobal [_container,1]; + }; + _control = (everyContainer _object); + { + if!((_x select 1) in _current_filled)exitWith + { + _current_filled pushBack (_x select 1); + }; + } + forEach _control; + if!(_weapons isEqualTo [])then + { + [(_current_filled select _forEachIndex),_weapons] call ExileServer_util_fill_fillWeapons; + }; + if!(_magazines isEqualTo [])then + { + [(_current_filled select _forEachIndex),_magazines] call ExileServer_util_fill_fillMagazines; + }; + if!(_items isEqualTo [[],[]])then + { + [(_current_filled select _forEachIndex),_items] call ExileServer_util_fill_fillItems; + }; + } + forEach _containers; + }; +}; +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_util_fill_fillItems.sqf b/@exileserver/addons/exile_server/code/ExileServer_util_fill_fillItems.sqf new file mode 100644 index 0000000..77fd531 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_util_fill_fillItems.sqf @@ -0,0 +1,25 @@ +/** + * ExileServer_util_fill_fillItems + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_object","_items"]; +_object = _this select 0; +_items = _this select 1; +if ((typeName _items) isEqualTo "ARRAY") then +{ + if!(_items isEqualTo [[],[]])then + { + { + _object addItemCargoGlobal [_x ,((_items select 1) select _forEachIndex)]; + } + forEach (_items select 0); + }; +}; +true diff --git a/@exileserver/addons/exile_server/code/ExileServer_util_fill_fillMagazines.sqf b/@exileserver/addons/exile_server/code/ExileServer_util_fill_fillMagazines.sqf new file mode 100644 index 0000000..7a99e26 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_util_fill_fillMagazines.sqf @@ -0,0 +1,25 @@ +/** + * ExileServer_util_fill_fillMagazines + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_object","_magazines"]; +_object = _this select 0; +_magazines = _this select 1; +if ((typeName _magazines) isEqualTo "ARRAY") then +{ + if!(_magazines isEqualTo [])then + { + { + _object addMagazineAmmoCargo [_x select 0, 1 , _x select 1]; + } + forEach _magazines; + }; +}; +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_util_fill_fillWeapons.sqf b/@exileserver/addons/exile_server/code/ExileServer_util_fill_fillWeapons.sqf new file mode 100644 index 0000000..22a5fae --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_util_fill_fillWeapons.sqf @@ -0,0 +1,40 @@ +/** + * ExileServer_util_fill_fillWeapons + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_object","_weapons","_i","_thing"]; +_object = _this select 0; +_weapons = _this select 1; +if ((typeName _weapons) isEqualTo "ARRAY") then +{ + if!(_weapons isEqualTo [])then + { + { + _object addWeaponCargoGlobal [_x select 0, 1]; + for "_i" from 1 to ((count _x) -1) do + { + _thing = _x select _i; + if !(_thing isEqualTo "") then + { + if ((typeName _i) isEqualTo "ARRAY") then + { + _object addMagazineAmmoCargo [_thing select 0, 1, _thing select 1]; + } + else + { + _object addItemCargoGlobal [_thing, 1]; + }; + }; + }; + } + forEach _weapons; + }; +}; +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_util_getFragKiller.sqf b/@exileserver/addons/exile_server/code/ExileServer_util_getFragKiller.sqf new file mode 100644 index 0000000..5e0cba8 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_util_getFragKiller.sqf @@ -0,0 +1,40 @@ +/** + * ExileServer_util_getFragKiller + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_killer","_player"]; +_killer = _this; +_player = objNull; +if (isPlayer _killer) then +{ + if ((typeOf _killer) isEqualTo "Exile_Unit_Player") then + { + _player = _killer; + } + else + { + _uid = getPlayerUID _killer; + { + if ((getPlayerUID _x) isEqualTo _uid) exitWith + { + _player = _x; + }; + } + forEach allPlayers; + }; +} +else +{ + if (isUAVConnected _killer) then + { + _player = (UAVControl _killer) select 0; + }; +}; +_player \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_util_getFragPerks.sqf b/@exileserver/addons/exile_server/code/ExileServer_util_getFragPerks.sqf new file mode 100644 index 0000000..748334e --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_util_getFragPerks.sqf @@ -0,0 +1,111 @@ +/** + * ExileServer_util_getFragPerks + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_victim","_killer","_killingPlayer","_perks","_lastKillAt","_killStack","_lastVictims","_victimUID","_flagNextToKiller","_flagNextToVictim","_vehicle","_vehicleRole","_distance","_distanceBonus"]; +_victim = _this select 0; +_killer = _this select 1; +_killingPlayer = _this select 2; +_perks = []; +if ((currentWeapon _killingPlayer) isKindOf ["Exile_Melee_Abstract", configFile >> "CfgWeapons"]) then +{ + _perks pushBack ["Humiliation", getNumber (configFile >> "CfgSettings" >> "Respect" >> "Frags" >> "humiliation")]; +}; +if (isNil "ExileServerHadFirstBlood") then +{ + ExileServerHadFirstBlood = true; + _perks pushBack ["First Blood", getNumber (configFile >> "CfgSettings" >> "Respect" >> "Bonus" >> "firstBlood")]; +}; +_lastKillAt = _killingPlayer getVariable ["ExileLastKillAt", 0]; +_killStack = _killingPlayer getVariable ["ExileKillStack", 0]; +_killStack = _killStack + 1; +if (time - _lastKillAt < (getNumber (configFile >> "CfgSettings" >> "Respect" >> "Bonus" >> "killStreakTimeout"))) then +{ + _perks pushBack [format ["%1x Kill Streak", _killStack], _killStack * (getNumber (configFile >> "CfgSettings" >> "Respect" >> "Bonus" >> "killStreak"))]; +} +else +{ + _killStack = 1; +}; +_killingPlayer setVariable ["ExileKillStack", _killStack]; +_killingPlayer setVariable ["ExileLastKillAt", time]; +_lastVictims = _killingPlayer getVariable ["ExileLastVictims", ["0", "1", "2"]]; +_victimUID = _victim getVariable ["ExileOwnerUID", getPlayerUID _victim]; +if (_victimUID in _lastVictims) then +{ + _perks pushBack ["Domination", getNumber (configFile >> "CfgSettings" >> "Respect" >> "Frags" >> "domination")]; +}; +_lastVictims deleteAt 0; +_lastVictims pushBack _victimUID; +_killingPlayer setVariable ["ExileLastVictims", _lastVictims]; +_flagNextToKiller = _killingPlayer call ExileClient_util_world_getTerritoryAtPosition; +if !(isNull _flagNextToKiller) then +{ + if ((getPlayerUID _killingPlayer) in (_flagNextToKiller getVariable ["ExileTerritoryBuildRights", []])) then + { + _perks pushBack ["Homie", getNumber (configFile >> "CfgSettings" >> "Respect" >> "Bonus" >> "homie")]; + }; +}; +_flagNextToVictim = _victim call ExileClient_util_world_getTerritoryAtPosition; +if !(isNull _flagNextToVictim) then +{ + if ((getPlayerUID _victim) in (_flagNextToVictim getVariable ["ExileTerritoryBuildRights", []])) then + { + _perks pushBack ["Raid", getNumber (configFile >> "CfgSettings" >> "Respect" >> "Bonus" >> "raid")]; + }; +}; +_vehicle = vehicle _killingPlayer; +if !(_vehicle isEqualTo _killingPlayer) then +{ + _vehicleRole = _killingPlayer call ExileClient_util_vehicle_getRole; + switch (_vehicleRole) do + { + case "driver": + { + switch (true) do + { + case (_vehicle isKindOf "ParachuteBase"): + { + _perks pushBack ["Chute > Chopper", getNumber (configFile >> "CfgSettings" >> "Respect" >> "Frags" >> "chuteGreaterChopper")]; + }; + case (_vehicle isKindOf "Air"): + { + _perks pushBack ["Big Bird", (getNumber (configFile >> "CfgSettings" >> "Respect" >> "Frags" >> "bigBird"))]; + }; + default + { + _perks pushBack ["Road Kill", (getNumber (configFile >> "CfgSettings" >> "Respect" >> "Frags" >> "roadKill"))]; + }; + }; + }; + case "turret": + { + if ((currentWeapon _killingPlayer) isKindOf "StaticWeapon") then + { + _perks pushBack ["Let it Rain", (getNumber (configFile >> "CfgSettings" >> "Respect" >> "Frags" >> "letItRain"))]; + } + else + { + _perks pushBack ["Mad Passenger", (getNumber (configFile >> "CfgSettings" >> "Respect" >> "Frags" >> "passenger"))]; + }; + }; + default + { + _perks pushBack ["Mad Passenger", (getNumber (configFile >> "CfgSettings" >> "Respect" >> "Frags" >> "passenger"))]; + }; + }; +}; +_distance = floor (_victim distance _killingPlayer); +_distanceBonus = (floor ((_distance min 3000) / 100)) * getNumber (configFile >> "CfgSettings" >> "Respect" >> "Bonus" >> "per100mDistance"); +if (_distanceBonus > 0) then +{ + _perks pushBack [format ["%1m Range", _distance], _distanceBonus]; +}; +_perks \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_util_getFragType.sqf b/@exileserver/addons/exile_server/code/ExileServer_util_getFragType.sqf new file mode 100644 index 0000000..0d7e73a --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_util_getFragType.sqf @@ -0,0 +1,59 @@ +/** + * ExileServer_util_getFragType + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_victim","_killer","_killingPlayer","_type","_victimClanId","_killerClanId"]; +_victim = _this select 0; +_killer = _this select 1; +_killingPlayer = _this select 2; +_type = 0; +try +{ + if (_victim getVariable ["IsPlayingRussianRoulette", false]) then + { + throw 2; + }; + if (_victim isEqualTo _killer) then + { + throw 1; + }; + if ((vehicle _victim) isEqualTo _killer) then + { + throw 3; + }; + if (isNull _killer) then + { + throw 0; + }; + if (isNull _killingPlayer) then + { + throw 4; + }; + if ((group _victim) isEqualTo (group _killingPlayer)) then + { + throw 5; + }; + _victimClanId = _victim getVariable ["ExileClanID", -2]; + _killerClanId = _killer getVariable ["ExileClanID", -3]; + if (!(_victimClanId isEqualTo -1) && (_victimClanId isEqualTo _killerClanId)) then + { + throw 5; + }; + if (_victim getVariable ["ExileIsBambi", false]) then + { + throw 6; + }; + throw 7; +} +catch +{ + _type = _exception; +}; +_type \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_util_getItemCargo.sqf b/@exileserver/addons/exile_server/code/ExileServer_util_getItemCargo.sqf new file mode 100644 index 0000000..9c67011 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_util_getItemCargo.sqf @@ -0,0 +1,35 @@ +/** + * ExileServer_util_getItemCargo + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_object","_items","_realContainers","_containers","_i"]; +_object = _this; +_items = getItemCargo _object; +_realContainers = [] ; +_containers = (everyContainer _object); +if !(_containers isEqualTo []) then +{ + { + _realContainers pushBack (_x select 0); + } + forEach _containers; +}; +if !(_items isEqualTo [[], []]) then +{ + for "_i" from ((count (_items select 0)) - 1) to 0 step -1 do + { + if (((_items select 0) select _i) in _realContainers) then + { + (_items select 0) deleteAt _i; + (_items select 1) deleteAt _i; + }; + }; +}; +_items \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_util_getObjectContainerCargo.sqf b/@exileserver/addons/exile_server/code/ExileServer_util_getObjectContainerCargo.sqf new file mode 100644 index 0000000..2edc24b --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_util_getObjectContainerCargo.sqf @@ -0,0 +1,30 @@ +/** + * ExileServer_util_getObjectContainerCargo + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_vehicle","_data","_allContainers","_containerType","_containerObject","_temp"]; +_vehicle = _this; +_data = []; +_allContainers = everyContainer _vehicle; +if !(_allContainers isEqualTo []) then +{ + { + _containerType = _x select 0; + _containerObject = _x select 1; + _temp = []; + _temp pushBack _containerType; + _temp pushBack (weaponsItemsCargo _containerObject); + _temp pushBack (magazinesAmmoCargo _containerObject); + _temp pushBack (getItemCargo _containerObject); + _data pushBack _temp; + } + forEach _allContainers; +}; +_data \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_util_log.sqf b/@exileserver/addons/exile_server/code/ExileServer_util_log.sqf new file mode 100644 index 0000000..157cf7b --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_util_log.sqf @@ -0,0 +1,23 @@ +/** + * ExileServer_util_log + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_log"]; +_log = format["ExileServer - %1", _this]; +if(isNil "MAR_fnc_log")then +{ + diag_log _log; +} +else +{ + [_log,"info"] call MAR_fnc_log; + diag_log _log; +}; +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_util_setDamageTexture.sqf b/@exileserver/addons/exile_server/code/ExileServer_util_setDamageTexture.sqf new file mode 100644 index 0000000..43105df --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_util_setDamageTexture.sqf @@ -0,0 +1,37 @@ +/** + * ExileServer_util_setDamageTexture + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_constructionObject","_damage"]; +_constructionObject = _this; +_damage = _constructionObject getVariable ["ExileConstructionDamage",0]; +if(_damage isEqualTo 0)then +{ + { + _constructionObject setObjectTextureGlobal [_forEachIndex, _x]; + } + forEach (getArray (configFile >> "CfgVehicles" >> (typeOf _constructionObject) >> "hiddenSelectionsTextures")); + { + _constructionObject setObjectMaterialGlobal [_forEachIndex, _x]; + } + forEach (getArray (configFile >> "CfgVehicles" >> (typeOf _constructionObject) >> "hiddenSelectionMaterials")); +} +else +{ + { + _constructionObject setObjectTextureGlobal [_forEachIndex, _x]; + } + forEach (getArray (configFile >> "CfgVehicles" >> (typeOf _constructionObject) >> format ["damageLevel%1Textures", _damage])); + { + _constructionObject setObjectMaterialGlobal [_forEachIndex, _x]; + } + forEach (getArray (configFile >> "CfgVehicles" >> (typeOf _constructionObject) >> format ["damageLevel%1Materials", _damage])); +}; +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_util_time_addTime.sqf b/@exileserver/addons/exile_server/code/ExileServer_util_time_addTime.sqf new file mode 100644 index 0000000..0a65b9f --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_util_time_addTime.sqf @@ -0,0 +1,15 @@ +/** + * ExileServer_util_time_addTime + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_time1","_time2"]; +_time1 = _this select 0; +_time2 = _this select 1; +(call compile ("extDB3" callExtension format ["9:TIMEDIFF:MINUTES:%1:%2",_time1,_time2])) select 1 diff --git a/@exileserver/addons/exile_server/code/ExileServer_util_time_currentTime.sqf b/@exileserver/addons/exile_server/code/ExileServer_util_time_currentTime.sqf new file mode 100644 index 0000000..d92171f --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_util_time_currentTime.sqf @@ -0,0 +1,12 @@ +/** + * ExileServer_util_time_currentTime + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +(call compile ("extDB3" callExtension "9:LOCAL_TIME")) select 1 diff --git a/@exileserver/addons/exile_server/code/ExileServer_util_time_toArma.sqf b/@exileserver/addons/exile_server/code/ExileServer_util_time_toArma.sqf new file mode 100644 index 0000000..83c606b --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_util_time_toArma.sqf @@ -0,0 +1,21 @@ +/** + * ExileServer_util_time_toArma + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_minutes","_year","_leftOverMinutes","_month","_day","_hour"]; +_minutes = _this; +_year = floor (_minutes / 525600); +_leftOverMinutes = _minutes - (_year * 525600); +_month = floor (_leftOverMinutes / 43829); +_leftOverMinutes = _leftOverMinutes - (_month * 43829); +_day = floor (_leftOverMinutes / 1440); +_leftOverMinutes = _leftOverMinutes - (_day * 1440); +_hour = floor (_leftOverMinutes / 60); +[_year,_month,_day,_hour,_leftOverMinutes - (_hour * 60)] diff --git a/@exileserver/addons/exile_server/code/ExileServer_util_time_toMinutes.sqf b/@exileserver/addons/exile_server/code/ExileServer_util_time_toMinutes.sqf new file mode 100644 index 0000000..450a562 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_util_time_toMinutes.sqf @@ -0,0 +1,26 @@ +/** + * ExileServer_util_time_toMinutes + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_time","_timeMinutes"]; +_time = _this; +_timeMinutes = 0; +{ + switch (_forEachIndex) do + { + case 0 : { _timeMinutes = _timeMinutes + (_x * 525600);}; + case 1 : { _timeMinutes = _timeMinutes + (_x * 43829);}; + case 2 : { _timeMinutes = _timeMinutes + (_x * 1440);}; + case 3 : { _timeMinutes = _timeMinutes + (_x * 60);}; + default { _timeMinutes = _timeMinutes + _x;}; + }; +} +forEach _time; +_timeMinutes \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_util_time_uptime.sqf b/@exileserver/addons/exile_server/code/ExileServer_util_time_uptime.sqf new file mode 100644 index 0000000..7bbf177 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_util_time_uptime.sqf @@ -0,0 +1,12 @@ +/** + * ExileServer_util_time_uptime + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +(call compile ("extDB3" callExtension "9:UPTIME:MINUTES")) select 1 diff --git a/@exileserver/addons/exile_server/code/ExileServer_world_calculateVehicleGrid.sqf b/@exileserver/addons/exile_server/code/ExileServer_world_calculateVehicleGrid.sqf new file mode 100644 index 0000000..cdf0157 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_world_calculateVehicleGrid.sqf @@ -0,0 +1,27 @@ +/** + * ExileServer_world_calculateVehicleGrid + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_numberOfVehiclesToSpawn","_numberOfChunks","_chunksOnXAxis","_chunksOnYAxis","_chunkSizeX","_chunkSizeY","_chunkPositions","_y"]; +_numberOfVehiclesToSpawn = _this; +_numberOfChunks = _numberOfVehiclesToSpawn ; +_chunksOnXAxis = floor (sqrt _numberOfChunks); +_chunksOnYAxis = floor(_numberOfChunks / _chunksOnXAxis); +_chunkSizeX = floor (worldSize / _chunksOnXAxis); +_chunkSizeY = floor (worldSize / _chunksOnYAxis); +_chunkPositions = []; +for "_x" from 0 to _chunksOnXAxis - 1 do +{ + for "_y" from 0 to _chunksOnYAxis - 1 do + { + _chunkPositions pushBack [_x * _chunkSizeX + _chunkSizeX * 0.5, _y * _chunkSizeY + _chunkSizeY * 0.5]; + }; +}; +[_chunkSizeX, _chunkSizeY, _chunkPositions] \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_world_initialize.sqf b/@exileserver/addons/exile_server/code/ExileServer_world_initialize.sqf new file mode 100644 index 0000000..3e0301c --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_world_initialize.sqf @@ -0,0 +1,22 @@ +/** + * ExileServer_world_initialize + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +"Initializing game world..." call ExileServer_util_log; +call ExileServer_World_loadAllClans; +call ExileServer_World_loadAllTerritories; +call ExileServer_world_loadAllDatabaseConstructions; +call ExileServer_world_loadAllDatabaseVehicles; +call ExileServer_world_loadAllDatabaseContainers; +call ExileServer_system_xm8_sendProtectionMoneyDue; +call ExileServer_world_spawnSpawnZoneVehicles; +call ExileServer_world_spawnVehicles; +"Game world initialized! Let the fun begin!" call ExileServer_util_log; +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_world_loadAllClans.sqf b/@exileserver/addons/exile_server/code/ExileServer_world_loadAllClans.sqf new file mode 100644 index 0000000..a843836 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_world_loadAllClans.sqf @@ -0,0 +1,35 @@ +/** + * ExileServer_world_loadAllClans + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_continueLoading","_page","_pageSize","_clanIDs","_numberOfClans","_i"]; +"Loading families from database..." call ExileServer_util_log; +_continueLoading = true; +_page = 0; +_pageSize = 100; +while {_continueLoading} do +{ + _clanIDs = format ["loadClansIdPage:%1:%2", _page * _pageSize, _pageSize] call ExileServer_system_database_query_selectFull; + _numberOfClans = count _clanIDs; + if (_numberOfClans > 0) then + { + for "_i" from 0 to _numberOfClans - 1 do + { + ((_clanIDs select _i) select 0) call ExileServer_system_clan_database_load; + }; + }; + _page = _page + 1; + if (_numberOfClans < 100) then + { + _continueLoading = false; + }; +}; +"Done loading families!" call ExileServer_util_log; +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_world_loadAllDatabaseConstructions.sqf b/@exileserver/addons/exile_server/code/ExileServer_world_loadAllDatabaseConstructions.sqf new file mode 100644 index 0000000..36ff153 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_world_loadAllDatabaseConstructions.sqf @@ -0,0 +1,35 @@ +/** + * ExileServer_world_loadAllDatabaseConstructions + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_continueLoading","_page","_pageSize","_constructionIDs","_numberOfConstructions","_i"]; +"Loading constructions from database..." call ExileServer_util_log; +_continueLoading = true; +_page = 0; +_pageSize = 100; +while {_continueLoading} do +{ + _constructionIDs = format ["loadConstructionIdPage:%1:%2", _page * _pageSize, _pageSize] call ExileServer_system_database_query_selectFull; + _numberOfConstructions = count _constructionIDs; + if (_numberOfConstructions > 0) then + { + for "_i" from 0 to _numberOfConstructions - 1 do + { + ((_constructionIDs select _i) select 0) call ExileServer_object_construction_database_load; + }; + }; + _page = _page + 1; + if (_numberOfConstructions < 100) then + { + _continueLoading = false; + }; +}; +"Done loading constructions!" call ExileServer_util_log; +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_world_loadAllDatabaseContainers.sqf b/@exileserver/addons/exile_server/code/ExileServer_world_loadAllDatabaseContainers.sqf new file mode 100644 index 0000000..3bba2d1 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_world_loadAllDatabaseContainers.sqf @@ -0,0 +1,37 @@ +/** + * ExileServer_world_loadAllDatabaseContainers + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_continueLoading","_page","_pageSize","_containerIDs","_numberOfContainers","_i"]; +"Loading containers from database..." call ExileServer_util_log; +_continueLoading = true; +_page = 0; +_pageSize = 100; +ExileAbandondedSafes = []; +ExileContainerCargo = []; +while {_continueLoading} do +{ + _containerIDs = format ["loadContainerIdPage:%1:%2", _page * _pageSize, _pageSize] call ExileServer_system_database_query_selectFull; + _numberOfContainers = count _containerIDs; + if (_numberOfContainers > 0) then + { + for "_i" from 0 to _numberOfContainers - 1 do + { + ((_containerIDs select _i) select 0) call ExileServer_object_container_database_load; + }; + }; + _page = _page + 1; + if (_numberOfContainers < 100) then + { + _continueLoading = false; + }; +}; +"Done loading containers!" call ExileServer_util_log; +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_world_loadAllDatabaseVehicles.sqf b/@exileserver/addons/exile_server/code/ExileServer_world_loadAllDatabaseVehicles.sqf new file mode 100644 index 0000000..a0fc95b --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_world_loadAllDatabaseVehicles.sqf @@ -0,0 +1,35 @@ +/** + * ExileServer_world_loadAllDatabaseVehicles + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_continueLoading","_page","_pageSize","_vehicleIDs","_numberOfVehicles","_i"]; +"Loading vehicles from database..." call ExileServer_util_log; +_continueLoading = true; +_page = 0; +_pageSize = 100; +while {_continueLoading} do +{ + _vehicleIDs = format ["loadVehicleIdPage:%1:%2", _page * _pageSize, _pageSize] call ExileServer_system_database_query_selectFull; + _numberOfVehicles = count _vehicleIDs; + if (_numberOfVehicles > 0) then + { + for "_i" from 0 to _numberOfVehicles - 1 do + { + ((_vehicleIDs select _i)select 0) call ExileServer_object_vehicle_database_load; + }; + }; + _page = _page + 1; + if (_numberOfVehicles < 100) then + { + _continueLoading = false; + }; +}; +"Done loading vehicles!" call ExileServer_util_log; +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_world_loadAllTerritories.sqf b/@exileserver/addons/exile_server/code/ExileServer_world_loadAllTerritories.sqf new file mode 100644 index 0000000..1beb087 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_world_loadAllTerritories.sqf @@ -0,0 +1,36 @@ +/** + * ExileServer_world_loadAllTerritories + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_continueLoading","_page","_pageSize","_territoryIDs","_numberOfTerritories","_i"]; +ExileLocations = []; +"Loading territories from database..." call ExileServer_util_log; +_continueLoading = true; +_page = 0; +_pageSize = 100; +while {_continueLoading} do +{ + _territoryIDs = format ["loadTerriotryIdPage:%1:%2", _page * _pageSize, _pageSize] call ExileServer_system_database_query_selectFull; + _numberOfTerritories = count _territoryIDs; + if (_numberOfTerritories > 0) then + { + for "_i" from 0 to _numberOfTerritories - 1 do + { + ((_territoryIDs select _i)select 0) call ExileServer_system_territory_database_load; + }; + }; + _page = _page + 1; + if (_numberOfTerritories < 100) then + { + _continueLoading = false; + }; +}; +"Done loading territories!" call ExileServer_util_log; +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_world_spawnSpawnZoneVehicles.sqf b/@exileserver/addons/exile_server/code/ExileServer_world_spawnSpawnZoneVehicles.sqf new file mode 100644 index 0000000..abfa678 --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_world_spawnSpawnZoneVehicles.sqf @@ -0,0 +1,36 @@ +/** + * ExileServer_world_spawnSpawnZoneVehicles + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_spawnRadius","_vehiclesToSpawn","_markerName","_markerCenterPosition","_numberOfVehiclesToSpawn","_vehicleClassName","_i","_vehiclePosition","_vehicleDirection"]; +"Creating spawn zone vehicles..." call ExileServer_util_log; +_spawnRadius = getNumber(configFile >> "CfgSettings" >> "BambiSettings" >> "spawnZoneRadius"); +_vehiclesToSpawn = getArray(configFile >> "CfgSettings" >> "BambiSettings" >> "spawnZoneVehicles"); +{ + _markerName = _x; + if (getMarkerType _markerName == "ExileSpawnZone") then + { + _markerCenterPosition = getMarkerPos _markerName; + { + _numberOfVehiclesToSpawn = _x select 0; + _vehicleClassName = _x select 1; + for "_i" from 1 to _numberOfVehiclesToSpawn do + { + _vehiclePosition = [_markerCenterPosition, _spawnRadius] call ExileClient_util_world_findRoadPosition; + if(_vehiclePosition isEqualTo [])exitWith{}; + _vehicleDirection = (random 360); + [_vehicleClassName, _vehiclePosition, _vehicleDirection, true] call ExileServer_object_vehicle_createNonPersistentVehicle; + }; + } + forEach _vehiclesToSpawn; + }; +} +forEach allMapMarkers; +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/code/ExileServer_world_spawnVehicles.sqf b/@exileserver/addons/exile_server/code/ExileServer_world_spawnVehicles.sqf new file mode 100644 index 0000000..1c3fb5d --- /dev/null +++ b/@exileserver/addons/exile_server/code/ExileServer_world_spawnVehicles.sqf @@ -0,0 +1,86 @@ +/** + * ExileServer_world_spawnVehicles + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_mapsizeX","_mapsizeY","_gridSize","_gridVehicles","_gridSizeOffset","_vehicleCount","_debugMarkers","_vehicleClassNames","_maximumDamage","_damageChance","_randomizeFuel","_fuel","_randomizeAmmo","_ammo","_xSize","_workingXSize","_ySize","_workingYSize","_position","_spawned","_spawnedPositions","_positionReal","_spawnControl","_vehicleClassName","_vehicle","_hitpointsData","_hitpoints","_debugMarker"]; +_mapsizeX = worldSize; +_mapsizeY = worldSize; +_gridSize = getNumber(configFile >> "CfgSettings" >> "VehicleSpawn" >> "vehiclesGridSize"); +_gridVehicles = getNumber(configFile >> "CfgSettings" >> "VehicleSpawn" >> "vehiclesGridAmount"); +format ["Spawning Dynamic Vehicles. GridSize: %1 Vehs/Grid: %2",_gridSize,_gridVehicles] call ExileServer_util_log; +_gridSizeOffset = _gridSize % 2; +_vehicleCount = 0; +_debugMarkers = ((getNumber(configFile >> "CfgSettings" >> "VehicleSpawn" >> "vehiclesDebugMarkers")) isEqualTo 1); +_vehicleClassNames = getArray (configFile >> "CfgSettings" >> "VehicleSpawn" >> "ground"); +_maximumDamage = getNumber (configFile >> "CfgSettings" >> "VehicleSpawn" >> "maximumDamage"); +_damageChance = getNumber (configFile >> "CfgSettings" >> "VehicleSpawn" >> "damageChance"); +_randomizeFuel = ((getNumber(configFile >> "CfgSettings" >> "VehicleSpawn" >> "randomizeFuel")) isEqualTo 1); +_fuel = (getNumber(configFile >> "CfgSettings" >> "VehicleSpawn" >> "fuel")); +_randomizeAmmo = ((getNumber(configFile >> "CfgSettings" >> "VehicleSpawn" >> "randomizeAmmo")) isEqualTo 1); +_ammo = (getNumber(configFile >> "CfgSettings" >> "VehicleSpawn" >> "ammo")); +for "_xSize" from 0 to _mapsizeX step _gridSize do +{ + _workingXSize = _xSize + _gridSizeOffset; + for "_ySize" from 0 to _mapsizeY step _gridSize do + { + _workingYSize = _ySize + _gridSizeOffset; + _position = [_workingXSize,_workingYSize]; + _spawned = 0; + _spawnedPositions = []; + while {_spawned < _gridVehicles} do + { + _positionReal = [_position, 25, _gridSize, 5, 0 , 1 , 0 , _spawnedPositions] call BIS_fnc_findSafePos; + if(count _positionReal isEqualTo 3)exitWith{}; + _spawnControl = [[(_positionReal select 0) - 50, (_positionReal select 1) + 50],[(_positionReal select 0) + 50,(_positionReal select 1) - 50]]; + _spawnedPositions pushBack _spawnControl; + _positionReal pushBack 0; + _vehicleClassName = selectRandom _vehicleClassNames; + _vehicle = [_vehicleClassName, _positionReal, random 360, true] call ExileServer_object_vehicle_createNonPersistentVehicle; + _hitpointsData = getAllHitPointsDamage _vehicle; + if !(_hitpointsData isEqualTo []) then + { + _hitpoints = _hitpointsData select 0; + { + if ((random 100) < _damageChance) then + { + _vehicle setHitPointDamage [_x, random _maximumDamage]; + }; + } + forEach _hitpoints; + }; + if (_randomizeFuel) then + { + _vehicle setFuel (random _fuel); + } + else + { + _vehicle setFuel _fuel; + }; + if (_randomizeAmmo) then + { + _vehicle setVehicleAmmo (random _ammo); + } + else + { + _vehicle setVehicleAmmo _ammo; + }; + if (_debugMarkers) then + { + _debugMarker = createMarker ["vehicleMarker#"+str _vehicleCount, _positionReal]; + _debugMarker setMarkerColor "ColorOrange"; + _debugMarker setMarkerType "mil_dot_noShadow"; + }; + _spawned = _spawned + 1; + _vehicleCount = _vehicleCount + 1; + }; + }; +}; +format ["Dynamic vehicles spawned. Count : %1",_vehicleCount] call ExileServer_util_log; +true \ No newline at end of file diff --git a/@exileserver/addons/exile_server/config.bin b/@exileserver/addons/exile_server/config.bin new file mode 100644 index 0000000..9f5e0b0 Binary files /dev/null and b/@exileserver/addons/exile_server/config.bin differ diff --git a/@exileserver/addons/exile_server/fsm/call.fsm b/@exileserver/addons/exile_server/fsm/call.fsm new file mode 100644 index 0000000..2867360 --- /dev/null +++ b/@exileserver/addons/exile_server/fsm/call.fsm @@ -0,0 +1,34 @@ +/*%FSM*/ +/*%FSM*/ +/* +item0[] = {"scheduled_call_F",1,4346,100.000000,-75.000000,200.000000,-25.000000,0.000000,"scheduled" \n "call" \n "FSM"}; +globals[] = {25.000000,1,0,0,16777215,640,480,1,22,6316128,1,-85.912735,315.605164,318.635895,-242.199982,202,603,1}; +window[] = {0,-1,-1,-1,-1,957,2128,3088,208,1,220}; +*//*%FSM*/ +class FSM +{ + fsmName = "Exile_call.fsm"; + class States + { + /*%FSM*/ + class scheduled_call_F + { + name = "scheduled_call_F"; + init = /*%FSM*/"format [""Unscheduled FSM called with: %1"",_this] call ExileServer_util_log;" \n + "(_this select 0) call (_this select 1);" \n + """Unscheduled FSM call finished"" call ExileServer_util_log;" \n + "true"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + }; + }; + /*%FSM*/ + }; + initState=""; + finalStates[] = + { + "scheduled_call_F", + }; +}; +/*%FSM*/ \ No newline at end of file diff --git a/@exileserver/addons/exile_server/fsm/main.fsm b/@exileserver/addons/exile_server/fsm/main.fsm new file mode 100644 index 0000000..effe7ef --- /dev/null +++ b/@exileserver/addons/exile_server/fsm/main.fsm @@ -0,0 +1,143 @@ +/*%FSM*/ +/*%FSM*/ +/* +item0[] = {"Start",0,250,775.000000,-50.000000,875.000000,0.000000,0.000000,"Start"}; +item1[] = {"Continue",8,218,775.000000,25.000000,875.000000,75.000000,0.000000,"Continue"}; +item2[] = {"Wait",2,250,775.000000,100.000000,875.000000,150.000000,0.000000,"Wait"}; +item3[] = {"Ground_Weapon_Ho",4,4314,650.000000,100.000000,750.000000,150.000000,0.000000,"Ground" \n "Weapon" \n "Holder"}; +item4[] = {"Weapon_Holder_Si",4,218,650.000000,175.000000,750.000000,225.000000,0.000000,"Weapon" \n "Holder" \n "Simulated"}; +item5[] = {"Loot",4,218,775.000000,175.000000,875.000000,225.000000,0.000000,"Loot"}; +item6[] = {"Groups",4,218,900.000000,175.000000,1000.000000,225.000000,0.000000,"Groups"}; +item7[] = {"All_Dead",4,218,900.000000,100.000000,1000.000000,150.000000,0.000000,"All" \n "Dead"}; +link0[] = {0,1}; +link1[] = {1,2}; +link2[] = {2,3}; +link3[] = {2,4}; +link4[] = {2,5}; +link5[] = {2,6}; +link6[] = {2,7}; +link7[] = {3,2}; +link8[] = {4,2}; +link9[] = {5,2}; +link10[] = {6,2}; +link11[] = {7,2}; +globals[] = {25.000000,1,0,0,0,640,480,1,455,6316128,1,507.138519,1104.597778,441.719635,-113.631027,979,1030,1}; +window[] = {2,-1,-1,-1,-1,968,234,1528,234,3,997}; +*//*%FSM*/ +class FSM +{ + fsmName = "main.fsm"; + class States + { + /*%FSM*/ + class Start + { + name = "Start"; + init = /*%FSM*/"_groundWeaponHolderInterval = 60 * getNumber (configFile >> ""CfgSettings"" >> ""GarbageCollector"" >> ""Ingame"" >> ""GroundWeaponHolder"" >> ""interval"");" \n + "_groundWeaponHolderLastTick = diag_tickTime;" \n + "" \n + "_weaponHolderSimulatedInterval = 60 * getNumber (configFile >> ""CfgSettings"" >> ""GarbageCollector"" >> ""Ingame"" >> ""WeaponHolderSimulated"" >> ""interval"");" \n + "_weaponHolderSimulatedLastTick = diag_tickTime;" \n + "" \n + "_allDeadInterval = 60 * getNumber (configFile >> ""CfgSettings"" >> ""GarbageCollector"" >> ""Ingame"" >> ""AllDead"" >> ""interval"");" \n + "_allDeadLastTick = diag_tickTime;" \n + "" \n + "_lootInterval = 60 * getNumber (configFile >> ""CfgSettings"" >> ""GarbageCollector"" >> ""Ingame"" >> ""Loot"" >> ""interval"");" \n + "_lootLastTick = diag_tickTime;" \n + "" \n + "_groupsInterval = 60 * getNumber (configFile >> ""CfgSettings"" >> ""GarbageCollector"" >> ""Ingame"" >> ""Groups"" >> ""interval"");" \n + "_groupsLastTick = diag_tickTime;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Continue + { + priority = 0.000000; + to="Wait"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Wait + { + name = "Wait"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Weapon_Holder_Si + { + priority = 0.000000; + to="Wait"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_ticktime - _weaponHolderSimulatedLastTick) >=_weaponHolderSimulatedInterval"/*%FSM*/; + action=/*%FSM*/"_weaponHolderSimulatedLastTick = diag_tickTime;" \n + "" \n + "call ExileServer_system_garbageCollector_unscheduled_deleteWeaponHolderSimulated;"/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Loot + { + priority = 0.000000; + to="Wait"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_ticktime - _lootLastTick) >=_lootInterval"/*%FSM*/; + action=/*%FSM*/"_lootLastTick = diag_tickTime;" \n + "" \n + "call ExileServer_system_garbageCollector_unscheduled_deleteLoot;"/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Groups + { + priority = 0.000000; + to="Wait"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_ticktime - _groupsLastTick) >=_groupsInterval"/*%FSM*/; + action=/*%FSM*/"_groupsLastTick = diag_tickTime;" \n + "" \n + "call ExileServer_system_garbageCollector_unscheduled_deleteGroups;"/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class All_Dead + { + priority = 0.000000; + to="Wait"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_ticktime - _allDeadLastTick) >=_allDeadInterval"/*%FSM*/; + action=/*%FSM*/"_allDeadLastTick = diag_tickTime;" \n + "" \n + "call ExileServer_system_garbageCollector_unscheduled_deleteAllDead;"/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Ground_Weapon_Ho + { + priority = 0.000000; + to="Wait"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_ticktime - _groundWeaponHolderLastTick) >=_groundWeaponHolderInterval"/*%FSM*/; + action=/*%FSM*/"_groundWeaponHolderLastTick = diag_tickTime;" \n + "" \n + "call ExileServer_system_garbageCollector_unscheduled_deleteGroundWeaponHolders;"/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + }; + initState="Start"; + finalStates[] = + { + }; +}; +/*%FSM*/ \ No newline at end of file diff --git a/@exileserver/addons/exile_server_config.pbo b/@exileserver/addons/exile_server_config.pbo new file mode 100644 index 0000000..45a1132 Binary files /dev/null and b/@exileserver/addons/exile_server_config.pbo differ diff --git a/@exileserver/addons/exile_server_config/$PREFIX$ b/@exileserver/addons/exile_server_config/$PREFIX$ new file mode 100644 index 0000000..84c09ae --- /dev/null +++ b/@exileserver/addons/exile_server_config/$PREFIX$ @@ -0,0 +1 @@ +exile_server_config \ No newline at end of file diff --git a/@exileserver/addons/exile_server_config/config.cpp b/@exileserver/addons/exile_server_config/config.cpp new file mode 100644 index 0000000..f55f7cb --- /dev/null +++ b/@exileserver/addons/exile_server_config/config.cpp @@ -0,0 +1,5768 @@ +/** + * config + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +class CfgPatches +{ + class exile_server_config + { + requiredVersion = 0.1; + requiredAddons[] = {}; + units[] = {}; + weapons[] = {}; + magazines[] = {}; + ammo[] = {}; + }; +}; + + +class CfgBuildings +{ + + /////////////////////////////////////////////////////////////////////////// + // Castles & Lighthouses & Life Guard Towers + /////////////////////////////////////////////////////////////////////////// + class Land_LifeguardTower_01_F + { + table = "Tourist"; + positions[] = {{-0.498047, -0.222656, 1.13312}}; + }; + + class Land_LightHouse_F + { + table = "Tourist"; + positions[] = {{-5.74805, 11.0859, -3.75002}, {0.789063, -2.94336, -11.0953}, {1.07813, -2.83008, 5.39755}}; + }; + + class Land_Lighthouse_small_F + { + table = "Tourist"; + positions[] = {{-0.369141, 1.18555, -3.39546}, {4.32617, -0.462891, -3.39546}}; + }; + + class Land_Castle_01_tower_F + { + table = "Tourist"; + positions[] = {{-1.66602, 0.603516, 7.94255}, {-1.99023, -1.70508, -1.0866}, {-2.14453, 2.73633, -3.95897}, {0.164063, 1.33203, -9.47995}, {1.14844, -1.18359, 7.94255}, {2.06641, 2.66992, -6.67494}, {2.15039, -1.89063, 1.70487}, {2.27344, 2.70703, 4.42336}}; + }; + + /////////////////////////////////////////////////////////////////////////// + // Military + /////////////////////////////////////////////////////////////////////////// + //"Land_Airport_center_F" + //"Land_Airport_left_F" + //"Land_Airport_right_F" + // TODO: "Land_Cargo_House_V2_F", + + class Land_TentHangar_V1_F + { + table = "Military"; + positions[] = {{-8.1582, -2.20703, -4.08853}, {-8.1582, 6.85547, -4.08853}, {-8.52734, -7.57227, -4.08853}, {7.76953, -7.64453, -4.08853}, {8.16016, 1.89453, -4.08853}, {8.57617, 7.48438, -4.08853}}; + }; + + class Land_Hangar_F + { + table = "Military"; + positions[] = {{-11.6641, 20.9063, -5.38129}, {-12.1133, 9.19336, -5.38129}, {-12.1543, -3.90625, -5.38129}, {-12.1816, -16.8906, -5.38129}, {1.75, 20.9688, -5.38129}, {11.3711, -19.2734, -5.38129}, {12.0469, -5.7168, -5.38129}, {12.7305, 6.83203, -5.38129}, {13.7285, 18.1602, -5.38129}}; + }; + + class Land_Airport_Tower_F + { + table = "Military"; + positions[] = {{-0.363281, 6.25586, -10.4415}, {-0.636719, -2.08203, -1.4408}, {-0.638672, 2.21875, -4.44063}, {-0.705078, 1.94336, -7.44128}, {-0.751953, 5.2793, 1.55464}, {-1.10742, -4.67578, 2.25613}}; + }; + + class Land_Cargo_House_V1_F + { + table = "Military"; + positions[] = {{-1.38281, 3.12109, 0.040287}, {1.24805, 2.54102, 0.0402873}}; + }; + + class Land_Cargo_House_V3_F + { + table = "Military"; + positions[] = {{-2.0918, 1.58984, -0.0957484}, {1.11914, 3.17969, 0.0402873}}; + }; + + class Land_Cargo_HQ_V1_F + { + table = "Military"; + positions[] = {{-0.294922, -3.42188, -3.27229}, {-1.46484, 3.26172, -3.27229}, {-2.02734, -2.62891, -0.747443}, {4.24609, 1.51758, -0.747443}, {4.98633, 3.64844, -3.27229}}; + }; + + class Land_Cargo_HQ_V2_F + { + table = "Military"; + positions[] = {{-1.25586, 1.48828, -0.747442}, {-1.50391, -2.52148, -3.27229}, {-1.50391, 2.67773, -3.27229}, {-1.9043, -4.61133, -0.747442}, {5.35156, 1.64648, -0.747442}, {5.5332, 3.30859, -3.27229}}; + }; + + class Land_Cargo_HQ_V3_F + { + table = "Military"; + positions[] = {{-1.56641, -2.93164, -0.747444}, {-1.81641, -4.90234, -3.27229}, {-1.89648, 0.654297, -3.27229}, {4.65234, 2.41602, -3.27229}, {5.24805, 1.60742, -0.747444}}; + }; + + class Land_u_Barracks_V2_F + { + table = "Military"; + // There are broken? + //positions[] = {{-0.505859, 3.2168, 0.605521}, {-0.601563, 3.07617, 3.9395}, {-11.0234, -2.65625, 0.60552}, {-11.1328, -3.58398, 3.9395}, {-12.377, 0.271484, 3.9395}, {-2.39453, -3.92773, 0.605342}, {-5.09766, -4.89844, 3.93943}, {-8.69922, 3.24414, 3.9395}, {-9.12695, 3.73047, 0.60552}, {10.3711, 3.51367, 0.605521}, {10.6484, 2.85156, 3.9395}, {13.0684, -3.30469, 0.605521}, {13.1934, -3.42383, 3.9395}, {3.28711, -3.98633, 0.605521}, {3.4707, -3.55469, 3.9395}, {6.22852, 3.50391, 3.9395}, {6.39258, 3.05664, 0.605521}}; + positions[] = {{9.75244, -1.66211, 1.43508}, {9.70215, -1.77148, -1.89791}, {-5.31592, -2.94531, -1.89791}, {-16.0903, 1.21094, -1.8979}, {6.95557, 4.13867, -1.89791}, {-14.6865, -2.08008, -1.89791}, {-3.89746, 3.95898, -1.89791}, {0.0639648, -2.16406, 1.43507}, {2.74951, 4.44336, 1.43507}, {2.84521, 4.22461, -1.89791}, {-12.3584, 4.30469, 1.43508}, {-12.1733, 4.46875, -1.89791}, {-16.123, 1.125, 1.43507}, {0.137695, -1.90625, -1.89791}, {-14.585, -1.94336, 1.43508}, {-5.88818, -3.99609, 1.43507}, {-3.96143, 4.37109, 1.43508}, {6.89014, 4.32227, 1.43507}}; + }; + + class Land_i_Barracks_V2_F + { + table = "Military"; + positions[] = {{-0.505859, 3.2168, 0.605521}, {-0.601563, 3.07617, 3.9395}, {-11.0234, -2.65625, 0.60552}, {-11.1328, -3.58398, 3.9395}, {-12.377, 0.271484, 3.9395}, {-2.39453, -3.92773, 0.605342}, {-5.09766, -4.89844, 3.93943}, {-8.69922, 3.24414, 3.9395}, {-9.12695, 3.73047, 0.60552}, {10.3711, 3.51367, 0.605521}, {10.6484, 2.85156, 3.9395}, {13.0684, -3.30469, 0.605521}, {13.1934, -3.42383, 3.9395}, {3.28711, -3.98633, 0.605521}, {3.4707, -3.55469, 3.9395}, {6.22852, 3.50391, 3.9395}, {6.39258, 3.05664, 0.605521}}; + }; + + class Land_i_Barracks_V1_F + { + table = "Military"; + positions[] = {{-0.464844, 3.49219, 0.605521}, {-0.476563, 3.95703, 3.9395}, {-10.4844, -3.32422, 3.9395}, {-11.1055, -2.92188, 0.605521}, {-12.3066, 0.222656, 0.605521}, {-2.29688, -4.23828, 0.605283}, {-3.89648, -4.80078, 3.93923}, {-8.66992, 3.86328, 0.605521}, {-9.03516, 3.31055, 3.9395}, {10.3301, 2.77734, 0.605521}, {10.4023, 3.18945, 3.9395}, {13.0352, -3.23438, 3.9395}, {13.1738, -3.31055, 0.605521}, {3.57227, -3.49414, 0.605522}, {3.61133, -2.98047, 3.9395}, {6.38281, 3.41992, 0.60552}, {6.4082, 2.87695, 3.9395}}; + }; + + class Land_Cargo_Patrol_V1_F + { + table = "Military"; + positions[] = {{-1.6875, -1.03906, -0.55952}, {1.73828, -1.17383, -0.55952}}; + }; + + class Land_Cargo_Patrol_V2_F + { + table = "Military"; + positions[] = {{-1.01953, -1.0918, -0.55952}, {1.82031, -0.695313, -0.55952}}; + }; + + class Land_Cargo_Tower_V1_F + { + table = "Military"; + positions[] = {{-3.54785, -3.01758, 2.47987},{-3.15625, -0.837891, 5.00472},{-2.0498, -3.29883, -0.120125},{4.55957, 4.39258, -0.120125},{-4.42383, 2.45117, -0.120125},{-2.87598, 2.20898, -4.2958},{-2.88281, 4.14258, 5.00472},{0.235352, -1.19727, 5.07987},{3.58105, 4.11719, 2.47988},{1.27441, 3.17773, -8.24333},{2.50488, 0.0625, 5.00472}}; + }; + + class Land_Cargo_Tower_V1_No1_F + { + table = "Military"; + positions[] = {{-2.4668, -4.10156, 5.00471}, {-2.7168, 1.0625, -0.120123}, {-2.83984, -2.95313, 2.47987}, {-3.06641, -2.66992, -0.120123}, {-3.12109, 2.42773, -4.2958}, {-3.16211, 4.51563, 5.00471}, {1.26367, 2.49609, -8.24333}, {2.25195, 4.30664, -0.120123}, {3.34766, 3.33203, 2.47987}, {3.66797, 1.8457, 5.00471}}; + }; + + class Land_Cargo_Tower_V1_No2_F + { + table = "Military"; + positions[] = {{-2.71289, 3.0957, -0.120123}, {-2.83203, 5.06445, 5.00472}, {-3.48633, 2.28906, -4.2958}, {-3.64844, -2.87891, 2.47988}, {-3.77344, -3.32617, 5.00472}, {-3.80664, -1.75977, -0.120123}, {0.0625, -0.287109, 5.07988}, {1.58984, -2.11523, -0.120123}, {2.13672, 2.20703, -8.24332}, {3.57422, 4.22461, 2.47988}, {3.75, 1.31055, 5.00472}, {4.98633, 3.90625, -0.120123}}; + }; + + class Land_Cargo_Tower_V1_No3_F + { + table = "Military"; + positions[] = {{-0.214844, -0.460938, 5.07988}, {-2.33203, -2.96094, -0.120119}, {-2.89648, -4.0625, 5.00472}, {-3.08008, -2.8125, 2.47988}, {-3.28711, 2.60352, -4.2958}, {-3.61328, 4.44141, 5.00472}, {-4.01758, 1.86133, -0.120119}, {1.54688, 2.61133, -8.24332}, {3.52734, 3.8418, 2.47988}, {3.5332, -0.386719, 5.00472}, {4.88477, 4.18945, -0.120119}}; + }; + + class Land_Cargo_Tower_V1_No4_F + { + table = "Military"; + positions[] = {{-2.68555, -3.07031, -0.120119}, {-2.93359, -4.27148, 5.00472}, {-3.22461, 4.84375, 5.00472}, {-3.6543, 1.57227, -4.2958}, {-3.70508, -3.0332, 2.47988}, {-4.26367, 0.980469, -0.120119}, {2.1543, 2.08789, -8.24332}, {3.46289, 2.25781, 2.47988}, {3.62305, 2.16797, 5.00472}, {5.10156, 4.20898, -0.120119}}; + }; + + class Land_Cargo_Tower_V1_No5_F + { + table = "Military"; + positions[] = {{-2.25781, -2.77344, -0.120119}, {-2.375, -4.45508, 5.00472}, {-2.41602, 5.18164, 5.00472}, {-2.94922, 2.4082, -4.2958}, {-3.89648, -2.7832, 2.47988}, {-4.03906, 1.43945, -0.120119}, {0.0410156, -0.8125, 5.07988}, {1.62305, 2.55664, -8.24332}, {2.97461, -0.335938, 5.00472}, {3.90039, 3.68555, 2.47988}, {4.80859, 3.57422, -0.120117}}; + }; + + class Land_Cargo_Tower_V1_No6_F + { + table = "Military"; + positions[] = {{-1.6875, -2.5918, -0.120119}, {-3.16992, -3.74219, 5.00472}, {-3.41797, 1.87305, -0.120119}, {-3.49805, 2.06836, -4.2958}, {-3.81055, 4.59766, 5.00472}, {-3.92969, -2.12109, 2.47988}, {1.92578, 2.27344, -8.24332}, {3.50195, 2.76563, 2.47988}, {3.64258, 0.0078125, 5.00472}, {5.19141, 4.45117, -0.120119}}; + }; + + class Land_Cargo_Tower_V1_No7_F + { + table = "Military"; + positions[] = {{-2.59766, -3.14063, -0.120119}, {-2.7832, 1.94531, -4.2958}, {-2.83203, 1.58594, -0.120119}, {-3.20508, 4.62891, 5.00472}, {-3.29883, -2.90234, 5.00472}, {-3.87891, -3.11914, 2.47988}, {0.228516, -1.05273, 5.07988}, {1.65234, 2.58594, -8.24332}, {3.40039, 3.05859, 2.47988}, {4.18164, 0.246094, 5.00472}, {4.42578, 3.99805, -0.120119}}; + }; + + class Land_Cargo_Tower_V2_F + { + table = "Military"; + positions[] = {{4.29492, 3.70508, -0.120117}, {-2.5293, -3.10742, 2.47988}, {-2.6543, 2.01172, -4.2958}, {-2.66797, -3.4707, 5.00472}, {-2.67773, 4.97461, 5.00472}, {-3.06836, 1.80273, -0.120117}, {-3.25586, -3.56445, -0.120117}, {0.611328, 0.0214844, 5.07988}, {2.46094, 1.92383, -8.24332}, {2.61328, -0.296875, 2.47988}, {3.07422, 4.14063, 2.47988}, {3.50195, 1.22656, 5.00472}}; + }; + + class Land_Cargo_Tower_V3_F + { + table = "Military"; + positions[] = {{-1.59375, -2.7168, -0.120119}, {-2.40039, 2.39648, -4.2958}, {-3.24023, -3.17773, 5.00472}, {-3.51367, 4.57617, 5.00472}, {-3.70703, -3.60547, 2.47988}, {-4.54883, 2.47266, -0.120119}, {0.142578, -0.179688, 5.07988}, {2.2793, 2.25391, -8.24332}, {3.87109, 3.3418, 2.47988}, {4.22656, 0.390625, 5.00472}, {5.05469, 4.16406, -0.120119}}; + }; + + class Land_MilOffices_V1_F + { + table = "Military"; + positions[] = {{-11.6309, -5.04492, -2.86675}, {-15.1172, 9.07617, -2.86675}, {-15.123, 2.19336, -2.86675}, {-15.5938, -4.07227, -2.86675}, {-3.46484, -3.22266, -2.86675}, {-4.10352, 9.33398, -2.86675}, {-7.09766, -2.95898, -2.86675}, {-8.6582, 9.02344, -2.86675}, {0.794922, -3.08594, -2.86675}, {1.45703, 8.60156, -2.86675}, {13.9258, 0.492188, -2.86675}, {15.3613, 8.10742, -2.86675}, {8.54883, 8.01563, -2.86675}, {8.61133, -4.3125, -2.86675}, {8.68359, -1.73438, -2.86675}}; + }; + + class Land_Radar_F + { + table = "Military"; + positions[] = {{-10.1797, -9.80859, -6.00412}, {-9.61719, 10.4219, -6.00412}, {11.6211, 1.06641, -6.00412}, {2.81445, 12.2578, -7.78305}}; + }; + + /////////////////////////////////////////////////////////////////////////// + // Medical + /////////////////////////////////////////////////////////////////////////// + //"Land_Hospital_main_F", + //"Land_Hospital_side1_F", + //"Land_Hospital_side2_F", + class Land_Medevac_house_V1_F + { + table = "Medical"; + positions[] = {{-1.25, 1.01367, -0.105749}, {1.38281, 2.82227, 0.0302868}}; + }; + + class Land_Medevac_HQ_V1_F + { + table = "Medical"; + positions[] = {{-0.896484, 2.24219, -3.26622}, {-1.45898, -3.75391, -3.26622}, {-1.54297, 1.05469, -0.741375}, {5.17578, 2.66992, -3.26622}, {5.6875, 1.63477, -0.741374}}; + }; + + /////////////////////////////////////////////////////////////////////////// + // Garages / Vehicle + /////////////////////////////////////////////////////////////////////////// + class Land_FuelStation_Build_F + { + table = "VehicleService"; + positions[] = {{-1.02344, -0.509766, -1.33601}, {2.07617, 0.580078, -1.3361}}; + }; + + class Land_i_Garage_V1_F + { + table = "VehicleService"; + positions[] = {{-0.925781, 2.05469, -0.0974805}, {-1.52539, -1.99805, -0.0974805}, {3.80273, -0.939453, -0.0974805}}; + }; + + class Land_i_Garage_V2_F + { + table = "VehicleService"; + positions[] = {{-0.00585938, -1.24609, -0.0974801}, {-2.16016, 1.54492, -0.0974798}, {1.60547, 2.11719, -0.0974803}, {3.2832, -1.51953, -0.0974796}}; + }; + + class Land_CarService_F + { + table = "VehicleService"; + positions[] = {{-0.964844, 1.77148, -1.25606}, {-3.15625, 7.39844, -1.25606}, {-4.54688, 4, -1.25606}, {0.492188, 2.8457, -1.25606}, {3.50781, -0.113281, -1.25606}, {3.74414, 6.12891, -1.25606}}; + }; + + /////////////////////////////////////////////////////////////////////////// + // Civillian Lower Class + /////////////////////////////////////////////////////////////////////////// + // TODO: "Land_u_Addon_02_V1_F", + // TODO: "Land_i_Addon_02_V1_F", + // TODO: "Land_i_Addon_03mid_V1_F", + + class Land_Chapel_Small_V1_F + { + table = "CivillianLowerClass"; + positions[] = {{0.482422, 0.65625, -0.867858}, {3.08984, -1.2832, -0.867858}}; + }; + + class Land_Chapel_Small_V2_F + { + table = "CivillianLowerClass"; + positions[] = {{0.556641, -0.966797, -0.867857}, {3.54297, 0.486328, -0.867857}}; + }; + + class Land_Chapel_V1_F + { + table = "CivillianLowerClass"; + positions[] = {{-3.22852, -3.4043, -2.80848}, {-3.65625, 2.8418, -2.80848}, {-6.47266, -2.20703, -2.80848}, {3.98438, 2.72852, -2.80848}, {4.73242, -2.59375, -2.80848}, {9.35938, -0.285156, -2.60848}}; + }; + + class Land_Chapel_V2_F + { + table = "CivillianLowerClass"; + positions[] = {{-2.36523, 2.46289, -2.80848}, {-3.06445, -2, -2.80848}, {-6.61328, -1.54688, -2.80848}, {4.75781, 3.67383, -2.80848}, {4.82813, -2.96484, -2.80848}, {9.03711, 0.316406, -2.60848}}; + }; + + class Land_Church_01_V1_F + { + table = "CivillianLowerClass"; + positions[] = {{-4.36719, -5.81055, -5.46942}, {-4.46875, -2.23633, -5.74363}, {-4.54492, 1.57422, -5.74363}, {-4.8125, 5.58789, -5.49442}, {3.00781, -5.92969, -6.44017}, {4.19141, 5.77148, -6.44865}}; + }; + + class Land_i_Addon_03_V1_F + { + table = "CivillianLowerClass"; + positions[] = {{-2.98828, -0.244141, -0.0501008}, {3.53711, -0.578125, -0.0501013}}; + }; + + class Land_i_Addon_04_V1_F + { + table = "CivillianLowerClass"; + positions[] = {{-1.25, 0.0175781, 0.0796976}}; + }; + + class Land_u_Addon_01_V1_F + { + table = "CivillianLowerClass"; + positions[] = {{1.69727, 3.04102, 0.0627024}, {4.28125, 1.1543, 0.0627022}}; + }; + + class Land_i_Windmill01_F + { + table = "CivillianLowerClass"; + positions[] = {{-0.585938, 0.908203, -3.53162}}; + }; + + class Land_d_Windmill01_F + { + table = "CivillianLowerClass"; + positions[] = {{-0.935547, 0.259766, -2.2985}, {-1.65039, 0.365234, 0.947132}}; + }; + + class Land_Slum_House01_F + { + table = "CivillianLowerClass"; + positions[] = {{0.767578, 0.773438, -1.07847}}; + }; + + class Land_Slum_House02_F + { + table = "CivillianLowerClass"; + positions[] = {{1.13867, 2.50391, -0.798099}, {1.59375, -0.0566406, -0.798099}}; + }; + + class Land_Slum_House03_F + { + table = "CivillianLowerClass"; + positions[] = {{-1.29688, 0.566406, -1.07377}, {2.27148, 1.125, -1.07377}}; + }; + + class Land_cargo_house_slum_F + { + table = "CivillianLowerClass"; + positions[] = {{-3.04688, -0.306641, -0.36025}}; + }; + + class Land_i_Stone_HouseBig_V1_F + { + table = "CivillianLowerClass"; + positions[] = {{-0.777344, 2.19922, 1.21893}, {-1.33789, 0.355469, -1.65434}, {1.58594, -0.576172, 1.21893}, {3.7793, 1.48828, -1.64097}}; + }; + + class Land_i_Stone_HouseBig_V2_F + { + table = "CivillianLowerClass"; + positions[] = {{-0.207031, 2.62305, 1.21893}, {-1.26953, 0.136719, -1.65416}, {2.55078, -0.556641, 1.21893}, {4.26367, 1.48828, -1.63971}}; + }; + + class Land_i_Stone_HouseBig_V3_F + { + table = "CivillianLowerClass"; + positions[] = {{-0.484375, 2.57617, 1.21893}, {-0.759766, 0.404297, -1.65283}, {2.29102, -1.02539, 1.21893}, {4.02734, 1.1543, -1.64032}}; + }; + + class Land_i_Stone_HouseSmall_V1_F + { + table = "CivillianLowerClass"; + positions[] = {{-3.47656, 2.25195, -0.627007}, {-6.96094, 3.02539, -0.619827}, {3.27148, 2.02734, -0.611488}, {6.61914, 2.50977, -0.596566}}; + }; + + class Land_i_Stone_HouseSmall_V2_F + { + table = "CivillianLowerClass"; + positions[] = {{-2.41992, 1.76758, -0.632064}, {-7.00391, 1.83594, -0.633547}, {3.77148, 2.05664, -0.609262}, {7.33008, 2.02539, -0.593399}}; + }; + + class Land_i_Stone_HouseSmall_V3_F + { + table = "CivillianLowerClass"; + positions[] = {{-2.68945, 2.05664, -0.628867}, {-7.74023, 3.45313, -0.615288}, {3.60938, 1.61328, -0.609982}, {6.83984, 3.07227, -0.595582}}; + }; + + class Land_i_Stone_Shed_V1_F + { + table = "CivillianLowerClass"; + positions[] = {{-2.63867, 1.96484, -0.100502}, {1.19141, 2.16992, -0.100502}}; + }; + + class Land_i_Stone_Shed_V2_F + { + table = "CivillianLowerClass"; + positions[] = {{-2.12305, 1.86914, -0.100502}, {1.78125, 1.625, -0.100502}}; + }; + + class Land_i_Stone_Shed_V3_F + { + table = "CivillianLowerClass"; + positions[] = {{-2.3125, 2.05469, -0.100502}, {1.79297, 1.93359, -0.100502}}; + }; + + class Land_u_House_Big_01_V1_F + { + table = "CivillianLowerClass"; + positions[] = {{-1.89648, 6.0332, 0.855065}, {-2.35742, 5.4082, -2.56494}, {-2.89648, -3.33203, 0.855065}, {-3.0957, -0.896484, -2.65494}, {1.25, -1.31445, -2.56494}, {2.0293, -0.521484, 0.855065}, {2.36523, 5.47461, -2.56493}, {2.95117, 5.49609, 0.855065}, {2.99023, -5.02734, 0.855065}, {3.58789, -4.98828, -2.56494}}; + }; + + class Land_u_House_Big_02_V1_F + { + table = "CivillianLowerClass"; + positions[] = {{-2.43164, 2.83008, 0.965823}, {-2.70703, -2.07422, 0.965824}, {-2.88281, 1.88086, -2.54418}, {0.871094, -1.66016, -2.54418}, {2.41602, 3.00977, 0.965824}, {3.66992, -5.79883, -2.10418}, {3.9082, 3.56055, -2.54418}}; + }; + + class Land_u_House_Small_01_V1_F + { + table = "CivillianLowerClass"; + positions[] = {{-1.18359, 3.63281, -0.904629}, {-1.7793, -2.59961, -0.903945}, {3.25195, 3.44531, -0.904572}}; + }; + + class Land_u_House_Small_02_V1_F + { + table = "CivillianLowerClass"; + positions[] = {{-0.916016, -2.17969, -0.71971}, {-1.49609, 0.962891, -0.714579}, {3.83203, 1.15234, -0.713537}, {5.80469, -1.7207, -0.710968}}; + }; + + /////////////////////////////////////////////////////////////////////////// + // Civillian Upper Class + /////////////////////////////////////////////////////////////////////////// + class Land_Offices_01_V1_F + { + table = "CivillianUpperClass"; + positions[] = {{-13.502, -6.54883, 9.84601}, {10.7676, -5.27734, 4.66547}, {-10.7031, 6.85156, -7.05899}, {-3.26953, 5.84961, 9.84601}, {1.09375, -4.51172, -7.05899}, {5.52148, 2.22852, 0.752261}, {5.68164, 4.16602, -7.05899}, {5.94531, -2.68945, -3.15997}, {6.1875, 2.40625, 4.66546}, {9.07422, -4.97656, 9.84601}}; + }; + + class Land_i_House_Big_01_V1_F + { + table = "CivillianUpperClass"; + positions[] = {{-2.21484, 5.46875, -2.56493}, {-3.24023, -1.5918, -2.65493}, {0.558594, -0.640625, 0.855072}, {1.24023, -1.98828, -2.56493}, {1.66602, -5.2832, 0.855072}, {2.19531, 5.19922, -2.56493}, {2.4375, 5.01172, 0.855076}, {2.87305, -5.01758, -2.56493}}; + }; + + class Land_i_House_Big_01_V2_F + { + table = "CivillianUpperClass"; + positions[] = {{-2.05078, 5.41016, 0.855071}, {-2.11133, 5.51758, -2.56493}, {-3.19531, -1.45117, -2.65493}, {0.328125, 0.283203, -2.56493}, {0.759766, -1.29688, 0.855071}, {1.27539, -5.21484, 0.855071}, {2.25195, -4.56445, -2.56493}, {3.68359, 5.18359, 0.855071}}; + }; + + class Land_i_House_Big_01_V3_F + { + table = "CivillianUpperClass"; + positions[] = {{-2.78125, 5.69336, -2.56493}, {-2.7832, 5.31055, 0.855072}, {-2.78906, 0.654297, 0.855072}, {-3.03906, -1.11133, -2.65493}, {0.675781, -1.29883, -2.56493}, {1.61133, -0.865234, 0.855072}, {2.51758, 5.85938, 0.855072}, {2.65625, -4.94531, -2.56493}, {2.99414, -5.15625, 0.855073}, {3.16211, 5.16406, -2.56493}}; + }; + + class Land_i_House_Big_02_V1_F + { + table = "CivillianUpperClass"; + positions[] = {{-1.69141, -2.51172, 0.784063}, {-2.58789, 3.63672, 0.784063}, {-2.86914, 2.97266, -2.62327}, {1.15234, -1.65625, -2.62327}, {2.55273, 1.625, 0.784063}, {3.08203, 2.11914, -2.62327}, {3.33594, -5.625, -2.28594}}; + }; + + class Land_i_House_Big_02_V2_F + { + table = "CivillianUpperClass"; + positions[] = {{-2.08789, -2.46484, 0.784063}, {-2.54688, 2.53906, -2.62327}, {-3.01758, 3.12109, 0.784063}, {1.11328, -1.46289, -2.62327}, {2.68945, 2.03711, 0.784063}, {3.02734, 2.27344, -2.62327}, {3.26367, -5.55273, -2.28594}}; + }; + + class Land_i_House_Big_02_V3_F + { + table = "CivillianUpperClass"; + positions[] = {{-2.50391, -2.10742, -2.62327}, {-3.00781, 3.68164, 0.784063}, {-3.0957, 2.57227, -2.62327}, {-3.31055, -2.88867, 0.784063}, {1.26953, -1.73438, -2.62327}, {2.40234, 2.26953, -2.62327}, {2.89844, 2.11719, 0.784064}, {3.26758, -5.52734, -2.28594}}; + }; + + class Land_i_House_Small_01_V1_F + { + table = "CivillianUpperClass"; + positions[] = {{-1.2207, 3.05078, -1.0419}, {-2.74414, -0.560547, -1.04199}, {3.06641, -1.90234, -1.0404}, {3.35547, 2.94336, -1.04187}}; + }; + + class Land_i_House_Small_01_V2_F + { + table = "CivillianUpperClass"; + positions[] = {{-2.53711, -1.80664, -1.0418}, {-3.90625, 3.26367, -1.04239}, {3.31836, -1.31641, -1.04058}, {3.38672, 3.78906, -1.04213}}; + }; + + class Land_i_House_Small_01_V3_F + { + table = "CivillianUpperClass"; + positions[] = {{-0.738281, 3.17578, -1.04194}, {-2.46094, -2.16992, -1.04174}, {-2.68359, -1.76563, -1.04187}, {-2.76563, 3.31641, -1.04232}, {3.07422, -1.27539, -1.04059}, {3.08398, 3.04883, -1.0419}, {3.41406, 3.10547, -1.04192}, {3.61719, -0.394531, -1.04086}}; + }; + + class Land_i_House_Small_02_V1_F + { + table = "CivillianUpperClass"; + positions[] = {{-1.08008, -2.11133, -0.709651}, {-1.18945, 0.785156, -0.705689}, {2.64258, -2.09766, -0.704848}, {5.95313, 0.556641, -0.700583}}; + }; + + class Land_i_House_Small_02_V2_F + { + table = "CivillianUpperClass"; + positions[] = {{-1.29688, 1.06641, -0.704727}, {-1.56836, -1.83789, -0.710279}, {2.85352, -1.52148, -0.704572}, {2.88086, 1.76367, -0.702332}, {5.21289, 0.935547, -0.701534}}; + }; + + class Land_i_House_Small_02_V3_F + { + table = "CivillianUpperClass"; + positions[] = {{-1.35352, 0.873047, -0.705387}, {-1.5, -2.00781, -0.710184}, {3.49219, -1.16602, -0.703744}, {5.61328, 1.51367, -0.70101}}; + }; + + class Land_i_House_Small_03_V1_F + { + table = "CivillianUpperClass"; + positions[] = {{-3.89648, -0.134766, -0.371629}, {0.419922, 2.68555, -0.371629}, {3.59961, 2.0918, -0.371629}, {3.70703, -4.19727, -0.371629}}; + }; + + /////////////////////////////////////////////////////////////////////////// + // Shops + /////////////////////////////////////////////////////////////////////////// + class Land_i_Shop_01_V1_F + { + table = "Shop"; + positions[] = {{-0.863281, 6.10938, -2.76158}, {-1.2168, 0.232422, -2.76158}, {-1.2832, -0.884766, 1.10984}, {-2.28516, 6.1875, 1.10975}}; + }; + + class Land_i_Shop_01_V2_F + { + table = "Shop"; + positions[] = {{-1.17969, 5.32813, -2.76158}, {-18.127, 16.7285, -2.74088}, {-2.39258, 5.51563, 1.10978}, {-2.53906, 0.253906, -2.76158}, {-2.70703, -1.4707, 1.10992}, {-24.2051, 3.65039, 1.25308}, {1.15625, 1.20313, 1.10906}}; + }; + + class Land_i_Shop_01_V3_F + { + table = "Shop"; + positions[] = {{-1.5918, 5.35156, -2.76158}, {-2.39258, -0.544922, -2.76158}, {-2.73242, -1.03906, 1.10991}, {-2.98242, 5.80664, 1.10999}, {1.66016, 1.70508, 1.10901}}; + }; + + class Land_i_Shop_02_V1_F + { + table = "Shop"; + positions[] = {{-0.824219, 1.10742, -2.67036}, {-4.04883, -3.18555, 1.2386}, {-4.43359, -1.98242, -2.69136}, {0.78125, -2.35547, -2.66928}, {2.27734, 1.0957, 1.2386}}; + }; + + class Land_i_Shop_02_V2_F + { + table = "Shop"; + positions[] = {{-0.171875, -1.43359, -2.66855}, {-2.57422, -4.19336, 1.23859}, {-4.51758, 2.74023, -2.66855}, {1.61523, 0.28125, 1.23859}}; + }; + + class Land_i_Shop_02_V3_F + { + table = "Shop"; + positions[] = {{-1.01953, 0.71875, -2.66924}, {-2.86719, -3.83594, 1.23859}, {-4.25195, 3.58789, -2.66855}, {1.56641, 0.509766, 1.23859}}; + }; + + class Land_u_Shop_01_V1_F + { + table = "Shop"; + positions[] = {{-1.14258, 1.23438, -2.88084}, {-2.32422, 3.14648, 0.9905}, {-3.31836, 5.81836, 0.990853}, {0.808594, -0.544922, 0.990474}, {2.58789, 5.81641, -2.88084}}; + }; + + class Land_u_Shop_02_V1_F + { + table = "Shop"; + positions[] = {{-3.46484, -1.625, 1.23859}, {-3.9082, 3.0957, -2.66855}, {0.751953, -3.26563, -2.66855}, {1.71484, 0.486328, 1.23859}}; + }; + + class Land_Kiosk_blueking_F + { + table = "Shop"; + positions[] = {{-1.62109, 0.341797, -1.76588}, {1.36328, -0.908203, -1.76588}}; + }; + + class Land_Kiosk_gyros_F + { + table = "Shop"; + positions[] = {{-1.20898, -1.07813, -1.97606}, {1.26758, -0.128906, -1.97606}}; + }; + + class Land_Kiosk_redburger_F + { + table = "Shop"; + positions[] = {{-1.07617, -0.335938, -2.87051}, {1.42188, -0.373047, -2.87051}}; + }; + + /////////////////////////////////////////////////////////////////////////// + // Industrial + /////////////////////////////////////////////////////////////////////////// + class Land_Unfinished_Building_01_F + { + table = "Industrial"; + positions[] = {{-0.158203, 3.50391, 1.19791}, {-2.34375, 4.20898, -2.29709}, {-2.51563, 0.337891, 1.19791}, {-3.25391, 0.0351563, -2.29709}, {2.45508, -0.144531, -2.29709}, {3.10742, -2.34766, 1.19791}}; + }; + + class Land_Unfinished_Building_02_F + { + table = "Industrial"; + positions[] = {{-0.890625, -3.35742, 0.976167}, {-2.31055, -1.57227, -2.48553}, {-6.36523, 2.20898, 0.976168}, {-6.58398, 3.67383, -2.50139}, {3.58008, 3.13281, -2.49362}, {4.33594, 3.00391, 0.976168}}; + }; + + class Land_WIP_F + { + table = "Industrial"; + positions[] = {{-10.0645, -4.58398, 8.3499}, {-12.5254, 10.1191, 8.348}, {-13.3496, 9.04883, 12.3173}, {-14.3477, -2.64844, 0.392311}, {-15.1621, 9.90039, 0.407514}, {-15.9004, -9.26367, 12.3304}, {-16.0352, -2.52734, 4.32572}, {-16.0996, 4.24023, 0.444829}, {-16.4004, 8.88672, 4.32572}, {-16.7813, -8.80078, 0.347982}, {-17.0195, -8.72852, 4.32572}, {-3.60156, -14.6484, 4.32041}, {-4.18359, -1.03516, 0.386505}, {-6.93359, -0.988281, 12.1457}, {-7.66016, 9.24414, 0.417827}, {-7.77344, -10.4785, 0.359629}, {-8.33008, -14.7305, 12.3244}, {-8.73242, 9.51953, 4.32572}, {-8.88867, -13.3887, 0.355543}, {11.9922, -7.99219, 12.2546}, {12.9023, 9.91797, 0.448912}, {18.0801, -9.25781, 4.32428}, {19.5586, -7.8457, 8.33803}, {2.11719, 9.48438, 0.337147}, {20.6309, -9.31445, 0.329187}, {22.334, -2.5332, 4.32572}, {24.0859, -0.179688, 8.29181}, {3.30859, 6.66602, 8.36808}, {3.99219, -8.87891, 8.34295}, {4.74414, -8.89063, 4.32432}, {6.0332, -8.34961, 0.384681}, {7.08984, 10.4727, 4.32572}, {8.53906, 8.4082, 0.415831}, {9.10742, -1.40625, 0.431863}, {9.64844, 6.28906, 12.3112}}; + }; + + class Land_dp_smallTank_F + { + table = "Industrial"; + positions[] = {{-0.0898438, -1.58203, 5.32797}}; + }; + + class Land_dp_bigTank_F + { + table = "Industrial"; + positions[] = {{-1.54102, -1.93359, 3.59794}, {-5.79883, -0.496094, 3.59794}, {5.9707, -1.84375, 3.59794}}; + }; + + class Land_u_Shed_Ind_F + { + table = "Industrial"; + positions[] = {{-2.41211, 4.91602, -1.40862}, {-6.54688, -0.166016, -1.40862}, {10.6914, 2.14648, -1.40862}}; + }; + + class Land_Metal_Shed_F + { + table = "Industrial"; + positions[] = {{-3.34375, -1.80273, -1.343}, {3.52539, -2.15625, -1.343}}; + }; + + class Land_i_Shed_Ind_F + { + table = "Industrial"; + positions[] = {{-2.66797, -0.576172, -1.40977}, {-2.85547, 6.49023, -1.40977}, {-5.78906, 0.158203, -1.40977}, {14.1348, 6.31445, -1.40977}, {5.70508, 0.423828, -1.40977}, {6.49609, 6.5625, -1.40977}}; + }; + + class Land_Research_house_V1_F + { + table = "Industrial"; + positions[] = {{-1.28516, 2.89258, 0.0302877}, {1.12305, 2.04492, -0.0384929}}; + }; + + class Land_Research_HQ_F + { + table = "Industrial"; + positions[] = {{-1.03125, 2.60547, -3.26622}, {-2.25195, -2.75586, -0.741376}, {-2.28711, -3.94141, -3.26622}, {4.69336, 4.01172, -3.26622}, {6.06445, 3.50391, -0.741376}}; + }; + + /////////////////////////////////////////////////////////////////////////// + // Factories + /////////////////////////////////////////////////////////////////////////// + class Land_Factory_Main_F + { + table = "Factories"; + positions[] = {{-8.51953,13.5698,-6.45422}, {-8.75,10.9609,-6.41479}}; + }; + + class Land_dp_smallFactory_F + { + table = "Factories"; + positions[] = {{-1.97266, 3.14844, 2.62608}, {-6.49609, -4.92773, 2.82442}, {5.32422, -3.69531, 2.95848}, {9.49805, -4.71094, 1.21193}, {9.95898, 1.41211, 1.21193}}; + }; + + class Land_dp_mainFactory_F + { + table = "Factories"; + positions[] = {{-12.8477, -4.8457, -4.45162}, {-15.4961, 6.70703, -4.45162}, {-6.36133, -2.13477, 1.18268}, {-6.91211, -15.3555, 1.18268}, {0.736328, 8.16406, 1.18268}, {1.25391, -10.5801, 1.18268}, {12.8926, 7.0332, -5.51301}, {13.0332, -3.95117, -4.22302}, {13.1719, 4.60742, -4.22302}, {13.2676, 0.710938, -4.22302}, {14.793, -16.8613, -4.08302}, {18.1406, -9.24023, -4.08302}, {19.0566, 5.17969, -7.61482}, {19.0996, -5.68555, -5.51301}, {19.3535, 2.14844, -5.51301}, {3.43555, -2.94141, 1.18268}, {8.82617, -7.33008, -0.280016}, {8.92773, -13.9453, -0.280016}, {9.13281, 8.58203, -0.280016}}; + }; + + /////////////////////////////////////////////////////////////////////////// + // Ghost Hotel + /////////////////////////////////////////////////////////////////////////// + class Land_GH_Gazebo_F + { + table = "Radiation"; + positions[] = {{-5.93945, 2.15894, -1.77238},{-5.90332, -0.724121, -1.77238},{5.104, 2.22534, -1.77238},{5.26807, -0.790771, -1.77238}}; + }; + + class Land_GH_House_1_F + { + table = "Radiation"; + positions[] = {{-3.49902, -6.07056, 1.39883},{-3.23633, 0.0153809, 1.39883},{3.36963, 0.337891, 1.39883},{3.39404, -5.21753, 1.39883},{-3.65332, -3.97876, -2.10117},{-3.35889, 0.632324, -2.10117},{3.23438, -5.31934, -2.10117}}; + }; + + class Land_GH_House_2_F + { + table = "Radiation"; + positions[] = {{3.26563, -5.11426, -0.336174},{-3.23242, -5.51929, -0.336174},{-3.59033, 0.983643, -0.336174},{3.69287, 0.738281, -0.336174}}; + }; + + class Land_GH_House_ruins_F + { + table = "Radiation"; + positions[] = {{3.16553, -1.15942, 5.97215},{-3.26416, -0.868408, 5.97215}}; + }; + + class Land_GH_MainBuilding_entry_F + { + table = "Radiation"; + positions[] = {{-3.65039, -17.2097, -0.152101},{-0.499023, -14.7449, -0.152101},{4.09717, -17.7261, -0.152101}}; + }; + + class Land_GH_MainBuilding_left_F + { + table = "Radiation"; + positions[] = {{-6.44043, 2.63159, -1.05388},{-6.40381, -2.12085, -1.05388},{6.74365, -5.78149, -1.05388},{-0.207031, -7.60864, -1.05388},{2.12793, -10.2429, -1.05388},{5.5249, -15.4812, -1.05388},{-0.98291, -18.1379, -1.05387},{-2.06543, 5.00342, -1.05388},{4.94092, 11.8662, -1.05389},{-1.63135, -1.71094, -1.05388},{9.74365, 1.61304, -1.05389},{4.88525, 6.50024, -1.05389},{14.9434, 3.5686, -1.05389},{13.2563, 8.73413, -1.0539},{17.2432, -4.43799, 3.39144},{13.584, 4.49951, 3.39144},{15.5112, -1.00366, 3.39144},{9.44727, 2.41968, 3.39144},{2.64893, 5.43433, 3.39144},{-0.672363, -6.15454, 3.39144},{1.25537, 0.418213, 3.39144},{-5.28076, -6.47534, 3.39144},{-6.63867, -1.47412, 3.39144},{-7.39063, 4.22949, 3.39144}}; + }; + + class Land_GH_MainBuilding_middle_F + { + table = "Radiation"; + positions[] = {{-0.408203, 2.26978, 0.538373},{-12.1367, 1.58447, 0.538378},{-2.14014, -7.85303, 1.25473},{-14.9414, -4.22363, 0.538417},{-16.2109, -8.05908, 0.538444},{-4.00293, -17.3718, 0.538503},{11.3765, -5.7373, 0.538428},{15.5952, -9.00879, 0.53845},{14.1016, -3.40771, 0.538412},{0.957031, 11.2915, 2.76766},{9.70215, 6.27051, 4.98464},{13.7354, -1.34595, 4.98465},{2.89844, -14.8083, 4.98466},{-9.37158, -11.5811, 4.98465},{-14.1709, 1.90674, 4.98465},{-10.71, 6.09961, 4.98464}}; + }; + + class Land_GH_MainBuilding_right_F + { + table = "Radiation"; + positions[] = {{11.9268, -18.7073, 3.82813},{2.43213, -14.093, 3.81848},{6.94629, 2.26904, -1.05388},{7.02637, -1.66724, -1.05387},{-1.81201, -9.91284, -1.05388},{-0.240723, -7.5647, -1.05388},{-5.69873, -6.15967, -1.05388},{3.89648, -11.2732, -1.05387},{1.15527, 3.63159, -1.05388},{2.70215, 9.94263, -1.05389},{-10.3442, 0.716309, -1.05389},{-4.8833, 5.8147, -1.05389},{-7.16406, 1.28369, -1.05389},{-14.3013, 3.41919, -1.05389},{-12.9961, 8.2854, -1.0539},{-11.1431, 13.0371, -1.0539},{-15.7705, -0.219971, -1.05389},{-16.3779, -4.63135, 3.39144},{-14.043, 3.26343, 3.39144},{-6.1499, 6.17603, 3.39144},{-7.31689, 1.0271, 3.39144},{-0.897461, -4.72583, 3.39144},{-1.25635, 1.18457, 3.39144},{1.7832, -4.39404, 3.39144},{7.21973, 3.79077, 3.39144},{5.69287, -1.56128, 3.39144},{5.80078, -6.55884, 3.39144}}; + }; + class land_1 + { + table = "Industrial"; + positions[] = {{14.0977, 9.27832, -5.30631},{-6.3584, 8.4375, -5.30632},{-14.2788, 8.0957, -5.30632}}; + }; + + class land_2 + { + table = "Industrial"; + positions[] = {{-8.04541, 6.65527, 4.21223},{-10.0181, -6.0498, 4.38565},{-2.16016, -6.75195, 3.90532},{11.9395, -2.30762, 4.40326}}; + }; + + class Land_A_Crane_02a + { + table = "Industrial"; + positions[] = {{3.62939, -0.0185547, 1.38779},{-0.175293, 1.78906, 3.10723},{-2.67627, -0.696289, 3.10723}}; + }; + + class Land_A_Crane_02b + { + table = "Industrial"; + positions[] = {{-8.95557, 1.5498, -7.84474},{-8.51416, -1.5332, -7.84474},{-7.96924, -0.438477, -4.98164}}; + }; + + class Land_A_CraneCon + { + table = "Industrial"; + positions[] = {{-9.64795, 1.52246, 5.78629},{-7.19531, -0.521484, 5.78629},{-9.91992, -1.56641, 5.78629}}; + }; + + class Land_A_Hospital + { + table = "Medical"; + positions[] = {{-7.01465, 2.24414, 3.29184},{-12.2856, -2.19336, 3.29184},{0.768066, -4.32227, 3.29184},{9.37646, -2.19238, 3.29184},{16.7549, 4.42871, 6.15884},{21.1167, 1.20996, 6.15884}}; + }; + + class Land_A_Office01 + { + table = "Shop"; + positions[] = {{-15.188, 1.48926, -4.528},{-7.47803, 5.30859, -4.528},{4.396, 0.104492, -4.528},{-0.0356445, 6.66504, -4.528},{1.77539, 3.48145, -4.528},{14.061, -3.15625, -4.528},{0.368164, 6.94727, -2.028},{2.23096, 3.60547, -2.028},{7.13672, -3.03906, -2.028},{9.97021, -1.15332, -2.028},{15.1084, 3.43457, -2.028},{12.9458, 6.34961, -2.028},{-2.69482, 3.47754, 0.472004},{-11.3599, 2.30469, 0.472008},{13.3257, -1.92188, 0.472},{9.39404, 5.50488, 0.472},{4.56396, -3.01855, 6.2049},{-2.58252, -0.799805, 6.20491},{0.802734, 2.69922, 6.20491}}; + }; + + class Land_A_Office02 + { + table = "Shop"; + positions[] = {{-0.581543, -5.67871, -8.15104},{5.14258, -5.7793, -8.15111},{2.02979, -4.74805, -8.15053},{-21.2427, 2.1748, 5.38394},{-11.4209, 0.0673828, 5.38394},{-1.84033, 2.02246, 5.38394},{9.21729, 3.43066, 5.38395},{18.8926, 6.28613, 5.38394},{20.4136, -1.30469, 5.38394},{6.00049, -2.12695, 5.38394},{-17.3633, 1.19434, 8.71684},{-19.123, 3.86719, 8.71684}}; + }; + + class land_AII_last_floor + { + table = "Military"; + positions[] = {{-1.42236, 5.96289, 4.6129},{-4.45508, 3.43555, 5.46183},{-9.89795, 16.1748, 4.61091},{-14.2314, 22.249, 4.61073},{-23.418, -7.18457, 5.45109},{-10.5127, -16.2051, 5.44856},{4.02783, -21.3271, 5.51657},{5.60254, -11.5703, 6.08711},{-10.6987, 10.3369, 5.43586}}; + }; + + class land_AII_middle_floor + { + table = "Military"; + positions[] = {{-13.688, 8.02148, 0.513981},{-10.0068, 5.15332, 0.51099},{-13.0356, -0.71875, 0.520344},{-8.25098, 2.8584, 0.513554},{-4.39795, 2.17383, 0.513092},{-6.1333, 8.2168, 0.513794},{-7.30713, 5.61621, 0.520306}}; + }; + + class land_AII_upper_part + { + table = "Military"; + positions[] = {{-0.750488, -3.58496, -2.31057},{-1.50635, -1.92773, -2.32196},{-3.05322, 2.05176, -2.32196},{0.378418, 3.15332, -2.58292}}; + }; + + class land_b_small1 + { + table = "Industrial"; + positions[] = {{-2.86816, -0.407227, -1.50034},{-0.739258, -4.81543, -1.50034},{-0.48291, -1.04102, -1.50034}}; + }; + + class Land_Barn_Metal + { + table = "Industrial"; + positions[] = {{-7.60107, -2.67871, -5.46857},{-8.69824, -24.8643, -5.26},{0.746582, -24.2676, -5.46857},{10.2876, -24.8691, -5.43213},{9.39404, -5.85254, -5.46857},{10.248, 22.4385, -5.46857},{-8.69727, -24.8633, -5.46854},{-9.24121, 16.9082, 5.56142},{-9.55469, -3.21875, 5.56142},{10.6216, -3.22656, 5.56142},{0.579102, -25.2393, 5.56143},{10.8906, -26.7842, 5.56142},{-1.28906, 22.6455, 5.58787},{10.5737, 14.3779, 5.58787}}; + }; + + class Land_Barn_W_01 + { + table = "CivillianLowerClass"; + positions[] = {{0.299316, 22.208, -3.1789},{1.85938, 18.2881, -2.66324},{-5.40625, 8.97754, -2.66161},{-6.14551, -9.7207, -2.65836},{5.95947, 9.42578, -2.66169},{5.79053, -9.96973, -2.65831},{-1.08643, -18.0977, -2.65689},{-6.2373, -14.7119, -2.65749},{6.45264, 14.4609, -2.66257},{8.18018, 14.6631, -3.03774},{-8.12012, -14.8809, -2.98197}}; + }; + + class Land_bouda2_vnitrek + { + table = "CivillianLowerClass"; + positions[] = {{-0.369141, -2.53906, -0.72002},{-3.2168, 1.58691, -0.72002},{0.382324, 0.46875, -0.72002}}; + }; + + class land_bud2 + { + table = "CivillianLowerClass"; + positions[] = {{-2.3623, -1.00586, -1.79023},{1.80273, -0.383789, -1.78249}}; + }; + + class Land_budova4_winter + { + table = "Military"; + positions[] = {{-8.83984, 2.3584, -1.09823},{5.0708, -1.40625, -1.09823},{6.57959, -0.0283203, -0.934856},{1.56201, -2.17383, -1.09823},{2.6377, -0.046875, -1.09823},{-1.71045, -1.25293, -1.09823},{-0.383789, -0.00976563, -1.09823},{-4.86865, -1.00879, -1.09823},{-9.05322, -2.32129, -1.09823},{-8.2124, -0.428711, -1.09823}}; + }; + + class land_bunka + { + table = "Shop"; + positions[] = {{2.44971, 1.91992, -1.51244},{-1.84717, 2.53125, -1.51244},{0.172363, 2.63086, -1.51244}}; + }; + + class land_cast1 + { + table = "Factories"; + positions[] = {{-4.93311, -10.6875, -4.38392},{-3.57178, 5.57813, -4.38391},{1.57617, 6.61328, -4.38392},{-3.64893, 10.7246, -4.38392},{-0.235352, 16.6797, -4.38392},{-4.97949, 17.1348, -4.38392},{1.07129, -0.219727, -1.06585}}; + }; + + class land_cast2 + { + table = "Factories"; + positions[] = {{1.37793, 13.9932, -4.38393},{-3.45752, 9.15234, -4.38393},{-1.4082, 1.34863, -4.38393},{-4.85156, -8.19824, -4.38392},{1.20654, -10.6094, -4.35677}}; + }; + + class land_chat_tr + { + table = "CivillianLowerClass"; + positions[] = {{-2.32764, -2.27051, -2.43594},{-2.16992, 2.02734, -2.44564},{1.8208, 1.6084, -2.43839},{1.31689, -2.08301, -2.42417}}; + }; + + class land_dlouhy1 + { + table = "CivillianUpperClass"; + positions[] = {{5.70068, -2.35059, -9.5115},{5.49121, 3.41992, -9.51136},{0.822266, -2.20508, -9.50821},{-1.96729, -5.15625, -9.61368},{-6.39014, -0.860352, -9.50334},{-13.3608, -5.13965, -9.63223},{-15.8569, 0.00292969, -9.49695},{-15.5884, 2.50098, -9.49713},{-3.16211, 2.76758, -9.50551},{-16.2661, 5.7041, -9.49667},{-13.0146, 11.2822, -9.64676},{-11.2837, 9.32715, -9.50003},{-6.62061, 8.62012, -9.50318},{-2.92334, 11.3408, -9.6426},{-6.5415, 6.89844, -9.50323},{-1.61914, 8.95215, -9.50656},{-3.27881, 5.42578, -9.50544},{7.02686, 9.4043, -4.98993},{3.95801, 9.46191, -4.98993},{4.04297, -1.94531, -4.98993},{4.23047, -3.57031, -4.98993},{7.09863, -3.58887, -4.98993},{-2.54053, -2.91406, -4.9898},{-1.96533, -5.15332, -4.99091},{-2.11963, -0.246094, -4.98847},{-9.86523, -1.53223, -4.98911},{-13.3618, -5.04688, -4.99086},{-16.5234, -3.20801, -4.98994},{-15.563, 0.476563, -4.98811},{-15.835, 2.96875, -4.98687},{-8.98828, 2.89844, -4.9869},{-16.7842, 8.56934, -4.98408},{-21.0645, 9.25879, -5.083},{-21.124, -2.26172, -9.49339},{-13.2056, 11.2344, -4.98275},{-11.3857, 9.54883, -4.98359},{-11.3604, 6.49414, -4.98511},{-6.69189, 6.5332, -4.98509},{-3.00049, 11.5479, -4.98259},{-1.6626, 9.27246, -4.98373},{-3.08301, 4.99023, -4.98586},{-3.1626, 2.7666, -4.98697},{11.1074, -1.90234, -4.98936},{13.8535, 2.19141, -4.98732},{16.3271, -2.69238, -4.98975},{24.4204, -2.52832, -4.98967},{26.0439, -5.43164, -4.99111},{28.8101, -0.598633, -4.9887},{18.2666, -0.443359, -4.98863},{11.2856, 2.38184, -4.98722},{11.2876, 6.40527, -4.98521},{11.2593, 9.49609, -4.98367},{14.6904, 9.21094, -4.98382},{15.7583, 11.3447, -4.98275},{19.2959, 9.25195, -4.9838},{19.1582, 6.39746, -4.98522},{19.207, 2.26758, -4.98728},{14.8828, 6.12207, -4.98535},{26.2935, 2.10645, -4.98736},{22.2964, 1.99121, -4.98742},{22.1465, 5.72754, -4.98555},{22.1973, 9.5625, -4.98368},{26.4482, 9.35254, -4.98378},{26.3408, 11.5605, -4.98265},{29.5107, 9.34082, -4.98375}}; + }; + + class land_dlouhy2 + { + table = "CivillianLowerClass"; + positions[] = {{-0.71875, 5.58789, -9.31654},{1.06543, 0.354492, -9.32137},{-0.845215, -4.54883, -9.31622}}; + }; + + class land_domek_podhradi_1 + { + table = "CivillianLowerClass"; + positions[] = {{-5.3335, 3.54102, -2.75047},{-5.79199, -3.52637, -2.75047},{3.40527, -3.37891, -2.75047},{0.533203, -0.389648, -2.73914},{4.92871, 2.75391, -2.73911},{0.484375, 3.87695, -2.73909}}; + }; + + class land_dr_1 + { + table = "CivillianLowerClass"; + positions[] = {{0.147461, -0.493164, -1.07508},{-0.343262, 1.92383, -1.08438},{-2.8457, 1.74316, -1.08788},{-2.74463, -0.714844, -1.08217}}; + }; + + class land_dr_2 + { + table = "CivillianLowerClass"; + positions[] = {{-2.56934, 1.46094, -0.997974},{-0.309082, 1.42676, -0.994301},{4.38867, 1.53711, -0.98571},{3.71338, -1.39453, -0.973618},{-0.55957, -2.23242, -0.978878}}; + }; + + class Land_dulni_bs + { + table = "CivillianLowerClass"; + positions[] = {{1.97559, 2.6582, -1.75205},{2.45703, -1.08691, -1.75204},{0.107422, -2.83008, -1.75204}}; + }; + + class Land_dum_ras + { + table = "CivillianLowerClass"; + positions[] = {{2.5542, 3.49805, -2.66958},{-0.300781, 0.151367, -2.66957},{-0.5625, -2.03125, -2.66957},{-0.710938, -2.58398, 0.272606},{1.75391, 3.47266, 0.272602},{-0.166504, 1.93457, 0.272606}}; + }; + + class Land_dum_zboreny + { + table = "CivillianLowerClass"; + positions[] = {{-2.14941, -4.11914, -2.37675},{1.11865, -0.722656, -2.37675},{6.43115, -3.39746, -2.37675},{-5.66455, 4.21875, 1.40812},{-2.62988, -3.42188, 1.40902},{1.98584, -0.769531, 1.39545},{-5.13135, -3.81738, 1.41562}}; + }; + + class Land_dum_zboreny_total + { + table = "CivillianLowerClass"; + positions[] = {{-4.48975, -2.46582, -2.23949},{-4.82227, 2.27539, -2.31548},{4.70947, 2.34668, -2.33912}}; + }; + + class land_f_b1 + { + table = "VehicleService"; + positions[] = {{-4.71436, -0.746094, -2.21533},{-4.91309, -5.07813, -2.21533},{-2.38477, -3.29785, -2.21533}}; + }; + + class land_f_b2 + { + table = "VehicleService"; + positions[] = {{-6.93359, 0.602539, -4.96382},{-4.69922, -2.65625, -4.96382},{-1.76318, 3.53906, -4.97872},{0.286133, -0.306641, -4.21184},{2.08838, -3.16602, -4.21183}}; + }; + + class Land_Fuel_tank_stairs + { + table = "Industrial"; + positions[] = {{2.56934, -0.169922, 0.806641}}; + }; + + class land_fuelstation_w + { + table = "VehicleService"; + positions[] = {{-0.119141, 1.2666, -2.28589},{4.01611, -3.81641, -2.25437}}; + }; + + class land_garaze + { + table = "VehicleService"; + positions[] = {{-3.1582, -3.11328, -1.56419},{2.4375, -3.86035, -2.11892},{0.065918, -6.53613, -1.67742},{5.46143, -6.25977, -2.119},{4.94287, 0.117188, -2.11902},{3.23438, 5.73242, -2.119},{0.188477, 3.70508, -1.88765}}; + }; + + class land_hala1 + { + table = "Industrial"; + positions[] = {{-0.166504, -5.2832, -4.00997},{-0.201172, -0.611328, -4.00996},{0.69873, 4.97949, -4.00997},{5.45996, -3.13867, -3.98352},{-5.16455, 1.19238, -3.98352}}; + }; + + class land_hlaska + { + table = "Military"; + positions[] = {{-0.668945, 0.740234, 3.77092}}; + }; + + class Land_Hlidac_budka + { + table = "Military"; + positions[] = {{2.3418, 0.675781, -0.783619},{-1.77197, 1.92773, -0.783619}}; + }; + + class land_hotel_p1 + { + table = "Shop"; + positions[] = {{-11.0967, -3.02246, -4.65403},{-4.54248, -0.703125, -4.65404},{-10.0791, 3.53125, -4.65403},{-1.21143, -1.64648, -4.65403},{13.8491, 8.28711, -1.13431},{13.6074, 0.416016, -1.12066},{13.8945, -7.89648, -1.13431}}; + }; + + class land_hotel_p2 + { + table = "Shop"; + positions[] = {{7.14795, -1.11133, -7.29951},{4.04053, 2.56152, -7.29951},{-0.273926, -0.673828, -7.29951},{-2.74609, 2.04883, -7.29951},{-6.66553, -10.8359, -0.670689},{-3.03906, -25.0195, 1.31509},{-8.25732, 14.0684, -0.188686},{-3.71631, 23.1865, 1.03674},{1.09277, -19.2598, 6.06893},{6.76172, -14.2334, 6.06892},{4.73926, -6.79785, 6.06892},{8.39941, 6.44238, 6.06893},{0.0703125, 6.85352, 6.06892},{-2.85303, 18.458, 6.06893},{6.24023, 17.0322, 6.06893},{1.46582, -0.719727, 6.06893},{4.34424, -2.07324, 6.06893}}; + }; + + class Land_HouseV2_01B + { + table = "CivillianUpperClass"; + positions[] = {{-4.14014, -2.57031, -5.18788}}; + }; + + class Land_HouseV2_04_interier + { + table = "CivillianLowerClass"; + positions[] = {{0.289551, 1.33691, -2.89027},{7.24072, -1.63477, -5.74182},{7.44287, 5.53125, -5.73914},{2.66113, 6.87988, -5.73851},{3.3125, 3.62793, -5.73954},{-1.89795, 2.81641, -5.7398},{-5.06152, 6.37695, -5.73866}}; + }; + + class Land_HouseV2_05 + { + table = "CivillianLowerClass"; + positions[] = {{5.28125, 6.9873, -2.65818},{-3.33643, -0.25, -2.7924}}; + }; + + class Land_HouseV_1I1 + { + table = "CivillianLowerClass"; + positions[] = {{-0.629883, -1.9248, -2.82415}}; + }; + + class Land_HouseV_1I4 + { + table = "CivillianLowerClass"; + positions[] = {{-0.486816, 4.16699, -2.7365},{-2.24951, -0.986328, -2.76074},{-3.91016, -4.00195, -2.76509},{0.0488281, -4.36719, -2.76856}}; + }; + + class Land_houseV_2T2 + { + table = "CivillianLowerClass"; + positions[] = {{-3.9585, 0.647461, -4.0352}}; + }; + + class Land_HouseV_3I1 + { + table = "CivillianLowerClass"; + positions[] = {{5.29248, -1.86719, -2.02602}}; + }; + + class Land_HouseV_3I2 + { + table = "CivillianLowerClass"; + positions[] = {{4.07422, 2.50098, -2.02417}}; + }; + + class Land_HouseV_3I3 + { + table = "CivillianLowerClass"; + positions[] = {{0.898926, 2.67871, -1.68621},{4.34033, 2.20215, -1.47564}}; + }; + + class Land_HouseV_3I4 + { + table = "CivillianLowerClass"; + positions[] = {{5.5332, 2.64258, -2.62949}}; + }; + + class Land_hut06 + { + table = "CivillianLowerClass"; + positions[] = {{0.513672, 1.83301, -1.55149},{-0.552246, -0.0419922, -1.54668}}; + }; + + class Land_hut_old01 + { + table = "CivillianLowerClass"; + positions[] = {{-2.82275, 2.26172, -3.0186},{2.39307, -7.42383, -2.96946},{-4.6665, -1.7959, -3.01507},{1.85352, 4.6543, -3.01839},{-6.62744, 6.87695, -3.02645},{-7.50293, -7.14453, -3.01511},{-3.08691, -2.10938, -3.01197}}; + }; + + class Land_Ind_Expedice_1 + { + table = "Factories"; + positions[] = {{-1.82666, -8.5293, -3.48673},{2.97021, -14.4375, -3.48673},{6.88428, -14.9609, -5.75725},{9.41943, -12.6875, -5.75726},{13.5112, -14.624, -5.75725},{12.5645, -20.2344, -5.75725},{-2.28564, -19.9434, -3.48673},{-11.8623, -18.0654, -3.48673},{-9.41211, -7.62305, -3.48672},{-12.9346, -2.08105, -3.48673},{-0.103516, 13.0859, -3.48673},{3.45459, 18.1846, -3.48673},{-0.59375, 16.1543, 9.71017},{-0.312012, 10.4131, 9.71017},{-1.69238, 4.23633, 9.71017},{2.10059, 7.05859, -5.6839},{-1.58301, 13.1543, -5.6839}}; + }; + + class Land_Ind_IlluminantTower + { + table = "Military"; + positions[] = {{1.17822, -0.277344, 10.3513},{-0.855957, -0.0869141, 10.3513}}; + }; + + class Land_Ind_MalyKomin + { + table = "Industrial"; + positions[] = {{-0.993652, -0.308594, -7.69932},{2.1958, -0.422852, -7.69932}}; + }; + + class Land_Ind_Pec_03a + { + table = "Industrial"; + positions[] = {{11.75, 14.8037, 5.76025},{8.36865, 4.24121, 5.76025},{11.6655, -8.36719, 5.76025},{6.96191, -15.7451, 5.76025},{-1.96777, -22.3271, 5.76025},{-4.75537, -5.51563, 5.76025},{-1.86182, 2.5752, 5.76025},{-4.34082, 13.0742, 5.76025},{3.19287, 20.251, 4.02583},{-1.06396, 24.501, 4.02583}}; + }; + + class Land_Ind_Pec_03b + { + table = "Industrial"; + positions[] = {{2.96289, 25.8848, 4.02583},{-1.07227, 21.6309, 4.02583},{-4.0791, 14.9619, 5.76025},{-0.356934, 4.58594, 5.76025},{-4.32617, -9.64941, 5.76025},{-0.961914, -16.7637, 5.76025},{3.42822, -24.7012, 5.76025},{10.2559, -19.7666, 5.76025},{7.74023, -10.6123, 5.76025},{10.7046, -1.34668, 5.76025},{10.647, 11.499, 5.76025}}; + }; + + class Land_Ind_Quarry + { + table = "Industrial"; + positions[] = {{-6.91357, 15.0264, -7.47989},{-7.28711, 7.63184, -7.47989},{-6.74414, -1.58301, -7.47989},{-3.35791, -10.8428, -7.47989},{5.45654, 4.74609, -7.47989},{8.17725, 9.01172, -7.47989},{6.17969, 11.9297, -7.47989},{0.290039, 17.2236, 5.29451},{-4.20117, 16.5439, 5.29451},{-4.28516, 8.84277, 5.29451},{-4.30713, -6.3457, 5.29452},{-4.07617, 0.918945, 5.29451}}; + }; + + class Land_Ind_SawMill + { + table = "Industrial"; + positions[] = {{-4.646, 10.0225, -5.80637},{-4.36963, -2.53516, -5.7921},{3.31152, -11.4541, -5.72437},{10.5, -4.90137, -5.72056},{10.5283, -1.49023, -5.74226},{10.7983, 5.6123, -5.78193}}; + }; + + class Land_Ind_Stack_Big + { + table = "Industrial"; + positions[] = {{-2.78027, -1.78809, -23.2495},{0.44873, 5.12207, -6.00286},{-3.02539, 5.07227, -6.00286},{-3.05664, 2.21484, -6.00286},{3.35107, -4.76074, -28.4986}}; + }; + + class Land_Ind_Workshop01_01 + { + table = "Industrial"; + positions[] = {{-0.591309, 0.150391, -1.29873},{1.91357, -1.125, -1.29229},{0.628906, -3.35254, -1.29331}}; + }; + + class Land_Ind_Workshop01_02 + { + table = "Industrial"; + positions[] = {{-1.58057, -0.878906, -1.4297},{1.55322, -1.37012, -1.43058},{-0.345215, 1.08691, -1.42694}}; + }; + + class Land_Ind_Workshop01_04 + { + table = "Industrial"; + positions[] = {{-1.4458, 4.62891, -1.53094},{0.562012, 4.6748, -1.52906},{-0.76416, 2.46484, -1.53055}}; + }; + + class land_jzd_4silka + { + table = "Industrial"; + positions[] = {{-3.3916, 0.258789, -1.17006}}; + }; + + class land_jzd_bezstrechy + { + table = "CivillianLowerClass"; + positions[] = {{7.93115, 2.51367, -5.22504},{6.21924, -3.71387, -5.22504},{-0.757813, -3.27246, -5.22504},{-10.3262, -1.87891, -5.22504},{-5.85791, 2.8252, -5.22504},{1.70557, 2.6582, -5.22504},{0.855957, 2.20313, -0.404762}}; + }; + + class land_jzd_kr1 + { + table = "Industrial"; + positions[] = {{-4.60498, -16.6143, -6.34966},{-0.616211, -11.9746, -6.26657},{2.00879, 0.411133, -6.26657},{-2.75879, 7.97363, -6.34966},{3.2373, 12.166, -6.34966},{2.22852, 3.82227, -6.26657},{4.25293, -7.25391, -6.34966},{-3.63916, 12.5576, -2.14675},{3.32227, 7.34863, -2.14675},{-3.50049, -1.67871, -2.14676},{0.86377, -8.74902, -2.14675},{-1.79688, -15.4854, -2.14675},{4.17969, -16.0742, -2.14675},{1.33887, -6.41699, 1.31637}}; + }; + + class land_jzd_kr2 + { + table = "Industrial"; + positions[] = {{4.33154, 23.5986, -2.38598},{-7.01855, 22.6494, -6.3362},{3.06006, 15.4053, -2.34158},{-3.38916, 8.94141, -2.07983},{5.90381, 10.1426, -2.07984},{-0.131836, 3.41992, -2.07984},{-2.67334, -4.22363, -2.07983},{7.01074, -4.36426, -2.07984},{2.15918, -9.3125, -2.07983},{6.0249, -15.4023, -2.07984},{2.06885, -12.9785, -2.07984},{-2.85889, -15.7559, -2.07984},{2.05176, -18.6699, -2.07983},{2.04688, -24.3594, -0.117252},{-7.77246, 20.3125, -6.33621},{4.08887, 20.2959, -6.33621},{1.78662, 12.8369, -6.3362},{1.87793, 9.47168, -6.19965},{1.9082, 5.69531, -6.19965},{1.83447, -3.8584, -6.19965},{1.72021, -9.01953, -6.19965},{1.78711, -13.3994, -6.19965},{2.20703, -16.7363, -6.19965},{2.53027, -23.6309, -6.233},{-2.64941, 8.58203, -6.2563},{-2.64307, -12.1484, -6.2563},{6.21387, -3.83008, -6.2563}}; + }; + + class land_jzd_silo_tes + { + table = "Factories"; + positions[] = {{-2.88379, -1.75977, -16.0503},{17.8921, -6.25586, -15.9365},{24.4775, -0.426758, -15.9552},{18.7129, 5.69043, -16.0179}}; + }; + + class land_jzd_stodola1 + { + table = "CivillianLowerClass"; + positions[] = {{0.400879, -13.5039, -2.0262},{-3.86035, -9.13281, -2.0262},{-0.871582, -1.84473, -2.0262},{-3.12207, 6.1543, -2.0262},{1.37891, 14.0986, -2.0262}}; + }; + + class land_jzd_stodola2 + { + table = "CivillianLowerClass"; + positions[] = {{6.86377, -5.91699, -2.0262},{3.77734, -12.7139, -2.0262},{-0.95459, -1.85254, -2.0262},{-5.56543, 3.05859, -2.0262},{7.41016, 5.45703, -2.0262},{2.16113, 7.55273, -2.0262},{3.38037, 12.7236, -2.0262},{7.05078, 14.0605, -2.0262},{1.06689, 1.17383, 1.31123}}; + }; + + class land_jzd_vodojem + { + table = "Industrial"; + positions[] = {{-0.27002, 0.380859, -6.83972}}; + }; + + class Land_KBud + { + table = "Tourist"; + positions[] = {{0.0415039, -0.40625, -1.04616}}; + }; + + class Land_komin + { + table = "Industrial"; + positions[] = {{1.4082, 0.291992, 12.4562},{-1.29688, 1.70313, 12.4562}}; + }; + + class land_kontejner_des + { + table = "Industrial"; + positions[] = {{-0.90625, -0.110352, -0.604759}}; + }; + + class land_kostelik_final_2122 + { + table = "CivillianLowerClass"; + positions[] = {{-0.694336, 3.57324, -5.57918},{1.99854, 3.09668, -5.57919},{4.07324, -0.552734, -5.57918},{-0.619141, -6.96094, -5.57918},{2.00195, -6.27051, -5.57918},{-2.23291, -2.90137, -5.57918},{2.39404, 8.44238, -5.55285},{-1.03955, 8.20215, -5.01875},{1.06689, 7.79492, 1.55624},{-0.308594, 7.52832, 1.55565},{0.831543, -1.79492, -5.57918}}; + }; + + class Land_kulna + { + table = "CivillianLowerClass"; + positions[] = {{-0.358887, 2.14551, -1.1406}}; + }; + + class land_lodenice + { + table = "CivillianLowerClass"; + positions[] = {{-3.89795, 1.52051, -2.83267},{-1.83301, -5.40625, -2.01773},{-4.23145, -12.6211, -1.10887},{-0.587891, -12.7275, -1.0997}}; + }; + + class land_marsh1 + { + table = "CivillianLowerClass"; + positions[] = {{4.64844, 3.49316, -3.95897},{1.33008, 4.81934, -3.95897},{3.98535, 6.78223, -3.95897},{2.28564, -0.0136719, -3.95897},{3.98193, -3.84277, -3.95897},{0.0605469, -5.29004, -3.95897},{-0.55127, 0.425781, -3.95897},{-2.35938, 4.36133, -3.99553}}; + }; + + class land_marsh2 + { + table = "CivillianLowerClass"; + positions[] = {{-6.88477, -1.49512, -0.265942},{0.22998, 9.88281, -0.541714},{2.99219, 10.4424, -0.73275},{5.43848, 9.24902, -0.941872}}; + }; + + class Land_Mil_Barracks_i + { + table = "Military"; + positions[] = {{4.72119, -1.99121, -1.09824},{6.64404, -0.0224609, -0.93486},{0.72998, -1.94727, -1.09824},{1.13184, -0.0605469, -1.09824},{-1.7417, -2.11914, -1.09823},{-0.903809, 0.0771484, -1.09823},{-3.85596, 0.00683594, -1.09824},{-5.04834, -1.8125, -1.09824},{-8.65771, 2.46875, -1.09823},{-8.58887, -1.83691, -1.09823}}; + }; + + class Land_Misc_Cargo1Ao + { + table = "Industrial"; + positions[] = {{-0.20459, 1.27539, -1.09225}}; + }; + + class Land_Misc_Cargo1Bo + { + table = "Industrial"; + positions[] = {{0.0966797, 0.678711, -1.09225}}; + }; + + class Land_Misc_deerstand + { + table = "Military"; + positions[] = {{-0.0947266, -0.667969, 1.08539}}; + }; + + class Land_Misc_PowerStation + { + table = "VehicleService"; + positions[] = {{4.16992, -4.13574, -1.26852},{4.09131, 1.93164, -1.26783},{3.86328, 6.91992, -1.2674}}; + }; + + class land_molovabud1 + { + table = "Industrial"; + positions[] = {{-9.02637, -1.52637, 1.41187},{-8.70215, 6.33398, 1.41187},{-3.35205, 1.04004, 1.41187},{1.27637, 5.45605, 1.41425},{-1.12793, 0.734375, 5.07722}}; + }; + + class Land_Nasypka + { + table = "Industrial"; + positions[] = {{-1.35791, -0.119141, 6.56824}}; + }; + + class land_Tovarna1 + { + table = "Industrial"; + positions[] = {{3.8584, -5.31836, -5.75442},{-6.19629, -6.02637, -5.75442},{-10.3931, -2.59375, -5.75442},{-10.2061, 3.5791, -5.75442},{-10.7573, 7.00684, -5.75442},{-2.11475, 9.29297, -5.75442},{3.84668, 6.97949, -5.75442},{-4.80566, 2.62891, -5.75441},{1.2417, 2.21973, -5.75442},{-1.66699, -3.27734, -5.75442},{-10.7734, -6.67285, -0.320099},{-10.8408, 4.02832, -0.320103},{3.51465, 4.69336, -0.320103},{3.89551, -3.3457, -0.320103},{-4.44971, -6.65137, -0.320099},{-9.4917, -6.31055, 2.17997},{-6.7041, 2.38379, 2.17997},{-3.7583, 2.5166, 2.17997},{-1.16797, 2.92871, 2.17997},{3.08691, 2.88477, 2.17997},{0.312988, -5.51172, 2.17997},{0.150879, -0.84082, 2.17997},{2.06689, 2.51563, 4.82976},{-3.9248, 1.5957, 4.82985},{-8.56885, 2.5625, 4.82973},{-6.41846, -3.70996, 4.82981},{-0.359863, -5.14648, 4.82973}}; + }; + + class Land_Tovarna2 + { + table = "Industrial"; + positions[] = {{-6.62939, 7.03125, -5.55933},{-4.0459, 4.9707, -5.55933},{-8.83398, 7.84668, -5.55933},{-13.0425, 6.48438, -5.55933},{-11.5796, 3.19824, -5.55933},{-13.1543, -2.66602, -5.55933},{-11.6787, -7.64844, -5.56399},{-4.72412, -1.37012, -5.5772},{-2.51611, 7.9873, -5.55933},{1.68555, 6.6582, -5.5697},{-11.1611, 2.30566, -2.23135},{-12.6118, 8.00586, -2.23135},{-4.28418, 5.01758, -2.23156},{-6.14355, 8.34375, -2.23156},{-13.0337, 2.28418, 1.66661},{-12.2842, 7.39453, 1.66661},{-9.30322, 7.27148, 1.66661},{-4.25, 4.77344, 1.62174},{-6.52637, 8.47266, 1.62174},{-3.7959, 8.35742, 1.62174},{-3.75586, 0.200195, 3.42429},{-9.74365, 0.180664, 3.42429},{-13.1099, -2.29199, 3.4243},{-13.0254, -7.99414, 3.4243},{-6.33496, -8.81641, 3.4243},{0.432129, -8.81445, 3.4243},{2.3584, -4.66992, 3.4243},{2.29883, 5.5752, 3.42429},{5.64795, -4.23926, -4.61871}}; + }; + + class land_trubice + { + table = "Industrial"; + positions[] = {{-3.31152, 2.16504, 2.59439},{1.09229, 2.82227, 2.59438},{5.39551, 0.498047, 2.59438}}; + }; + + class Land_vez + { + table = "Military"; + positions[] = {{-0.266602, 1.36523, 1.36331}}; + }; + + class land_vstup + { + table = "Industrial"; + positions[] = {{-12.4053, -2.3916, -4.57601},{-5.09863, -0.53418, -4.56671},{2.9541, -2.67383, -4.53907},{7.39893, -1.62695, -4.52592}}; + }; + + class Land_vys_budova_p2 + { + table = "CivillianLowerClass"; + positions[] = {{-6.41992, 3.33789, -0.702797},{-2.60352, -2.88379, -0.702797},{-6.21973, -3.98438, -0.702797},{-0.716309, -2.80957, 0.694061}}; + }; + + class Land_Vysilac_FM + { + table = "Military"; + positions[] = {{1.62988, -0.418945, 8.39022}}; + }; + + class land_vysoky2 + { + table = "CivillianUpperClass"; + positions[] = {{1.23291, 0.397461, -15.4928},{3.23291, -2.34375, -15.5683},{6.66016, 4.94141, -15.6088},{6.50146, -5.2373, -15.6088},{3.46826, -13.1758, -15.5678},{9.36914, -10.8037, -15.5851}}; + }; + + class land_x_nadrz + { + table = "Industrial"; + positions[] = {{-0.677734, 2.68262, 1.44318}}; + }; + + class land_x_skladiste_low_te + { + table = "Industrial"; + positions[] = {{-13.2363, -9.30371, -2.8418},{-14.231, 3.10449, -2.84105},{-2.57813, 8.91992, -1.61393},{0.682617, 6.83594, -2.84118},{13.1919, 6.2959, 0.106834},{9.46045, -1.61426, -2.58824},{10.0454, -6.80762, -2.58824},{1.45361, -5.36816, -2.58824},{-6.55615, -9.5127, -2.84166},{-15.5264, -11.1084, 4.04656},{4.94336, -12.0215, 4.04781},{16.9888, -3.24316, 4.04781},{16.814, 10.458, 4.04665},{10.6865, 6.64941, 6.17473}}; + }; + + class land_x_vetraci_komin + { + table = "Industrial"; + positions[] = {{3.07617, -0.651367, 14.9767},{-0.126953, -0.155273, 14.9466}}; + }; + + class land_x_vez_te + { + table = "CivillianLowerClass"; + positions[] = {{1.37744, -0.333008, -4.60751},{-0.855469, 2.38574, -4.58929},{0.958984, 2.96875, -4.58572},{1.19434, -0.387695, -0.273819},{0.800781, 2.80176, -0.272766},{-2.59912, 2.79102, -0.272377},{-2.41211, 0.592773, -0.273094},{-4.83057, -3.3623, -0.274063}}; + }; + + class land_zd_1 + { + table = "CivillianLowerClass"; + positions[] = {{-1.92969, 3.09961, -3.67255},{2.68896, 3.86426, -3.67256},{2.27881, -1.89551, -3.67255},{-0.723145, -2.45215, -3.67255},{-4.57813, -1.90918, -4.04225}}; + }; + + class land_zd_2 + { + table = "CivillianLowerClass"; + positions[] = {{-2.1416, -0.546875, -1.82467},{-0.318848, 2.48145, -1.82467},{1.85205, 1.12793, -1.82467}}; + }; + + class Land_HouseV2_03 + { + table = "CivillianUpperClass"; + positions[] = {{18.3115, 1.0625, -5.62046},{10.0884, -9.37305, -5.60065},{-18.4453, 2.13477, -5.90977},{-18.1553, 0.09375, -5.88095}}; + }; + + class land_seb_nasypka + { + table = "Industrial"; + positions[] = {{2.58789, -3.42188, -4.24763},{4.24707, 9.42383, -6.46843},{7.66113, 8.33203, -6.49762},{8.46094, 3.88672, -6.50448},{10.937, 0.0751953, -6.52561},{5.90869, -2.25098, -6.90967},{8.9917, -9.40332, -0.134293},{8.97705, -3.41602, -0.134289},{6.27197, -2.44629, 1.30363},{6.06689, 4.19922, 1.30363},{4.11523, 8.49805, 1.30363},{7.87158, 6.61621, 1.30363},{5.11279, 4.30566, 3.86848},{7.66943, 1.15723, 3.12964},{5.90625, 9.59668, 3.27484},{2.71143, -6.04297, -0.134289}}; + }; + + class land_seb_near_fac + { + table = "Factories"; + positions[] = {{-23.6338, -19.4893, -2.74704},{-23.417, -23.2939, -5.23791}}; + }; + + class land_seb_residental + { + table = "CivillianLowerClass"; + positions[] = {{4.65283, 6.66699, -3.97305},{-5.93555, 9.76367, -3.71556},{-0.84375, 2.00195, -3.69101},{-6.8833, -8.72266, -3.65704},{-6.19385, -0.334961, -3.6836},{-0.363281, 4.80273, -3.69986},{-2.65723, 7.20898, 0.527275},{-6.62402, 5.46777, 0.535892},{-2.62891, 2.04199, 0.552792},{-1.87891, -2.06543, 0.573109},{-6.69287, -3.84863, 0.581905},{-1.95313, -7.14258, 0.448582},{-6.7876, -7.85156, 0.403408}}; + }; + + class land_seb_rozvodna + { + table = "Industrial"; + positions[] = {{-0.746582, 3.18555, 0.582798}}; + }; + + class land_seb_vod_vez + { + table = "Industrial"; + positions[] = {{0.291992, 0.31543, 15.0059},{2.41504, -0.685547, 15.0589}}; + }; + + class land_senik + { + table = "CivillianLowerClass"; + positions[] = {{-1.24219, -0.173828, -4.08134},{-0.446777, 2.09375, -4.07665},{0.0864258, -3.96973, -4.08918},{-3.14014, -7.28711, -4.09602},{-7.97656, -3.49707, -4.0882},{-17.2642, -3.91504, -4.08906},{-17.3037, 0.610352, -4.07971},{-13.439, 4.39355, -4.07189},{-7.9624, -0.228516, -4.08143},{-4.69238, 3.64551, -4.07343}}; + }; + + class Land_Shed_Ind02 + { + table = "Industrial"; + positions[] = {{2.48096, 8.94629, -4.62599},{3.07715, 1.91211, -4.62599},{2.68262, -6.92383, -4.62599},{-2.57568, -1.43359, -4.62599},{4.72559, -5.57227, -1.27567},{4.71387, 4.27734, -1.28024},{-1.03467, 9.94043, -1.27845},{-1.34961, 11.8389, -1.27658},{-3.92725, 3.22363, -1.28432},{-4.08496, -7.4834, -1.28736}}; + }; + + class Land_Shed_W01 + { + table = "CivillianLowerClass"; + positions[] = {{-1.46973, -0.0566406, -1.40097}}; + }; + + class land_sklad2 + { + table = "CivillianLowerClass"; + positions[] = {{-3.17139, -2.12988, -2.38225},{2.39063, -3.15625, -2.38225},{3.30371, 1.88281, -2.38225},{-2.32568, 3.64844, -2.38225}}; + }; + + class land_st_vez + { + table = "Military"; + positions[] = {{0.0141602, -4.40625, -3.31476},{-5.08496, -2.78223, -3.31476},{-4.76514, 2.26953, -3.31476},{-0.228516, 3.75, -3.31476},{-1.03857, -2.08105, 6.40833},{-4.41309, 0.394531, 6.40833},{-1.98145, 2.73926, 6.40833}}; + }; + + class Land_stodola_old_open + { + table = "CivillianLowerClass"; + positions[] = {{3.66943, -10.3945, -5.08055},{-2.44189, -6.48633, -5.08055},{2.729, 3.72461, -5.08055},{-2.5835, 9.38379, -5.08055},{2.51514, 10.0439, -5.08055},{-2.20947, 9.76758, -0.993511},{3.87744, 10.6729, -0.993511},{0.335938, 10.3711, 2.96444},{-2.57227, -9.40332, -1.00523},{4.58887, -10.7676, -0.998154},{3.5, -7.14746, -1.00394},{0.982422, -10.6992, 2.96444}}; + }; + + class Land_stodola_open + { + table = "CivillianLowerClass"; + positions[] = {{1.88086, 5.7959, -4.1124},{-2.96338, 6.39355, -4.10798},{-0.639648, -1.17383, -4.20508},{-3.59912, -6.5332, -3.18184},{-4.01416, 1.04297, -4.11878}}; + }; + + class land_syp_r + { + table = "CivillianLowerClass"; + positions[] = {{-0.782715, 0.944336, -6.54317},{1.80078, -0.692383, -6.53119}}; + }; + + class Land_Nav_Boathouse + { + table = "CivillianLowerClass"; + positions[] = {{5.39844, -0.183594, 3.73029},{2.88184, 7.22168, 3.72778},{-3.04541, 7.42578, 3.73394},{-5.12012, -0.625977, 3.73032},{0.262207, -4.09375, 3.64116}}; + }; + + class Land_Nav_Boathouse_PierL + { + table = "CivillianLowerClass"; + positions[] = {{4.73975, 0.168945, 5.88749},{-1.41748, -0.195313, 5.88749}}; + }; + + class Land_Nav_Boathouse_PierR + { + table = "CivillianLowerClass"; + positions[] = {{-4.71875, -2.78027, 5.87571},{-0.0219727, -2.75391, 5.87571}}; + }; + + class Land_NAV_Lighthouse + { + table = "Tourist"; + positions[] = {{-0.452148, 0.0410156, -6.78146},{0.706543, 0.436523, 2.41912},{-0.727051, -0.0292969, 2.41912},{-0.977051, 1.41797, 2.41912},{0.782227, -1.41113, 2.41912}}; + }; + + class land_nav_pier_c + { + table = "Industrial"; + positions[] = {{-8.15576, -16.2305, 23.0037},{-7.75244, -1.47949, 23.0037},{-7.90234, 15.5029, 23.0037},{-7.47852, 8.41309, 23.0037},{-8.00391, -9.05273, 23.0037}}; + }; + + class land_nav_pier_c2 + { + table = "Industrial"; + positions[] = {{14.0571, 6.25684, 23.8614},{6.81982, 7.10059, 23.8614},{-0.686523, 7.44629, 23.8614},{-7.65723, 7.83301, 23.8614},{-17.3403, 7.67871, 23.8614}}; + }; + + class land_nav_pier_c2_end + { + table = "Industrial"; + positions[] = {{6.6377, -4.05078, 23.8614},{1.34473, -3.78223, 23.8614},{-6.92529, -3.66504, 23.8614},{-2.79932, -3.23047, 23.8614}}; + }; + + class land_nav_pier_c_90 + { + table = "Industrial"; + positions[] = {{-7.7085, -8.63867, 24.0014},{-7.34619, -3.86133, 24.0014},{-7.38965, 1.01465, 24.0014},{-7.5083, 6.71191, 24.0014},{0.339355, 7.0293, 24.0014},{6.40283, 7.0957, 24.0014}}; + }; + + class land_nav_pier_c_big + { + table = "Industrial"; + positions[] = {{18.3433, -22.2959, 23.0031},{6.84717, -21.9932, 23.0031},{-3.09033, -22.248, 23.0031},{-14.6865, -22.3359, 23.0031},{-16.9067, -15.0117, 23.0031},{-17.063, 0.720703, 23.0031},{-11.8149, 11.71, 23.0031},{-7.14502, 18.2432, 23.0032},{6.7002, 19.3457, 23.0031},{9.86377, 12.5205, 23.0031},{17.9229, 11.5645, 23.0031},{18.21, 1.91016, 23.0031},{18.3379, -9.86133, 23.0031}}; + }; + + class Land_nav_pier_m_2 + { + table = "CivillianLowerClass"; + positions[] = {{15.189, -2.6123, 23.4414},{6.021, -2.7207, 23.4414},{-2.30273, -2.72461, 23.4414},{-15.8667, -2.66699, 23.4414},{-9.52539, 2.48828, 23.4414},{0.265625, 2.66113, 23.4414},{9.00732, 2.63965, 23.4414}}; + }; + + class land_nav_pier_m_end + { + table = "CivillianLowerClass"; + positions[] = {{1.65039, -4.83789, 23.4414},{-3.99854, -5.31445, 23.4414},{-4.5835, -0.269531, 23.4414},{-5.29102, 4.99023, 23.4414},{-0.487793, 5.88281, 23.4414}}; + }; + + class Land_ns_jbad_A_GeneralStore_01 + { + table = "CivillianUpperClass"; + positions[] = {{-1.95898, 3.79395, -1.20155},{0.864746, 3.93359, -1.20155},{3.40576, 3.81543, -1.20155},{5.2002, 3.82813, -1.20155},{10.1587, 3.05371, -1.20155},{10.1592, 0.866211, -1.20154},{5.89063, 0.604492, -1.20155},{3.96387, 0.604492, -1.20155},{1.83594, 0.631836, -1.20155},{-0.505371, 0.662109, -1.20155},{5.79248, -4.14746, -1.20155},{12.71, -3.49316, -1.20155},{2.54541, -6.17969, -1.20155},{-1.36865, -5.91016, -1.20155},{-5.46875, -5.92871, -1.20154},{-9.01465, -6.27441, -1.20155},{0.26123, -7.33691, -1.20155},{12.2588, -7.87207, -1.20155},{-9.2002, -3.20605, -1.20155},{0.37207, -1.16309, -1.20155}}; + }; + + class Land_ns_Jbad_A_Stationhouse + { + table = "Military"; + positions[] = {{-6.93945, -7.13867, -9.46536},{-12.9404, 0.662109, -9.46536},{-6.33008, 1.7041, -9.46536},{-5.67383, -1.94531, -9.46537},{-7.77002, -4.62207, -9.46536},{-6.93506, 4.94922, -9.46536},{-5.90967, 7.74707, -9.46536},{-11.2642, 8.73242, -9.46536},{-12.208, 5.63574, -9.46536},{-14.3066, 6.98828, -9.46536},{-16.7954, 2.97461, -9.46536},{-17.332, -5.8457, -9.46536},{-14.6265, -5.30664, -9.46536},{-2.13672, -3.03613, -9.46536},{-2.03516, 2.78516, -9.46536},{-1.91406, 7.15527, -9.46536},{-8.48096, -6.48535, -6.77364},{-15.7749, -7.71777, -6.77364},{-17.375, -3.10254, -6.77364},{-17.0884, 6.61523, -6.77364},{-12.9873, 6.54883, -6.77364},{-9.61328, 6.80469, -6.77364},{-5.8584, 6.69141, -6.77364},{-2.31299, 6.87305, -6.77364},{-1.86133, -3.58105, -6.77364},{-7.43652, -3.58691, -6.77364},{-14.3545, -7.84277, -3.6493},{-16.6865, -7.78711, -3.6493},{-16.7388, 7.72949, -3.6493},{-13.9004, 7.69336, -3.6493},{-9.65723, 8.08789, -3.6493},{-6.38184, 7.78809, -3.6493},{-3.146, 8.21387, -3.6493},{-9.59473, -3.41113, -3.6493},{-6.93213, -3.34473, -3.6493},{-16.2041, 0.322266, -3.6493},{1.34912, -2.77832, -4.50294},{4.82324, -0.526367, -4.50294},{2.17676, -7.55664, -4.50269},{12.9829, -7.05371, -4.50269},{-9.396, -6.19141, -0.502689},{-15.7285, -6.89355, -0.502689},{-16.8872, 1.82227, -0.502689},{-11.0439, 2.58887, -0.502689},{-4.49365, 2.33301, -0.502686},{-1.93701, -7.98535, 8.49731},{-3.91748, -7.66309, 8.49731}}; + }; + + class Land_ns_jbad_hangar_2 + { + table = "Industrial"; + positions[] = {{12.8218, -8.23438, -2.56319},{13.3193, -2.53516, -2.56318},{13.2275, 3.03223, -2.56319},{13.4185, 9.16797, -2.56319},{1.84619, 4.42578, -2.56319},{0.273438, -1.96875, -2.56319},{0.223633, -7.3418, -2.56319},{-12.1475, -4.97363, -2.56319},{-12.7822, 0.652344, -2.56319},{-12.5186, 5.44141, -2.56319},{0.0429688, 9.13281, -2.56319}}; + }; + + class Land_ns_Jbad_Ind_Garage01 + { + table = "Industrial"; + positions[] = {{-1.56641, 2.76855, -0.70237},{-1.72363, -1.36328, -0.71067},{0.694824, 0.235352, -0.710865}}; + }; + + class Land_ns_Jbad_Ind_PowerStation + { + table = "Industrial"; + positions[] = {{3.79004, 7.35742, -0.0734406},{3.93555, 2.98242, -0.0776749},{3.91504, -1.97852, -0.0574455}}; + }; + + class Land_ns_Jbad_Mil_Barracks + { + table = "Military"; + positions[] = {{6.04395, -3.20898, -1.9798},{2.90332, -3.1416, -1.9798},{-0.803223, -2.35547, -1.9798},{-4.16357, -2.34473, -1.9798},{-7.53955, -2.92383, -1.9798},{-7.5293, 3.27734, -1.9798},{-4.19482, 3.24609, -1.9798},{-0.518066, 3.81543, -1.9798},{2.29834, 3.09668, -1.9798},{5.45459, 3.01172, -1.9798},{-5.80371, 0.0537109, -1.9798}}; + }; + + class Land_ns_Jbad_Mil_ControlTower + { + table = "Military"; + positions[] = {{8.93896, -2.4834, -9.58517},{3.74316, -2.73535, -9.58517},{4.68555, 1.06152, -9.58517},{9.20117, 5.04199, -9.62869},{4.0332, 4.7168, -5.4637},{3.02783, -0.135742, -1.0687},{6.95605, -1.1377, -1.0687},{6.04004, 2.51367, -1.0687},{3.03564, 1.75488, -1.0687},{0.952148, 5.11426, -9.6287},{-9.42725, -0.114258, -9.58517},{0.900391, 2.07813, -9.60597},{8.31592, 0.0869141, -9.58517},{0.416504, -3.0166, -1.05692},{6.09424, -3.65527, -1.05692},{9.68945, 0.405273, -1.05692},{6.51074, 5.625, -1.05692},{6.03662, 3.22949, 2.80917},{3.48291, -0.34375, 2.87234}}; + }; + + class Land_ns_Jbad_Mil_Guardhouse + { + table = "CivillianLowerClass"; + positions[] = {{-2.66943, 3.2793, -1.66939},{4.04395, 3.66309, -1.66939},{2.69775, 0.196289, -1.66939},{-1.37598, 3.42188, -1.66939}}; + }; + + class Land_ns_Jbad_Mil_Guardhouse_winter + { + table = "CivillianUpperClass"; + positions[] = {{-3.30664, 2.98242, -1.66938},{3.49316, 3.70313, -1.66939},{-0.645996, 3.14551, -1.66939},{3.88818, 0.946289, -1.66939},{-0.267578, -0.269531, -1.66939}}; + }; + + class Land_ns_Jbad_Mil_House + { + table = "Military"; + positions[] = {{-1.65674, -5.99219, -5.01462},{8.46973, 4.03516, -5.01462},{7.90967, -5.97266, -5.01463},{5.9165, -7.05273, -5.01463},{2.89111, -6.42676, -5.01462},{1.23682, -5.16504, -5.01462},{1.60205, -2.2207, -5.01462},{1.66943, 3.78125, -5.01463},{13.2617, -0.860352, -5.01462},{13.748, -2.25781, -5.01462},{5.44238, -2.89844, -5.01462},{-1.61182, 3.02344, -0.672493},{-13.0781, 1.9209, -0.696548},{-12.4023, -1.39258, -0.696548},{-13.8862, -4.80859, -0.696548},{-5.20605, -5.17773, -0.696548},{-5.49072, -2.76758, -0.696552},{-5.40479, 0.0078125, -0.696552},{-6.08154, 4.5918, -0.696545},{-4.62744, 0.244141, -5.01463},{-4.49658, -2.52246, -5.01463},{-4.56055, -4.71387, -5.01462},{-4.76465, -7.3584, -5.01462},{-13.5967, -7.61621, -5.01462},{-13.7686, -4.79199, -5.01462},{-13.9316, -1.64355, -5.01462},{-14.3921, 1.50488, -5.01462},{-5.47559, 4.78711, -5.01462},{-8.73828, -3.43945, -5.01462}}; + }; + + class land_p1_v1 + { + table = "CivillianLowerClass"; + positions[] = {{-9.48145, 0.251953, 15.7814},{0.390625, 1.25781, 15.7191},{15.5005, 1.01953, 15.7191},{21.3237, 1.90137, 15.7191},{8.04443, 0.874023, 15.7191}}; + }; + + class land_p1_v2 + { + table = "CivillianLowerClass"; + positions[] = {{13.4614, -0.0595703, 15.8593},{1.31055, 0.222656, 15.8421},{-9.30908, 0.395508, 15.8421},{-22.5, 0.293945, 15.8421}}; + }; + + class land_panelova2 + { + table = "Industrial"; + positions[] = {{-6.35107, 0.430664, 0.5737},{-6.94727, 4.40137, 0.573704},{-3.82031, 6.3252, 0.573708},{8.93311, 7.03906, 5.67995},{9.54736, 0.0117188, 5.67995},{9.4751, -6.79688, 5.67995},{4.10596, -8.95605, 5.67995},{0.784668, 0.615234, 5.67995}}; + }; + + class land_panelova3 + { + table = "CivillianUpperClass"; + positions[] = {{-2.02393, -4.05664, -2.99467},{1.93408, 2.16602, -3.00268},{5.26465, 1.64941, 0.0510063},{5.92432, -2.23242, 0.0510063},{1.86133, -4.71875, 0.0510063},{0.651855, 0.65918, 0.0510063}}; + }; + + class land_part1 + { + table = "Factories"; + positions[] = {{4.9751, 1.4082, -9.1134},{-2.62598, 6.85938, -9.1134},{-3.95654, 0.295898, -9.1134},{0.0849609, 1.74512, -8.23541},{2.55811, -3.95996, -8.23301},{0.67627, -6.23047, -9.26768},{1.84277, 3.89648, -4.40201},{0.464355, 1.73926, -4.402},{-3.25732, 3.24512, -4.402},{4.19775, 6.86621, 1.93876},{4.68311, 1.04492, 1.93857},{1.90576, -2.84375, 1.93798},{-3.38428, -3.04883, 1.93808},{-4.19727, 5.19922, 1.93821},{4.229, 6.31934, 6.62016},{-0.125977, 6.64355, 6.59703},{5.11279, -1.55957, 6.60015},{-0.223145, -1.92969, 6.57503}}; + }; + + class land_part2 + { + table = "Factories"; + positions[] = {{-2.98682, 4.24805, -9.86775},{-2.99121, -4.69824, -9.86775},{1.0835, -4.15332, -9.86775},{0.568848, 1.96582, -9.86775},{4.81738, 0.119141, -9.86775},{-4.07275, -0.433594, -9.86775}}; + }; + + class land_part3 + { + table = "Industrial"; + positions[] = {{4.30029, 3.23242, -9.7823},{-3.11182, -2.9668, -9.7823},{-0.620117, -6.25684, -9.7823},{-2.61475, 3.61328, -9.12671},{4.63379, -3.71582, -9.27485}}; + }; + + class land_plynom + { + table = "Tourist"; + positions[] = {{-0.615723, -0.589844, -12.5784},{0.469727, -1.18164, -2.60305},{-1.83984, -0.77832, -2.60305},{0.26123, 0.941406, -2.60305}}; + }; + + class land_pozorovatelna + { + table = "Military"; + positions[] = {{-2.54639, 2.11426, -2.49767},{0.805176, 2.80859, -2.49767},{3.35986, 0.398438, -2.49767},{1.35449, -3.07129, -2.49767},{-1.16162, -2.39453, 7.54509},{-1.94922, 1.42578, 7.54509},{1.96289, 1.92969, 7.54508},{1.56543, -1.3291, 7.54509}}; + }; + + class land_provoz1 + { + table = "CivillianLowerClass"; + positions[] = {{4.17432, 3.20996, -2.30756},{0.660156, 3.69727, -2.30756},{-2.80078, 3.64648, -2.30756},{-1.63428, 1.08496, -2.30756},{-3.64258, -3.09863, -2.30756},{2.36084, -3.6875, -2.30756},{1.75781, -1.48926, -2.30756},{-3.27539, -0.850586, -2.30756}}; + }; + + class land_provoz2 + { + table = "CivillianLowerClass"; + positions[] = {{-2.72998, -1.48828, -2.51849},{-6.00488, 2.05078, -2.51849},{-1.47021, 2.41113, -2.51849},{3.66016, 2.57715, -2.51849},{6.47559, -1.25293, -2.51849},{1.4043, -0.520508, -2.51849}}; + }; + + class Land_psi_bouda + { + table = "CivillianLowerClass"; + positions[] = {{1.50391, -0.165039, -0.510769}}; + }; + + class Land_Rail_Semafor + { + table = "Industrial"; + positions[] = {{-1.13672, -2.11914, -3.09424}}; + }; + + class Land_Rail_Zavora + { + table = "Industrial"; + positions[] = {{0.853516, 1.24902, -3.00996}}; + }; + + class Land_repair_center + { + table = "Industrial"; + positions[] = {{-2.56934, 2.8252, -1.52847},{-2.44043, -0.498047, -1.52847},{0.723145, 6.05859, -2.51424},{1.18408, -3.59863, -2.48021},{-0.379395, -3.48535, -2.48787}}; + }; + + class land_rozvodna + { + table = "Industrial"; + positions[] = {{-7.11914, -1.02344, -4.70046},{-7.13574, -1.50488, -0.369423},{-6.91504, -4.40332, -4.69898}}; + }; + + class Land_ruin_01 + { + table = "CivillianLowerClass"; + positions[] = {{-4.22266, -2.38281, -1.85783},{-4.65381, 1.90918, -1.77736},{0.255859, 1.87793, -1.87815},{4.49072, 0.31543, -1.89494}}; + }; + + class Land_sara_domek_ruina + { + table = "CivillianLowerClass"; + positions[] = {{3.23682, -3.85547, -1.6696},{-2.26611, -3.51855, -1.69232},{5.66895, 1.35547, -1.68663}}; + }; + + class land_seb_bouda1 + { + table = "Medical"; + positions[] = {{-1.98633, 1.73242, -3.28989},{-2.11279, -0.297852, -3.28989},{2.53271, 1.93262, -3.28989},{2.67822, 2.23145, -1.23185},{-3.06787, 0.942383, 0.572216},{2.46191, -2.31348, 1.13067},{-0.516602, 2.16602, 0.571716}}; + }; + + class land_seb_bouda3 + { + table = "CivillianLowerClass"; + positions[] = {{-3.16992, -3.75879, -1.72879},{-3.06592, -0.341797, -1.72878},{-3.12793, 3.84668, -1.72879},{0.696777, 4.05957, -1.72852},{2.52881, 1.74023, -1.72871},{2.53076, -2.77637, -1.72871}}; + }; + + class Land_seb_bouda_plech + { + table = "VehicleService"; + positions[] = {{0.272949, 1.15723, -1.14411},{0.612793, -1.32129, -1.13259}}; + }; + + class land_seb_main_fac + { + table = "Industrial"; + positions[] = {{20.2397, -6.28809, -6.0019},{20.1323, -0.277344, -6.0019},{14.7222, -0.286133, -6.00189},{8.71826, -3.16699, -6.0019},{2.87354, -6.94336, -6.0019},{3.64453, 15.7803, 8.63872},{8.84375, 11.8525, 8.63873},{20.7271, 13.3164, 8.63872},{22.0767, 5.18555, 8.63872},{12.668, 4.78711, 8.63873},{3.85889, 3.99121, 8.63872},{9.89307, 16.2549, 4.16873},{14.1387, 17.6328, 4.16873},{20.1953, 21.2832, 4.16873},{-2.13281, 4.35645, 4.16873},{-7.08203, 3.02637, 4.16873},{-5.4502, 11.6123, 4.16873},{-26.3335, -2.50879, 5.78507},{-21.8853, -21.4766, 6.62068},{-11.1016, -7.77637, 5.5584}}; + }; + + class land_seb_mine_main_opt + { + table = "Industrial"; + positions[] = {{0.200195, -2.64844, -5.11368},{-0.065918, 1.44141, -5.09117},{-6.45654, 5.61523, -4.79106},{-2.86084, 2.72559, -0.995052},{-0.0131836, 4.7207, -0.991344},{-3.49854, 5.5791, -0.989746},{-0.959961, 5.41699, -5.06926},{6.56592, 1.58105, -4.79755},{4.11816, 3.27734, 5.05729},{-4.6626, 3.16699, 7.8684},{-5.74951, -2.37109, 7.86839},{-0.536133, -3.12012, 7.8684}}; + }; + + class land_seb_mine_maringotka + { + table = "Industrial"; + positions[] = {{0.23291, 0.0742188, -0.612675},{-0.94043, -1.0166, -0.612675},{-1.80273, 1.60645, -1.80481}}; + }; + + class land_seb_mine_near + { + table = "Industrial"; + positions[] = {{12.7983, -7.2373, -11.7431},{11.0381, -5.07715, -8.8979},{5.08057, -7.26758, -8.8979},{8.21387, -7.15723, -8.8979},{12.3599, 5.94336, -11.8273},{1.08984, 5.6748, -11.8485}}; + }; + + class land_seb_mine_near_bordel + { + table = "Industrial"; + positions[] = {{-2.35742, 1.12402, -1.5913},{2.18848, 1.50977, -1.58464}}; + }; + + class land_seb_nadrze + { + table = "Industrial"; + positions[] = {{-1.71924, 7.23828, -1.99941},{0.884766, 7.42383, -1.99976},{1.90088, 2.84473, -1.98533},{2.104, -2.93262, -1.96194},{-1.94531, -7.37988, -1.96484}}; + }; + + class Land_vys_budova_p1 + { + table = "Military"; + positions[] = {{4.67285, -9.89844, -2.95578},{2.59277, -11.4277, -2.9579},{1.34326, -4.62988, -2.95771},{-1.03125, -10.8135, -2.96087},{0.00537109, 3.47266, -2.96087},{3.87695, -1.25293, -2.96087},{2.09131, 9.34766, -2.96236},{0.953125, 6.55859, -2.96087},{-5.84521, 9.24023, -2.96087},{-5.76367, 2.80469, -2.96087},{-6.62109, -2.30859, -2.97414},{-2.52734, -6.43262, -2.96087},{-5.80176, -11.4531, -2.96087},{-3.37793, -3.25098, -2.96087},{-1.10059, 4.71582, -0.407818},{-1.08496, -1.66895, -0.407818},{-0.66748, 4.49902, 2.12336},{1.89697, -1.58594, 2.12336},{0.874512, -0.941406, 5.54735},{-3.29443, -1.69629, 5.59869},{2.32715, -8.84766, 5.59121},{3.23828, 1.57617, 5.59121},{-0.154297, 8.67871, 5.59121},{-5.93896, 2.6543, 5.59121},{-6.43848, -11.2549, 5.59121},{-2.58008, 3.24707, 5.59869}}; + }; + class land_Mi8_Crashed + { + table = "Tourist"; + positions[] = {{1.96582, -5.91016, -1.93351},{2.27588, -3.44238, -1.94127},{-0.348633, -4.37793, -1.73772},{-2.43164, -3.96484, -1.96016}}; + }; + //Tanoa + + /////////////////////////////////////////////////////////////////////////// + // Tourist - Churches, Temples + /////////////////////////////////////////////////////////////////////////// + class Land_Temple_Native_01_F + { + table = "Tourist"; + positions[] = {{2.86328, 3.62207, -5.94443},{-2.13916, 3.75977, -5.94443},{0.0214844, 2.21387, -5.94443}}; + }; + class Land_BasaltWall_01_gate_F + { + table = "Tourist"; + positions[] = {{0.0439453, 0.864258, -0.817093}}; + }; + class Land_Cathedral_01_F + { + table = "Tourist"; + positions[] = {{7.21387, -13.8271, -8.8191},{0.727295, -13.9795, -7.82105},{-7.71265, -13.25, -8.8191},{-12.6165, -13.6201, -10.1715},{-8.31592, -5.81348, -9.39412},{8.65625, -5.93066, -9.39412},{12.52, -14.5186, -10.1715}}; + }; + class Land_Church_01_F + { + table = "Tourist"; + positions[] = {{7.84204, 8.19629, -9.98111},{7.97876, 4.67188, -9.98111},{8.10913, 0.875977, -9.98111},{-7.82324, -0.583984, -9.98111},{-7.87085, 2.66602, -9.98111},{-7.93921, 6.75977, -9.98111}}; + }; + class Land_Church_02_F + { + table = "Tourist"; + positions[] = {{-1.57104, -16.291, -3.31618},{2.27466, -17.1553, -3.31618}}; + }; + class Land_Church_03_F + { + table = "Tourist"; + positions[] = {{-2.0188, 8.6582, -6.7793}}; + }; + class Land_Hotel_02_F + { + table = "Tourist"; + positions[] = {{-1.92993, -8.71289, -3.41328},{-1.68457, -5.88867, -3.41328},{-2.05542, -3.74316, -3.41328},{-0.919678, 2.72461, -3.41328},{-1.44141, 6.75586, -3.41328},{-2.28882, 10.0713, -3.41328},{-1.7937, 14.9482, -3.41328},{-0.670898, -1.53125, -3.41328},{3.26514, -1.31543, -3.41328},{7.61841, -0.356445, -3.41328},{5.31714, -0.30957, -3.41328},{7.62646, -1.7334, -3.41328},{2.55078, 1.68457, -3.41328},{-8.28198, 0.0371094, 0.0829258},{-5.4873, 0.396484, 0.0830498},{-8.25562, 1.77246, 0.0829353},{-6.80396, 2.12402, 0.0829277},{-2.97876, -1.2832, 0.0829277},{-0.0288086, -0.879883, 0.0829277},{2.29663, -0.895508, 0.201029},{-3.04395, 3.02441, 0.0829277},{0.036377, 2.55762, 0.0829277},{2.36206, 2.54102, 0.201008},{4.4043, 0.210938, 0.201008},{4.35107, 1.84961, 0.20101},{-6.39966, 1.38574, -3.41328},{-8.302, -0.541016, -3.41328},{-3.31665, -0.0693359, -3.41328},{6.95557, 1.69141, -3.41328},{0.772217, 0.842773, 0.0829296},{7.59888, 3.51172, -3.41328}}; + }; + class Land_Mausoleum_01_F + { + table = "Tourist"; + positions[] = {{-0.353271, -0.273438, -1.9543},{0.789551, 1.28613, -1.9543}}; + }; + + /////////////////////////////////////////////////////////////////////////// + // Military + /////////////////////////////////////////////////////////////////////////// + class Land_Airport_01_controlTower_F + { + table = "Military"; + positions[] = {{-1.33838, -2.1748, 4.21085},{2.74023, -2.18848, 4.21085},{3.20215, 3.36816, 4.21085},{0.688477, -0.482422, 7.91645},{-1.7041, 2.05859, 7.91645},{0.241699, 1.05566, 4.65807}}; + }; + class Land_Airport_01_terminal_F + { + table = "Military"; + positions[] = {{0.827881, -1.37305, -4.16959},{-7.77563, 6.21191, -4.02355},{-5.3645, 7.58496, -4.02355},{9.20093, 8.3584, -4.05115},{6.49023, 6.29004, -4.05115},{-2.06299, -3.88965, -4.16956},{8.37256, -9.38281, -3.60985},{5.72144, -7.32324, -4.05115},{-12.0342, 0.892578, -4.02597},{-15.1523, 2.55957, -4.02597}}; + }; + class Land_Airport_02_controlTower_F + { + table = "Military"; + positions[] = {{-0.812744, 0.282227, -10.661},{0.941406, -2.72852, -7.56659},{1.30371, -2.91895, -4.33187},{0.729492, -2.33203, -1.09817},{-3.49194, 1.33203, 2.13546},{-3.42407, 8.52734, 2.13546},{3.66113, 7.77637, 2.13546},{3.46069, 1.49121, 2.13546},{-1.35278, 5.05273, 2.13546},{1.03467, 4.76367, 2.13546}}; + }; + class Land_Airport_02_terminal_F + { + table = "Military"; + positions[] = {{9.60767, -6.86035, -1.40867},{5.26221, -7.11816, -1.40867},{5.20581, 2.50684, -1.40868},{10.1387, 1.65332, -1.40867},{10.0408, -3.44336, -1.40867},{6.25098, -3.10938, -1.40867},{1.42871, 3.71387, -1.40868},{-15.1729, -9.67676, -1.40867},{19.1196, -10.5801, -1.40867}}; + }; + class Land_Barracks_01_camo_F + { + table = "Military"; + positions[] = {{-2.03223, -4.17578, 0.518449},{-12.3308, 3.25293, 0.518449},{-8.06128, -2.79688, 0.518449},{-13.0491, -3.41699, 0.518449},{-5.89697, 2.90039, 0.518449},{-0.161133, 3.46387, 0.518449},{6.76074, -3.37207, 0.518448},{3.97217, -3.37793, 0.518448},{3.79028, 3.08203, 0.518449},{13.0432, 2.82031, 0.518449},{10.2876, -2.74316, 0.518448},{-2.78931, -5.56543, 3.85143},{-12.4595, 3.32813, 3.85143},{-9.40015, -2.75, 3.85143},{-3.89746, 2.83496, 3.85143},{6.83984, -3.45605, 3.85143},{3.69678, 3.21973, 3.85143},{13.5459, 3.05859, 3.85143},{10.2222, -2.88086, 3.85143},{15.8203, 4.68457, 3.85143},{5.03662, 5.58203, 3.85143},{-11.1951, 5.7002, 3.85143}}; + }; + class Land_Barracks_01_grey_F + { + table = "Military"; + positions[] = {{-4.93823, -3.14258, 0.579082},{-7.1687, -0.0634766, 0.579084},{0.246094, 3.5625, 0.579081},{15.8589, 3.48145, 3.82728},{4.1709, 3.31836, 3.91306},{-4.14941, 2.08008, 0.579082},{-5.45679, 4.16797, 0.579081},{3.21436, 3.62891, 0.579081},{6.79688, 3.63184, 0.579083},{13.6021, 3.58887, 0.579082},{2.74634, -3.52246, 0.579081},{6.47388, -3.57324, 0.579081},{13.2324, -3.56543, 0.579082},{10.2068, -3.60938, 0.579092},{0.724121, -1.92578, 2.14746},{-11.688, -3.53027, 0.579081},{-8.72437, -3.49414, 0.579082},{-5.19409, -1.15625, 3.91299},{-2.52246, 4.02246, 3.91306},{-11.7957, 3.63379, 3.91306},{-8.79614, 3.57129, 3.91306},{0.246094, 3.5625, 3.91306},{-4.85718, 1.84082, 3.91306},{6.79688, 3.63184, 3.91306},{13.0173, 3.62207, 3.91306},{2.74634, -3.52246, 3.91306},{6.47388, -3.57324, 3.91306},{13.2324, -3.56543, 3.91306},{10.2068, -3.60938, 3.91306},{-11.688, -3.53027, 3.91306},{-8.72437, -3.49414, 3.91306},{-2.67603, -5.52637, 3.9129},{-5.47803, -5.47754, 3.91306},{-12.571, 5.66699, 3.82743},{1.52539, 5.85156, 3.82743},{13.0151, 5.56738, 3.82743},{8.60815, 5.64941, 3.82743},{-8.0498, -2.96875, 7.73989},{-7.94238, 4.33301, 7.53899},{-10.9417, 4.27246, 7.54615},{-11.0132, -2.84766, 7.75703},{-3.51318, -3.02734, 7.73164},{0.239258, 2.94727, 7.69844},{5.69629, -3.12012, 7.7184},{6.52026, 3.02539, 7.68936},{13.1848, -3.37891, 7.68175},{12.9956, 3.25977, 7.66242},{-9.55566, 3.30469, 0.579081},{-11.7957, 3.63379, 0.579083}}; + }; + class Land_Cargo_House_V4_F + { + table = "Military"; + positions[] = {{-1.54419, 0.999023, -0.272255},{-1.50879, 3.05518, -0.136219},{1.49829, 3.27637, -0.136219}}; + }; + class Land_Cargo_HQ_V4_F + { + table = "Military"; + positions[] = {{-2.38062, 2.84961, -3.28473},{3.62866, 5.22852, -3.16431},{6.25708, 3.00537, -3.28473},{4.15381, -4.32813, -3.28473},{-1.63599, 2.06934, -0.759884},{5.61597, 1.51514, -0.759884},{-1.58765, -3.61523, -0.759884}}; + }; + class Land_Cargo_Patrol_V4_F + { + table = "Military"; + positions[] = {{1.19702, -1.0708, -0.55952},{-1.55225, -1.25684, -0.55952}}; + }; + class Land_Cargo_Tower_V4_F + { + table = "Military"; + positions[] = {{1.24365, 2.92432, -8.27076},{-3.12207, -3.45801, -0.132563},{-4.18994, 2.93652, -0.132563},{4.13135, 4.40283, 2.46744},{-1.19702, -2.97461, 2.46744},{-4.38403, -5.64014, 2.58785},{-3.04907, 5.84717, 2.58785},{4.70801, -0.943848, 4.99228},{3.79785, 2.89355, 4.99228},{-2.58374, 4.81885, 4.99228},{-3.46924, -4.14063, 4.99228},{0.449951, 1.61523, 4.99228}}; + }; + + /////////////////////////////////////////////////////////////////////////// + // Medical + /////////////////////////////////////////////////////////////////////////// + + + /////////////////////////////////////////////////////////////////////////// + // VehicleService - Garages + /////////////////////////////////////////////////////////////////////////// + class Land_FuelStation_01_workshop_F + { + table = "VehicleService"; + positions[] = {{1.55859, 0.491211, -2.38167},{5.323, -0.123047, -2.38166},{3.38965, -3.31152, -2.38166},{-4.86279, 3.44043, -2.38166},{-0.757568, 2.62012, -2.38166},{-1.45166, -1.37207, -2.38166},{-0.297607, -4.38965, -2.38166},{-3.42407, -2.7959, -2.38166},{-4.43384, -1.31934, -2.38166}}; + }; + class Land_FuelStation_02_workshop_F + { + table = "VehicleService"; + positions[] = {{4.32983, -1.37402, -1.28247},{0.798584, 0.898438, -1.2825},{0.798828, 3.30762, -1.28248},{3.5061, 10.5254, -1.5024},{-4.67676, 0.318359, -1.20392},{-2.73096, 7.27441, -1.2675},{3.92358, 6.36621, -1.2675}}; + }; + class Land_Warehouse_03_F + { + table = "VehicleService"; + positions[] = {{-8.48145, -3.27783, -2.37297},{-8.30518, 2.33496, -2.37297},{4.01001, -0.54541, -2.37297},{0.600586, -3.29736, -2.37297},{-2.61084, 2.81201, -2.37297},{6.88647, 4.00146, 0.128591},{6.11084, 0.941895, 0.134463},{7.76172, -1.81592, 0.139763}}; + }; + class Land_GarageShelter_01_F + { + table = "VehicleService"; + positions[] = {{2.66284, 0.1875, -1.26478},{-1.15308, -2.07129, -1.26478},{-3.00488, 2.24219, -1.26478}}; + }; + + + /////////////////////////////////////////////////////////////////////////// + // Civillian Lower Class + /////////////////////////////////////////////////////////////////////////// + class Land_Addon_01_F + { + table = "CivillianLowerClass"; + positions[] = {{-0.0771484, -3.42969, -1.18165},{-0.0510254, 3.45508, -1.18165}}; + }; + class Land_Addon_04_F + { + table = "CivillianLowerClass"; + positions[] = {{5.11499, 3.44434, 0.313654},{5.3064, -1.28711, 0.313654},{1.43872, 4.01563, 0.313654},{-3.60425, 4.06055, 0.313654},{-5.37915, -1.30859, 0.315462},{-5.4126, -7.74414, 0.315462},{2.18799, -4.7334, 0.295511},{-2.14502, 0.327148, 0.313654},{-2.03418, -6.08789, 0.295511},{-1.64429, -3.04492, 0.295511}}; + }; + class Land_Shed_01_F + { + table = "CivillianLowerClass"; + positions[] = {{-1.63525, 0.723633, -0.930923},{0.366943, 0.666992, -0.930905},{1.9231, 0.618164, -0.930935}}; + }; + class Land_Shed_02_F + { + table = "CivillianLowerClass"; + positions[] = {{-0.999512, 0.856445, -0.853717},{1.07373, 1.06934, -0.853717}}; + }; + class Land_House_Native_02_F + { + table = "CivillianLowerClass"; + positions[] = {{1.4668, 1.57227, -2.37363},{2.01392, -1.94727, -2.37363},{-3.0769, -2.16211, -2.37363},{-3.13428, 1.90625, -2.37363}}; + }; + class Land_House_Small_01_F + { + table = "CivillianLowerClass"; + positions[] = {{-5.15918, 3.30469, -0.725801},{-2.37891, -3.66211, -0.725801},{-0.370605, 3.30078, -0.725801},{-5.71069, -1.92188, -0.725801},{-4.61841, -3.47949, -0.725801},{5.7312, 1.41113, -0.725801},{5.73682, 2.94531, -0.725801},{5.73633, -1.61523, -0.725798},{5.72656, -3.4043, -0.7258},{-0.0686035, 0.75293, -0.725799},{1.62427, 3.29199, -0.725801},{2.38892, 0.566406, -0.725801},{2.44507, -3.60059, -0.725801}}; + }; + class Land_House_Small_02_F + { + table = "CivillianLowerClass"; + positions[] = {{0.186768, -3.98535, -0.74064},{-1.48145, -5.63574, -0.74064},{-3.90405, 2.8916, -0.740633},{0.19165, 1.88086, -0.740639},{-1.82813, -2.85156, -0.740639},{-3.19019, -1.54199, -0.74064},{-3.32153, -5.41504, -0.74064},{-3.89648, 5.4873, -0.740639},{-1.49097, 5.86426, -0.740638}}; + }; + class Land_House_Small_03_F + { + table = "CivillianLowerClass"; + positions[] = {{-5.6853, 3.47363, -1.34902},{-4.21582, -1.17969, -1.32402},{-0.532227, 3.87305, -1.32402},{1.27075, -0.573242, -1.32402}}; + }; + class Land_House_Small_04_F + { + table = "CivillianLowerClass"; + positions[] = {{2.62964, -1.5332, -0.817202},{-1.37061, -3.31543, -0.817202},{-0.413574, 3.04102, -0.817202},{1.30786, -7.03906, -0.87291},{-3.44702, 3.64258, -0.872911}}; + }; + class Land_House_Small_05_F + { + table = "CivillianLowerClass"; + positions[] = {{-1.38037, 4.41016, -1.08628},{-0.400635, -0.0605469, -1.08628},{-0.890625, -3.07324, -1.08628}}; + }; + class Land_House_Small_06_F + { + table = "CivillianLowerClass"; + positions[] = {{-3.41675, -3.75879, -1.00433},{-3.06567, 0.991211, -1.00433},{0.966064, -2.96387, -1.00433},{-3.22119, 3.95996, -1.00503}}; + }; + class Land_House_Native_01_F + { + table = "CivillianLowerClass"; + positions[] = {{-2.04907, -1.64746, -3.13483},{-1.43799, 1.98047, -3.13483},{2.88135, 1.87695, -3.13483},{3.05176, -1.48438, -3.13483}}; + }; + class Land_PierWooden_01_hut_F + { + table = "CivillianLowerClass"; + positions[] = {{1.13232, -0.893555, 18.7197}}; + }; + class Land_PierWooden_01_ladder_F + { + table = "CivillianLowerClass"; + positions[] = {{0.233887, -0.708008, 19.827}}; + }; + class Land_PierWooden_01_dock_F + { + table = "CivillianLowerClass"; + positions[] = {{-4.53687, 0.679688, 17.8678},{-0.218018, -5.85645, 17.8678},{4.63672, 3.60156, 17.8678}}; + }; + class Land_PierWooden_01_platform_F + { + table = "CivillianLowerClass"; + positions[] = {{-1.22583, 1.11523, 19.5247},{1.12427, 1.14551, 19.5247}}; + }; + class Land_Shed_03_F + { + table = "CivillianLowerClass"; + positions[] = {{2.09058, -0.371094, -0.713204},{-0.305664, 0.0419922, -0.713204}}; + }; + class Land_Shed_04_F + { + table = "CivillianLowerClass"; + positions[] = {{0.278076, 0.768555, -0.726258}}; + }; + class Land_Shed_05_F + { + table = "CivillianLowerClass"; + positions[] = {{-1.93994, -1.54297, -0.917485},{1.58032, -1.0498, -0.917485}}; + }; + class Land_Shed_07_F + { + table = "CivillianLowerClass"; + positions[] = {{2.58154, -0.797852, -1.36388},{2.26782, 0.829102, -1.36387},{-3.31567, -0.990234, -1.36386},{-0.429688, -0.893555, -1.36388}}; + }; + class Land_Slum_01_F + { + table = "CivillianLowerClass"; + positions[] = {{3.35571, 2.1416, 0.643513},{2.30029, -0.546875, 0.643514},{1.05811, -1.90234, 0.643514},{-0.150146, 2.13574, 0.643545},{-2.06763, 1.97656, 0.617534},{4.91821, 1.76465, 0.643515},{4.86938, -1.81445, 0.643514},{-0.591309, -0.00878906, 0.643521}}; + }; + class Land_Slum_02_F + { + table = "CivillianLowerClass"; + positions[] = {{1.80273, -0.624023, 0.158215},{-0.717529, -2.38379, 0.158216},{2.12402, 3.88965, 0.158215},{2.09155, -3.78711, 0.158216},{1.72144, -1.96387, 0.158216},{-2.06787, 4.17871, 0.158215}}; + }; + class Land_Slum_03_F + { + table = "CivillianLowerClass"; + positions[] = {{-2.12012, 7.30469, -0.674455},{-2.55933, 2.12598, -0.674454},{2.83594, 6.05469, -0.651794},{3.9458, 0.943359, -0.651794},{0.0112305, -1.2207, -0.651794},{1.64575, -3.14648, -0.651794}}; + }; + class Land_WaterTower_01_F + { + table = "CivillianLowerClass"; + positions[] = {{-0.452148, 0.015625, 3.74843}}; + }; + + /////////////////////////////////////////////////////////////////////////// + // Civillian Upper Class + /////////////////////////////////////////////////////////////////////////// + class Land_Hotel_01_F + { + table = "CivillianUpperClass"; + positions[] = {{-8.20288, 7.83105, -1.58711},{-2.1604, 7.38281, -1.58712},{3.8728, 7.81836, -1.58711},{6.44751, 4.7998, -1.58711},{6.44751, -1.2334, -1.58711},{-2.1604, -5.81641, -1.58711},{3.8728, -5.81641, -1.58711},{-7.53955, -4.56445, -1.58711},{-7.63403, 0.913086, 1.66289},{6.14624, 7.49121, 4.4886},{6.01196, 0.84668, 4.48859},{0.8479, -5.81641, 4.48865},{6.1189, -5.98535, 4.48865},{-7.40649, -5.82227, 4.4886},{-6.28833, 7.66504, 4.48861},{3.34326, 6.52637, 7.75042},{5.21191, 1.56738, 7.59465},{3.34326, -5, 7.7508},{-6.60034, -5.00488, 7.60001},{-6.61377, -0.413086, 7.5989},{-6.64063, 6.62695, 7.5967},{-2.01831, 6.44531, 7.97652},{-4.02124, 3.88086, -5.31221},{1.14209, 5.27441, -5.31221},{-0.478271, -1.46094, -5.31221},{2.69238, 0.512695, -5.31221}}; + }; + class Land_House_Big_02_F + { + table = "CivillianUpperClass"; + positions[] = {{7.26123, -6.65332, -1.4679},{8.78711, -3.17871, -1.46789},{7.34692, 0.493164, -1.46789},{-5.19165, -0.584961, -1.4679},{-7.11353, 3.46484, -1.4679},{-9.80347, 2.98047, -1.46789},{-3.50171, 6.34277, -1.46789},{4.75928, 3.41895, -1.4679},{0.365479, 1.74121, -1.4679},{0.321533, 8.83398, -1.46789},{-3.83179, 8.92773, -1.46789},{2.44434, 6.33105, -1.46789},{6.07397, 5.41016, -1.46789},{4.53271, 8.58008, -1.46789}}; + }; + class Land_House_Big_03_F + { + table = "CivillianUpperClass"; + positions[] = {{10.6619, 5.75977, -3.22996},{9.25781, 3.40625, -2.99144},{1.88281, 0.274414, -3.19996},{7.68018, 0.445313, -0.115536},{5.85278, -2.44727, -0.115538},{5.896, 2.80762, -0.115538},{10.7966, 5.81641, -0.136646},{10.7966, -5.22168, -0.136646},{-12.5356, 6.02734, -0.136646},{-13.6335, -5.51855, -0.145912},{4.46899, 3.20898, -3.19996},{9.25879, 3.4082, -3.19996},{-7.49341, -4.64551, -0.136646},{3.17041, 4.95996, -0.136646},{-7.65063, 5.22656, -0.136646},{3.40796, -4.60645, -0.136648},{7.61133, -2.03027, -0.115538},{7.59229, 2.57031, -0.115536},{9.81934, 1.22559, -3.19996},{10.2896, 0.297852, -0.136644},{6.10205, 5.60742, -3.22997},{8.23096, -2.7334, -3.19996}}; + }; + class Land_House_Big_01_F + { + table = "CivillianUpperClass"; + positions[] = {{0.581055, 1.07715, -1.03786},{3.76978, 1.45898, -1.03786},{7.10107, 3.50879, -1.03786},{5.354, -0.949219, -1.03786},{7.10107, 0.709961, -1.03786},{2.60303, 5.45996, -1.03786},{1.08838, -1.04297, -1.03786},{-6.92017, -2.47754, -1.03786},{3.1604, 3.23047, -1.03786},{-1.71655, -3.68359, -1.03786},{1.73779, -2.62012, -1.03786},{7.14502, -3.83887, -1.03786},{3.41797, -3.76563, -1.03786}}; + }; + class Land_House_Big_04_F + { + table = "CivillianUpperClass"; + positions[] = {{-1.37891, -3.32227, -2.97358},{-3.73853, -4.79199, -2.97358},{-5.98267, -3.32715, -2.97359},{4.17285, -4.86523, -2.97358},{4.1709, -1.88672, -2.97358},{10.072, -7.38672, 0.253304},{1.69922, -7.38672, 0.253298},{-6.56543, -7.38672, 0.253365},{-2.49268, 6.82422, 0.269667},{-8.40747, -3.21582, 0.252121},{-7.91455, 5.04785, 0.255436},{4.07715, 6.31934, 0.263828},{-0.817871, 1.19824, 0.276417},{-5.89087, 2.65234, 0.276417},{-3.69604, 4.36133, 0.276417},{2.28882, 4.45898, 0.276417},{2.63916, 1.19238, 0.276417},{4.17358, 3.16309, 0.276417},{-8.5835, -2.4043, -2.97532},{-8.77393, -7.35254, -2.97424},{-8.0625, 1.89063, -2.97626},{-8.55005, 6.73438, -2.97482},{1.52148, -6.74219, -2.97358},{0.0705566, 6.78711, -2.97553}}; + }; + class Land_House_Big_05_F + { + table = "CivillianUpperClass"; + positions[] = {{-2.42017, -4.77539, -1.51147},{4.53735, -5.0459, -1.11731},{-8.91455, -4.73145, -1.51147},{-9.14844, 5.57715, -1.51147},{-2.42065, 5.48828, -1.51147},{4.50073, 5.00781, -1.11731}}; + }; + class Land_School_01_F + { + table = "CivillianUpperClass"; + positions[] = {{-12.2412, -1.23535, -1.27842},{-12.1011, 2.86914, -1.27842},{-6.37842, -1.32617, -1.27842},{-2.88672, -1.31543, -1.27842},{0.71582, 0.556641, -1.27842},{11.927, 2.93066, -1.27842},{7.01636, -0.12793, -1.27842},{13.5767, -1.79297, -1.27842}}; + }; + + /////////////////////////////////////////////////////////////////////////// + // Shops + /////////////////////////////////////////////////////////////////////////// + class Land_FuelStation_01_shop_F + { + table = "Shop"; + positions[] = {{-3.47095, -2.32715, -2.01301},{1.49292, -2.76465, -2.01301},{-3.97681, 4.03711, -2.01301},{0.912842, 2.21191, -2.01301}}; + }; + class Land_GuardHouse_01_F + { + table = "Shop"; + positions[] = {{-0.890381, 2.22461, -1.03759},{2.25879, 1.90527, -1.03759},{1.18262, -3.99707, -1.04188},{4.2688, -4.30566, -1.04188},{-1.89941, -0.541016, -1.04188},{-1.66211, -4.21094, -1.04188}}; + }; + class Land_Shop_City_01_F + { + table = "Shop"; + positions[] = {{2.4292, 3.38574, -4.955},{1.2439, -0.536621, -4.94684},{5.92114, 2.45996, -4.94911}}; + }; + class Land_Shop_City_02_F + { + table = "Shop"; + positions[] = {{2.87964, -6.96094, -4.33675},{3.52344, -3.69141, -4.3368},{7.54688, -3.29297, -4.33673},{-2.46313, -5.58398, -4.33675},{-0.394531, -7.3291, -4.33675},{-9.93286, -6.42188, -4.33675},{-8.23169, -3.64941, -4.33675}}; + }; + class Land_Shop_City_03_F + { + table = "Shop"; + positions[] = {{5.67749, -2.68164, -4.96615},{3.79248, 8.09082, -4.96667},{1.88354, -3.96289, -4.96746}}; + }; + class Land_Shop_City_04_F + { + table = "Shop"; + positions[] = {{1.2771, 10.0566, 4.17043},{7.14185, 9.99414, 4.17043},{4.28784, 9.86816, 4.17043},{6.50317, 1.44434, 4.17043},{1.27368, 1.37695, 4.17043},{7.23999, 5.65234, 4.17043},{7.2915, 7.69629, 4.17043},{1.28784, 3.91992, 4.17043},{-0.504395, 10.0264, 6.97933},{-6.20288, 9.97656, 6.97932},{-5.91138, 1.75684, 6.97932},{-6.104, 7.68848, 6.97932},{-0.501709, 3.88867, 6.97932},{-5.6123, -0.362305, 6.97932},{-5.93213, -4.22363, 6.97932},{-5.87793, -9.48828, 6.97932},{-3.51074, -9.6748, 6.97932},{1.36377, -1.84863, 6.97932},{-2.06396, -0.0917969, 6.97932},{7.09326, -4.71387, 6.97932},{4.16943, -5.02539, 6.97932},{7.18335, -0.458008, 6.97932},{1.20508, -9.41602, 6.97932},{7.18774, -9.19141, 6.97932},{7.20654, -10.5918, 3.60047},{1.93359, -10.7646, 3.60047},{-1.50293, -10.3926, 3.60047},{-6.23047, -10.5918, 3.60047}}; + }; + class Land_Shop_City_05_F + { + table = "Shop"; + positions[] = {{-0.283447, 2.6084, 4.08708},{-5.32642, -12.6162, 7.18407},{5.06274, -10.9531, 7.15172},{0.605469, -4.85449, 7.03372},{0.268311, -1.22461, 6.96352},{7.7915, -6.00879, 7.05611},{9.13062, 2.4502, 4.08708},{4.25415, 5.82715, 4.08708},{-2.11279, 9.05762, 4.08708},{6.97266, 13.6572, 4.08708},{0.479492, 13.2539, 4.08708},{-6.08496, 13.8789, 4.08708},{-8.25366, 10.1318, 4.08708},{-8.55688, -12.0498, 7.17308},{0.14209, -11.0918, -7.28322}}; + }; + class Land_Shop_City_06_F + { + table = "Shop"; + positions[] = {{-6.04688, 0.503906, -4.06816},{-3.99438, 7.72363, -4.06839},{-5.10303, -5.04199, -4.06798}}; + }; + class Land_Shop_City_07_F + { + table = "Shop"; + positions[] = {{1.10278, 2.13574, 0.00890541},{1.35547, 6.91504, 0.00893593},{-0.679443, 0.248047, 3.60637},{-1.02441, 4.30469, 3.60637},{2.6582, -3.65723, 3.60637},{-0.708984, -6.85547, 3.60637},{-4.04346, -2.99414, 3.60637},{-4.01318, 4.39941, 3.60637},{-3.63501, 7.54883, 3.60637}}; + }; + class Land_Shop_Town_01_F + { + table = "Shop"; + positions[] = {{-3.92822, -2.74707, -3.27012},{-3.80103, 0.883789, -3.27011},{-2.52832, -3.63965, -3.27011},{-3.80493, -6.10156, -3.27011},{-0.918213, -5.84473, -3.27011},{4.22827, -6.09766, -3.27011},{-2.00391, 3.82813, -3.27011},{-3.91284, 4.55273, -3.27012},{-1.0105, 0.652344, -3.27011},{0.751221, -2.10352, -3.27011},{2.72095, -3.8457, -3.27011},{3.85083, -2.64551, -3.27011}}; + }; + class Land_Shop_Town_02_F + { + table = "Shop"; + positions[] = {{2.99487, -4.95605, -2.14528},{-2.94238, -5.14746, -2.14139}}; + }; + class Land_Shop_Town_03_F + { + table = "Shop"; + positions[] = {{-5.88965, -3.25684, -3.12664},{-5.90576, -0.0273438, -3.12665},{5.32275, -1.48535, -3.12776},{0.748779, -1.30957, -3.12776},{0.994385, -4.28027, -3.12776}}; + }; + class Land_Shop_Town_04_F + { + table = "Shop"; + positions[] = {{-2.41553, -6.52832, -2.43639},{2.42578, -6.81152, -2.43639}}; + }; + class Land_Shop_Town_05_F + { + table = "Shop"; + positions[] = {{-7.17432, -6.53418, -2.72663},{7.25415, -6.73242, -2.72663},{1.95654, -6.69824, -2.72662},{-1.74683, -6.51855, -2.72663}}; + }; + class Land_Supermarket_01_F + { + table = "Shop"; + positions[] = {{4.35083, -2.46777, -1.50003},{-0.334473, -6.50879, -1.50003},{-0.251221, -0.452148, -1.50003},{-4.82568, 1.79492, -1.50003},{-4.38794, -5.06836, -1.50003},{7.19556, -1.90137, -1.50003},{1.91138, 1.69434, -1.50003},{-2.32007, -8.67676, -1.50003}}; + }; + class Land_Warehouse_02_F + { + table = "Shop"; + positions[] = {{20.1353, 11.1074, 4.53597},{20.1353, -9.1582, 4.53597},{19.5979, -1.66113, 4.53613},{19.5979, 3.98535, 4.53613},{-5.52881, 5.00781, 4.63205},{-7.08691, -8.17188, 4.54425},{-20.0464, 11.1074, 4.54819},{-20.0464, -9.1582, 4.54819},{-19.5269, -1.65527, 4.54803},{-19.5269, 3.99121, 4.54803},{3.19653, 5.10254, 4.6321},{1.84839, -1.40625, 4.54153},{11.4192, 5.10254, 4.63212},{7.40503, -7.6543, 4.53984},{11.2095, -12.8008, -3.94501},{5.47998, -12.2197, -3.94501},{-0.130127, -12.8135, -3.94501},{-3.7085, -12.4531, -3.94501}}; + }; + + /////////////////////////////////////////////////////////////////////////// + // Industrial + /////////////////////////////////////////////////////////////////////////// + class Land_Airport_01_hangar_F + { + table = "Industrial"; + positions[] = {{9.03003, -9.82813, -2.64558},{12.0889, 13.4424, -2.64558},{-10.1367, -9.1582, -2.64557},{5.88574, 13.7393, -2.64557},{-1.66846, -9.04395, 9.82697},{2.23926, -9.12988, 9.69195},{1.85083, 14.8818, 9.84647},{-1.72559, 14.9346, 9.80423},{-12.675, 14.3945, 5.44739},{12.7019, 14.3379, 5.52713},{12.5813, -8.32715, 5.5752},{-11.5681, -8.43457, 5.88791},{7.02759, 11.5313, 7.88078},{-12.155, 12.8789, 5.65434},{-12.188, 7.26563, 5.64122},{-6.71826, 11.6631, 7.93423},{-12.1636, 0.255859, 5.65096},{-6.75854, 2.82324, 7.9273},{-12.073, -5.24805, 5.687},{13.3979, -5.29395, 5.25013},{6.91626, 2.80078, 7.89974},{-7.02197, -9.43164, 7.69681},{6.95947, -9.37891, 7.81296},{13.6221, -0.296875, 5.16088},{13.4575, 6.87988, 5.22637},{6.99634, -5.94824, 7.88647},{-6.74829, -5.91406, 7.92898},{-12.0376, 11.5723, -2.62052},{2.6521, 1.68652, -2.62057}}; + }; + class Land_Airport_02_hangar_left_F + { + table = "Industrial"; + positions[] = {{-12.4209, -24.9082, -1.85819},{-7.03906, -17.4277, -0.645023},{-7.00854, -8.0498, -0.638107},{-6.97998, 1.14063, -0.631704},{-12.4202, -12.9775, -1.85804},{-12.416, -3.68555, -1.85711},{-12.4124, 5.6084, -1.85627},{-12.4209, -22.374, -1.85819},{-1.84839, -10.2188, 2.96794},{-5.51953, -14.9307, 1.87583},{-5.51953, -4.78809, 1.87583},{-5.51953, 5.1543, 1.87584},{-2.79541, 18.9854, 2.68622},{-4.56616, 12.959, 2.15945},{3.58447, -8.81055, 4.5841},{3.58423, 6.24512, 4.58404},{0.876221, -15.1367, 3.77843},{0.876221, 0.0351563, 3.77843},{0.876221, 8.45215, 3.77843},{2.63867, 19.2529, 4.30273},{5.93921, -22.7969, 5.28464},{9.00952, 5.37305, 6.19798},{6.29248, -4.72559, 5.38974},{8.06177, 19.5205, 5.91602},{6.29248, 13.4961, 5.38974},{11.3809, -24.5371, 6.90338},{11.7393, -7.10938, 7.01006},{11.7344, 8.98828, 7.00859},{11.7375, -18.5557, 7.00955},{13.4956, 19.791, 7.53254},{-4.20142, -21.4131, -1.28552},{-4.15698, -17.2041, -0.9673},{-4.15381, -12.2305, -0.945713},{-4.15381, -7.06836, -0.970572},{-4.15942, -2.0752, -0.951628},{-4.14771, 2.85547, -0.980427},{-4.15942, 6.97559, -0.951557},{-4.17969, 11.1748, -0.973799},{-4.15942, 16.6045, -0.951628},{0.163086, 19.9814, -1.28553},{5.12451, 19.6875, -1.28553}}; + }; + class Land_Airport_02_hangar_right_F + { + table = "Industrial"; + positions[] = {{4.39331, -25.1045, -0.900631},{10.4124, -15.0947, -1.34333},{7.27393, -12.7598, -0.635839},{9.71753, -10.458, -1.18671},{10.4124, -1.17871, -1.34333},{7.271, 5.80469, -0.635187},{12.71, -3.68457, -1.86125},{12.7129, -22.374, -1.8619},{4.38867, -17.2627, -0.984121},{4.38892, -7.06055, -0.967278},{4.39868, 2.81641, -0.997353},{4.38623, 11.1592, -0.970123},{0.162598, 19.6875, -1.32163},{-10.3376, 19.9814, -1.32163},{-16.4546, 19.6875, -1.32163},{-4.83081, 19.877, -4.72163},{-8.40137, 19.6875, -4.72162},{-15.3335, 19.9814, -4.72163},{7.37769, -12.3145, -4.95163},{2.14453, -10.2188, 3.00035},{5.81641, -14.9297, 1.90639},{5.81641, -4.78711, 1.90639},{5.81641, 5.15527, 1.90639},{3.09253, 18.9854, 2.71792},{4.86206, 12.959, 2.19076},{-3.28833, -8.81055, 4.61879},{-3.28833, 6.24512, 4.61879},{-0.579834, -15.1348, 3.81193},{-0.579834, 0.0371094, 3.81193},{-0.579834, 8.4541, 3.81193},{-2.34253, 19.2549, 4.33709},{-5.64233, -22.7969, 5.32012},{-8.71118, 5.375, 6.23442},{-5.99707, -4.72461, 5.4258},{-7.76514, 19.5234, 5.95251},{-5.99707, 13.4971, 5.4258},{-11.0835, -24.5371, 6.94116},{-17.6074, -13.8564, 8.88466},{-17.6074, 1.31543, 8.88471},{-11.4426, -7.10938, 7.04812},{-11.4392, 8.98828, 7.04716},{-11.4426, -18.5547, 7.04812},{-13.2024, 19.791, 7.57239},{-10.5923, 18.8203, -4.68848},{-14.3291, 18.8438, -1.39008},{-15.3164, 18.5908, -1.32163},{-11.6658, 18.499, -4.05376}}; + }; + class Land_ContainerCrane_01_F + { + table = "Industrial"; + positions[] = {{21.9863, 10.7412, -29.7253},{16.7583, 6.07129, 1.22021},{9.33081, 3.04004, 1.2331},{-3.68262, 6.24805, 1.23471},{-12.2251, 7.34277, 1.23625},{-14.718, -1.59375, 1.23302},{-8.86938, -8.3252, 1.23632},{8.94922, -4.05078, 1.2331},{18.71, -3.98828, 1.23309}}; + }; + class Land_Crane_F + { + table = "Industrial"; + positions[] = {{-7.68018, -1.75293, 5.74145},{-8.2002, 1.41895, 5.74145},{-10.165, 0.147461, 5.74145}}; + }; + class Land_DryDock_01_end_F + { + table = "Industrial"; + positions[] = {{16.4692, 7.59668, 5.13889},{20.4192, -3.24316, 5.13889},{16.4756, -9.06152, 5.2074},{20.5193, -12.4082, 5.13889},{13.2393, 7.88184, -5.54043},{7.13916, 14.9219, -5.54043},{2.26929, -11.4385, -5.54043},{-16.304, 7.58594, 5.13889},{-20.1809, -3.24316, 5.13889},{-19.8108, -7.58203, 5.13889},{-16.3308, -11.7334, 5.17903},{-13.0007, 7.88184, -5.54043},{-1.50073, -2.81836, -5.54043},{-6.90088, 14.9219, -5.54043},{7.03149, -17.3389, -5.54042},{-6.79297, -17.3389, -5.54043}}; + }; + class Land_DryDock_01_middle_F + { + table = "Industrial"; + positions[] = {{14.4111, -8.98047, -5.51673},{13.1912, 7.58008, -5.51673},{5.41113, 7.47949, -5.51673},{8.42114, -5.08984, -5.51673},{3.25098, -9.7998, -5.51673},{-13.5889, 8.37988, -5.51673},{-4.98901, 7.43945, -5.51673},{-19.3076, 8.96875, 5.10521},{-17.541, 0.825195, 5.10521},{-11.0889, -8.13965, -5.51673},{17.5417, -9.99805, 5.10564},{17.5461, 0.888672, 5.10564}}; + }; + class Land_GantryCrane_01_F + { + table = "Industrial"; + positions[] = {{-2.271, 1.99902, 8.67491},{-2.19482, -2.53613, 8.67491}}; + }; + class Land_HaulTruck_01_abandoned_F + { + table = "Industrial"; + positions[] = {{-0.733643, -4.39258, 1.27749},{1.72559, -4.19336, 1.27749}}; + }; + class Land_MiningShovel_01_abandoned_F + { + table = "Industrial"; + positions[] = {{5.90039, -8.41406, -0.680836},{5.30249, 0.911133, -0.750746},{1.73145, -7.10645, 4.10613},{-0.78125, -7.8584, 3.78039},{-2.5144, -11.2598, -0.662592}}; + }; + class Land_MobileCrane_01_F + { + table = "Industrial"; + positions[] = {{6.61865, 5.51465, -19.4957},{12.4185, 5.52832, -19.4957},{6.77734, 2.48828, -19.1123},{6.82275, 0.642578, -19.1123},{6.76855, -2.50488, -19.1123},{6.61865, -5.69727, -19.4957},{12.4185, -5.68359, -19.4957},{8.16138, -2.75, -14.0492},{14.1155, -2.79102, -14.0492},{13.1208, 2.95801, -14.0492},{8.25806, 2.69824, -14.0492},{9.73926, -3.37109, -8.33325},{7.85254, -3.33691, -8.33325}}; + }; + class Land_MobileCrane_01_hook_F + { + table = "Industrial"; + positions[] = {{6.61841, 5.51465, -19.4957},{12.4185, 5.52832, -19.4957},{6.77734, 2.48828, -19.1123},{6.82275, 0.642578, -19.1123},{6.76855, -2.50488, -19.1123},{6.61865, -5.69727, -19.4957},{12.4185, -5.68359, -19.4957},{8.16138, -2.75, -14.0492},{14.1155, -2.79102, -14.0492},{13.1208, 2.95801, -14.0492},{8.25806, 2.69824, -14.0492},{9.73926, -3.37109, -8.33325},{7.85254, -3.33691, -8.33325}}; + }; + class Land_ReservoirTower_F + { + table = "Industrial"; + positions[] = {{-1.8457, 1.83105, -1.8427},{1.28613, -3.4502, -1.82695}}; + }; + class Land_SCF_01_chimney_F + { + table = "Industrial"; + positions[] = {{-2.90894, -3.98145, -8.22002},{-5.19727, 0.483398, -8.22001},{-2.74243, 3.57422, -8.22002},{1.39404, -2.61523, -8.22002},{-2.94604, -3.01563, 24.2917},{-4.51831, 0.609375, 24.2917},{-2.34399, 2.65234, 24.2917},{1.09497, 2.86914, 24.5735},{0.949951, -1.91992, 24.2917}}; + }; + class Land_SCF_01_clarifier_F + { + table = "Industrial"; + positions[] = {{6.31934, 1.11719, -5.07754},{6.35181, -5.78027, -2.05335},{5.80225, 1.04688, 0.371124},{4.8501, 1.52344, 0.371122},{4.57251, -5.60938, -2.05335},{1.25488, -3.93555, 0.371124},{1.25488, 5.8916, 0.371126},{-4.4187, -3.93555, 0.371172},{-4.4187, 5.8916, 0.371126},{-7.25879, 0.977539, 0.371134},{-5.23145, 3.17676, 7.60777},{-5.40259, -1.02637, 7.59169},{-1.8186, -3.29688, 7.60185},{1.91064, -1.34082, 7.60829},{2.08765, 2.9043, 7.62741},{-1.5791, 4.27539, 7.77099}}; + }; + class Land_SCF_01_condenser_F + { + table = "Industrial"; + positions[] = {{-7.45361, 12.4902, -1.53951},{-4.16528, 12.1348, -1.55146},{-7.45361, 8.12109, -1.53947},{-4.35181, 8.12012, -1.53409},{-5.70166, 6.4541, -1.55146},{-5.93872, 10.8223, -1.55146},{-5.64185, 9.74805, -1.55146},{4.58057, 3.21387, 1.96246},{2.80396, 0.202148, 1.96246},{6.25342, 0.44043, 1.96246},{4.53931, -1.2666, 1.96246}}; + }; + class Land_SCF_01_crystallizer_F + { + table = "Industrial"; + positions[] = {{2.20264, 7.78516, -5.9044},{8.84692, 7.78027, -2.77431},{2.27319, 7.78516, -0.472961},{8.79834, 7.79199, 2.56268},{2.07471, 6.86914, 4.95764},{-0.962646, 5.40723, 4.97862},{-4.38184, 5.43555, 4.9786},{-7.49756, 5.44922, 4.9786},{-0.962402, -1.41113, 4.98178},{-7.49756, -1.36914, 4.98496},{-9.3103, 3.76563, 4.98026},{-9.31396, -0.415039, 4.98437},{-4.08789, -0.424805, 4.9833},{4.40259, 5.44922, 4.97856},{4.40283, -1.36914, 4.97918},{5.99756, 3.74316, 4.97839},{5.98828, -0.450195, 4.97857},{1.42236, 3.75684, 4.9802},{-0.962646, 5.40723, -0.465189},{-7.49756, 5.44922, -0.465189},{-9.37109, 3.75684, -0.465189},{-9.36157, 1.57715, -0.465191},{-4.04639, 3.75684, -0.465189},{1.28687, 0.494141, -0.465189},{5.12744, 3.75684, -0.465189},{1.25757, 1.57129, -0.465189},{5.62524, 5.44922, -0.465189},{5.62524, 0.507813, -0.465189},{8.48071, 3.75684, -0.465189},{8.5022, 1.57129, -0.465189}}; + }; + class Land_SCF_01_crystallizerTowers_F + { + table = "Industrial"; + positions[] = {{4.72705, -3.80957, 12.1495},{8.42017, -2.21777, 12.1495},{8.79761, 1.83398, 12.1495},{6.02148, 4.5293, 12.1495},{2.47388, 2.88184, 12.1495},{1.92188, -1.41602, 12.189},{-5.33594, -3.83496, 12.1575},{-1.43774, -2.02148, 12.1575},{-1.31299, 1.89746, 12.5944},{-4.27319, 4.5293, 12.1575},{-7.72998, 2.84473, 12.1575},{-8.40088, -1.15332, 12.1887},{0.365723, 0.235352, 12.1987},{-3.44092, -3.75098, -6.98271},{-0.304688, -3.69727, -6.98271},{1.25513, -2.48535, -6.9827},{-2.46533, -2.5498, -6.98255},{3.07031, -3.72168, -6.98271},{4.90088, -3.61523, -6.98271}}; + }; + class Land_SCF_01_diffuser_F + { + table = "Industrial"; + positions[] = {{-8.25195, 23.5225, -2.37402},{-1.9043, 23.3721, -2.37402},{2.28149, 23.7813, -2.37402},{6.88208, 23.6113, -2.37402},{6.71021, 9.92188, -2.37402},{6.87622, 18.3623, -2.37402},{6.83472, 1.33789, -2.37402},{6.87622, -7.25293, -2.37402},{6.34106, -23.2354, 2.33232},{3.65186, -21.8379, 2.33232},{0.114014, -23.5957, 2.35555},{-7.36475, -23.2051, 2.33232},{-4.10059, -21.793, 2.33232},{-5.35229, -12.7754, 4.52572},{1.0542, -14.4561, 4.52572},{4.99634, -17.8154, 4.52572},{3.01147, -18.8594, 4.52572},{2.86426, -12.6387, 4.52572}}; + }; + class Land_SCF_01_feeder_F + { + table = "Industrial"; + positions[] = {{4.86865, 12.1465, -3.33626},{0.436523, 17.4316, -3.33626},{-4.55176, 14.5176, -3.33626}}; + }; + class Land_SCF_01_generalBuilding_F + { + table = "Industrial"; + positions[] = {{14.334, -0.46582, -4.87007},{14.334, 2.69629, -4.87006},{14.0728, 4.17676, -4.87005},{1.07861, -24.2744, -0.354742},{-4.60767, -24.2568, -0.354109},{-1.45044, -14.6309, -4.84514},{0.82959, -21.9668, -4.84514},{-5.23193, -15.5225, -4.84514},{-5.23193, -20.3779, -4.84514},{0.897949, -16.6621, -4.84514},{-3.10083, -18.3438, -4.84514},{-7.53979, -8.16211, -0.35066},{-5.82178, -5.48535, 7.53344},{-5.82837, 7.19727, 7.57747},{-5.91724, 15.1963, 7.53357},{-6.04443, -11.5645, 7.44203},{1.63818, 17.5078, 11.2323},{1.83838, -11.5645, 11.3045},{-2.40601, 12.165, 9.25619},{1.10352, 2.26465, 10.804},{-4.48413, 1.98926, 8.16404},{1.06665, 20.3691, 10.9818},{-4.50415, 20.6543, 8.2311},{12.0906, -3.14453, 7.41085},{11.71, 2.01367, 7.5915},{12.0908, 7.18945, 7.41079},{11.71, 12.3467, 7.5915},{12.0938, 17.5186, 7.41184},{4.2146, -3.13965, 11.2645},{4.19458, 2.02051, 11.2351},{4.22046, 10.0293, 11.2857},{4.23657, 15.1973, 11.3193},{4.85327, 20.3662, 11.0314},{10.4482, 20.6523, 8.25541},{4.86206, -8.07227, 10.9426},{10.4482, -8.36719, 8.19658},{5.14331, -11.7627, 10.8526},{10.4604, -11.9209, 8.23243},{2.42944, -22.4482, 3.94098},{4.13257, -17.0049, -0.361994}}; + }; + class Land_SCF_01_storageBin_big_F + { + table = "Industrial"; + positions[] = {{1.37769, 13.627, 7.90879},{9.89014, 6.30371, 8.00624},{10.1826, -6.13867, 8.00229},{-5.81763, -10.5547, 7.99491},{-11.9951, 1.1416, 7.99358},{-5.48584, 11.04, 7.98675}}; + }; + class Land_SCF_01_storageBin_medium_F + { + table = "Industrial"; + positions[] = {{-6.86719, 2.24902, 6.72745},{0.320068, 7.36816, 6.72422},{6.81982, 2.11621, 6.73727},{-2.69751, -6.45508, 6.73897},{2.38794, -6.66699, 6.73858}}; + }; + class Land_SCF_01_storageBin_small_F + { + table = "Industrial"; + positions[] = {{-3.10742, 2.34473, 7.31781},{0.0847168, 4.62598, 7.32273},{2.97827, 2.28809, 7.34985},{-1.2583, -1.51563, 7.33663},{1.01611, -1.61035, 7.34604}}; + }; + class Land_SCF_01_warehouse_F + { + table = "Industrial"; + positions[] = {{2.38428, 10.7109, 3.95826},{-4.36938, 17.123, 2.78613},{11.988, 15.9063, 3.34447},{9.17725, 5.1377, 4.36988},{9.10986, -5.03711, 4.3945},{0.108398, -5.5459, 3.1112}}; + }; + class Land_SCF_01_washer_F + { + table = "Industrial"; + positions[] = {{-4.57568, 8.00684, -1.80085},{3.07935, 9.40527, -1.80085},{6.34424, 6.25488, -1.80085},{5.36182, 2.12109, -1.74189},{6.32837, -1.6582, -1.80085},{5.3855, -5.95801, -1.69704},{-1.10571, 7.36523, -1.80085},{-5.48535, 5.35352, -1.80085},{-6.25439, 2.28418, -1.80086},{-5.21948, -1.6582, -1.80085},{-6.37622, -5.96875, -1.80085},{-5.26172, -11.3262, -1.73402},{-0.0224609, 1.28223, 2.17754},{-4.55737, 1.30859, 2.1776},{-6.23975, 6.87695, 2.1776},{6.92871, 4.69336, 2.1776}}; + }; + class Land_SM_01_reservoirTower_F + { + table = "Industrial"; + positions[] = {{-2.59717, 0.891602, -1.99113},{1.46973, -3.23242, -1.98599},{0.704834, 2.8623, -2.00094}}; + }; + class Land_SM_01_shed_F + { + table = "Industrial"; + positions[] = {{-7.63892, 0.208984, -1.59421},{-7.74121, 4.16016, -1.59421},{1.08545, 2.70996, -1.59421},{-3.43799, -0.211914, -1.59421},{-6.10669, 6.38477, -1.59421},{5.42358, 4.74316, -1.59421},{4.89355, -0.0634766, -1.59421},{10.5295, 1.25781, -1.59421},{14.3044, 2.56445, -1.59421},{14.6626, -1.02832, -1.59421}}; + }; + class Land_SM_01_shed_unfinished_F + { + table = "Industrial"; + positions[] = {{-7.58374, 0.210938, -1.64209},{-7.68628, 4.16211, -1.64209},{1.14063, 2.71191, -1.64209},{-3.38281, -0.208984, -1.64209},{-6.05151, 6.3877, -1.64209},{5.47876, 4.74512, -1.64209},{4.94849, -0.0615234, -1.64209},{10.5845, 1.25977, -1.64209},{14.3594, 2.56738, -1.64209},{14.7175, -1.02539, -1.64209}}; + }; + class Land_StorageTank_01_large_F + { + table = "Industrial"; + positions[] = {{-5.26636, -8.7168, 0.685705},{7.5376, -8.96484, 0.685705},{9.66333, -14.584, 1.25553},{-9.50464, -14.8418, 1.24478},{-17.2966, 3.29102, 1.2443},{-3.35693, 17.2061, 1.25514},{2.25879, 9.52734, 0.685705}}; + }; + class Land_StorageTank_01_small_F + { + table = "Industrial"; + positions[] = {{-0.796387, 0.594727, 4.88818},{-6.31348, 3.91211, 3.66358},{2.63135, 7.28418, 3.60974},{7.54492, -2.71191, 3.30923},{-3.45142, -8.1748, 2.89969}}; + }; + class Land_SY_01_conveyor_end_F + { + table = "Industrial"; + positions[] = {{-0.00488281, 2.75, 5.24897},{-1.54126, -0.825195, 5.24897}}; + }; + class Land_SY_01_crusher_F + { + table = "Industrial"; + positions[] = {{8.23657, 6.33301, -1.09768},{7.81909, 16.5752, -1.08356},{-2.04224, 16.8691, -1.09297},{-7.8064, 8.47754, -1.08161},{2.10229, 14.3193, 11.3212},{6.33032, 4.37402, 11.7734},{-3.43262, 3.04688, 11.8368},{-7.92847, 9.2002, 11.5554},{0.595947, 8.41211, 11.5916}}; + }; + class Land_SY_01_reclaimer_F + { + table = "Industrial"; + positions[] = {{-14.1489, 2.63379, -2.28311},{-14.2458, 5.48145, -2.28683},{-13.6816, 1.11719, -2.28615},{-11.7661, -0.139648, -2.28826},{-14.9082, 1.87012, -1.96475}}; + }; + class Land_SY_01_shiploader_arm_F + { + table = "Industrial"; + positions[] = {{-4.59619, 2.30664, 0.389979},{10.1455, 2.12012, 0.389979},{14.0559, -2.29004, 0.389979},{-0.133545, -2.05566, 0.389979}}; + }; + class Land_SY_01_shiploader_F + { + table = "Industrial"; + positions[] = {{20.2991, 5.68164, -2.65544},{21.0994, 3.10059, 4.28977},{6.71289, 1.40137, 3.15136},{-3.97119, 1.40234, 3.09128},{-14.6008, 1.36523, 3.04038},{-21.2002, 0.898438, 5.34398},{6.71411, -2.24316, 3.08376},{-3.96802, -2.23438, 3.02955},{-14.6001, -2.16406, 3.02285},{-20.8071, -1.34668, 5.3525}}; + }; + class Land_TTowerBig_1_F + { + table = "Industrial"; + positions[] = {{1.86597, -0.705078, 2.92152},{0.969727, 1.45703, 2.93679},{-1.77271, 1.64063, 2.94032},{-0.356689, -2.06641, 2.9476}}; + }; + class Land_Walkover_01_F + { + table = "Industrial"; + positions[] = {{0.026123, 0.611328, 1.36034}}; + }; + + /////////////////////////////////////////////////////////////////////////// + // Factories + /////////////////////////////////////////////////////////////////////////// + class Land_DPP_01_mainFactory_F + { + table = "Factories"; + positions[] = {{-21.6887, 4.69238, -8.67055},{-21.6733, -14.5742, -8.68732},{-19.5613, -8.34766, -4.42347},{0.0639648, -5.23926, 1.12253},{0.453125, -14.0039, 1.12253},{-7.25708, -15.957, 1.12253},{-8.34741, -9.97949, 1.12253},{-7.28394, 3.64258, 1.12253},{3.70215, 9.25879, 1.12253},{7.29419, 5.17871, -0.317474},{8.38037, -7.69629, -0.317478},{8.1936, -14.2451, -0.317478},{12.5447, -1.97852, -4.25747},{13.1741, 1.39941, -4.25747},{12.9707, 4.99414, -4.25747},{17.3352, -1.26465, -5.51371},{16.3391, -11.3018, -4.07347},{16.1682, -7.34863, -4.07347},{14.2576, -17.1299, -4.07347},{20.6343, -4.13281, -7.43347},{18.5691, 5.11328, -7.64927}}; + }; + class Land_DPP_01_smallFactory_F + { + table = "Factories"; + positions[] = {{9.78833, -1.48145, 1.69896},{-1.29395, 3.17383, 3.0918},{-8.48071, -4.74707, 3.28734},{2.12598, -5.53613, 3.2094},{6.54004, 0.380859, 3.26465}}; + }; + class Land_SCF_01_boilerBuilding_F + { + table = "Factories"; + positions[] = {{19.9551, 13.1162, -13.218},{21.5356, 1.60742, -13.218},{11.6555, 4.40039, -13.218},{13.1863, 12.2744, -13.218},{18.5403, 11.7012, -8.65283},{21.9075, 0.967773, -8.67283},{12.26, -8.82227, -5.55016},{8.29736, -21.2119, 0.826183},{4.57446, -14.8301, 1.65308},{5.99463, -12.5732, 1.36908},{5.23267, -5.7373, 1.49743},{4.57446, -4.2998, 1.63667},{5.99414, -2.46094, 1.34452},{10.4329, -0.328125, 0.421211},{21.0168, 9.04688, -16.6483},{-4.15381, -14.8213, 1.55791},{-4.17993, -13.3525, 1.56871},{-5.60059, -12.583, 1.30381},{-9.26074, -0.237305, 0.512077},{-4.14819, -4.30078, 1.61219},{-5.60522, -2.44141, 1.27797},{-4.01392, 9.2998, 7.56076},{4.7417, 1.46777, 7.63056},{-3.20605, 3.65332, 7.73126},{3.93311, 6.58203, 7.81587},{9.89307, 10.834, 0.533249},{4.55322, 15.792, 1.64978},{6.08081, 15.3867, 1.32867},{4.28442, 16.8301, 1.70323},{8.29419, 20.9619, 0.847332},{-9.09326, 10.5137, 0.533012},{-5.5918, 15.3896, 1.23261},{-3.76025, 16.832, 1.60073},{-4.81055, 18.3252, 1.37109},{-12.2722, 20.1699, -4.55378},{-17.0876, -14.2314, -3.77558},{-17.0906, -10.9219, -3.76845},{-10.5383, -17.9766, -5.09464},{-12.7368, -2.11035, -4.39582},{-13.4448, 7.83496, -4.15535},{-10.5427, -21.3369, -5.09303},{-1.83618, 23.6367, -13.188}}; + }; +}; +class CfgLootTables +{ + /** + Result of 100 rounds: + + Exile_Item_PlasticBottleDirtyWater + 30Rnd_45ACP_Mag_SMG_01 + 10Rnd_9x21_Mag + Chemlight_blue + Exile_Item_MountainDupe + Exile_Item_Heatpack + Exile_Item_DsNuts + Exile_Item_Can_Empty + optic_Aco_smg + Exile_Item_PlasticBottleEmpty + Exile_Item_ToiletPaper + H_Hat_tan + U_C_Man_casual_1_F + muzzle_snds_acp + Exile_Item_Dogfood + U_I_C_Soldier_Bandit_4_F + ItemWatch + H_Cap_red + Exile_Item_Heatpack + H_Cap_headphones + V_Press_F + H_Cap_tan + H_Hat_brown + hgun_Pistol_Signal_F + ItemRadio + H_Cap_press + Exile_Item_Noodles + Exile_Item_Can_Empty + Exile_Item_Dogfood + Exile_Item_Magazine03 + U_C_Poloshirt_blue + Exile_Item_Magazine03 + V_Press_F + U_NikosAgedBody + Exile_Item_Can_Empty + H_Cap_tan + Chemlight_red + U_C_Scientist + FlareWhite_F + V_TacVest_blk_POLICE + Exile_Item_PlasticBottleEmpty + Chemlight_red + Exile_Item_Cheathas + 30Rnd_9x21_Mag + B_OutdoorPack_blu + H_Hat_brown + Exile_Item_BBQSandwich + B_HuntingBackpack + Exile_Item_PlasticBottleEmpty + Exile_Item_ToiletPaper + 30Rnd_45ACP_Mag_SMG_01_Tracer_Green + Exile_Item_SeedAstics + Exile_Item_GloriousKnakworst + FlareWhite_F + Exile_Item_DsNuts + SMG_02_F + Exile_Item_Magazine02 + Exile_Item_Can_Empty + B_AssaultPack_sgg + U_C_Man_casual_5_F + B_AssaultPack_khk + Exile_Item_Surstromming + V_TacVest_blk_POLICE + muzzle_snds_L + Exile_Item_Heatpack + H_Cap_blk_Raven + Exile_Item_ToiletPaper + U_C_Man_casual_1_F + H_StrawHat + Exile_Magazine_6Rnd_45ACP + U_C_Poor_shorts_1 + hgun_PDW2000_F + Exile_Item_PlasticBottleDirtyWater + hgun_P07_F + muzzle_snds_L + ItemMap + Exile_Item_ToiletPaper + U_C_Poor_1 + Exile_Weapon_M1014 + U_C_Poloshirt_salmon + Exile_Item_Can_Empty + U_C_Poor_2 + hgun_Pistol_heavy_02_F + Exile_Item_Surstromming + Exile_Item_Raisins + Exile_Item_Magazine01 + hgun_PDW2000_F + FlareYellow_F + H_Cap_press + Exile_Item_Heatpack + Chemlight_yellow + FlareGreen_F + B_AssaultPack_blk + Exile_Item_Raisins + H_Beret_blk_POLICE + U_C_Poor_shorts_1 + U_C_Poor_2 + U_I_C_Soldier_Bandit_2_F + muzzle_snds_acp + Exile_Item_ToiletPaper + */ + class CivillianLowerClass + { + count = 161; + half = 7481.25369930428; + halfIndex = 80; + sum = 10000; + items[] = + { + {398.936170212766, "Exile_Item_Can_Empty"}, // 3.99% + {797.872340425532, "Exile_Item_ToiletPaper"}, // 3.99% + {1196.8085106383, "Exile_Item_PlasticBottleEmpty"}, // 3.99% + {1409.57446808511, "Exile_Weapon_M1014"}, // 2.13% + {1569.14893617021, "Exile_Magazine_8Rnd_74Slug"}, // 1.60% + {1702.12765957447, "FlareRed_F"}, // 1.33% + {1835.10638297872, "FlareGreen_F"}, // 1.33% + {1968.08510638298, "Chemlight_yellow"}, // 1.33% + {2101.06382978723, "Chemlight_red"}, // 1.33% + {2234.04255319149, "Chemlight_green"}, // 1.33% + {2367.02127659574, "Chemlight_blue"}, // 1.33% + {2500, "V_Rangemaster_belt"}, // 1.33% + {2632.97872340425, "FlareWhite_F"}, // 1.33% + {2765.95744680851, "FlareYellow_F"}, // 1.33% + {2893.61702127659, "Exile_Item_PlasticBottleDirtyWater"}, // 1.28% + {3011.82033096927, "Exile_Item_Heatpack"}, // 1.18% + {3125.59101654846, "Exile_Item_InstantCoffee"}, // 1.14% + {3231.97399527187, "Exile_Item_ChocolateMilk"}, // 1.06% + {3335.40189125295, "ItemMap"}, // 1.03% + {3435.13593380615, "Exile_Item_Magazine04"}, // 1.00% + {3534.86997635934, "Exile_Item_Magazine03"}, // 1.00% + {3634.60401891253, "Exile_Item_Magazine02"}, // 1.00% + {3734.33806146572, "Exile_Item_Magazine01"}, // 1.00% + {3827.4231678487, "Exile_Item_Raisins"}, // 0.93% + {3920.50827423168, "Exile_Item_Moobar"}, // 0.93% + {4009.16075650118, "ItemRadio"}, // 0.89% + {4097.81323877069, "ItemWatch"}, // 0.89% + {4182.91962174941, "Exile_Item_MountainDupe"}, // 0.85% + {4265.66193853428, "Exile_Item_CockONut"}, // 0.83% + {4348.40425531915, "Exile_Item_SeedAstics"}, // 0.83% + {4420.80378250591, "Exile_Item_Surstromming"}, // 0.72% + {4493.20330969267, "Exile_Item_ChristmasTinner"}, // 0.72% + {4565.60283687943, "Exile_Item_SausageGravy"}, // 0.72% + {4638.0023640662, "Exile_Item_Noodles"}, // 0.72% + {4710.40189125296, "Exile_Item_DsNuts"}, // 0.72% + {4782.80141843972, "Exile_Item_Cheathas"}, // 0.72% + {4855.20094562648, "Exile_Item_BeefParts"}, // 0.72% + {4927.60047281324, "Exile_Item_Dogfood"}, // 0.72% + {5000, "Exile_Item_CatFood"}, // 0.72% + {5072.39952718677, "Exile_Item_BBQSandwich"}, // 0.72% + {5144.79905437353, "Exile_Item_MacasCheese"}, // 0.72% + {5217.13947990544, "Exile_Item_EnergyDrink"}, // 0.72% + {5283.62884160757, "V_Press_F"}, // 0.66% + {5350.1182033097, "V_TacVest_blk_POLICE"}, // 0.66% + {5413.94799054374, "H_Cap_press"}, // 0.64% + {5477.77777777778, "H_Cap_red"}, // 0.64% + {5541.60756501183, "H_Cap_tan"}, // 0.64% + {5605.43735224587, "H_Hat_blue"}, // 0.64% + {5669.26713947991, "H_StrawHat_dark"}, // 0.64% + {5733.09692671395, "H_Hat_checker"}, // 0.64% + {5796.926713948, "H_Hat_grey"}, // 0.64% + {5860.75650118204, "H_Hat_tan"}, // 0.64% + {5924.58628841608, "H_StrawHat"}, // 0.64% + {5988.41607565012, "H_Hat_brown"}, // 0.64% + {6050.47281323878, "Exile_Item_GloriousKnakworst"}, // 0.62% + {6110.04728132388, "Exile_Item_Beer"}, // 0.60% + {6169.14893617022, "Binocular"}, // 0.59% + {6228.25059101655, "ItemGPS"}, // 0.59% + {6285.69739952719, "muzzle_snds_L"}, // 0.57% + {6343.14420803783, "muzzle_snds_acp"}, // 0.57% + {6399.1352494712, "U_C_Journalist"}, // 0.56% + {6455.12629090457, "U_Rangemaster"}, // 0.56% + {6511.11733233794, "U_C_HunterBody_grn"}, // 0.56% + {6567.10837377131, "U_C_Poor_shorts_1"}, // 0.56% + {6623.09941520469, "U_C_Scientist"}, // 0.56% + {6679.09045663806, "U_C_Poor_2"}, // 0.56% + {6735.08149807143, "U_C_Poor_1"}, // 0.56% + {6789.76433760215, "B_OutdoorPack_blk"}, // 0.55% + {6844.15563499457, "SMG_01_F"}, // 0.54% + {6897.34712435627, "H_Bandanna_surfer"}, // 0.53% + {6950.53861371797, "H_Beret_blk_POLICE"}, // 0.53% + {7003.73010307967, "H_Cap_blk"}, // 0.53% + {7056.92159244137, "H_Cap_blu"}, // 0.53% + {7110.11308180308, "H_Cap_grn"}, // 0.53% + {7163.30457116478, "H_Cap_headphones"}, // 0.53% + {7216.49606052648, "H_Cap_blk_Raven"}, // 0.53% + {7269.68754988818, "Exile_Item_ZipTie"}, // 0.53% + {7322.87903924989, "H_Cap_oli"}, // 0.53% + {7375.67059260135, "SMG_02_F"}, // 0.53% + {7428.46214595281, "SMG_05_F"}, // 0.53% + {7481.25369930428, "hgun_PDW2000_F"}, // 0.53% + {7532.96764729482, "Exile_Item_CanOpener"}, // 0.52% + {7584.68159528536, "Exile_Item_Matches"}, // 0.52% + {7635.7454250726, "Exile_Item_PlasticBottleFreshWater"}, // 0.51% + {7685.9486285151, "hgun_P07_F"}, // 0.50% + {7735.16318409275, "B_OutdoorPack_tan"}, // 0.49% + {7784.3777396704, "B_OutdoorPack_blu"}, // 0.49% + {7832.19031437755, "hgun_Rook40_F"}, // 0.48% + {7880.0028890847, "hgun_ACPC2_F"}, // 0.48% + {7923.74916070928, "B_HuntingBackpack"}, // 0.44% + {7967.29774849079, "U_C_Poloshirt_burgundy"}, // 0.44% + {8010.8463362723, "U_C_Poloshirt_blue"}, // 0.44% + {8054.39492405381, "U_C_Poloshirt_salmon"}, // 0.44% + {8097.94351183532, "U_C_Poloshirt_tricolour"}, // 0.44% + {8141.49209961683, "U_C_Poloshirt_stripped"}, // 0.44% + {8179.77008728833, "B_AssaultPack_tna_F"}, // 0.38% + {8218.04807495984, "B_AssaultPack_mcamo"}, // 0.38% + {8256.32606263134, "B_AssaultPack_cbr"}, // 0.38% + {8294.60405030285, "B_AssaultPack_blk"}, // 0.38% + {8332.88203797435, "B_AssaultPack_sgg"}, // 0.38% + {8371.16002564586, "B_AssaultPack_rgr"}, // 0.38% + {8409.43801331736, "B_AssaultPack_dgtl"}, // 0.38% + {8447.71600098887, "B_AssaultPack_khk"}, // 0.38% + {8478.82213511852, "U_C_Man_casual_1_F"}, // 0.31% + {8509.92826924817, "U_I_C_Soldier_Bandit_1_F"}, // 0.31% + {8541.03440337782, "U_I_C_Soldier_Bandit_2_F"}, // 0.31% + {8572.14053750747, "U_C_man_sport_3_F"}, // 0.31% + {8603.24667163712, "U_I_C_Soldier_Bandit_4_F"}, // 0.31% + {8634.35280576677, "U_I_C_Soldier_Bandit_5_F"}, // 0.31% + {8665.45893989642, "U_C_man_sport_1_F"}, // 0.31% + {8696.56507402607, "U_C_man_sport_2_F"}, // 0.31% + {8727.67120815572, "U_I_C_Soldier_Bandit_3_F"}, // 0.31% + {8758.77734228537, "U_C_Man_casual_6_F"}, // 0.31% + {8789.88347641502, "U_C_Man_casual_5_F"}, // 0.31% + {8820.98961054467, "U_C_Man_casual_4_F"}, // 0.31% + {8852.09574467432, "U_C_Man_casual_3_F"}, // 0.31% + {8883.20187880397, "U_C_Man_casual_2_F"}, // 0.31% + {8914.28005236361, "Exile_Weapon_Makarov"}, // 0.31% + {8945.35822592326, "hgun_Pistol_01_F"}, // 0.31% + {8976.43639948291, "Exile_Weapon_TaurusGold"}, // 0.31% + {9007.51457304255, "Exile_Weapon_Taurus"}, // 0.31% + {9038.5927466022, "Exile_Weapon_Colt1911"}, // 0.31% + {9069.67092016185, "hgun_P07_khk_F"}, // 0.31% + {9100.74909372149, "hgun_Pistol_heavy_01_F"}, // 0.31% + {9131.82726728114, "hgun_Pistol_heavy_02_F"}, // 0.31% + {9162.90544084079, "hgun_Pistol_Signal_F"}, // 0.31% + {9193.93380963511, "Exile_Item_CookingPot"}, // 0.31% + {9224.96217842944, "Exile_Item_EMRE"}, // 0.31% + {9254.74941247199, "Exile_Item_PowerDrink"}, // 0.30% + {9284.30023989516, "11Rnd_45ACP_Mag"}, // 0.30% + {9313.85106731833, "30Rnd_9x21_Mag"}, // 0.30% + {9343.40189474149, "Exile_Magazine_7Rnd_45ACP"}, // 0.30% + {9372.95272216466, "Exile_Magazine_8Rnd_9x18"}, // 0.30% + {9402.50354958783, "10Rnd_9x21_Mag"}, // 0.30% + {9432.05437701099, "Exile_Magazine_6Rnd_45ACP"}, // 0.30% + {9461.60520443416, "9Rnd_45ACP_Mag"}, // 0.30% + {9488.94662419952, "B_Kitbag_sgg"}, // 0.27% + {9516.28804396488, "B_Kitbag_cbr"}, // 0.27% + {9543.62946373024, "B_Kitbag_mcamo"}, // 0.27% + {9570.22520841109, "optic_ACO_grn_smg"}, // 0.27% + {9596.82095309194, "optic_Aco"}, // 0.27% + {9623.4166977728, "30Rnd_45ACP_Mag_SMG_01"}, // 0.27% + {9650.01244245365, "30Rnd_45ACP_Mag_SMG_01_Tracer_Green"}, // 0.27% + {9676.6081871345, "optic_Holosight_smg"}, // 0.27% + {9703.20393181535, "optic_Aco_smg"}, // 0.27% + {9729.7996764962, "optic_Holosight_smg_blk_F"}, // 0.27% + {9756.39542117705, "optic_ACO_grn"}, // 0.27% + {9782.99116585791, "30Rnd_9x21_Mag_SMG_02_Tracer_Green"}, // 0.27% + {9809.58691053876, "30Rnd_9x21_Mag_SMG_02"}, // 0.27% + {9836.18265521961, "30Rnd_9x21_Mag_SMG_02_Tracer_Yellow"}, // 0.27% + {9862.77839990046, "30Rnd_9x21_Mag_SMG_02_Tracer_Red"}, // 0.27% + {9886.41906183899, "6Rnd_45ACP_Cylinder"}, // 0.24% + {9908.75948737091, "optic_MRD"}, // 0.22% + {9931.09991290282, "optic_Yorris"}, // 0.22% + {9945.87532661441, "16Rnd_9x21_Mag"}, // 0.15% + {9960.65074032599, "Exile_Item_MobilePhone"}, // 0.15% + {9970.9935299241, "6Rnd_RedSignal_F"}, // 0.10% + {9981.33631952221, "6Rnd_GreenSignal_F"}, // 0.10% + {9987.55754634814, "U_OrestesBody"}, // 0.06% + {9993.77877317407, "U_NikosBody"}, // 0.06% + {10000, "U_NikosAgedBody"} // 0.06% + }; + }; + + /** + Result of 100 rounds: + + H_Cap_blk + Chemlight_blue + H_Hat_brown + B_AssaultPack_mcamo + H_Cap_red + SMG_02_F + 20Rnd_556x45_UW_mag + optic_Holosight_smg + Chemlight_yellow + Exile_Item_Can_Empty + U_C_Man_casual_3_F + FlareYellow_F + Exile_Item_Magazine03 + Exile_Item_PlasticBottleEmpty + H_Hat_grey + SMG_01_F + Exile_Item_InstantCoffee + Exile_Item_ToiletPaper + Chemlight_blue + Exile_Item_Matches + U_C_Poor_shorts_1 + Exile_Item_InstantCoffee + Exile_Item_Matches + Exile_Item_InstantCoffee + Exile_Item_BBQSandwich + B_OutdoorPack_blk + Exile_Item_ToiletPaper + U_C_Man_casual_1_F + U_OrestesBody + Exile_Item_InstantCoffee + Exile_Item_Dogfood + H_Cap_blk + Exile_Weapon_TaurusGold + Exile_Item_Can_Empty + Exile_Item_SeedAstics + Exile_Item_PlasticBottleEmpty + 30Rnd_9x21_Mag_SMG_02_Tracer_Red + Exile_Item_ToiletPaper + muzzle_snds_acp + V_Press_F + FlareWhite_F + Exile_Weapon_Colt1911 + ItemRadio + Exile_Item_BeefParts + Exile_Item_PlasticBottleEmpty + SMG_02_F + B_Kitbag_cbr + Exile_Item_Cheathas + U_I_C_Soldier_Bandit_1_F + Chemlight_blue + SMG_02_F + Exile_Item_Can_Empty + Exile_Item_Can_Empty + Exile_Magazine_8Rnd_74Slug + B_OutdoorPack_tan + Exile_Item_MountainDupe + Exile_Item_CatFood + Exile_Item_PlasticBottleDirtyWater + Exile_Item_Moobar + hgun_Pistol_01_F + H_Cap_blk_Raven + Exile_Magazine_8Rnd_74Slug + optic_Arco_blk_F + optic_Holosight_smg + H_Hat_blue + Exile_Magazine_8Rnd_74Slug + Exile_Item_Magazine01 + Exile_Item_Heatpack + H_Cap_blu + Exile_Item_BeefParts + Exile_Item_Matches + FlareGreen_F + Exile_Item_BeefParts + H_Cap_oli + Exile_Item_DsNuts + U_C_Poloshirt_blue + 10Rnd_9x21_Mag + FlareRed_F + Chemlight_red + B_OutdoorPack_tan + B_OutdoorPack_blu + Exile_Item_Beer + Exile_Item_Can_Empty + B_AssaultPack_cbr + ItemGPS + Exile_Item_ChristmasTinner + H_Beret_blk_POLICE + Exile_Item_CanOpener + Exile_Item_ChocolateMilk + Exile_Item_Can_Empty + SMG_01_F + H_Cap_grn + H_Cap_blu + hgun_P07_F + U_C_man_sport_2_F + Exile_Item_PlasticBottleEmpty + Exile_Magazine_6Rnd_45ACP + Exile_Item_DsNuts + 30Rnd_9x21_Mag_SMG_02_Tracer_Green + 6Rnd_GreenSignal_F + */ + class CivillianUpperClass + { + count = 295; + half = 9336.05248315373; + halfIndex = 147; + sum = 9999.99999999997; + items[] = + { + {380.710659898477, "Exile_Item_Can_Empty"}, // 3.81% + {761.421319796954, "Exile_Item_ToiletPaper"}, // 3.81% + {1142.13197969543, "Exile_Item_PlasticBottleEmpty"}, // 3.81% + {1345.17766497462, "Exile_Weapon_M1014"}, // 2.03% + {1497.46192893401, "Exile_Magazine_8Rnd_74Slug"}, // 1.52% + {1624.3654822335, "V_Rangemaster_belt"}, // 1.27% + {1751.269035533, "Chemlight_blue"}, // 1.27% + {1878.17258883249, "Chemlight_green"}, // 1.27% + {2005.07614213198, "Chemlight_red"}, // 1.27% + {2131.97969543147, "Chemlight_yellow"}, // 1.27% + {2258.88324873096, "FlareYellow_F"}, // 1.27% + {2385.78680203046, "FlareGreen_F"}, // 1.27% + {2512.69035532995, "FlareWhite_F"}, // 1.27% + {2639.59390862944, "FlareRed_F"}, // 1.27% + {2761.42131979695, "Exile_Item_PlasticBottleDirtyWater"}, // 1.22% + {2874.22447828539, "Exile_Item_Heatpack"}, // 1.13% + {2982.79751833051, "Exile_Item_InstantCoffee"}, // 1.09% + {3084.32036097011, "Exile_Item_ChocolateMilk"}, // 1.02% + {3183.02312464749, "ItemMap"}, // 0.99% + {3278.20078962211, "Exile_Item_Magazine03"}, // 0.95% + {3373.37845459673, "Exile_Item_Magazine04"}, // 0.95% + {3468.55611957135, "Exile_Item_Magazine02"}, // 0.95% + {3563.73378454597, "Exile_Item_Magazine01"}, // 0.95% + {3652.56627185561, "Exile_Item_Raisins"}, // 0.89% + {3741.39875916526, "Exile_Item_Moobar"}, // 0.89% + {3826.00112803158, "ItemWatch"}, // 0.85% + {3910.60349689791, "ItemRadio"}, // 0.85% + {3991.82177100959, "Exile_Item_MountainDupe"}, // 0.81% + {4070.78398195149, "Exile_Item_CockONut"}, // 0.79% + {4149.7461928934, "Exile_Item_SeedAstics"}, // 0.79% + {4218.83812746757, "Exile_Item_Surstromming"}, // 0.69% + {4287.93006204174, "Exile_Item_SausageGravy"}, // 0.69% + {4357.0219966159, "Exile_Item_MacasCheese"}, // 0.69% + {4426.11393119007, "Exile_Item_BBQSandwich"}, // 0.69% + {4495.20586576424, "Exile_Item_CatFood"}, // 0.69% + {4564.29780033841, "Exile_Item_ChristmasTinner"}, // 0.69% + {4633.38973491257, "Exile_Item_BeefParts"}, // 0.69% + {4702.48166948674, "Exile_Item_Cheathas"}, // 0.69% + {4771.57360406091, "Exile_Item_DsNuts"}, // 0.69% + {4840.66553863508, "Exile_Item_Noodles"}, // 0.69% + {4909.75747320925, "Exile_Item_Dogfood"}, // 0.69% + {4978.79300620417, "Exile_Item_EnergyDrink"}, // 0.69% + {5042.24478285392, "V_Press_F"}, // 0.63% + {5105.69655950366, "V_TacVest_blk_POLICE"}, // 0.63% + {5166.61026508742, "H_Cap_press"}, // 0.61% + {5227.52397067117, "H_Cap_red"}, // 0.61% + {5288.43767625493, "H_Cap_tan"}, // 0.61% + {5349.35138183869, "H_Hat_blue"}, // 0.61% + {5410.26508742244, "H_Hat_tan"}, // 0.61% + {5471.1787930062, "H_Hat_checker"}, // 0.61% + {5532.09249858996, "H_Hat_grey"}, // 0.61% + {5593.00620417371, "H_StrawHat_dark"}, // 0.61% + {5653.91990975747, "H_Hat_brown"}, // 0.61% + {5714.83361534123, "H_StrawHat"}, // 0.61% + {5774.05527354766, "Exile_Item_GloriousKnakworst"}, // 0.59% + {5830.90806542583, "Exile_Item_Beer"}, // 0.57% + {5887.30964467005, "ItemGPS"}, // 0.56% + {5943.71122391427, "Binocular"}, // 0.56% + {5998.53355893965, "muzzle_snds_L"}, // 0.55% + {6053.35589396503, "muzzle_snds_acp"}, // 0.55% + {6106.7889690385, "U_C_Poor_2"}, // 0.53% + {6160.22204411197, "U_C_Poor_shorts_1"}, // 0.53% + {6213.65511918544, "U_C_HunterBody_grn"}, // 0.53% + {6267.08819425891, "U_C_Journalist"}, // 0.53% + {6320.52126933238, "U_C_Scientist"}, // 0.53% + {6373.95434440585, "U_C_Poor_1"}, // 0.53% + {6427.38741947932, "U_Rangemaster"}, // 0.53% + {6479.5720582193, "B_OutdoorPack_blk"}, // 0.52% + {6531.47847400496, "SMG_01_F"}, // 0.52% + {6582.23989532476, "H_Cap_blk_Raven"}, // 0.51% + {6633.00131664455, "H_Cap_grn"}, // 0.51% + {6683.76273796435, "H_Cap_oli"}, // 0.51% + {6734.52415928415, "H_Cap_headphones"}, // 0.51% + {6785.28558060394, "H_Bandanna_surfer"}, // 0.51% + {6836.04700192374, "H_Beret_blk_POLICE"}, // 0.51% + {6886.80842324354, "H_Cap_blk"}, // 0.51% + {6937.56984456333, "H_Cap_blu"}, // 0.51% + {6988.33126588313, "Exile_Item_ZipTie"}, // 0.51% + {7038.71102238097, "SMG_02_F"}, // 0.50% + {7089.09077887882, "SMG_05_F"}, // 0.50% + {7139.47053537666, "hgun_PDW2000_F"}, // 0.50% + {7188.82191721535, "Exile_Item_CanOpener"}, // 0.49% + {7238.17329905404, "Exile_Item_Matches"}, // 0.49% + {7286.90426352105, "Exile_Item_PlasticBottleFreshWater"}, // 0.49% + {7334.81391959816, "hgun_P07_F"}, // 0.48% + {7381.78009446414, "B_OutdoorPack_tan"}, // 0.47% + {7428.74626933012, "B_OutdoorPack_blu"}, // 0.47% + {7474.37451321309, "hgun_Rook40_F"}, // 0.46% + {7520.00275709605, "hgun_ACPC2_F"}, // 0.46% + {7561.75046808803, "B_HuntingBackpack"}, // 0.42% + {7603.30952647851, "U_C_Poloshirt_tricolour"}, // 0.42% + {7644.86858486899, "U_C_Poloshirt_blue"}, // 0.42% + {7686.42764325946, "U_C_Poloshirt_burgundy"}, // 0.42% + {7727.98670164994, "U_C_Poloshirt_stripped"}, // 0.42% + {7769.54576004042, "U_C_Poloshirt_salmon"}, // 0.42% + {7806.0750071584, "B_AssaultPack_rgr"}, // 0.37% + {7842.60425427639, "B_AssaultPack_sgg"}, // 0.37% + {7879.13350139437, "B_AssaultPack_blk"}, // 0.37% + {7915.66274851235, "B_AssaultPack_cbr"}, // 0.37% + {7952.19199563034, "B_AssaultPack_tna_F"}, // 0.37% + {7988.72124274832, "B_AssaultPack_khk"}, // 0.37% + {8025.25048986631, "B_AssaultPack_dgtl"}, // 0.37% + {8061.77973698429, "B_AssaultPack_mcamo"}, // 0.37% + {8091.46477869178, "U_I_C_Soldier_Bandit_5_F"}, // 0.30% + {8121.14982039926, "U_I_C_Soldier_Bandit_2_F"}, // 0.30% + {8150.83486210674, "U_I_C_Soldier_Bandit_3_F"}, // 0.30% + {8180.51990381423, "U_I_C_Soldier_Bandit_4_F"}, // 0.30% + {8210.20494552171, "U_I_C_Soldier_Bandit_1_F"}, // 0.30% + {8239.8899872292, "U_C_man_sport_1_F"}, // 0.30% + {8269.57502893668, "U_C_Man_casual_5_F"}, // 0.30% + {8299.26007064416, "U_C_Man_casual_6_F"}, // 0.30% + {8328.94511235165, "U_C_Man_casual_3_F"}, // 0.30% + {8358.63015405913, "U_C_Man_casual_2_F"}, // 0.30% + {8388.31519576661, "U_C_Man_casual_1_F"}, // 0.30% + {8418.0002374741, "U_C_man_sport_3_F"}, // 0.30% + {8447.68527918158, "U_C_man_sport_2_F"}, // 0.30% + {8477.37032088907, "U_C_Man_casual_4_F"}, // 0.30% + {8507.02867941299, "hgun_Pistol_heavy_01_F"}, // 0.30% + {8536.68703793692, "hgun_Pistol_heavy_02_F"}, // 0.30% + {8566.34539646084, "Exile_Weapon_Colt1911"}, // 0.30% + {8596.00375498477, "hgun_Pistol_Signal_F"}, // 0.30% + {8625.6621135087, "hgun_P07_khk_F"}, // 0.30% + {8655.32047203262, "Exile_Weapon_Taurus"}, // 0.30% + {8684.97883055655, "Exile_Weapon_TaurusGold"}, // 0.30% + {8714.63718908047, "hgun_Pistol_01_F"}, // 0.30% + {8744.2955476044, "Exile_Weapon_Makarov"}, // 0.30% + {8773.90637670761, "Exile_Item_EMRE"}, // 0.30% + {8803.51720581083, "Exile_Item_CookingPot"}, // 0.30% + {8831.94360174991, "Exile_Item_PowerDrink"}, // 0.28% + {8860.14439137202, "9Rnd_45ACP_Mag"}, // 0.28% + {8888.34518099413, "Exile_Magazine_7Rnd_45ACP"}, // 0.28% + {8916.54597061624, "Exile_Magazine_8Rnd_9x18"}, // 0.28% + {8944.74676023835, "Exile_Magazine_6Rnd_45ACP"}, // 0.28% + {8972.94754986046, "30Rnd_9x21_Mag"}, // 0.28% + {9001.14833948257, "11Rnd_45ACP_Mag"}, // 0.28% + {9029.34912910468, "10Rnd_9x21_Mag"}, // 0.28% + {9055.44144847467, "B_Kitbag_cbr"}, // 0.26% + {9081.53376784466, "B_Kitbag_sgg"}, // 0.26% + {9107.62608721465, "B_Kitbag_mcamo"}, // 0.26% + {9133.00679787454, "30Rnd_9x21_Mag_SMG_02"}, // 0.25% + {9158.38750853444, "optic_Holosight_smg"}, // 0.25% + {9183.76821919434, "optic_Holosight_smg_blk_F"}, // 0.25% + {9209.14892985424, "30Rnd_9x21_Mag_SMG_02_Tracer_Yellow"}, // 0.25% + {9234.52964051414, "30Rnd_45ACP_Mag_SMG_01_Tracer_Green"}, // 0.25% + {9259.91035117403, "30Rnd_9x21_Mag_SMG_02_Tracer_Green"}, // 0.25% + {9285.29106183393, "30Rnd_9x21_Mag_SMG_02_Tracer_Red"}, // 0.25% + {9310.67177249383, "optic_ACO_grn_smg"}, // 0.25% + {9336.05248315373, "optic_ACO_grn"}, // 0.25% + {9361.43319381363, "30Rnd_45ACP_Mag_SMG_01"}, // 0.25% + {9386.81390447352, "optic_Aco"}, // 0.25% + {9412.19461513342, "optic_Aco_smg"}, // 0.25% + {9434.75524683111, "6Rnd_45ACP_Cylinder"}, // 0.23% + {9456.07504378542, "optic_MRD"}, // 0.21% + {9477.39484073974, "optic_Yorris"}, // 0.21% + {9491.49523555079, "16Rnd_9x21_Mag"}, // 0.14% + {9505.59563036185, "Exile_Item_MobilePhone"}, // 0.14% + {9515.46590672959, "6Rnd_RedSignal_F"}, // 0.10% + {9525.33618309732, "6Rnd_GreenSignal_F"}, // 0.10% + {9532.46654997168, "acc_flashlight"}, // 0.07% + {9538.40355831317, "U_NikosBody"}, // 0.06% + {9544.34056665467, "U_NikosAgedBody"}, // 0.06% + {9550.27757499617, "U_OrestesBody"}, // 0.06% + {9555.75542621773, "30Rnd_65x39_caseless_green"}, // 0.05% + {9561.23327743929, "30Rnd_556x45_Stanag_red"}, // 0.05% + {9566.71112866085, "30Rnd_556x45_Stanag_green"}, // 0.05% + {9572.18897988241, "30Rnd_556x45_Stanag"}, // 0.05% + {9577.28209907838, "muzzle_snds_H_khk_F"}, // 0.05% + {9582.37521827434, "muzzle_snds_65_TI_blk_F"}, // 0.05% + {9587.46833747031, "muzzle_snds_65_TI_hex_F"}, // 0.05% + {9592.56145666628, "muzzle_snds_65_TI_ghex_F"}, // 0.05% + {9597.65457586224, "muzzle_snds_H_MG_blk_F"}, // 0.05% + {9602.74769505821, "muzzle_snds_H_MG_khk_F"}, // 0.05% + {9607.84081425418, "optic_Arco"}, // 0.05% + {9612.93393345014, "optic_Arco_blk_F"}, // 0.05% + {9618.02705264611, "optic_Arco_ghex_F"}, // 0.05% + {9623.12017184207, "optic_Hamr"}, // 0.05% + {9628.21329103804, "optic_Hamr_khk_F"}, // 0.05% + {9633.30641023401, "optic_Holosight"}, // 0.05% + {9638.39952942997, "optic_Holosight_blk_F"}, // 0.05% + {9643.49264862594, "optic_Holosight_khk_F"}, // 0.05% + {9648.58576782191, "acc_pointer_IR"}, // 0.05% + {9653.67888701787, "optic_MRCO"}, // 0.05% + {9658.77200621384, "optic_DMS"}, // 0.05% + {9663.8651254098, "optic_DMS_ghex_F"}, // 0.05% + {9668.95824460577, "optic_ERCO_blk_F"}, // 0.05% + {9674.05136380174, "optic_ERCO_khk_F"}, // 0.05% + {9679.1444829977, "optic_ERCO_snd_F"}, // 0.05% + {9684.23760219367, "muzzle_snds_58_wdm_F"}, // 0.05% + {9689.33072138964, "muzzle_snds_m_khk_F"}, // 0.05% + {9694.4238405856, "muzzle_snds_m_snd_F"}, // 0.05% + {9699.51695978157, "muzzle_snds_H_snd_F"}, // 0.05% + {9704.61007897753, "muzzle_snds_H"}, // 0.05% + {9709.7031981735, "muzzle_snds_M"}, // 0.05% + {9714.79631736947, "muzzle_snds_58_blk_F"}, // 0.05% + {9718.8250016012, "Exile_Weapon_LeeEnfield"}, // 0.04% + {9722.85368583292, "Exile_Weapon_AK74"}, // 0.04% + {9726.88237006465, "Exile_Weapon_AK47"}, // 0.04% + {9730.91105429638, "Exile_Weapon_AKS_Gold"}, // 0.04% + {9734.93973852811, "Exile_Weapon_AK107"}, // 0.04% + {9738.96842275984, "Exile_Weapon_DMR"}, // 0.04% + {9742.99710699157, "Exile_Weapon_CZ550"}, // 0.04% + {9747.0257912233, "Exile_Weapon_SVDCamo"}, // 0.04% + {9751.05447545503, "Exile_Weapon_AK74_GL"}, // 0.04% + {9755.08315968676, "Exile_Weapon_VSSVintorez"}, // 0.04% + {9759.11184391849, "arifle_Katiba_F"}, // 0.04% + {9763.14052815022, "Exile_Weapon_SVD"}, // 0.04% + {9767.16921238194, "Exile_Weapon_AK107_GL"}, // 0.04% + {9771.18630327776, "20Rnd_556x45_UW_mag"}, // 0.04% + {9774.47301401069, "30Rnd_65x39_caseless_mag_Tracer"}, // 0.03% + {9777.75972474363, "Exile_Magazine_30Rnd_762x39_AK"}, // 0.03% + {9781.04643547657, "Exile_Magazine_30Rnd_545x39_AK"}, // 0.03% + {9784.3331462095, "Exile_Magazine_30Rnd_545x39_AK_Green"}, // 0.03% + {9787.61985694244, "Exile_Magazine_20Rnd_762x51_DMR_White"}, // 0.03% + {9790.90656767538, "30Rnd_556x45_Stanag_Tracer_Red"}, // 0.03% + {9794.19327840831, "30Rnd_556x45_Stanag_Tracer_Yellow"}, // 0.03% + {9797.47998914125, "30Rnd_65x39_caseless_green_mag_Tracer"}, // 0.03% + {9800.76669987419, "30Rnd_65x39_caseless_mag"}, // 0.03% + {9804.05341060712, "Exile_Magazine_30Rnd_545x39_AK_Red"}, // 0.03% + {9807.34012134006, "30Rnd_556x45_Stanag_Tracer_Green"}, // 0.03% + {9810.626832073, "Exile_Magazine_30Rnd_545x39_AK_Yellow"}, // 0.03% + {9813.91354280593, "Exile_Magazine_10Rnd_762x54"}, // 0.03% + {9817.20025353887, "Exile_Magazine_10Rnd_9x39"}, // 0.03% + {9820.48696427181, "Exile_Magazine_20Rnd_9x39"}, // 0.03% + {9823.77367500474, "30Rnd_762x39_Mag_F"}, // 0.03% + {9827.06038573768, "30Rnd_762x39_Mag_Green_F"}, // 0.03% + {9830.34709647062, "30Rnd_762x39_Mag_Tracer_F"}, // 0.03% + {9833.63380720355, "30Rnd_762x39_Mag_Tracer_Green_F"}, // 0.03% + {9836.92051793649, "30Rnd_762x39_AK47_M"}, // 0.03% + {9840.20722866943, "30Rnd_545x39_Mag_F"}, // 0.03% + {9843.49393940236, "30Rnd_545x39_Mag_Green_F"}, // 0.03% + {9846.7806501353, "30Rnd_545x39_Mag_Tracer_F"}, // 0.03% + {9850.06736086824, "30Rnd_545x39_Mag_Tracer_Green_F"}, // 0.03% + {9853.35407160117, "Exile_Magazine_30Rnd_545x39_AK_White"}, // 0.03% + {9856.64078233411, "Exile_Magazine_5Rnd_22LR"}, // 0.03% + {9859.92749306705, "150Rnd_556x45_Drum_Mag_Tracer_F"}, // 0.03% + {9863.21420379998, "Exile_Magazine_20Rnd_762x51_DMR"}, // 0.03% + {9866.50091453292, "Exile_Magazine_20Rnd_762x51_DMR_Green"}, // 0.03% + {9869.78762526586, "Exile_Magazine_20Rnd_762x51_DMR_Red"}, // 0.03% + {9873.07433599879, "150Rnd_556x45_Drum_Mag_F"}, // 0.03% + {9876.36104673173, "30Rnd_580x42_Mag_F"}, // 0.03% + {9879.64775746467, "30Rnd_580x42_Mag_Tracer_F"}, // 0.03% + {9882.9344681976, "20Rnd_762x51_Mag"}, // 0.03% + {9886.22117893054, "100Rnd_580x42_Mag_F"}, // 0.03% + {9889.50788966348, "100Rnd_580x42_Mag_Tracer_F"}, // 0.03% + {9892.79460039641, "Exile_Magazine_20Rnd_762x51_DMR_Yellow"}, // 0.03% + {9896.0175477818, "arifle_MX_khk_F"}, // 0.03% + {9899.24049516718, "arifle_TRG20_F"}, // 0.03% + {9902.46344255256, "arifle_MX_F"}, // 0.03% + {9905.68638993795, "arifle_MXC_F"}, // 0.03% + {9908.90933732333, "arifle_Katiba_GL_F"}, // 0.03% + {9912.13228470872, "arifle_TRG21_F"}, // 0.03% + {9915.3552320941, "arifle_MXC_khk_F"}, // 0.03% + {9918.2767527456, "Exile_Magazine_10Rnd_303"}, // 0.03% + {9921.09683170781, "arifle_Mk20C_F"}, // 0.03% + {9923.91691067002, "arifle_Mk20_F"}, // 0.03% + {9926.46347026801, "optic_NVS"}, // 0.03% + {9928.88068080704, "arifle_SDAR_F"}, // 0.02% + {9931.29789134608, "arifle_MXM_F"}, // 0.02% + {9933.31223346194, "arifle_SPAR_03_snd_F"}, // 0.02% + {9935.32657557781, "arifle_SPAR_03_khk_F"}, // 0.02% + {9937.34091769367, "arifle_AKM_FL_F"}, // 0.02% + {9939.35525980954, "arifle_AK12_F"}, // 0.02% + {9941.3696019254, "arifle_SPAR_01_GL_khk_F"}, // 0.02% + {9943.38394404127, "arifle_SPAR_01_khk_F"}, // 0.02% + {9945.39828615713, "arifle_SPAR_01_blk_F"}, // 0.02% + {9947.412628273, "arifle_SPAR_01_GL_snd_F"}, // 0.02% + {9949.42697038886, "arifle_SPAR_02_blk_F"}, // 0.02% + {9951.44131250472, "arifle_SPAR_02_khk_F"}, // 0.02% + {9953.45565462059, "arifle_SPAR_02_snd_F"}, // 0.02% + {9955.46999673645, "arifle_CTARS_hex_F"}, // 0.02% + {9957.48433885232, "arifle_CTARS_ghex_F"}, // 0.02% + {9959.49868096818, "arifle_CTARS_blk_F"}, // 0.02% + {9961.51302308405, "arifle_CTAR_GL_blk_F"}, // 0.02% + {9963.52736519991, "arifle_CTAR_ghex_F"}, // 0.02% + {9965.54170731578, "arifle_CTAR_hex_F"}, // 0.02% + {9967.55604943164, "arifle_CTAR_blk_F"}, // 0.02% + {9969.57039154751, "arifle_ARX_hex_F"}, // 0.02% + {9971.58473366337, "arifle_ARX_ghex_F"}, // 0.02% + {9973.59907577924, "arifle_ARX_blk_F"}, // 0.02% + {9975.6134178951, "arifle_AKS_F"}, // 0.02% + {9977.62776001096, "arifle_AKM_F"}, // 0.02% + {9979.64210212683, "arifle_AK12_GL_F"}, // 0.02% + {9981.65644424269, "arifle_SPAR_03_blk_F"}, // 0.02% + {9983.67078635856, "arifle_SPAR_01_snd_F"}, // 0.02% + {9985.68512847442, "arifle_SPAR_01_GL_blk_F"}, // 0.02% + {9987.51107888161, "10Rnd_50BW_Mag_F"}, // 0.02% + {9989.1225525743, "arifle_Mk20_GL_F"}, // 0.02% + {9990.73402626699, "arifle_MX_GL_F"}, // 0.02% + {9992.34549995969, "arifle_MX_GL_khk_F"}, // 0.02% + {9993.95697365238, "arifle_TRG21_GL_F"}, // 0.02% + {9995.1655789219, "arifle_MXM_Black_F"}, // 0.01% + {9996.37418419142, "arifle_MXC_Black_F"}, // 0.01% + {9997.58278946094, "arifle_MXM_khk_F"}, // 0.01% + {9998.79139473046, "arifle_MX_GL_Black_F"}, // 0.01% + {9999.99999999997, "arifle_MX_Black_F"} // 0.01% + }; + }; + + /** + Result of 100 rounds: + + hgun_Pistol_01_F + Exile_Item_PlasticBottleEmpty + ItemWatch + SmokeShell + Chemlight_red + hgun_Pistol_heavy_02_F + H_Cap_blk + B_Kitbag_mcamo + Exile_Weapon_M1014 + Exile_Item_Can_Empty + SmokeShellRed + Exile_Item_PlasticBottleDirtyWater + Exile_Item_EnergyDrink + Exile_Item_ToiletPaper + SMG_02_F + Exile_Item_PowerDrink + Exile_Item_MountainDupe + Exile_Item_ToiletPaper + Exile_Item_PlasticBottleEmpty + Exile_Weapon_TaurusGold + Exile_Item_Vishpirin + Exile_Item_MountainDupe + Exile_Weapon_Makarov + Exile_Item_MountainDupe + SMG_01_F + Exile_Item_Raisins + Exile_Item_Can_Empty + Exile_Item_Bandage + 30Rnd_9x21_Mag_SMG_02_Tracer_Green + Exile_Item_ChocolateMilk + FlareGreen_F + hgun_P07_khk_F + B_HuntingBackpack + Exile_Item_Can_Empty + Exile_Item_PlasticBottleFreshWater + Exile_Item_ToiletPaper + Exile_Item_InstaDoc + Exile_Item_ToiletPaper + hgun_ACPC2_F + Chemlight_green + Exile_Item_ZipTie + B_OutdoorPack_blk + Exile_Item_Beer + FlareYellow_F + Exile_Item_ToiletPaper + hgun_Pistol_heavy_02_F + Exile_Item_ScrewDriver + FlareWhite_F + SmokeShellBlue + Exile_Item_PlasticBottleEmpty + hgun_Pistol_heavy_02_F + Exile_Item_Can_Empty + Exile_Item_Can_Empty + Exile_Item_PlasticBottleEmpty + Exile_Item_DsNuts + Exile_Item_Beer + Chemlight_blue + Exile_Item_ChocolateMilk + Exile_Item_Magazine03 + muzzle_snds_L + Exile_Item_CockONut + Exile_Item_PlasticBottleEmpty + 30Rnd_45ACP_Mag_SMG_01_Tracer_Green + B_Kitbag_sgg + SMG_05_F + Exile_Item_PlasticBottleEmpty + Exile_Item_Magazine02 + Exile_Item_ChocolateMilk + hgun_P07_khk_F + FlareYellow_F + Exile_Weapon_Makarov + Exile_Item_PlasticBottleDirtyWater + FlareYellow_F + Exile_Item_SeedAstics + FlareWhite_F + Exile_Item_CatFood + Exile_Item_Handsaw + Exile_Item_ZipTie + Exile_Weapon_M1014 + Exile_Item_DsNuts + Exile_Item_Noodles + ItemRadio + Exile_Item_Can_Empty + Exile_Item_Surstromming + Exile_Item_InstantCoffee + FlareYellow_F + hgun_Pistol_01_F + Exile_Weapon_Makarov + Exile_Item_MountainDupe + Exile_Item_Can_Empty + Exile_Item_Raisins + Exile_Item_CockONut + hgun_P07_khk_F + Exile_Weapon_Taurus + Exile_Item_CanOpener + Exile_Item_ToiletPaper + B_AssaultPack_sgg + FlareRed_F + 9Rnd_45ACP_Mag + 6Rnd_45ACP_Cylinder + */ + class Shop + { + count = 193; + half = 9064.5076897852; + halfIndex = 96; + sum = 10000; + items[] = + { + {600, "Exile_Item_Can_Empty"}, // 6.00% + {1200, "Exile_Item_ToiletPaper"}, // 6.00% + {1800, "Exile_Item_PlasticBottleEmpty"}, // 6.00% + {2120, "Exile_Weapon_M1014"}, // 3.20% + {2408, "Exile_Item_PlasticBottleDirtyWater"}, // 2.88% + {2648, "Exile_Item_ZipTie"}, // 2.40% + {2888, "Exile_Item_ChocolateMilk"}, // 2.40% + {3080, "Exile_Item_MountainDupe"}, // 1.92% + {3243.2, "Exile_Item_EnergyDrink"}, // 1.63% + {3393.2, "Exile_Item_Magazine01"}, // 1.50% + {3543.2, "Exile_Item_Magazine02"}, // 1.50% + {3693.2, "Exile_Item_Magazine03"}, // 1.50% + {3843.2, "Exile_Item_Magazine04"}, // 1.50% + {3977.6, "Exile_Item_Beer"}, // 1.34% + {4102.04444444444, "Exile_Item_Heatpack"}, // 1.24% + {4217.24444444444, "Exile_Item_PlasticBottleFreshWater"}, // 1.15% + {4326.13333333333, "ItemMap"}, // 1.09% + {4428.38897243108, "SMG_01_F"}, // 1.02% + {4528.38897243108, "Chemlight_blue"}, // 1.00% + {4628.38897243108, "FlareYellow_F"}, // 1.00% + {4728.38897243108, "FlareWhite_F"}, // 1.00% + {4828.38897243108, "FlareRed_F"}, // 1.00% + {4928.38897243108, "FlareGreen_F"}, // 1.00% + {5028.38897243108, "Chemlight_green"}, // 1.00% + {5128.38897243108, "Chemlight_yellow"}, // 1.00% + {5228.38897243108, "Chemlight_red"}, // 1.00% + {5327.63709273183, "SMG_05_F"}, // 0.99% + {5426.88521303258, "hgun_PDW2000_F"}, // 0.99% + {5526.13333333333, "SMG_02_F"}, // 0.99% + {5620.51535580524, "hgun_P07_F"}, // 0.94% + {5713.84868913858, "ItemWatch"}, // 0.93% + {5807.18202247191, "ItemRadio"}, // 0.93% + {5898.84868913858, "Exile_Item_InstantCoffee"}, // 0.92% + {5988.73632958802, "hgun_Rook40_F"}, // 0.90% + {6078.62397003745, "hgun_ACPC2_F"}, // 0.90% + {6167.51285892634, "Exile_Item_Vishpirin"}, // 0.89% + {6256.40174781523, "Exile_Item_Heatpack"}, // 0.89% + {6336.40174781523, "Exile_Magazine_8Rnd_74Slug"}, // 0.80% + {6411.40174781523, "Exile_Item_Moobar"}, // 0.75% + {6486.40174781523, "Exile_Item_Raisins"}, // 0.75% + {6553.60174781523, "Exile_Item_PowerDrink"}, // 0.67% + {6620.2684144819, "Exile_Item_CockONut"}, // 0.67% + {6686.93508114856, "Exile_Item_SeedAstics"}, // 0.67% + {6749.15730337079, "ItemGPS"}, // 0.62% + {6811.37952559301, "Binocular"}, // 0.62% + {6869.80649188515, "hgun_Pistol_01_F"}, // 0.58% + {6928.23345817728, "hgun_P07_khk_F"}, // 0.58% + {6986.66042446942, "hgun_Pistol_heavy_01_F"}, // 0.58% + {7045.08739076155, "hgun_Pistol_heavy_02_F"}, // 0.58% + {7103.51435705369, "hgun_Pistol_Signal_F"}, // 0.58% + {7161.94132334582, "Exile_Weapon_Colt1911"}, // 0.58% + {7220.36828963796, "Exile_Weapon_Makarov"}, // 0.58% + {7278.79525593009, "Exile_Weapon_TaurusGold"}, // 0.58% + {7337.22222222223, "Exile_Weapon_Taurus"}, // 0.58% + {7395.55555555556, "Exile_Item_DsNuts"}, // 0.58% + {7453.88888888889, "Exile_Item_Noodles"}, // 0.58% + {7512.22222222223, "Exile_Item_BeefParts"}, // 0.58% + {7570.55555555556, "Exile_Item_Cheathas"}, // 0.58% + {7628.88888888889, "Exile_Item_CatFood"}, // 0.58% + {7687.22222222222, "Exile_Item_BBQSandwich"}, // 0.58% + {7745.55555555556, "Exile_Item_MacasCheese"}, // 0.58% + {7803.88888888889, "Exile_Item_ChristmasTinner"}, // 0.58% + {7862.22222222222, "Exile_Item_SausageGravy"}, // 0.58% + {7920.55555555556, "Exile_Item_Surstromming"}, // 0.58% + {7978.88888888889, "Exile_Item_Dogfood"}, // 0.58% + {8028.88888888889, "Exile_Item_GloriousKnakworst"}, // 0.50% + {8074.60317460317, "SmokeShell"}, // 0.46% + {8120.31746031746, "SmokeShellYellow"}, // 0.46% + {8166.03174603175, "SmokeShellPurple"}, // 0.46% + {8211.74603174603, "SmokeShellBlue"}, // 0.46% + {8257.46031746032, "SmokeShellOrange"}, // 0.46% + {8303.1746031746, "SmokeShellGreen"}, // 0.46% + {8348.88888888889, "SmokeShellRed"}, // 0.46% + {8393.33333333334, "Exile_Item_Bandage"}, // 0.44% + {8435, "Exile_Item_CanOpener"}, // 0.42% + {8476.66666666667, "Exile_Item_Matches"}, // 0.42% + {8516.66666666667, "V_Rangemaster_belt"}, // 0.40% + {8554.04984423676, "B_OutdoorPack_blk"}, // 0.37% + {8588.78668634202, "Exile_Melee_Axe"}, // 0.35% + {8622.43154615511, "B_OutdoorPack_tan"}, // 0.34% + {8656.07640596819, "B_OutdoorPack_blu"}, // 0.34% + {8685.98294802427, "B_HuntingBackpack"}, // 0.30% + {8714.78294802427, "muzzle_snds_L"}, // 0.29% + {8743.58294802427, "muzzle_snds_acp"}, // 0.29% + {8769.75117232333, "B_AssaultPack_tna_F"}, // 0.26% + {8795.9193966224, "B_AssaultPack_mcamo"}, // 0.26% + {8822.08762092146, "B_AssaultPack_blk"}, // 0.26% + {8848.25584522052, "B_AssaultPack_cbr"}, // 0.26% + {8874.42406951959, "B_AssaultPack_rgr"}, // 0.26% + {8900.59229381865, "B_AssaultPack_dgtl"}, // 0.26% + {8926.76051811772, "B_AssaultPack_khk"}, // 0.26% + {8952.92874241678, "B_AssaultPack_sgg"}, // 0.26% + {8977.92874241678, "Exile_Item_CookingPot"}, // 0.25% + {9002.92874241678, "Exile_Item_EMRE"}, // 0.25% + {9023.45505820626, "Exile_Item_Handsaw"}, // 0.21% + {9043.98137399573, "Exile_Item_Pliers"}, // 0.21% + {9064.5076897852, "Exile_Item_ScrewDriver"}, // 0.21% + {9084.5076897852, "V_Press_F"}, // 0.20% + {9104.5076897852, "V_TacVest_blk_POLICE"}, // 0.20% + {9123.19927857025, "B_Kitbag_cbr"}, // 0.19% + {9141.8908673553, "B_Kitbag_sgg"}, // 0.19% + {9160.58245614034, "B_Kitbag_mcamo"}, // 0.19% + {9178.36023391812, "10Rnd_9x21_Mag"}, // 0.18% + {9196.1380116959, "Exile_Magazine_8Rnd_9x18"}, // 0.18% + {9213.91578947367, "Exile_Magazine_6Rnd_45ACP"}, // 0.18% + {9231.69356725145, "Exile_Magazine_7Rnd_45ACP"}, // 0.18% + {9249.47134502923, "9Rnd_45ACP_Mag"}, // 0.18% + {9267.24912280701, "11Rnd_45ACP_Mag"}, // 0.18% + {9285.02690058478, "Exile_Item_InstaDoc"}, // 0.18% + {9302.80467836256, "30Rnd_9x21_Mag"}, // 0.18% + {9320.17309941519, "Exile_Item_JunkMetal"}, // 0.17% + {9335.9625730994, "Exile_Item_WaterCanisterEmpty"}, // 0.16% + {9351.75204678361, "Exile_Melee_Shovel"}, // 0.16% + {9367.30760233917, "Exile_Item_MobilePhone"}, // 0.16% + {9381.70760233917, "H_Cap_tan"}, // 0.14% + {9396.10760233917, "H_Hat_blue"}, // 0.14% + {9410.50760233917, "H_Hat_brown"}, // 0.14% + {9424.90760233917, "H_Hat_checker"}, // 0.14% + {9439.30760233917, "H_Hat_tan"}, // 0.14% + {9453.70760233917, "H_StrawHat"}, // 0.14% + {9468.10760233917, "H_StrawHat_dark"}, // 0.14% + {9482.50760233916, "H_Cap_red"}, // 0.14% + {9496.90760233916, "H_Hat_grey"}, // 0.14% + {9511.30760233916, "H_Cap_press"}, // 0.14% + {9525.52982456139, "6Rnd_45ACP_Cylinder"}, // 0.14% + {9539.74035087718, "Exile_Item_LightBulb"}, // 0.14% + {9553.07368421051, "30Rnd_9x21_Mag_SMG_02_Tracer_Green"}, // 0.13% + {9566.40701754384, "optic_Holosight_smg_blk_F"}, // 0.13% + {9579.74035087718, "optic_ACO_grn"}, // 0.13% + {9593.07368421051, "30Rnd_9x21_Mag_SMG_02"}, // 0.13% + {9606.40701754385, "optic_Aco_smg"}, // 0.13% + {9619.74035087718, "30Rnd_45ACP_Mag_SMG_01_Tracer_Green"}, // 0.13% + {9633.07368421051, "optic_ACO_grn_smg"}, // 0.13% + {9646.40701754385, "30Rnd_9x21_Mag_SMG_02_Tracer_Red"}, // 0.13% + {9659.74035087718, "30Rnd_9x21_Mag_SMG_02_Tracer_Yellow"}, // 0.13% + {9673.07368421052, "optic_Holosight_smg"}, // 0.13% + {9686.40701754385, "optic_Aco"}, // 0.13% + {9699.74035087718, "30Rnd_45ACP_Mag_SMG_01"}, // 0.13% + {9712.37192982455, "Exile_Item_ExtensionCord"}, // 0.13% + {9724.37192982455, "H_Bandanna_surfer"}, // 0.12% + {9736.37192982455, "H_Beret_blk_POLICE"}, // 0.12% + {9748.37192982455, "H_Cap_oli"}, // 0.12% + {9760.37192982455, "H_Cap_headphones"}, // 0.12% + {9772.37192982455, "H_Cap_blk"}, // 0.12% + {9784.37192982455, "H_Cap_grn"}, // 0.12% + {9796.37192982455, "H_Cap_blu"}, // 0.12% + {9808.37192982455, "H_Cap_blk_Raven"}, // 0.12% + {9819.57192982455, "optic_MRD"}, // 0.11% + {9830.77192982455, "optic_Yorris"}, // 0.11% + {9839.66081871344, "16Rnd_9x21_Mag"}, // 0.09% + {9847.55555555555, "Exile_Item_Grinder"}, // 0.08% + {9855.45029239765, "Exile_Item_MetalScrews"}, // 0.08% + {9863.34502923976, "Exile_Melee_SledgeHammer"}, // 0.08% + {9869.66081871344, "Exile_Item_Sand"}, // 0.06% + {9875.97660818713, "Exile_Item_Foolbox"}, // 0.06% + {9882.29239766081, "Exile_Item_MetalBoard"}, // 0.06% + {9888.6081871345, "Exile_Item_CamoTentKit"}, // 0.06% + {9894.83040935672, "6Rnd_RedSignal_F"}, // 0.06% + {9901.05263157894, "6Rnd_GreenSignal_F"}, // 0.06% + {9905.78947368421, "Exile_Item_PortableGeneratorKit"}, // 0.05% + {9910.52631578947, "Exile_Item_Cement"}, // 0.05% + {9915.26315789473, "Exile_Item_FloodLightKit"}, // 0.05% + {9919.47368421052, "U_C_Poor_2"}, // 0.04% + {9923.68421052631, "U_C_Poor_1"}, // 0.04% + {9927.8947368421, "U_C_Poor_shorts_1"}, // 0.04% + {9932.10526315789, "U_C_HunterBody_grn"}, // 0.04% + {9936.31578947368, "U_C_Journalist"}, // 0.04% + {9940.52631578947, "U_C_Scientist"}, // 0.04% + {9944.73684210526, "U_Rangemaster"}, // 0.04% + {9948.01169590643, "U_C_Poloshirt_salmon"}, // 0.03% + {9951.2865497076, "U_C_Poloshirt_tricolour"}, // 0.03% + {9954.56140350877, "U_C_Poloshirt_stripped"}, // 0.03% + {9957.83625730994, "U_C_Poloshirt_burgundy"}, // 0.03% + {9961.11111111111, "U_C_Poloshirt_blue"}, // 0.03% + {9964.26900584795, "Exile_Item_Knife"}, // 0.03% + {9966.6081871345, "U_C_Man_casual_5_F"}, // 0.02% + {9968.94736842105, "U_C_Man_casual_6_F"}, // 0.02% + {9971.2865497076, "U_I_C_Soldier_Bandit_5_F"}, // 0.02% + {9973.62573099415, "U_I_C_Soldier_Bandit_2_F"}, // 0.02% + {9975.9649122807, "U_I_C_Soldier_Bandit_3_F"}, // 0.02% + {9978.30409356725, "U_I_C_Soldier_Bandit_4_F"}, // 0.02% + {9980.6432748538, "U_C_man_sport_1_F"}, // 0.02% + {9982.98245614035, "U_C_man_sport_2_F"}, // 0.02% + {9985.3216374269, "U_C_man_sport_3_F"}, // 0.02% + {9987.66081871345, "U_C_Man_casual_1_F"}, // 0.02% + {9990, "U_C_Man_casual_2_F"}, // 0.02% + {9992.33918128655, "U_C_Man_casual_3_F"}, // 0.02% + {9994.6783625731, "U_C_Man_casual_4_F"}, // 0.02% + {9997.01754385965, "U_I_C_Soldier_Bandit_1_F"}, // 0.02% + {9998.59649122808, "Exile_Item_ThermalScannerPro"}, // 0.02% + {9999.06432748539, "U_NikosBody"}, // 0.00% + {9999.5321637427, "U_OrestesBody"}, // 0.00% + {10000, "U_NikosAgedBody"} // 0.00% + }; + }; + + /** + Result of 100 rounds: + + Exile_Item_Pliers + Exile_Item_FuelCanisterFull + FlareGreen_F + Exile_Item_LightBulb + FlareWhite_F + Exile_Item_Pliers + Exile_Item_PortableGeneratorKit + Exile_Item_Grinder + Exile_Item_Can_Empty + Exile_Item_FuelCanisterEmpty + Exile_Item_ExtensionCord + Exile_Item_Can_Empty + Exile_Item_ToiletPaper + Exile_Item_FuelCanisterEmpty + FlareGreen_F + Exile_Item_Handsaw + Exile_Item_ToiletPaper + Exile_Item_FuelCanisterEmpty + Exile_Item_FuelCanisterFull + Exile_Item_JunkMetal + FlareYellow_F + Exile_Item_ToiletPaper + Exile_Item_JunkMetal + Exile_Item_ToiletPaper + Exile_Melee_Axe + Exile_Item_Handsaw + Exile_Item_FuelCanisterEmpty + Exile_Item_Magazine02 + Exile_Item_MetalBoard + Exile_Item_ToiletPaper + FlareWhite_F + Exile_Item_Pliers + Exile_Item_Magazine01 + Exile_Item_FuelCanisterEmpty + Exile_Melee_Axe + Exile_Item_FuelCanisterEmpty + Exile_Melee_SledgeHammer + Exile_Item_FuelCanisterEmpty + FlareYellow_F + FlareWhite_F + Exile_Item_Can_Empty + Exile_Item_Magazine01 + Exile_Item_PlasticBottleEmpty + Exile_Item_ZipTie + Exile_Item_FuelCanisterEmpty + Exile_Item_Pliers + Exile_Item_MetalScrews + Exile_Item_ZipTie + Exile_Item_ExtensionCord + Exile_Item_FuelCanisterFull + Exile_Item_Pliers + Exile_Item_FuelCanisterEmpty + Exile_Item_FuelCanisterEmpty + Exile_Item_FuelCanisterFull + Exile_Melee_Shovel + Exile_Melee_Axe + Exile_Item_ZipTie + Exile_Item_ToiletPaper + Exile_Item_PlasticBottleEmpty + Exile_Item_Magazine04 + Exile_Item_Handsaw + Exile_Item_FuelCanisterFull + Exile_Item_MetalBoard + Exile_Item_Grinder + FlareRed_F + Exile_Item_FuelCanisterFull + Exile_Item_PlasticBottleEmpty + Exile_Item_ToiletPaper + Exile_Item_Pliers + Exile_Item_ZipTie + Exile_Item_JunkMetal + Exile_Item_Can_Empty + Exile_Item_ZipTie + Exile_Item_Handsaw + Exile_Item_ZipTie + Exile_Item_WaterCanisterEmpty + Exile_Item_Magazine03 + Exile_Item_ToiletPaper + Exile_Item_Can_Empty + Exile_Melee_Shovel + Exile_Melee_Shovel + FlareGreen_F + Exile_Item_FuelCanisterEmpty + Exile_Item_DuctTape + FlareYellow_F + Exile_Item_ZipTie + Exile_Item_Pliers + Exile_Item_JunkMetal + Exile_Item_ToiletPaper + Exile_Item_FuelCanisterEmpty + Exile_Item_Handsaw + Exile_Item_Handsaw + Exile_Item_Pliers + Exile_Melee_Shovel + Exile_Item_Magazine02 + Exile_Item_FuelCanisterFull + Exile_Item_Magazine03 + Exile_Item_ZipTie + Exile_Melee_SledgeHammer + Exile_Item_Foolbox + */ + class Industrial + { + count = 36; + half = 8180.77803203661; + halfIndex = 18; + sum = 10000; + items[] = + { + {1086.95652173913, "Exile_Item_FuelCanisterEmpty"}, // 10.87% + {1956.52173913043, "Exile_Item_FuelCanisterFull"}, // 8.70% + {2608.69565217391, "Exile_Item_Can_Empty"}, // 6.52% + {3260.86956521739, "Exile_Item_ToiletPaper"}, // 6.52% + {3913.04347826087, "Exile_Item_PlasticBottleEmpty"}, // 6.52% + {4416.47597254005, "Exile_Melee_Axe"}, // 5.03% + {4851.2585812357, "Exile_Item_ZipTie"}, // 4.35% + {5177.34553775744, "FlareWhite_F"}, // 3.26% + {5503.43249427918, "FlareRed_F"}, // 3.26% + {5829.51945080091, "FlareGreen_F"}, // 3.26% + {6155.60640732265, "FlareYellow_F"}, // 3.26% + {6453.08924485126, "Exile_Item_ScrewDriver"}, // 2.97% + {6750.57208237986, "Exile_Item_Handsaw"}, // 2.97% + {7048.05491990847, "Exile_Item_Pliers"}, // 2.97% + {7299.77116704805, "Exile_Item_JunkMetal"}, // 2.52% + {7528.60411899313, "Exile_Melee_Shovel"}, // 2.29% + {7757.43707093821, "Exile_Item_WaterCanisterEmpty"}, // 2.29% + {7974.82837528604, "Exile_Item_DuctTape"}, // 2.17% + {8180.77803203661, "Exile_Item_LightBulb"}, // 2.06% + {8363.84439359268, "Exile_Item_ExtensionCord"}, // 1.83% + {8526.88787185355, "Exile_Item_Magazine02"}, // 1.63% + {8689.93135011442, "Exile_Item_Magazine01"}, // 1.63% + {8852.97482837529, "Exile_Item_Magazine04"}, // 1.63% + {9016.01830663616, "Exile_Item_Magazine03"}, // 1.63% + {9130.4347826087, "Exile_Item_MetalScrews"}, // 1.14% + {9244.85125858124, "Exile_Item_Grinder"}, // 1.14% + {9359.26773455378, "Exile_Melee_SledgeHammer"}, // 1.14% + {9450.80091533181, "Exile_Item_Sand"}, // 0.92% + {9542.33409610984, "Exile_Item_Foolbox"}, // 0.92% + {9633.86727688787, "Exile_Item_MetalBoard"}, // 0.92% + {9725.4004576659, "Exile_Item_CamoTentKit"}, // 0.92% + {9794.05034324943, "Exile_Item_PortableGeneratorKit"}, // 0.69% + {9862.70022883295, "Exile_Item_FloodLightKit"}, // 0.69% + {9931.35011441647, "Exile_Item_Cement"}, // 0.69% + {9977.11670480549, "Exile_Item_Knife"}, // 0.46% + {10000, "Exile_Item_ThermalScannerPro"} // 0.23% + }; + }; + + /** + Result of 100 rounds: + + Exile_Item_WaterCanisterEmpty + Exile_Item_Can_Empty + Exile_Item_ScrewDriver + Exile_Item_Magazine02 + Exile_Item_Handsaw + Exile_Item_WaterCanisterEmpty + Exile_Item_FloodLightKit + Exile_Item_Sand + Exile_Item_ToiletPaper + Exile_Item_PlasticBottleEmpty + Exile_Item_Magazine03 + Exile_Item_ToiletPaper + Exile_Melee_Axe + Exile_Item_Can_Empty + Exile_Item_Handsaw + Exile_Melee_Shovel + Exile_Item_ToiletPaper + Exile_Item_PlasticBottleEmpty + Exile_Item_Can_Empty + Exile_Item_LightBulb + Exile_Item_JunkMetal + Exile_Item_ToiletPaper + Exile_Item_LightBulb + Exile_Item_ToiletPaper + Exile_Item_BaseCameraKit + Exile_Melee_Shovel + Exile_Item_PlasticBottleEmpty + Exile_Item_Magazine04 + Exile_Item_CamoTentKit + Exile_Item_ToiletPaper + Exile_Item_Pliers + Exile_Item_WaterCanisterEmpty + Exile_Item_Grinder + Exile_Item_PlasticBottleEmpty + Exile_Item_Laptop + Exile_Item_PlasticBottleEmpty + Exile_Item_MetalBoard + Exile_Item_PlasticBottleEmpty + Exile_Item_JunkMetal + Exile_Item_Pliers + Exile_Item_ToiletPaper + Exile_Item_Magazine04 + Exile_Item_Laptop + Exile_Item_BaseCameraKit + Exile_Item_PlasticBottleEmpty + Exile_Item_WaterCanisterEmpty + Exile_Melee_SledgeHammer + Exile_Item_BaseCameraKit + Exile_Item_Magazine03 + Exile_Item_Can_Empty + Exile_Item_WaterCanisterEmpty + Exile_Item_PlasticBottleEmpty + Exile_Item_PlasticBottleEmpty + Exile_Item_Can_Empty + Exile_Item_ExtensionCord + Exile_Item_Laptop + Exile_Item_BaseCameraKit + Exile_Item_ToiletPaper + Exile_Melee_Axe + Exile_Item_Grinder + Exile_Melee_Shovel + Exile_Item_Can_Empty + Exile_Item_PortableGeneratorKit + Exile_Item_Sand + Exile_Item_Handsaw + Exile_Item_Can_Empty + Exile_Melee_Axe + Exile_Item_ToiletPaper + Exile_Item_WaterCanisterEmpty + Exile_Item_BaseCameraKit + Exile_Item_LightBulb + Exile_Item_ToiletPaper + Exile_Item_BaseCameraKit + Exile_Melee_Shovel + Exile_Item_BaseCameraKit + Exile_Item_Magazine01 + Exile_Melee_SledgeHammer + Exile_Item_ToiletPaper + Exile_Item_Can_Empty + Exile_Item_ExtensionCord + Exile_Item_ExtensionCord + Exile_Item_ScrewDriver + Exile_Item_PlasticBottleEmpty + Exile_Item_Magazine02 + Exile_Item_ScrewDriver + Exile_Item_BaseCameraKit + Exile_Item_WaterCanisterEmpty + Exile_Item_LightBulb + Exile_Melee_Axe + Exile_Item_PlasticBottleEmpty + Exile_Melee_Shovel + Exile_Melee_Shovel + Exile_Item_WaterCanisterEmpty + Exile_Item_LightBulb + Exile_Item_Magazine04 + Exile_Item_Can_Empty + Exile_Melee_SledgeHammer + Exile_Item_Pliers + Exile_Item_MetalBoard + Exile_Item_CamoTentKit + */ + class Factories + { + count = 30; + half = 8085.52631578947; + halfIndex = 15; + sum = 10000; + items[] = + { + {1000, "Exile_Item_PlasticBottleEmpty"}, // 10.00% + {2000, "Exile_Item_Can_Empty"}, // 10.00% + {3000, "Exile_Item_ToiletPaper"}, // 10.00% + {3723.68421052632, "Exile_Melee_Axe"}, // 7.24% + {4223.68421052632, "Exile_Item_Laptop"}, // 5.00% + {4723.68421052632, "Exile_Item_BaseCameraKit"}, // 5.00% + {5151.31578947368, "Exile_Item_Pliers"}, // 4.28% + {5578.94736842105, "Exile_Item_Handsaw"}, // 4.28% + {6006.57894736842, "Exile_Item_ScrewDriver"}, // 4.28% + {6368.42105263158, "Exile_Item_JunkMetal"}, // 3.62% + {6697.36842105263, "Exile_Melee_Shovel"}, // 3.29% + {7026.31578947368, "Exile_Item_WaterCanisterEmpty"}, // 3.29% + {7322.36842105263, "Exile_Item_LightBulb"}, // 2.96% + {7585.52631578947, "Exile_Item_ExtensionCord"}, // 2.63% + {7835.52631578947, "Exile_Item_Magazine01"}, // 2.50% + {8085.52631578947, "Exile_Item_Magazine02"}, // 2.50% + {8335.52631578947, "Exile_Item_Magazine03"}, // 2.50% + {8585.52631578947, "Exile_Item_Magazine04"}, // 2.50% + {8750, "Exile_Item_Grinder"}, // 1.64% + {8914.47368421053, "Exile_Item_MetalScrews"}, // 1.64% + {9078.94736842105, "Exile_Melee_SledgeHammer"}, // 1.64% + {9210.52631578948, "Exile_Item_Sand"}, // 1.32% + {9342.1052631579, "Exile_Item_MetalBoard"}, // 1.32% + {9473.68421052632, "Exile_Item_Foolbox"}, // 1.32% + {9605.26315789474, "Exile_Item_CamoTentKit"}, // 1.32% + {9703.94736842106, "Exile_Item_PortableGeneratorKit"}, // 0.99% + {9802.63157894737, "Exile_Item_FloodLightKit"}, // 0.99% + {9901.31578947369, "Exile_Item_Cement"}, // 0.99% + {9967.1052631579, "Exile_Item_Knife"}, // 0.66% + {10000, "Exile_Item_ThermalScannerPro"} // 0.33% + }; + }; + + /** + Result of 100 rounds: + + FlareYellow_F + Exile_Item_FuelCanisterEmpty + Exile_Item_DuctTape + Exile_Item_Magazine04 + Exile_Item_ZipTie + FlareYellow_F + Exile_Item_MetalBoard + Exile_Item_LightBulb + Exile_Item_FuelCanisterFull + Exile_Item_FuelCanisterEmpty + Exile_Item_Magazine01 + Exile_Item_FuelCanisterFull + Exile_Item_Can_Empty + Exile_Item_FuelCanisterEmpty + Exile_Item_ZipTie + FlareRed_F + Exile_Item_FuelCanisterFull + Exile_Item_FuelCanisterEmpty + Exile_Item_FuelCanisterEmpty + Exile_Melee_Axe + FlareWhite_F + Exile_Item_FuelCanisterFull + Exile_Melee_Axe + Exile_Item_FuelCanisterFull + Exile_Item_ToiletPaper + FlareRed_F + Exile_Item_FuelCanisterEmpty + Exile_Item_Magazine02 + Exile_Item_MetalScrews + Exile_Item_FuelCanisterFull + Exile_Item_PlasticBottleEmpty + FlareYellow_F + Exile_Item_Magazine03 + Exile_Item_FuelCanisterEmpty + Exile_Item_ToiletPaper + Exile_Item_FuelCanisterEmpty + Exile_Item_ExtensionCord + Exile_Item_FuelCanisterEmpty + FlareWhite_F + Exile_Item_PlasticBottleEmpty + Exile_Item_FuelCanisterFull + Exile_Item_Magazine03 + Exile_Item_ToiletPaper + Exile_Item_PlasticBottleEmpty + Exile_Item_FuelCanisterEmpty + FlareYellow_F + Exile_Item_WaterCanisterEmpty + Exile_Item_PlasticBottleEmpty + Exile_Item_Magazine04 + Exile_Item_FuelCanisterEmpty + FlareYellow_F + Exile_Item_FuelCanisterEmpty + Exile_Item_FuelCanisterEmpty + Exile_Item_FuelCanisterEmpty + Exile_Melee_Axe + Exile_Item_ToiletPaper + Exile_Item_PlasticBottleEmpty + Exile_Item_FuelCanisterFull + Exile_Item_Can_Empty + Exile_Item_JunkMetal + FlareGreen_F + Exile_Item_FuelCanisterEmpty + Exile_Item_Sand + Exile_Item_WaterCanisterEmpty + Exile_Item_ZipTie + Exile_Item_FuelCanisterEmpty + Exile_Item_Can_Empty + Exile_Item_FuelCanisterFull + FlareYellow_F + Exile_Item_PlasticBottleEmpty + Exile_Melee_Axe + Exile_Item_FuelCanisterFull + Exile_Item_PlasticBottleEmpty + FlareGreen_F + Exile_Item_PlasticBottleEmpty + Exile_Item_ScrewDriver + Exile_Item_WaterCanisterEmpty + Exile_Item_FuelCanisterFull + Exile_Item_FuelCanisterFull + Exile_Melee_Axe + Exile_Melee_Axe + Exile_Item_DuctTape + Exile_Item_FuelCanisterEmpty + Exile_Item_Handsaw + Exile_Item_DuctTape + Exile_Item_PlasticBottleEmpty + FlareGreen_F + FlareYellow_F + Exile_Item_FuelCanisterFull + Exile_Item_FuelCanisterEmpty + FlareRed_F + FlareGreen_F + FlareYellow_F + Exile_Melee_Axe + Exile_Item_Magazine02 + Exile_Item_FuelCanisterEmpty + Exile_Melee_Shovel + Exile_Item_PlasticBottleEmpty + Exile_Item_LightBulb + Exile_Item_Grinder + */ + class VehicleService + { + count = 36; + half = 8698.51258581236; + halfIndex = 18; + sum = 10000; + items[] = + { + {1739.13043478261, "Exile_Item_FuelCanisterEmpty"}, // 17.39% + {3130.4347826087, "Exile_Item_FuelCanisterFull"}, // 13.91% + {3782.60869565217, "Exile_Item_Can_Empty"}, // 6.52% + {4434.78260869565, "Exile_Item_ToiletPaper"}, // 6.52% + {5086.95652173913, "Exile_Item_PlasticBottleEmpty"}, // 6.52% + {5521.73913043478, "Exile_Item_ZipTie"}, // 4.35% + {5869.5652173913, "Exile_Item_DuctTape"}, // 3.48% + {6195.65217391304, "FlareWhite_F"}, // 3.26% + {6521.73913043478, "FlareRed_F"}, // 3.26% + {6847.82608695652, "FlareGreen_F"}, // 3.26% + {7173.91304347826, "FlareYellow_F"}, // 3.26% + {7488.55835240275, "Exile_Melee_Axe"}, // 3.15% + {7674.48512585812, "Exile_Item_ScrewDriver"}, // 1.86% + {7860.4118993135, "Exile_Item_Pliers"}, // 1.86% + {8046.33867276888, "Exile_Item_Handsaw"}, // 1.86% + {8209.38215102975, "Exile_Item_Magazine04"}, // 1.63% + {8372.42562929062, "Exile_Item_Magazine01"}, // 1.63% + {8535.46910755149, "Exile_Item_Magazine02"}, // 1.63% + {8698.51258581236, "Exile_Item_Magazine03"}, // 1.63% + {8855.8352402746, "Exile_Item_JunkMetal"}, // 1.57% + {8998.85583524028, "Exile_Melee_Shovel"}, // 1.43% + {9141.87643020595, "Exile_Item_WaterCanisterEmpty"}, // 1.43% + {9270.59496567506, "Exile_Item_LightBulb"}, // 1.29% + {9385.0114416476, "Exile_Item_ExtensionCord"}, // 1.14% + {9456.52173913044, "Exile_Melee_SledgeHammer"}, // 0.72% + {9528.03203661327, "Exile_Item_Grinder"}, // 0.72% + {9599.54233409611, "Exile_Item_MetalScrews"}, // 0.72% + {9656.75057208238, "Exile_Item_Sand"}, // 0.57% + {9713.95881006865, "Exile_Item_Foolbox"}, // 0.57% + {9771.16704805492, "Exile_Item_MetalBoard"}, // 0.57% + {9828.37528604119, "Exile_Item_CamoTentKit"}, // 0.57% + {9871.28146453089, "Exile_Item_PortableGeneratorKit"}, // 0.43% + {9914.18764302059, "Exile_Item_FloodLightKit"}, // 0.43% + {9957.0938215103, "Exile_Item_Cement"}, // 0.43% + {9985.69794050343, "Exile_Item_Knife"}, // 0.29% + {10000, "Exile_Item_ThermalScannerPro"} // 0.14% + }; + }; + + /** + Result of 100 rounds: + + Exile_Item_Bandage + Exile_Item_ToiletPaper + Rangefinder + bipod_02_F_hex + ItemCompass + muzzle_snds_338_green + 30Rnd_580x42_Mag_F + Exile_Item_MobilePhone + Exile_Item_ToiletPaper + Exile_Item_Can_Empty + B_ViperHarness_hex_F + Exile_Item_ToiletPaper + Exile_Item_PlasticBottleEmpty + Exile_Item_Can_Empty + APERSBoundingMine_Range_Mag + LMG_03_F + Exile_Item_PlasticBottleEmpty + Exile_Item_Can_Empty + Exile_Item_ToiletPaper + srifle_GM6_ghex_F + 10Rnd_338_Mag + Exile_Item_PlasticBottleEmpty + srifle_LRR_tna_F + Exile_Item_PlasticBottleEmpty + Exile_Item_Magazine03 + Exile_Weapon_PKP + Exile_Item_Can_Empty + B_ViperLightHarness_base_F + H_HelmetB_paint + Exile_Item_PlasticBottleEmpty + Exile_Item_Magazine04 + B_Carryall_oli + U_B_T_FullGhillie_tna_F + Exile_Item_Can_Empty + Exile_Item_Magazine02 + Exile_Item_Can_Empty + muzzle_snds_H_MG_khk_F + Exile_Item_Can_Empty + IEDLandSmall_Remote_Mag + 1Rnd_HE_Grenade_shell + Exile_Item_PlasticBottleEmpty + U_B_CTRG_Soldier_2_F + Exile_Item_Magazine01 + Exile_Item_Magazine03 + Exile_Item_Can_Empty + U_B_GhillieSuit + srifle_DMR_03_woodland_F + Exile_Item_Magazine04 + 5Rnd_127x108_Mag + Exile_Item_ToiletPaper + U_I_GhillieSuit + Exile_Item_Can_Empty + Exile_Item_Can_Empty + Exile_Item_ToiletPaper + 1Rnd_SmokeBlue_Grenade_shell + Exile_Item_Magazine01 + Exile_Item_Magazine03 + Exile_Item_PlasticBottleEmpty + Exile_Item_PlasticBottleEmpty + V_PlateCarrierGL_tna_F + ItemGPS + Exile_Item_ToiletPaper + arifle_SPAR_02_blk_F + 150Rnd_762x54_Box_Tracer + HandGrenade + Exile_Item_ToiletPaper + Exile_Item_PlasticBottleEmpty + Exile_Item_PlasticBottleEmpty + 10Rnd_762x54_Mag + Exile_Item_Magazine03 + srifle_LRR_tna_F + Exile_Item_ToiletPaper + Exile_Item_Magazine03 + SmokeShellRed + Exile_Item_Magazine04 + optic_KHS_hex + 3Rnd_SmokePurple_Grenade_shell + Exile_Item_PlasticBottleEmpty + Exile_Item_ToiletPaper + 1Rnd_SmokeOrange_Grenade_shell + B_Carryall_oucamo + ItemWatch + Exile_Item_Can_Empty + 3Rnd_UGL_FlareWhite_F + U_IG_Guerilla1_1 + Exile_Item_Magazine03 + B_Carryall_ghex_F + srifle_GM6_F + Exile_Item_PlasticBottleEmpty + Exile_Item_Can_Empty + LMG_03_F + SmokeShellOrange + muzzle_snds_338_black + 1Rnd_SmokeRed_Grenade_shell + B_ViperLightHarness_khk_F + Exile_Item_Can_Empty + arifle_Katiba_F + Exile_Item_Magazine04 + muzzle_snds_65_TI_ghex_F + H_Bandanna_mcamo + */ + class Military + { + count = 552; + half = 9066.71085627853; + halfIndex = 276; + sum = 10000.0000000001; + items[] = + { + {1237.62376237624, "Exile_Item_Can_Empty"}, // 12.38% + {2475.24752475248, "Exile_Item_ToiletPaper"}, // 12.38% + {3712.87128712871, "Exile_Item_PlasticBottleEmpty"}, // 12.38% + {4022.27722772277, "Exile_Item_Magazine01"}, // 3.09% + {4331.68316831683, "Exile_Item_Magazine02"}, // 3.09% + {4641.08910891089, "Exile_Item_Magazine03"}, // 3.09% + {4950.49504950495, "Exile_Item_Magazine04"}, // 3.09% + {5050, "1Rnd_HE_Grenade_shell"}, // 1.00% + {5149.0099009901, "Exile_Item_ZipTie"}, // 0.99% + {5235.10546706845, "ItemCompass"}, // 0.86% + {5309.36289281102, "MiniGrenade"}, // 0.74% + {5383.62031855359, "HandGrenade"}, // 0.74% + {5433.12526904864, "APERSMine_Range_Mag"}, // 0.50% + {5482.63021954369, "APERSTripMine_Wire_Mag"}, // 0.50% + {5532.13517003874, "APERSBoundingMine_Range_Mag"}, // 0.50% + {5581.14507102884, "3Rnd_HE_Grenade_shell"}, // 0.49% + {5625.14947146889, "Exile_Item_Heatpack"}, // 0.44% + {5668.19725450806, "Rangefinder"}, // 0.43% + {5706.7011048931, "ItemMap"}, // 0.39% + {5743.37143859313, "Exile_Item_Vishpirin"}, // 0.37% + {5780.04177229317, "Exile_Item_Heatpack"}, // 0.37% + {5813.0450726232, "ItemWatch"}, // 0.33% + {5846.04837295324, "ItemRadio"}, // 0.33% + {5876.51295787327, "U_IG_Guerilla1_1"}, // 0.30% + {5906.9775427933, "U_IG_Guerilla2_1"}, // 0.30% + {5937.44212771333, "U_IG_Guerilla2_3"}, // 0.30% + {5967.90671263336, "U_IG_Guerilla2_2"}, // 0.30% + {5997.60968293039, "IEDUrbanSmall_Remote_Mag"}, // 0.30% + {6027.31265322742, "DemoCharge_Remote_Mag"}, // 0.30% + {6057.01562352445, "IEDLandSmall_Remote_Mag"}, // 0.30% + {6086.71859382148, "150Rnd_93x64_Mag"}, // 0.30% + {6115.279142184, "U_IG_Guerilla3_2"}, // 0.29% + {6143.83969054653, "U_IG_Guerilla3_1"}, // 0.29% + {6171.63194345603, "10Rnd_338_Mag"}, // 0.28% + {6199.42419636554, "10Rnd_93x64_DMR_05_Mag"}, // 0.28% + {6224.67172111801, "UGL_FlareYellow_F"}, // 0.25% + {6249.91924587049, "UGL_FlareRed_F"}, // 0.25% + {6275.16677062296, "UGL_FlareGreen_F"}, // 0.25% + {6300.41429537544, "UGL_FlareWhite_F"}, // 0.25% + {6325.16677062296, "LMG_Mk200_F"}, // 0.25% + {6349.91924587049, "arifle_MX_SW_Black_F"}, // 0.25% + {6374.67172111801, "arifle_MX_SW_F"}, // 0.25% + {6399.42419636554, "LMG_Zafir_F"}, // 0.25% + {6424.17667161306, "Exile_Weapon_RPK"}, // 0.25% + {6448.92914686059, "Exile_Weapon_PK"}, // 0.25% + {6473.68162210811, "Exile_Weapon_PKP"}, // 0.25% + {6498.43409735563, "LMG_03_F"}, // 0.25% + {6522.75231865145, "10Rnd_127x54_Mag"}, // 0.24% + {6544.75451887147, "Binocular"}, // 0.22% + {6566.75671909149, "ItemGPS"}, // 0.22% + {6587.97312644651, "SmokeShellBlue"}, // 0.21% + {6609.18953380153, "SmokeShellOrange"}, // 0.21% + {6630.40594115656, "SmokeShellYellow"}, // 0.21% + {6651.62234851158, "SmokeShellGreen"}, // 0.21% + {6672.8387558666, "SmokeShellRed"}, // 0.21% + {6694.05516322162, "SmokeShell"}, // 0.21% + {6715.27157057664, "SmokeShellPurple"}, // 0.21% + {6736.06364978456, "20Rnd_650x39_Cased_Mag_F"}, // 0.21% + {6755.86562998258, "srifle_EBR_F"}, // 0.20% + {6775.6676101806, "srifle_DMR_01_F"}, // 0.20% + {6794.77478405588, "20Rnd_762x51_Mag"}, // 0.19% + {6813.71291948016, "B_Carryall_cbr"}, // 0.19% + {6832.65105490445, "B_Carryall_ghex_F"}, // 0.19% + {6851.46293609256, "20Rnd_762x51_Mag"}, // 0.19% + {6869.79810294258, "Exile_Item_Bandage"}, // 0.18% + {6887.73949439716, "B_Carryall_oli"}, // 0.18% + {6905.68088585175, "B_Carryall_khk"}, // 0.18% + {6922.51256902006, "10Rnd_762x54_Mag"}, // 0.17% + {6939.01421918508, "muzzle_snds_338_black"}, // 0.17% + {6955.5158693501, "V_RebreatherIA"}, // 0.17% + {6972.01751951511, "V_RebreatherIR"}, // 0.17% + {6988.51916968013, "V_RebreatherB"}, // 0.17% + {7005.02081984514, "U_B_GhillieSuit"}, // 0.17% + {7021.52247001016, "muzzle_snds_338_green"}, // 0.17% + {7038.02412017518, "U_I_GhillieSuit"}, // 0.17% + {7054.52577034019, "muzzle_snds_93mmg"}, // 0.17% + {7071.02742050521, "muzzle_snds_93mmg_tan"}, // 0.17% + {7087.52907067022, "muzzle_snds_B"}, // 0.17% + {7104.03072083524, "U_O_GhillieSuit"}, // 0.17% + {7120.53237100026, "muzzle_snds_338_sand"}, // 0.17% + {7136.58803062027, "srifle_DMR_05_hex_F"}, // 0.16% + {7152.64369024029, "srifle_DMR_05_blk_F"}, // 0.16% + {7168.6993498603, "srifle_DMR_05_tan_F"}, // 0.16% + {7184.25804858732, "srifle_GM6_F"}, // 0.16% + {7199.81674731433, "srifle_LRR_F"}, // 0.16% + {7215.37544604135, "srifle_LRR_tna_F"}, // 0.16% + {7230.93414476837, "srifle_GM6_ghex_F"}, // 0.16% + {7246.49284349538, "srifle_DMR_07_blk_F"}, // 0.16% + {7262.0515422224, "srifle_DMR_07_ghex_F"}, // 0.16% + {7277.61024094941, "srifle_DMR_07_hex_F"}, // 0.16% + {7292.76481763157, "1Rnd_SmokeGreen_Grenade_shell"}, // 0.15% + {7307.91939431373, "1Rnd_SmokeYellow_Grenade_shell"}, // 0.15% + {7323.07397099589, "1Rnd_SmokeRed_Grenade_shell"}, // 0.15% + {7338.22854767804, "1Rnd_SmokePurple_Grenade_shell"}, // 0.15% + {7353.3831243602, "1Rnd_SmokeBlue_Grenade_shell"}, // 0.15% + {7368.53770104236, "1Rnd_SmokeOrange_Grenade_shell"}, // 0.15% + {7383.69227772452, "1Rnd_Smoke_Grenade_shell"}, // 0.15% + {7398.64343727, "B_Carryall_ocamo"}, // 0.15% + {7413.59459681549, "B_Carryall_oucamo"}, // 0.15% + {7428.54575636097, "B_Carryall_mcamo"}, // 0.15% + {7443.39724150949, "V_PlateCarrier2_rgr"}, // 0.15% + {7458.248726658, "V_PlateCarrierIAGL_dgtl"}, // 0.15% + {7473.10021180652, "V_PlateCarrier3_rgr"}, // 0.15% + {7487.95169695504, "V_PlateCarrierGL_rgr"}, // 0.15% + {7502.80318210355, "V_PlateCarrierIA1_dgtl"}, // 0.15% + {7517.65466725207, "V_PlateCarrierIA2_dgtl"}, // 0.15% + {7532.50615240058, "V_PlateCarrierSpec_rgr"}, // 0.15% + {7547.3576375491, "V_PlateCarrier1_blk"}, // 0.15% + {7562.20912269761, "V_PlateCarrier1_rgr"}, // 0.15% + {7576.35339426762, "optic_AMS_snd"}, // 0.14% + {7590.49766583764, "optic_KHS_tan"}, // 0.14% + {7604.64193740765, "optic_KHS_old"}, // 0.14% + {7618.78620897767, "optic_KHS_hex"}, // 0.14% + {7632.93048054768, "optic_AMS_khk"}, // 0.14% + {7647.0747521177, "optic_AMS"}, // 0.14% + {7661.21902368771, "optic_KHS_blk"}, // 0.14% + {7675.26772585522, "srifle_DMR_04_F"}, // 0.14% + {7689.31642802274, "srifle_DMR_04_Tan_F"}, // 0.14% + {7703.09171859527, "O_NVGoggles_ghex_F"}, // 0.14% + {7716.86700916781, "NVGoggles_tna_F"}, // 0.14% + {7730.64229974035, "O_NVGoggles_hex_F"}, // 0.14% + {7744.41759031288, "NVGoggles"}, // 0.14% + {7758.19288088542, "O_NVGoggles_urb_F"}, // 0.14% + {7771.83199989936, "optic_DMS"}, // 0.14% + {7784.96596635723, "optic_SOS"}, // 0.13% + {7798.0999328151, "optic_SOS_khk_F"}, // 0.13% + {7811.23389927297, "optic_LRPS"}, // 0.13% + {7824.36786573084, "optic_LRPS_tna_F"}, // 0.13% + {7837.50183218871, "optic_LRPS_ghex_F"}, // 0.13% + {7849.54357690372, "srifle_DMR_02_sniper_F"}, // 0.12% + {7861.58532161873, "srifle_DMR_02_F"}, // 0.12% + {7873.62706633374, "srifle_DMR_02_camo_F"}, // 0.12% + {7885.50825445256, "3Rnd_UGL_FlareGreen_F"}, // 0.12% + {7897.38944257137, "3Rnd_UGL_FlareRed_F"}, // 0.12% + {7909.27063069018, "3Rnd_UGL_FlareWhite_F"}, // 0.12% + {7921.15181880899, "3Rnd_UGL_FlareYellow_F"}, // 0.12% + {7932.56036707123, "B_FieldPack_ocamo"}, // 0.11% + {7943.96891533346, "B_FieldPack_oucamo"}, // 0.11% + {7955.3774635957, "B_FieldPack_cbr"}, // 0.11% + {7966.78601185793, "B_FieldPack_blk"}, // 0.11% + {7977.93282190317, "bipod_01_F_snd"}, // 0.11% + {7989.07963194842, "bipod_01_F_blk"}, // 0.11% + {8000.22644199366, "bipod_02_F_blk"}, // 0.11% + {8011.3732520389, "bipod_02_F_tan"}, // 0.11% + {8022.52006208414, "bipod_03_F_blk"}, // 0.11% + {8033.66687212939, "bipod_01_F_khk"}, // 0.11% + {8044.81368217463, "bipod_03_F_oli"}, // 0.11% + {8055.30479751133, "bipod_02_F_hex"}, // 0.10% + {8065.79591284803, "bipod_01_F_mtp"}, // 0.10% + {8076.19195245199, "V_BandollierB_blk"}, // 0.10% + {8086.58799205595, "V_BandollierB_oli"}, // 0.10% + {8096.98403165991, "V_BandollierB_cbr"}, // 0.10% + {8107.38007126387, "V_BandollierB_khk"}, // 0.10% + {8117.77611086783, "V_HarnessO_brn"}, // 0.10% + {8128.17215047179, "V_HarnessOGL_brn"}, // 0.10% + {8138.56819007575, "V_HarnessO_gry"}, // 0.10% + {8148.96422967971, "V_HarnessOGL_gry"}, // 0.10% + {8159.36026928367, "V_HarnessOSpec_brn"}, // 0.10% + {8169.75630888763, "V_HarnessOSpec_gry"}, // 0.10% + {8180.15234849159, "V_BandollierB_rgr"}, // 0.10% + {8190.0533385906, "5Rnd_127x108_Mag"}, // 0.10% + {8199.95432868961, "7Rnd_408_Mag"}, // 0.10% + {8209.85531878862, "SatchelCharge_Remote_Mag"}, // 0.10% + {8219.45321735399, "muzzle_snds_B"}, // 0.10% + {8228.9734001415, "U_I_C_Soldier_Para_1_F"}, // 0.10% + {8238.49358292901, "U_I_C_Soldier_Para_2_F"}, // 0.10% + {8248.01376571652, "U_I_C_Soldier_Para_3_F"}, // 0.10% + {8257.53394850403, "U_I_C_Soldier_Para_4_F"}, // 0.10% + {8267.05413129154, "U_I_C_Soldier_Para_5_F"}, // 0.10% + {8276.57431407905, "U_I_C_Soldier_Camo_F"}, // 0.10% + {8285.53817342794, "B_ViperHarness_oli_F"}, // 0.09% + {8294.50203277684, "B_ViperHarness_blk_F"}, // 0.09% + {8303.46589212574, "B_ViperHarness_ghex_F"}, // 0.09% + {8312.42975147464, "B_ViperHarness_hex_F"}, // 0.09% + {8321.39361082354, "B_ViperLightHarness_ghex_F"}, // 0.09% + {8330.35747017243, "B_ViperLightHarness_hex_F"}, // 0.09% + {8339.32132952133, "B_FieldPack_ghex_F"}, // 0.09% + {8348.28518887023, "B_ViperLightHarness_blk_F"}, // 0.09% + {8357.24904821913, "B_ViperHarness_khk_F"}, // 0.09% + {8366.21290756803, "B_ViperLightHarness_oli_F"}, // 0.09% + {8375.17676691692, "B_ViperHarness_base_F"}, // 0.09% + {8384.14062626582, "B_ViperLightHarness_base_F"}, // 0.09% + {8393.10448561472, "B_Bergen_blk"}, // 0.09% + {8402.06834496362, "B_Bergen_rgr"}, // 0.09% + {8411.03220431252, "B_Bergen_mcamo"}, // 0.09% + {8419.99606366141, "B_Bergen_sgg"}, // 0.09% + {8428.95992301031, "B_ViperLightHarness_khk_F"}, // 0.09% + {8437.10218460489, "U_O_T_Officer_F"}, // 0.08% + {8445.24444619947, "U_O_T_Soldier_F"}, // 0.08% + {8453.38670779406, "U_B_CTRG_2"}, // 0.08% + {8461.52896938864, "U_B_CTRG_3"}, // 0.08% + {8469.67123098322, "U_B_CombatUniform_mcam"}, // 0.08% + {8477.8134925778, "U_B_CombatUniform_mcam_tshirt"}, // 0.08% + {8485.95575417238, "U_B_CombatUniform_mcam_vest"}, // 0.08% + {8494.09801576696, "U_B_GEN_Commander_F"}, // 0.08% + {8502.24027736154, "U_B_GEN_Soldier_F"}, // 0.08% + {8510.38253895612, "U_B_CTRG_Soldier_urb_3_F"}, // 0.08% + {8518.52480055071, "U_B_CTRG_Soldier_urb_2_F"}, // 0.08% + {8526.66706214529, "U_B_CTRG_Soldier_urb_1_F"}, // 0.08% + {8534.80932373987, "U_B_CTRG_Soldier_3_F"}, // 0.08% + {8542.95158533445, "U_B_CTRG_Soldier_2_F"}, // 0.08% + {8551.09384692903, "U_B_CTRG_Soldier_F"}, // 0.08% + {8559.23610852361, "U_B_T_Soldier_SL_F"}, // 0.08% + {8567.37837011819, "U_B_CombatUniform_mcam_worn"}, // 0.08% + {8575.52063171277, "U_B_T_Soldier_AR_F"}, // 0.08% + {8583.66289330736, "U_B_CTRG_1"}, // 0.08% + {8591.58368538656, "5Rnd_127x108_APDS_Mag"}, // 0.08% + {8599.19983161657, "U_IG_leader"}, // 0.08% + {8606.62557419083, "V_PlateCarrierH_CTRG"}, // 0.07% + {8614.05131676509, "V_PlateCarrierL_CTRG"}, // 0.07% + {8621.47705933935, "V_Chestrig_oli"}, // 0.07% + {8628.9028019136, "V_Chestrig_rgr"}, // 0.07% + {8636.32854448786, "V_Chestrig_blk"}, // 0.07% + {8643.75428706212, "V_Chestrig_khk"}, // 0.07% + {8651.08835380213, "Exile_Item_InstaDoc"}, // 0.07% + {8658.36849358081, "U_O_T_FullGhillie_tna_F"}, // 0.07% + {8665.6486333595, "U_B_T_FullGhillie_tna_F"}, // 0.07% + {8672.92877313818, "U_B_T_Soldier_F"}, // 0.07% + {8680.20891291687, "U_B_T_Sniper_F"}, // 0.07% + {8687.48905269555, "U_O_T_Sniper_F"}, // 0.07% + {8694.56118848056, "V_BandollierB_ghex_F"}, // 0.07% + {8701.63332426556, "V_HarnessOGL_ghex_F"}, // 0.07% + {8708.70546005057, "V_HarnessO_ghex_F"}, // 0.07% + {8715.77759583558, "V_PlateCarrierGL_tna_F"}, // 0.07% + {8722.84973162058, "V_PlateCarrierSpec_tna_F"}, // 0.07% + {8729.92186740559, "V_PlateCarrier1_tna_F"}, // 0.07% + {8736.9940031906, "V_TacChestrig_oli_F"}, // 0.07% + {8744.06613897561, "V_TacVest_gen_F"}, // 0.07% + {8751.13827476061, "V_TacChestrig_grn_F"}, // 0.07% + {8758.21041054562, "V_PlateCarrierSpec_rgr"}, // 0.07% + {8765.28254633063, "V_PlateCarrierSpec_mtp"}, // 0.07% + {8772.35468211563, "V_PlateCarrierSpec_blk"}, // 0.07% + {8779.42681790064, "V_PlateCarrierIAGL_oli"}, // 0.07% + {8786.49895368565, "V_PlateCarrierIAGL_dgtl"}, // 0.07% + {8793.57108947066, "V_PlateCarrierGL_rgr"}, // 0.07% + {8800.64322525566, "V_PlateCarrierGL_mtp"}, // 0.07% + {8807.71536104067, "V_PlateCarrierGL_blk"}, // 0.07% + {8814.78749682568, "V_TacChestrig_cbr_F"}, // 0.07% + {8821.85963261068, "V_PlateCarrier1_rgr_noflag_F"}, // 0.07% + {8828.93176839569, "V_PlateCarrier2_tna_F"}, // 0.07% + {8836.0039041807, "V_PlateCarrier2_rgr_noflag_F"}, // 0.07% + {8842.99283836823, "150Rnd_762x54_Box"}, // 0.07% + {8849.98177255577, "100Rnd_65x39_caseless_mag"}, // 0.07% + {8856.93564520056, "acc_flashlight"}, // 0.07% + {8863.48391907557, "Exile_Weapon_LeeEnfield"}, // 0.07% + {8870.03219295058, "Exile_Weapon_AK74"}, // 0.07% + {8876.58046682558, "Exile_Weapon_AK74_GL"}, // 0.07% + {8883.12874070059, "Exile_Weapon_AK107_GL"}, // 0.07% + {8889.6770145756, "Exile_Weapon_AK107"}, // 0.07% + {8896.2252884506, "Exile_Weapon_DMR"}, // 0.07% + {8902.77356232561, "Exile_Weapon_AKS_Gold"}, // 0.07% + {8909.32183620062, "Exile_Weapon_CZ550"}, // 0.07% + {8915.87011007562, "Exile_Weapon_AK47"}, // 0.07% + {8922.41838395063, "Exile_Weapon_SVDCamo"}, // 0.07% + {8928.96665782564, "Exile_Weapon_VSSVintorez"}, // 0.07% + {8935.51493170065, "arifle_Katiba_F"}, // 0.07% + {8942.06320557565, "Exile_Weapon_SVD"}, // 0.07% + {8948.57701485132, "U_I_pilotCoveralls"}, // 0.07% + {8955.09082412698, "U_B_PilotCoveralls"}, // 0.07% + {8961.60463340265, "U_O_PilotCoveralls"}, // 0.07% + {8968.11844267831, "U_I_HeliPilotCoveralls"}, // 0.07% + {8974.63225195397, "U_I_CombatUniform"}, // 0.07% + {8981.14606122964, "U_I_CombatUniform_shortsleeve"}, // 0.07% + {8987.6598705053, "U_I_CombatUniform_tshirt"}, // 0.07% + {8994.17367978097, "U_B_HeliPilotCoveralls"}, // 0.07% + {9000.23551045383, "3Rnd_SmokeYellow_Grenade_shell"}, // 0.06% + {9006.29734112669, "3Rnd_SmokePurple_Grenade_shell"}, // 0.06% + {9012.35917179956, "3Rnd_SmokeRed_Grenade_shell"}, // 0.06% + {9018.42100247242, "3Rnd_SmokeOrange_Grenade_shell"}, // 0.06% + {9024.48283314528, "3Rnd_SmokeGreen_Grenade_shell"}, // 0.06% + {9030.54466381814, "3Rnd_SmokeBlue_Grenade_shell"}, // 0.06% + {9036.60649449101, "3Rnd_Smoke_Grenade_shell"}, // 0.06% + {9042.62736684851, "srifle_DMR_03_F"}, // 0.06% + {9048.64823920602, "srifle_DMR_03_khaki_F"}, // 0.06% + {9054.66911156352, "srifle_DMR_03_tan_F"}, // 0.06% + {9060.68998392103, "srifle_DMR_03_woodland_F"}, // 0.06% + {9066.71085627853, "srifle_DMR_06_camo_F"}, // 0.06% + {9072.73172863604, "srifle_DMR_06_olive_F"}, // 0.06% + {9078.71219245423, "B_Bergen_hex_F"}, // 0.06% + {9084.69265627243, "B_Bergen_tna_F"}, // 0.06% + {9090.67312009062, "B_Bergen_dgtl_F"}, // 0.06% + {9096.65358390881, "B_Bergen_Base_F"}, // 0.06% + {9102.63404772701, "B_Bergen_mcamo_F"}, // 0.06% + {9108.45815954995, "Exile_Magazine_100Rnd_762x54_PK_Green"}, // 0.06% + {9114.2822713729, "200Rnd_556x45_Box_Red_F"}, // 0.06% + {9120.10638319585, "100Rnd_65x39_caseless_mag_Tracer"}, // 0.06% + {9125.9304950188, "Exile_Magazine_75Rnd_545x39_RPK_Green"}, // 0.06% + {9131.75460684174, "Exile_Magazine_45Rnd_545x39_RPK_Green"}, // 0.06% + {9137.57871866469, "150Rnd_762x54_Box_Tracer"}, // 0.06% + {9143.40283048764, "200Rnd_556x45_Box_Tracer_Red_F"}, // 0.06% + {9149.22694231058, "200Rnd_556x45_Box_Tracer_F"}, // 0.06% + {9155.05105413353, "200Rnd_556x45_Box_F"}, // 0.06% + {9160.55160418854, "Exile_Item_MobilePhone"}, // 0.06% + {9165.89386503333, "30Rnd_65x39_caseless_green"}, // 0.05% + {9171.23612587811, "30Rnd_556x45_Stanag"}, // 0.05% + {9176.5783867229, "30Rnd_556x45_Stanag_green"}, // 0.05% + {9181.92064756769, "30Rnd_556x45_Stanag_red"}, // 0.05% + {9187.1592666677, "arifle_TRG20_F"}, // 0.05% + {9192.3978857677, "arifle_MXC_khk_F"}, // 0.05% + {9197.63650486771, "arifle_MX_khk_F"}, // 0.05% + {9202.87512396772, "arifle_MX_F"}, // 0.05% + {9208.11374306772, "arifle_MXC_F"}, // 0.05% + {9213.35236216773, "arifle_TRG21_F"}, // 0.05% + {9218.59098126773, "arifle_Katiba_GL_F"}, // 0.05% + {9223.64250682845, "muzzle_snds_B_snd_F"}, // 0.05% + {9228.69403238917, "muzzle_snds_B_khk_F"}, // 0.05% + {9233.66108427831, "muzzle_snds_H_MG_blk_F"}, // 0.05% + {9238.62813616744, "optic_ERCO_snd_F"}, // 0.05% + {9243.59518805658, "optic_Holosight_khk_F"}, // 0.05% + {9248.56223994572, "muzzle_snds_65_TI_ghex_F"}, // 0.05% + {9253.52929183485, "optic_DMS_ghex_F"}, // 0.05% + {9258.49634372399, "muzzle_snds_65_TI_hex_F"}, // 0.05% + {9263.46339561313, "optic_DMS"}, // 0.05% + {9268.43044750226, "muzzle_snds_65_TI_blk_F"}, // 0.05% + {9273.3974993914, "muzzle_snds_58_wdm_F"}, // 0.05% + {9278.36455128053, "muzzle_snds_m_snd_F"}, // 0.05% + {9283.33160316967, "muzzle_snds_H_MG_khk_F"}, // 0.05% + {9288.29865505881, "optic_Arco"}, // 0.05% + {9293.26570694794, "optic_Arco_blk_F"}, // 0.05% + {9298.23275883708, "optic_Arco_ghex_F"}, // 0.05% + {9303.19981072622, "optic_ERCO_khk_F"}, // 0.05% + {9308.16686261535, "optic_Hamr"}, // 0.05% + {9313.13391450449, "optic_Hamr_khk_F"}, // 0.05% + {9318.10096639362, "optic_Holosight"}, // 0.05% + {9323.06801828276, "muzzle_snds_m_khk_F"}, // 0.05% + {9328.0350701719, "muzzle_snds_58_blk_F"}, // 0.05% + {9333.00212206103, "muzzle_snds_H_snd_F"}, // 0.05% + {9337.96917395017, "muzzle_snds_H_khk_F"}, // 0.05% + {9342.9362258393, "muzzle_snds_H"}, // 0.05% + {9347.90327772844, "muzzle_snds_M"}, // 0.05% + {9352.87032961758, "optic_Holosight_blk_F"}, // 0.05% + {9357.83738150671, "optic_MRCO"}, // 0.05% + {9362.80443339585, "acc_pointer_IR"}, // 0.05% + {9367.77148528499, "optic_ERCO_blk_F"}, // 0.05% + {9372.72198033449, "Exile_Magazine_10Rnd_93x64_DMR_05_Bullet_Cam_Mag"}, // 0.05% + {9377.672475384, "Exile_Magazine_10Rnd_338_Bullet_Cam_Mag"}, // 0.05% + {9382.55783234074, "U_B_SpecopsUniform_sgg"}, // 0.05% + {9387.4271717337, "H_Booniehat_khk"}, // 0.05% + {9392.29651112665, "H_Booniehat_mcamo"}, // 0.05% + {9397.16585051961, "Exile_Headgear_GasMask"}, // 0.05% + {9402.03518991257, "H_Booniehat_dirty"}, // 0.05% + {9406.90452930552, "H_Booniehat_dgtl"}, // 0.05% + {9411.77386869848, "H_Booniehat_khk_hs"}, // 0.05% + {9416.64320809143, "H_Booniehat_indp"}, // 0.05% + {9421.51254748439, "H_Booniehat_tan"}, // 0.05% + {9426.38188687734, "H_Booniehat_grn"}, // 0.05% + {9431.21163814515, "H_MilCap_blue"}, // 0.05% + {9436.04138941296, "H_MilCap_oucamo"}, // 0.05% + {9440.87114068077, "H_MilCap_mcamo"}, // 0.05% + {9445.70089194858, "H_MilCap_ocamo"}, // 0.05% + {9450.53064321639, "Exile_Headgear_GasMask"}, // 0.05% + {9455.3603944842, "H_MilCap_rucamo"}, // 0.05% + {9460.19014575201, "H_MilCap_dgtl"}, // 0.05% + {9464.77393746451, "arifle_Mk20_F"}, // 0.05% + {9469.35772917701, "arifle_Mk20C_F"}, // 0.05% + {9473.81317472157, "V_I_G_resistanceLeader_F"}, // 0.04% + {9477.74213904657, "arifle_MXM_F"}, // 0.04% + {9481.67110337157, "arifle_SDAR_F"}, // 0.04% + {9485.58876132442, "20Rnd_556x45_UW_mag"}, // 0.04% + {9489.39683443942, "U_I_G_resistanceLeader_F"}, // 0.04% + {9493.04883898414, "H_Bandanna_khk_hs"}, // 0.04% + {9496.70084352886, "H_Bandanna_khk"}, // 0.04% + {9500.35284807357, "H_Watchcap_blk"}, // 0.04% + {9504.00485261829, "H_Cap_khaki_specops_UK"}, // 0.04% + {9507.656857163, "H_Cap_tan_specops_US"}, // 0.04% + {9511.30886170772, "H_Cap_brn_SPECOPS"}, // 0.04% + {9514.96086625244, "H_Watchcap_khk"}, // 0.04% + {9518.61287079715, "H_BandMask_blk"}, // 0.04% + {9522.26487534187, "H_Bandanna_mcamo"}, // 0.04% + {9525.91687988658, "H_Bandanna_camo"}, // 0.04% + {9529.5688844313, "H_Bandanna_sgg"}, // 0.04% + {9533.22088897602, "H_Bandanna_cbr"}, // 0.04% + {9536.87289352073, "H_Hat_camo"}, // 0.04% + {9540.52489806545, "H_Bandanna_gry"}, // 0.04% + {9544.1472115163, "H_HelmetB"}, // 0.04% + {9547.76952496716, "H_HelmetB_paint"}, // 0.04% + {9551.39183841802, "H_HelmetB_light"}, // 0.04% + {9555.01415186887, "H_HelmetB_plain_blk"}, // 0.04% + {9558.63646531973, "H_HelmetSpecB"}, // 0.04% + {9562.25877877059, "H_HelmetSpecB_paint1"}, // 0.04% + {9565.88109222144, "H_HelmetSpecB_paint2"}, // 0.04% + {9569.5034056723, "H_HelmetSpecB_blk"}, // 0.04% + {9573.12571912315, "H_HelmetIA"}, // 0.04% + {9576.39985606066, "arifle_AKM_F"}, // 0.03% + {9579.67399299816, "arifle_SPAR_03_khk_F"}, // 0.03% + {9582.94812993566, "arifle_SPAR_01_GL_snd_F"}, // 0.03% + {9586.22226687317, "arifle_SPAR_01_GL_khk_F"}, // 0.03% + {9589.49640381067, "arifle_SPAR_01_GL_blk_F"}, // 0.03% + {9592.77054074818, "arifle_SPAR_01_snd_F"}, // 0.03% + {9596.04467768568, "arifle_SPAR_01_khk_F"}, // 0.03% + {9599.31881462318, "arifle_SPAR_01_blk_F"}, // 0.03% + {9602.59295156069, "arifle_CTARS_hex_F"}, // 0.03% + {9605.86708849819, "arifle_CTARS_ghex_F"}, // 0.03% + {9609.14122543569, "arifle_CTARS_blk_F"}, // 0.03% + {9612.4153623732, "arifle_SPAR_02_blk_F"}, // 0.03% + {9615.6894993107, "arifle_CTAR_GL_blk_F"}, // 0.03% + {9618.9636362482, "arifle_CTAR_blk_F"}, // 0.03% + {9622.23777318571, "arifle_ARX_hex_F"}, // 0.03% + {9625.51191012321, "arifle_ARX_ghex_F"}, // 0.03% + {9628.78604706071, "arifle_ARX_blk_F"}, // 0.03% + {9632.06018399822, "arifle_AKS_F"}, // 0.03% + {9635.33432093572, "arifle_AKM_FL_F"}, // 0.03% + {9638.60845787322, "arifle_AK12_GL_F"}, // 0.03% + {9641.88259481073, "arifle_AK12_F"}, // 0.03% + {9645.15673174823, "arifle_SPAR_03_snd_F"}, // 0.03% + {9648.43086868573, "arifle_CTAR_ghex_F"}, // 0.03% + {9651.70500562324, "arifle_SPAR_02_khk_F"}, // 0.03% + {9654.97914256074, "arifle_CTAR_hex_F"}, // 0.03% + {9658.25327949825, "arifle_SPAR_03_blk_F"}, // 0.03% + {9661.52741643575, "arifle_SPAR_02_snd_F"}, // 0.03% + {9664.78432107358, "U_O_V_Soldier_Viper_hex_F"}, // 0.03% + {9668.04122571141, "U_O_OfficerUniform_ocamo"}, // 0.03% + {9671.29813034925, "U_I_OfficerUniform"}, // 0.03% + {9674.55503498708, "U_O_Wetsuit"}, // 0.03% + {9677.81193962491, "U_B_Wetsuit"}, // 0.03% + {9681.06884426274, "U_O_CombatUniform_ocamo"}, // 0.03% + {9684.32574890057, "U_O_CombatUniform_oucamo"}, // 0.03% + {9687.58265353841, "U_O_SpecopsUniform_ocamo"}, // 0.03% + {9690.83955817624, "U_O_SpecopsUniform_blk"}, // 0.03% + {9694.09646281407, "U_O_V_Soldier_Viper_F"}, // 0.03% + {9697.3533674519, "U_I_Wetsuit"}, // 0.03% + {9700.55872395878, "Exile_Magazine_30Rnd_545x39_AK_Green"}, // 0.03% + {9703.76408046565, "Exile_Magazine_30Rnd_545x39_AK"}, // 0.03% + {9706.96943697253, "Exile_Magazine_30Rnd_762x39_AK"}, // 0.03% + {9710.1747934794, "30Rnd_65x39_caseless_mag_Tracer"}, // 0.03% + {9713.38014998627, "30Rnd_65x39_caseless_mag"}, // 0.03% + {9716.58550649315, "Exile_Magazine_10Rnd_9x39"}, // 0.03% + {9719.79086300002, "30Rnd_556x45_Stanag_Tracer_Yellow"}, // 0.03% + {9722.9962195069, "30Rnd_556x45_Stanag_Tracer_Red"}, // 0.03% + {9726.20157601377, "30Rnd_556x45_Stanag_Tracer_Green"}, // 0.03% + {9729.40693252065, "Exile_Magazine_30Rnd_545x39_AK_Red"}, // 0.03% + {9732.61228902752, "30Rnd_65x39_caseless_green_mag_Tracer"}, // 0.03% + {9735.8176455344, "Exile_Magazine_30Rnd_545x39_AK_White"}, // 0.03% + {9739.02300204127, "Exile_Magazine_20Rnd_9x39"}, // 0.03% + {9742.22835854815, "Exile_Magazine_20Rnd_762x51_DMR"}, // 0.03% + {9745.43371505502, "Exile_Magazine_30Rnd_545x39_AK_Yellow"}, // 0.03% + {9748.63907156189, "30Rnd_545x39_Mag_Tracer_Green_F"}, // 0.03% + {9751.84442806877, "30Rnd_545x39_Mag_Tracer_F"}, // 0.03% + {9755.04978457564, "30Rnd_545x39_Mag_Green_F"}, // 0.03% + {9758.25514108252, "30Rnd_545x39_Mag_F"}, // 0.03% + {9761.46049758939, "30Rnd_762x39_AK47_M"}, // 0.03% + {9764.66585409627, "30Rnd_762x39_Mag_Tracer_Green_F"}, // 0.03% + {9767.87121060314, "30Rnd_762x39_Mag_Tracer_F"}, // 0.03% + {9771.07656711002, "30Rnd_580x42_Mag_F"}, // 0.03% + {9774.28192361689, "30Rnd_762x39_Mag_Green_F"}, // 0.03% + {9777.48728012377, "30Rnd_762x39_Mag_F"}, // 0.03% + {9780.69263663064, "100Rnd_580x42_Mag_F"}, // 0.03% + {9783.89799313751, "30Rnd_580x42_Mag_Tracer_F"}, // 0.03% + {9787.10334964439, "150Rnd_556x45_Drum_Mag_F"}, // 0.03% + {9790.30870615126, "Exile_Magazine_20Rnd_762x51_DMR_Yellow"}, // 0.03% + {9793.51406265814, "150Rnd_556x45_Drum_Mag_Tracer_F"}, // 0.03% + {9796.71941916501, "20Rnd_762x51_Mag"}, // 0.03% + {9799.92477567189, "Exile_Magazine_10Rnd_762x54"}, // 0.03% + {9803.13013217876, "Exile_Magazine_20Rnd_762x51_DMR_Red"}, // 0.03% + {9806.33548868564, "Exile_Magazine_20Rnd_762x51_DMR_Green"}, // 0.03% + {9809.54084519251, "Exile_Magazine_20Rnd_762x51_DMR_White"}, // 0.03% + {9812.74620169939, "Exile_Magazine_5Rnd_22LR"}, // 0.03% + {9815.95155820626, "100Rnd_580x42_Mag_Tracer_F"}, // 0.03% + {9818.92185523596, "Exile_Magazine_7Rnd_408_Bullet_Cam_Mag"}, // 0.03% + {9821.83391114743, "130Rnd_338_Mag"}, // 0.03% + {9824.68311693132, "Exile_Magazine_10Rnd_303"}, // 0.03% + {9827.30242648132, "arifle_TRG21_GL_F"}, // 0.03% + {9829.92173603133, "arifle_Mk20_GL_F"}, // 0.03% + {9832.54104558133, "arifle_MX_GL_khk_F"}, // 0.03% + {9835.16035513133, "arifle_MX_GL_F"}, // 0.03% + {9837.6438810759, "optic_NVS"}, // 0.02% + {9840.07855077238, "H_FakeHeadgear_Syndikat_F"}, // 0.02% + {9842.51322046886, "H_Watchcap_camo"}, // 0.02% + {9844.94789016533, "H_Cap_grn_Syndikat_F"}, // 0.02% + {9847.38255986181, "H_MilCap_gen_F"}, // 0.02% + {9849.81722955829, "H_Cap_tan_Syndikat_F"}, // 0.02% + {9852.25189925477, "H_Watchcap_sgg"}, // 0.02% + {9854.68656895125, "H_TurbanO_blk"}, // 0.02% + {9857.12123864773, "H_Shemag_tan"}, // 0.02% + {9859.55590834421, "H_Shemag_olive"}, // 0.02% + {9861.99057804068, "H_Shemag_olive_hs"}, // 0.02% + {9864.42524773716, "H_ShemagOpen_khk"}, // 0.02% + {9866.85991743364, "H_ShemagOpen_tan"}, // 0.02% + {9869.29458713012, "H_MilCap_tna_F"}, // 0.02% + {9871.7292568266, "H_Cap_blk_Syndikat_F"}, // 0.02% + {9874.16392652308, "H_Shemag_khk"}, // 0.02% + {9876.59859621956, "H_MilCap_ghex_F"}, // 0.02% + {9879.03326591603, "H_Booniehat_tna_F"}, // 0.02% + {9881.46793561251, "H_Cap_oli_Syndikat_F"}, // 0.02% + {9883.88281124642, "H_HelmetB_light_grass"}, // 0.02% + {9886.29768688032, "H_HelmetB_black"}, // 0.02% + {9888.71256251423, "H_HelmetB_desert"}, // 0.02% + {9891.12743814813, "H_HelmetB_light_desert"}, // 0.02% + {9893.54231378204, "H_HelmetB_light_black"}, // 0.02% + {9895.95718941595, "H_HelmetB_light_sand"}, // 0.02% + {9898.37206504985, "H_HelmetB_snakeskin"}, // 0.02% + {9900.78694068376, "H_HelmetB_grass"}, // 0.02% + {9903.20181631766, "H_HelmetIA_camo"}, // 0.02% + {9905.61669195157, "H_HelmetIA_net"}, // 0.02% + {9908.03156758547, "H_HelmetB_sand"}, // 0.02% + {9910.44644321938, "H_HelmetB_light_snakeskin"}, // 0.02% + {9912.86131885328, "H_HelmetB_TI_tna_F"}, // 0.02% + {9915.27619448719, "H_HelmetSpecO_ghex_F"}, // 0.02% + {9917.69107012109, "H_HelmetCrew_O_ghex_F"}, // 0.02% + {9920.105945755, "H_HelmetLeaderO_ghex_F"}, // 0.02% + {9922.52082138891, "H_HelmetB_tna_F"}, // 0.02% + {9924.93569702281, "H_Beret_gen_F"}, // 0.02% + {9927.35057265672, "H_HelmetB_Light_tna_F"}, // 0.02% + {9929.76544829062, "H_HelmetB_Enh_tna_F"}, // 0.02% + {9932.18032392453, "H_Helmet_Skate"}, // 0.02% + {9934.59519955843, "H_BandMask_khk"}, // 0.02% + {9937.01007519234, "H_BandMask_reaper"}, // 0.02% + {9939.42495082624, "H_BandMask_demon"}, // 0.02% + {9941.40514884605, "Exile_Magazine_5Rnd_127x108_Bullet_Cam_Mag"}, // 0.02% + {9943.36963100855, "arifle_MXM_Black_F"}, // 0.02% + {9945.33411317105, "arifle_MX_Black_F"}, // 0.02% + {9947.29859533355, "arifle_MX_GL_Black_F"}, // 0.02% + {9949.26307749606, "arifle_MXC_Black_F"}, // 0.02% + {9951.22755965856, "arifle_MXM_khk_F"}, // 0.02% + {9953.00831327349, "10Rnd_50BW_Mag_F"}, // 0.02% + {9954.46434122923, "U_B_FullGhillie_sard"}, // 0.01% + {9955.92036918496, "U_B_FullGhillie_lsh"}, // 0.01% + {9957.3763971407, "U_B_FullGhillie_ard"}, // 0.01% + {9958.83242509644, "U_O_FullGhillie_sard"}, // 0.01% + {9960.28845305218, "U_O_FullGhillie_lsh"}, // 0.01% + {9961.74448100791, "U_I_FullGhillie_ard"}, // 0.01% + {9963.20050896365, "U_I_FullGhillie_lsh"}, // 0.01% + {9964.65653691939, "U_I_FullGhillie_sard"}, // 0.01% + {9966.11256487512, "U_O_FullGhillie_ard"}, // 0.01% + {9967.32989972336, "H_Beret_ocamo"}, // 0.01% + {9968.5472345716, "H_Beret_brn_SF"}, // 0.01% + {9969.76456941984, "H_Beret_grn"}, // 0.01% + {9970.98190426808, "H_Beret_red"}, // 0.01% + {9972.19923911632, "H_Beret_blk"}, // 0.01% + {9973.41657396456, "H_Beret_Colonel"}, // 0.01% + {9974.6339088128, "H_Beret_02"}, // 0.01% + {9975.85124366104, "H_Beret_grn_SF"}, // 0.01% + {9977.05868147799, "H_PilotHelmetFighter_B"}, // 0.01% + {9978.26611929494, "H_HelmetO_ghex_F"}, // 0.01% + {9979.4735571119, "H_HelmetCrew_I"}, // 0.01% + {9980.68099492885, "H_HelmetCrew_O"}, // 0.01% + {9981.8884327458, "H_PilotHelmetHeli_B"}, // 0.01% + {9983.09587056275, "H_PilotHelmetHeli_O"}, // 0.01% + {9984.30330837971, "H_PilotHelmetHeli_I"}, // 0.01% + {9985.51074619666, "H_HelmetB_camo"}, // 0.01% + {9986.71818401361, "H_CrewHelmetHeli_B"}, // 0.01% + {9987.92562183057, "H_PilotHelmetFighter_O"}, // 0.01% + {9989.13305964752, "H_CrewHelmetHeli_O"}, // 0.01% + {9990.34049746447, "H_HelmetCrew_B"}, // 0.01% + {9991.54793528142, "H_HelmetO_oucamo"}, // 0.01% + {9992.75537309838, "H_HelmetLeaderO_oucamo"}, // 0.01% + {9993.96281091533, "H_HelmetSpecO_ocamo"}, // 0.01% + {9995.17024873228, "H_HelmetSpecO_blk"}, // 0.01% + {9996.37768654923, "H_HelmetO_ocamo"}, // 0.01% + {9997.58512436619, "H_HelmetLeaderO_ocamo"}, // 0.01% + {9998.79256218314, "H_CrewHelmetHeli_I"}, // 0.01% + {10000.0000000001, "H_PilotHelmetFighter_I"} // 0.01% + }; + }; + + /** + Result of 100 rounds: + + Exile_Item_Can_Empty + Exile_Item_Vishpirin + Exile_Item_Bandage + Exile_Item_PlasticBottleEmpty + Exile_Item_Heatpack + Exile_Item_Can_Empty + Exile_Item_Magazine03 + Exile_Item_InstaDoc + Exile_Item_Vishpirin + Exile_Item_Vishpirin + Exile_Item_PlasticBottleEmpty + Exile_Item_Vishpirin + Exile_Item_Heatpack + Exile_Item_Vishpirin + Exile_Item_Bandage + Exile_Item_Can_Empty + Exile_Item_Heatpack + Exile_Item_Vishpirin + Exile_Item_Vishpirin + Exile_Item_Can_Empty + Exile_Item_Bandage + Exile_Item_Heatpack + Exile_Item_Can_Empty + Exile_Item_Heatpack + Exile_Item_Heatpack + Exile_Item_Bandage + Exile_Item_Vishpirin + Exile_Item_PlasticBottleEmpty + Exile_Item_Magazine02 + Exile_Item_Heatpack + Exile_Item_Heatpack + Exile_Item_Can_Empty + Exile_Item_PlasticBottleEmpty + Exile_Item_Vishpirin + Exile_Item_Heatpack + Exile_Item_Vishpirin + Exile_Item_Magazine01 + Exile_Item_Vishpirin + Exile_Item_Bandage + Exile_Item_Heatpack + Exile_Item_Vishpirin + Exile_Item_PlasticBottleEmpty + Exile_Item_Heatpack + Exile_Item_Heatpack + Exile_Item_Vishpirin + Exile_Item_Can_Empty + Exile_Item_InstaDoc + Exile_Item_Heatpack + Exile_Item_PlasticBottleEmpty + Exile_Item_Vishpirin + Exile_Item_Can_Empty + Exile_Item_Vishpirin + Exile_Item_Vishpirin + Exile_Item_Vishpirin + Exile_Item_ToiletPaper + Exile_Item_Heatpack + Exile_Item_Heatpack + Exile_Item_Heatpack + Exile_Item_Heatpack + Exile_Item_PlasticBottleEmpty + Exile_Item_Can_Empty + Exile_Item_Vishpirin + Exile_Item_Magazine02 + Exile_Item_InstaDoc + Exile_Item_Bandage + Exile_Item_Vishpirin + Exile_Item_Heatpack + Exile_Item_Heatpack + Exile_Item_Can_Empty + Exile_Item_Heatpack + Exile_Item_Can_Empty + Exile_Item_Vishpirin + Exile_Item_Heatpack + Exile_Item_Can_Empty + Exile_Item_Heatpack + Exile_Item_ToiletPaper + Exile_Item_InstaDoc + Exile_Item_Heatpack + Exile_Item_Vishpirin + Exile_Item_ToiletPaper + Exile_Item_ToiletPaper + Exile_Item_Bandage + Exile_Item_Vishpirin + Exile_Item_ToiletPaper + Exile_Item_Bandage + Exile_Item_Heatpack + Exile_Item_Can_Empty + Exile_Item_Can_Empty + Exile_Item_Heatpack + Exile_Item_Vishpirin + Exile_Item_Can_Empty + Exile_Item_Can_Empty + Exile_Item_Can_Empty + Exile_Item_ToiletPaper + Exile_Item_PlasticBottleEmpty + Exile_Item_Vishpirin + Exile_Item_InstaDoc + Exile_Item_Heatpack + Exile_Item_InstaDoc + Exile_Item_Magazine02 + */ + class Medical + { + count = 11; + half = 8731.48148148148; + halfIndex = 5; + sum = 10000; + items[] = + { + {2592.59259259259, "Exile_Item_Vishpirin"}, // 25.93% + {5185.18518518519, "Exile_Item_Heatpack"}, // 25.93% + {6481.48148148148, "Exile_Item_Bandage"}, // 12.96% + {7231.48148148148, "Exile_Item_Can_Empty"}, // 7.50% + {7981.48148148148, "Exile_Item_ToiletPaper"}, // 7.50% + {8731.48148148148, "Exile_Item_PlasticBottleEmpty"}, // 7.50% + {9250, "Exile_Item_InstaDoc"}, // 5.19% + {9437.5, "Exile_Item_Magazine01"}, // 1.88% + {9625, "Exile_Item_Magazine02"}, // 1.88% + {9812.5, "Exile_Item_Magazine03"}, // 1.88% + {10000, "Exile_Item_Magazine04"} // 1.88% + }; + }; + + /** + Result of 100 rounds: + + Exile_Item_Bandage + srifle_DMR_07_ghex_F + B_Carryall_ocamo + 20Rnd_762x51_Mag + B_Carryall_cbr + U_O_T_Sniper_F + U_I_FullGhillie_sard + H_HelmetSpecB_paint2 + srifle_DMR_07_hex_F + Exile_Item_ZipTie + muzzle_snds_338_black + srifle_DMR_07_hex_F + MiniGrenade + srifle_DMR_05_tan_F + B_Carryall_khk + APERSBoundingMine_Range_Mag + srifle_GM6_ghex_F + srifle_DMR_01_F + srifle_DMR_07_ghex_F + U_B_T_Sniper_F + srifle_DMR_03_F + srifle_GM6_ghex_F + U_B_T_Sniper_F + srifle_GM6_ghex_F + srifle_DMR_02_sniper_F + srifle_DMR_06_camo_F + srifle_DMR_01_F + H_MilCap_rucamo + H_HelmetB_light_grass + srifle_GM6_ghex_F + Exile_Item_Vishpirin + U_O_T_FullGhillie_tna_F + optic_KHS_hex + Exile_Item_ZipTie + U_I_GhillieSuit + srifle_EBR_F + H_BandMask_demon + srifle_DMR_01_F + srifle_DMR_06_olive_F + Exile_Item_Heatpack + srifle_LRR_F + H_MilCap_blue + U_O_GhillieSuit + srifle_DMR_02_F + srifle_DMR_05_tan_F + U_O_T_Sniper_F + H_HelmetB_paint + srifle_DMR_02_camo_F + muzzle_snds_338_sand + srifle_DMR_07_ghex_F + U_B_T_FullGhillie_tna_F + Exile_Item_ZipTie + Exile_Item_ZipTie + srifle_DMR_05_hex_F + ItemRadio + U_O_GhillieSuit + srifle_DMR_02_sniper_F + srifle_GM6_F + srifle_DMR_04_F + optic_AMS_khk + APERSBoundingMine_Range_Mag + srifle_DMR_05_hex_F + SatchelCharge_Remote_Mag + H_HelmetSpecB + B_Carryall_ghex_F + srifle_DMR_05_hex_F + srifle_DMR_04_Tan_F + srifle_GM6_F + U_O_T_FullGhillie_tna_F + srifle_DMR_02_F + U_B_T_Sniper_F + srifle_LRR_tna_F + srifle_DMR_02_F + APERSMine_Range_Mag + srifle_DMR_02_camo_F + DemoCharge_Remote_Mag + H_HelmetSpecB_paint1 + srifle_GM6_F + srifle_DMR_07_blk_F + ItemRadio + 10Rnd_93x64_DMR_05_Mag + B_Carryall_oucamo + Exile_Item_ZipTie + B_Bergen_dgtl_F + B_Carryall_mcamo + srifle_DMR_02_F + Exile_Item_Bandage + U_B_T_Soldier_F + srifle_GM6_ghex_F + Exile_Item_ZipTie + srifle_DMR_06_camo_F + APERSTripMine_Wire_Mag + U_O_T_FullGhillie_tna_F + ItemRadio + H_MilCap_mcamo + srifle_DMR_05_tan_F + optic_SOS + srifle_DMR_02_camo_F + H_BandMask_khk + H_HelmetB_light_snakeskin + */ + class Tourist + { + count = 169; + half = 8667.89250984947; + halfIndex = 84; + sum = 9999.99999999999; + items[] = + { + {400, "Exile_Item_ZipTie"}, // 4.00% + {666.666666666667, "srifle_DMR_01_F"}, // 2.67% + {933.333333333333, "srifle_EBR_F"}, // 2.67% + {1149.54954954955, "srifle_DMR_05_tan_F"}, // 2.16% + {1365.76576576577, "srifle_DMR_05_blk_F"}, // 2.16% + {1581.98198198198, "srifle_DMR_05_hex_F"}, // 2.16% + {1791.50579150579, "srifle_DMR_07_ghex_F"}, // 2.10% + {2001.0296010296, "srifle_DMR_07_blk_F"}, // 2.10% + {2210.55341055341, "srifle_DMR_07_hex_F"}, // 2.10% + {2420.07722007722, "srifle_LRR_tna_F"}, // 2.10% + {2629.60102960103, "srifle_LRR_F"}, // 2.10% + {2839.12483912484, "srifle_GM6_F"}, // 2.10% + {3048.64864864865, "srifle_GM6_ghex_F"}, // 2.10% + {3248.64864864865, "MiniGrenade"}, // 2.00% + {3448.64864864865, "HandGrenade"}, // 2.00% + {3637.83783783784, "srifle_DMR_04_Tan_F"}, // 1.89% + {3827.02702702703, "srifle_DMR_04_F"}, // 1.89% + {3993.69369369369, "U_O_GhillieSuit"}, // 1.67% + {4160.36036036036, "U_I_GhillieSuit"}, // 1.67% + {4327.02702702703, "U_B_GhillieSuit"}, // 1.67% + {4489.18918918919, "srifle_DMR_02_sniper_F"}, // 1.62% + {4651.35135135135, "srifle_DMR_02_F"}, // 1.62% + {4813.51351351352, "srifle_DMR_02_camo_F"}, // 1.62% + {4961.66166166166, "Exile_Item_Vishpirin"}, // 1.48% + {5109.80980980981, "Exile_Item_Heatpack"}, // 1.48% + {5237.3265883333, "B_Carryall_cbr"}, // 1.28% + {5364.84336685679, "B_Carryall_ghex_F"}, // 1.28% + {5485.64873598431, "B_Carryall_oli"}, // 1.21% + {5606.45410511182, "B_Carryall_khk"}, // 1.21% + {5707.12524605142, "B_Carryall_ocamo"}, // 1.01% + {5807.79638699102, "B_Carryall_oucamo"}, // 1.01% + {5908.46752793062, "B_Carryall_mcamo"}, // 1.01% + {5997.35641681951, "Exile_Item_Heatpack"}, // 0.89% + {6078.43749790059, "srifle_DMR_06_olive_F"}, // 0.81% + {6159.51857898167, "srifle_DMR_03_F"}, // 0.81% + {6240.59966006275, "srifle_DMR_03_khaki_F"}, // 0.81% + {6321.68074114383, "srifle_DMR_03_tan_F"}, // 0.81% + {6402.76182222491, "srifle_DMR_03_woodland_F"}, // 0.81% + {6483.84290330599, "srifle_DMR_06_camo_F"}, // 0.81% + {6563.84290330599, "APERSBoundingMine_Range_Mag"}, // 0.80% + {6643.84290330599, "APERSTripMine_Wire_Mag"}, // 0.80% + {6723.84290330599, "APERSMine_Range_Mag"}, // 0.80% + {6801.62068108377, "ItemMap"}, // 0.78% + {6875.69475515784, "Exile_Item_Bandage"}, // 0.74% + {6949.22416692255, "U_O_T_FullGhillie_tna_F"}, // 0.74% + {7022.75357868725, "U_O_T_Sniper_F"}, // 0.74% + {7096.28299045196, "U_B_T_FullGhillie_tna_F"}, // 0.74% + {7169.81240221667, "U_B_T_Soldier_F"}, // 0.74% + {7243.34181398137, "U_B_T_Sniper_F"}, // 0.74% + {7310.00848064804, "ItemWatch"}, // 0.67% + {7376.67514731471, "ItemRadio"}, // 0.67% + {7432.8154981919, "10Rnd_93x64_DMR_05_Mag"}, // 0.56% + {7488.95584906909, "10Rnd_338_Mag"}, // 0.56% + {7538.07865608664, "10Rnd_127x54_Mag"}, // 0.49% + {7586.07865608664, "IEDLandSmall_Remote_Mag"}, // 0.48% + {7634.07865608664, "DemoCharge_Remote_Mag"}, // 0.48% + {7682.07865608664, "IEDUrbanSmall_Remote_Mag"}, // 0.48% + {7726.52310053108, "ItemGPS"}, // 0.44% + {7770.96754497553, "Binocular"}, // 0.44% + {7812.96754497553, "20Rnd_650x39_Cased_Mag_F"}, // 0.42% + {7853.23600135136, "B_Bergen_Base_F"}, // 0.40% + {7893.5044577272, "B_Bergen_mcamo_F"}, // 0.40% + {7933.77291410304, "B_Bergen_dgtl_F"}, // 0.40% + {7974.04137047888, "B_Bergen_tna_F"}, // 0.40% + {8014.30982685472, "B_Bergen_hex_F"}, // 0.40% + {8052.90631808279, "20Rnd_762x51_Mag"}, // 0.39% + {8090.90631808279, "20Rnd_762x51_Mag"}, // 0.38% + {8124.90631808279, "10Rnd_762x54_Mag"}, // 0.34% + {8158.23965141613, "muzzle_snds_338_green"}, // 0.33% + {8191.57298474946, "muzzle_snds_338_sand"}, // 0.33% + {8224.90631808279, "muzzle_snds_93mmg"}, // 0.33% + {8258.23965141613, "muzzle_snds_93mmg_tan"}, // 0.33% + {8291.57298474946, "muzzle_snds_B"}, // 0.33% + {8324.90631808279, "muzzle_snds_338_black"}, // 0.33% + {8357.42664328605, "H_MilCap_dgtl"}, // 0.33% + {8389.9469684893, "H_MilCap_rucamo"}, // 0.33% + {8422.46729369255, "H_MilCap_oucamo"}, // 0.33% + {8454.9876188958, "H_MilCap_mcamo"}, // 0.33% + {8487.50794409905, "H_MilCap_ocamo"}, // 0.33% + {8520.0282693023, "Exile_Headgear_GasMask"}, // 0.33% + {8552.54859450556, "H_MilCap_blue"}, // 0.33% + {8582.17822413518, "Exile_Item_InstaDoc"}, // 0.30% + {8610.74965270661, "optic_KHS_blk"}, // 0.29% + {8639.32108127804, "optic_AMS"}, // 0.29% + {8667.89250984947, "optic_KHS_hex"}, // 0.29% + {8696.4639384209, "optic_KHS_old"}, // 0.29% + {8725.03536699233, "optic_AMS_khk"}, // 0.29% + {8753.60679556376, "optic_AMS_snd"}, // 0.29% + {8782.17822413519, "optic_KHS_tan"}, // 0.29% + {8809.72924454335, "optic_DMS"}, // 0.28% + {8836.25985678825, "optic_LRPS_tna_F"}, // 0.27% + {8862.79046903315, "optic_LRPS"}, // 0.27% + {8889.32108127805, "optic_LRPS_ghex_F"}, // 0.27% + {8915.85169352295, "optic_SOS_khk_F"}, // 0.27% + {8942.38230576785, "optic_SOS"}, // 0.27% + {8966.77254967028, "H_HelmetB_plain_blk"}, // 0.24% + {8991.16279357272, "H_HelmetIA"}, // 0.24% + {9015.55303747516, "H_HelmetSpecB_paint1"}, // 0.24% + {9039.9432813776, "H_HelmetB_light"}, // 0.24% + {9064.33352528004, "H_HelmetB_paint"}, // 0.24% + {9088.72376918248, "H_HelmetSpecB_blk"}, // 0.24% + {9113.11401308492, "H_HelmetB"}, // 0.24% + {9137.50425698735, "H_HelmetSpecB"}, // 0.24% + {9161.89450088979, "H_HelmetSpecB_paint2"}, // 0.24% + {9181.89450088979, "5Rnd_127x108_Mag"}, // 0.20% + {9201.89450088979, "7Rnd_408_Mag"}, // 0.20% + {9221.28225599184, "muzzle_snds_B"}, // 0.19% + {9237.54241859346, "H_HelmetB_desert"}, // 0.16% + {9253.80258119509, "H_BandMask_khk"}, // 0.16% + {9270.06274379671, "H_BandMask_reaper"}, // 0.16% + {9286.32290639834, "H_BandMask_demon"}, // 0.16% + {9302.58306899996, "H_Helmet_Skate"}, // 0.16% + {9318.84323160159, "H_HelmetB_Enh_tna_F"}, // 0.16% + {9335.10339420322, "H_HelmetB_Light_tna_F"}, // 0.16% + {9351.36355680484, "H_Beret_gen_F"}, // 0.16% + {9367.62371940647, "H_HelmetB_tna_F"}, // 0.16% + {9383.88388200809, "H_HelmetSpecO_ghex_F"}, // 0.16% + {9400.14404460972, "H_HelmetIA_net"}, // 0.16% + {9416.40420721134, "H_HelmetIA_camo"}, // 0.16% + {9432.66436981297, "H_HelmetB_grass"}, // 0.16% + {9448.9245324146, "H_HelmetLeaderO_ghex_F"}, // 0.16% + {9465.18469501622, "H_HelmetCrew_O_ghex_F"}, // 0.16% + {9481.44485761785, "H_HelmetB_TI_tna_F"}, // 0.16% + {9497.70502021947, "H_HelmetB_light_black"}, // 0.16% + {9513.9651828211, "H_HelmetB_light_desert"}, // 0.16% + {9530.22534542272, "H_HelmetB_light_snakeskin"}, // 0.16% + {9546.48550802435, "H_HelmetB_light_grass"}, // 0.16% + {9562.74567062598, "H_HelmetB_sand"}, // 0.16% + {9579.0058332276, "H_HelmetB_black"}, // 0.16% + {9595.26599582923, "H_HelmetB_snakeskin"}, // 0.16% + {9611.52615843085, "H_HelmetB_light_sand"}, // 0.16% + {9627.52615843085, "SatchelCharge_Remote_Mag"}, // 0.16% + {9643.52615843085, "5Rnd_127x108_APDS_Mag"}, // 0.16% + {9658.23204078379, "U_B_FullGhillie_sard"}, // 0.15% + {9672.93792313673, "U_B_FullGhillie_ard"}, // 0.15% + {9687.64380548968, "U_B_FullGhillie_lsh"}, // 0.15% + {9702.34968784262, "U_O_FullGhillie_ard"}, // 0.15% + {9717.05557019556, "U_O_FullGhillie_lsh"}, // 0.15% + {9731.7614525485, "U_O_FullGhillie_sard"}, // 0.15% + {9746.46733490144, "U_I_FullGhillie_ard"}, // 0.15% + {9761.17321725438, "U_I_FullGhillie_lsh"}, // 0.15% + {9775.87909960732, "U_I_FullGhillie_sard"}, // 0.15% + {9786.99021071843, "Exile_Item_MobilePhone"}, // 0.11% + {9797.19429235108, "muzzle_snds_B_snd_F"}, // 0.10% + {9807.39837398374, "muzzle_snds_B_khk_F"}, // 0.10% + {9817.39837398374, "Exile_Magazine_10Rnd_93x64_DMR_05_Bullet_Cam_Mag"}, // 0.10% + {9827.39837398374, "Exile_Magazine_10Rnd_338_Bullet_Cam_Mag"}, // 0.10% + {9835.52845528455, "H_PilotHelmetFighter_B"}, // 0.08% + {9843.65853658536, "H_CrewHelmetHeli_B"}, // 0.08% + {9851.78861788618, "H_CrewHelmetHeli_O"}, // 0.08% + {9859.91869918699, "H_CrewHelmetHeli_I"}, // 0.08% + {9868.0487804878, "H_HelmetO_oucamo"}, // 0.08% + {9876.17886178861, "H_HelmetLeaderO_oucamo"}, // 0.08% + {9884.30894308943, "H_HelmetSpecO_ocamo"}, // 0.08% + {9892.43902439024, "H_HelmetSpecO_blk"}, // 0.08% + {9900.56910569105, "H_HelmetO_ocamo"}, // 0.08% + {9908.69918699187, "H_HelmetLeaderO_ocamo"}, // 0.08% + {9916.82926829268, "H_PilotHelmetHeli_O"}, // 0.08% + {9924.95934959349, "H_PilotHelmetFighter_O"}, // 0.08% + {9933.0894308943, "H_PilotHelmetHeli_B"}, // 0.08% + {9941.21951219512, "H_PilotHelmetHeli_I"}, // 0.08% + {9949.34959349593, "H_PilotHelmetFighter_I"}, // 0.08% + {9957.47967479674, "H_HelmetCrew_B"}, // 0.08% + {9965.60975609756, "H_HelmetCrew_O"}, // 0.08% + {9973.73983739837, "H_HelmetCrew_I"}, // 0.08% + {9981.86991869918, "H_HelmetO_ghex_F"}, // 0.08% + {9989.99999999999, "H_HelmetB_camo"}, // 0.08% + {9995.99999999999, "Exile_Magazine_7Rnd_408_Bullet_Cam_Mag"}, // 0.06% + {9999.99999999999, "Exile_Magazine_5Rnd_127x108_Bullet_Cam_Mag"} // 0.04% + }; + }; + + /** + Result of 100 rounds: + + B_Carryall_khk + srifle_DMR_05_blk_F + U_O_GhillieSuit + MMG_01_hex_F + HandGrenade + IEDUrbanSmall_Remote_Mag + U_O_FullGhillie_ard + optic_LRPS_tna_F + srifle_GM6_F + srifle_DMR_01_F + B_Bergen_tna_F + srifle_GM6_F + srifle_DMR_07_blk_F + srifle_DMR_05_hex_F + U_B_GhillieSuit + srifle_DMR_03_khaki_F + srifle_DMR_07_hex_F + Exile_Item_ZipTie + srifle_DMR_05_blk_F + B_Carryall_mcamo + srifle_DMR_06_camo_F + srifle_DMR_07_hex_F + B_Carryall_mcamo + srifle_DMR_07_hex_F + srifle_DMR_02_camo_F + srifle_DMR_03_khaki_F + srifle_EBR_F + B_Bergen_dgtl_F + H_Beret_gen_F + srifle_DMR_07_hex_F + APERSTripMine_Wire_Mag + B_Carryall_khk + muzzle_snds_338_sand + srifle_EBR_F + srifle_DMR_02_sniper_F + Exile_Item_ZipTie + H_HelmetSpecB_paint2 + srifle_EBR_F + B_Carryall_ghex_F + MiniGrenade + srifle_DMR_07_ghex_F + muzzle_snds_338_green + srifle_DMR_04_Tan_F + APERSMine_Range_Mag + Exile_Item_ZipTie + IEDUrbanSmall_Remote_Mag + optic_DMS + APERSBoundingMine_Range_Mag + 10Rnd_127x54_Mag + srifle_DMR_05_blk_F + IEDUrbanSmall_Remote_Mag + srifle_EBR_F + srifle_DMR_01_F + srifle_DMR_05_blk_F + B_Carryall_ocamo + srifle_DMR_02_F + srifle_DMR_02_camo_F + srifle_DMR_07_ghex_F + srifle_DMR_04_F + H_MilCap_blue + srifle_DMR_03_F + srifle_DMR_05_tan_F + H_HelmetB_light_black + optic_LRPS + U_I_GhillieSuit + srifle_DMR_05_tan_F + srifle_DMR_04_F + srifle_DMR_07_hex_F + IEDLandSmall_Remote_Mag + APERSMine_Range_Mag + B_Carryall_mcamo + srifle_LRR_F + APERSMine_Range_Mag + srifle_DMR_06_olive_F + APERSBoundingMine_Range_Mag + MMG_02_sand_F + optic_KHS_tan + srifle_DMR_07_ghex_F + srifle_GM6_F + B_Carryall_ocamo + B_Carryall_ocamo + Exile_Item_Vishpirin + srifle_DMR_01_F + U_B_T_Soldier_F + Exile_Item_Heatpack + APERSMine_Range_Mag + B_Carryall_khk + DemoCharge_Remote_Mag + srifle_DMR_07_blk_F + srifle_DMR_01_F + srifle_DMR_03_khaki_F + srifle_DMR_03_F + IEDLandSmall_Remote_Mag + B_Carryall_oucamo + SatchelCharge_Remote_Mag + srifle_DMR_05_hex_F + optic_KHS_blk + APERSBoundingMine_Range_Mag + H_HelmetB_plain_blk + H_HelmetSpecO_ghex_F + */ + class Radiation + { + count = 167; + half = 8941.6128511025; + halfIndex = 83; + sum = 10000; + items[] = + { + {317.460317460317, "srifle_DMR_01_F"}, // 3.17% + {634.920634920635, "srifle_EBR_F"}, // 3.17% + {952.380952380952, "Exile_Item_ZipTie"}, // 3.17% + {1209.78120978121, "srifle_DMR_05_hex_F"}, // 2.57% + {1467.18146718147, "srifle_DMR_05_tan_F"}, // 2.57% + {1724.58172458172, "srifle_DMR_05_blk_F"}, // 2.57% + {1974.01483115769, "srifle_LRR_tna_F"}, // 2.49% + {2223.44793773365, "srifle_GM6_F"}, // 2.49% + {2472.88104430962, "srifle_LRR_F"}, // 2.49% + {2722.31415088558, "srifle_DMR_07_ghex_F"}, // 2.49% + {2971.74725746154, "srifle_DMR_07_hex_F"}, // 2.49% + {3221.18036403751, "srifle_DMR_07_blk_F"}, // 2.49% + {3470.61347061347, "srifle_GM6_ghex_F"}, // 2.49% + {3695.8386958387, "srifle_DMR_04_F"}, // 2.25% + {3921.06392106392, "srifle_DMR_04_Tan_F"}, // 2.25% + {4114.11411411411, "srifle_DMR_02_F"}, // 1.93% + {4307.16430716431, "srifle_DMR_02_sniper_F"}, // 1.93% + {4500.2145002145, "srifle_DMR_02_camo_F"}, // 1.93% + {4658.94465894466, "APERSMine_Range_Mag"}, // 1.59% + {4817.67481767482, "APERSBoundingMine_Range_Mag"}, // 1.59% + {4976.40497640498, "APERSTripMine_Wire_Mag"}, // 1.59% + {5135.13513513514, "MiniGrenade"}, // 1.59% + {5293.8652938653, "HandGrenade"}, // 1.59% + {5426.14042614043, "U_I_GhillieSuit"}, // 1.32% + {5558.41555841556, "U_B_GhillieSuit"}, // 1.32% + {5690.69069069069, "U_O_GhillieSuit"}, // 1.32% + {5808.26858604636, "Exile_Item_Vishpirin"}, // 1.18% + {5925.84648140204, "Exile_Item_Heatpack"}, // 1.18% + {6027.050273881, "B_Carryall_cbr"}, // 1.01% + {6128.25406635996, "B_Carryall_ghex_F"}, // 1.01% + {6224.77916288505, "srifle_DMR_06_camo_F"}, // 0.97% + {6321.30425941015, "srifle_DMR_03_woodland_F"}, // 0.97% + {6417.82935593525, "srifle_DMR_03_tan_F"}, // 0.97% + {6514.35445246034, "srifle_DMR_03_khaki_F"}, // 0.97% + {6610.87954898544, "srifle_DMR_03_F"}, // 0.97% + {6707.40464551053, "srifle_DMR_06_olive_F"}, // 0.97% + {6803.28192259587, "B_Carryall_oli"}, // 0.96% + {6899.1591996812, "B_Carryall_khk"}, // 0.96% + {6994.39729491929, "IEDLandSmall_Remote_Mag"}, // 0.95% + {7089.63539015739, "IEDUrbanSmall_Remote_Mag"}, // 0.95% + {7184.87348539548, "DemoCharge_Remote_Mag"}, // 0.95% + {7264.77121629993, "B_Carryall_mcamo"}, // 0.80% + {7344.66894720437, "B_Carryall_oucamo"}, // 0.80% + {7424.56667810881, "B_Carryall_ocamo"}, // 0.80% + {7497.82675136888, "MMG_02_camo_F"}, // 0.73% + {7571.08682462896, "MMG_02_black_F"}, // 0.73% + {7644.34689788903, "MMG_02_sand_F"}, // 0.73% + {7703.13584556687, "Exile_Item_Bandage"}, // 0.59% + {7761.4925215706, "U_O_T_FullGhillie_tna_F"}, // 0.58% + {7819.84919757433, "U_O_T_Sniper_F"}, // 0.58% + {7878.20587357807, "U_B_T_FullGhillie_tna_F"}, // 0.58% + {7936.5625495818, "U_B_T_Soldier_F"}, // 0.58% + {7994.91922558554, "U_B_T_Sniper_F"}, // 0.58% + {8043.75927442559, "MMG_01_tan_F"}, // 0.49% + {8092.59932326564, "MMG_01_hex_F"}, // 0.49% + {8137.15515729515, "10Rnd_93x64_DMR_05_Mag"}, // 0.45% + {8181.71099132467, "10Rnd_338_Mag"}, // 0.45% + {8220.6973461005, "10Rnd_127x54_Mag"}, // 0.39% + {8254.03067943383, "20Rnd_650x39_Cased_Mag_F"}, // 0.33% + {8285.98977179561, "B_Bergen_hex_F"}, // 0.32% + {8317.94886415739, "B_Bergen_tna_F"}, // 0.32% + {8349.90795651916, "B_Bergen_mcamo_F"}, // 0.32% + {8381.86704888094, "B_Bergen_Base_F"}, // 0.32% + {8413.82614124271, "B_Bergen_dgtl_F"}, // 0.32% + {8445.57217298875, "SatchelCharge_Remote_Mag"}, // 0.32% + {8476.20430888404, "20Rnd_762x51_Mag"}, // 0.31% + {8506.36303904277, "20Rnd_762x51_Mag"}, // 0.30% + {8533.3471660269, "10Rnd_762x54_Mag"}, // 0.27% + {8559.80219248192, "muzzle_snds_338_green"}, // 0.26% + {8586.25721893695, "muzzle_snds_93mmg_tan"}, // 0.26% + {8612.71224539198, "muzzle_snds_93mmg"}, // 0.26% + {8639.16727184701, "muzzle_snds_B"}, // 0.26% + {8665.62229830203, "muzzle_snds_338_sand"}, // 0.26% + {8692.07732475706, "muzzle_snds_338_black"}, // 0.26% + {8717.8871066644, "H_MilCap_blue"}, // 0.26% + {8743.69688857175, "H_MilCap_oucamo"}, // 0.26% + {8769.50667047909, "H_MilCap_mcamo"}, // 0.26% + {8795.31645238643, "H_MilCap_ocamo"}, // 0.26% + {8821.12623429377, "Exile_Headgear_GasMask"}, // 0.26% + {8846.93601620112, "H_MilCap_dgtl"}, // 0.26% + {8872.74579810846, "H_MilCap_rucamo"}, // 0.26% + {8896.26137717959, "Exile_Item_InstaDoc"}, // 0.24% + {8918.93711414104, "optic_AMS_snd"}, // 0.23% + {8941.6128511025, "optic_KHS_blk"}, // 0.23% + {8964.28858806395, "optic_KHS_hex"}, // 0.23% + {8986.9643250254, "optic_KHS_old"}, // 0.23% + {9009.64006198685, "optic_KHS_tan"}, // 0.23% + {9032.3157989483, "optic_AMS_khk"}, // 0.23% + {9054.99153590975, "optic_AMS"}, // 0.23% + {9076.85742512258, "optic_DMS"}, // 0.22% + {9097.91346658679, "optic_SOS"}, // 0.21% + {9118.96950805099, "optic_SOS_khk_F"}, // 0.21% + {9140.02554951519, "optic_LRPS"}, // 0.21% + {9161.0815909794, "optic_LRPS_tna_F"}, // 0.21% + {9182.1376324436, "optic_LRPS_ghex_F"}, // 0.21% + {9201.49496887411, "H_HelmetB"}, // 0.19% + {9220.85230530462, "H_HelmetB_paint"}, // 0.19% + {9240.20964173512, "H_HelmetB_light"}, // 0.19% + {9259.56697816563, "H_HelmetB_plain_blk"}, // 0.19% + {9278.92431459614, "H_HelmetSpecB_blk"}, // 0.19% + {9298.28165102664, "H_HelmetSpecB_paint2"}, // 0.19% + {9317.63898745715, "H_HelmetSpecB_paint1"}, // 0.19% + {9336.99632388766, "H_HelmetIA"}, // 0.19% + {9356.35366031816, "H_HelmetSpecB"}, // 0.19% + {9372.22667619118, "5Rnd_127x108_Mag"}, // 0.16% + {9388.09969206419, "7Rnd_408_Mag"}, // 0.16% + {9403.48679928804, "muzzle_snds_B"}, // 0.15% + {9416.39169024171, "H_HelmetB_desert"}, // 0.13% + {9429.29658119538, "H_HelmetB_snakeskin"}, // 0.13% + {9442.20147214905, "H_HelmetB_grass"}, // 0.13% + {9455.10636310272, "H_HelmetIA_camo"}, // 0.13% + {9468.0112540564, "H_HelmetIA_net"}, // 0.13% + {9480.91614501007, "H_HelmetB_light_grass"}, // 0.13% + {9493.82103596374, "H_HelmetB_light_sand"}, // 0.13% + {9506.72592691741, "H_HelmetLeaderO_ghex_F"}, // 0.13% + {9519.63081787109, "H_HelmetSpecO_ghex_F"}, // 0.13% + {9532.53570882476, "H_HelmetB_tna_F"}, // 0.13% + {9545.44059977843, "H_Beret_gen_F"}, // 0.13% + {9558.3454907321, "H_HelmetB_Light_tna_F"}, // 0.13% + {9571.25038168578, "H_HelmetB_Enh_tna_F"}, // 0.13% + {9584.15527263945, "H_Helmet_Skate"}, // 0.13% + {9597.06016359312, "H_BandMask_demon"}, // 0.13% + {9609.96505454679, "H_HelmetCrew_O_ghex_F"}, // 0.13% + {9622.86994550046, "H_HelmetB_light_black"}, // 0.13% + {9635.77483645414, "H_HelmetB_light_desert"}, // 0.13% + {9648.67972740781, "H_HelmetB_light_snakeskin"}, // 0.13% + {9661.58461836148, "H_HelmetB_sand"}, // 0.13% + {9674.48950931515, "H_HelmetB_black"}, // 0.13% + {9687.39440026883, "H_BandMask_reaper"}, // 0.13% + {9700.2992912225, "H_BandMask_khk"}, // 0.13% + {9713.20418217617, "H_HelmetB_TI_tna_F"}, // 0.13% + {9725.90259487458, "5Rnd_127x108_APDS_Mag"}, // 0.13% + {9737.57393007533, "U_B_FullGhillie_sard"}, // 0.12% + {9749.24526527608, "U_I_FullGhillie_sard"}, // 0.12% + {9760.91660047682, "U_B_FullGhillie_lsh"}, // 0.12% + {9772.58793567757, "U_O_FullGhillie_ard"}, // 0.12% + {9784.25927087832, "U_O_FullGhillie_lsh"}, // 0.12% + {9795.93060607906, "U_O_FullGhillie_sard"}, // 0.12% + {9807.60194127981, "U_I_FullGhillie_ard"}, // 0.12% + {9819.27327648056, "U_I_FullGhillie_lsh"}, // 0.12% + {9830.9446116813, "U_B_FullGhillie_ard"}, // 0.12% + {9839.04308916753, "muzzle_snds_B_snd_F"}, // 0.08% + {9847.14156665377, "muzzle_snds_B_khk_F"}, // 0.08% + {9855.07807459027, "Exile_Magazine_10Rnd_93x64_DMR_05_Bullet_Cam_Mag"}, // 0.08% + {9863.01458252678, "Exile_Magazine_10Rnd_338_Bullet_Cam_Mag"}, // 0.08% + {9869.46702800362, "H_PilotHelmetHeli_O"}, // 0.06% + {9875.91947348045, "H_HelmetSpecO_blk"}, // 0.06% + {9882.37191895729, "H_CrewHelmetHeli_B"}, // 0.06% + {9888.82436443412, "H_CrewHelmetHeli_O"}, // 0.06% + {9895.27680991096, "H_CrewHelmetHeli_I"}, // 0.06% + {9901.7292553878, "H_HelmetO_oucamo"}, // 0.06% + {9908.18170086463, "H_HelmetLeaderO_oucamo"}, // 0.06% + {9914.63414634147, "H_HelmetSpecO_ocamo"}, // 0.06% + {9921.0865918183, "H_PilotHelmetHeli_B"}, // 0.06% + {9927.53903729514, "H_HelmetB_camo"}, // 0.06% + {9933.99148277198, "H_HelmetO_ocamo"}, // 0.06% + {9940.44392824881, "H_HelmetO_ghex_F"}, // 0.06% + {9946.89637372565, "H_PilotHelmetFighter_I"}, // 0.06% + {9953.34881920249, "H_PilotHelmetFighter_O"}, // 0.06% + {9959.80126467932, "H_PilotHelmetFighter_B"}, // 0.06% + {9966.25371015616, "H_HelmetCrew_I"}, // 0.06% + {9972.70615563299, "H_HelmetCrew_O"}, // 0.06% + {9979.15860110983, "H_HelmetCrew_B"}, // 0.06% + {9985.61104658667, "H_HelmetLeaderO_ocamo"}, // 0.06% + {9992.0634920635, "H_PilotHelmetHeli_I"}, // 0.06% + {9996.82539682541, "Exile_Magazine_7Rnd_408_Bullet_Cam_Mag"}, // 0.05% + {10000, "Exile_Magazine_5Rnd_127x108_Bullet_Cam_Mag"} // 0.03% + }; + }; + +}; + +class CfgSettings +{ + /////////////////////////////////////////////////////////////////////// + // Community Base Addons + /////////////////////////////////////////////////////////////////////// + class CBA + { + // Set this to 1 if you want to have CBA support + useStackedEH = 0; + + // If you set this to 1 ........................................... + iReallyWantToGetHackedAndImRetarded = 0; + }; + + /////////////////////////////////////////////////////////////////////// + // GARBAGE COLLECTOR + /////////////////////////////////////////////////////////////////////// + class GarbageCollector + { + /* + Remark: + In 0.9.35 and below, Exile has checked if a player was nearby and then delayed + the deletion. This check has been removed to save server performance. + + Do NOT touch these if you are not 10000% sure what you do! + */ + class Ingame + { + // Dropped items without fissix + class GroundWeaponHolder + { + lifeTime = 10; + interval = 5; + }; + + // Dropped items with fissix + class WeaponHolderSimulated + { + lifeTime = 10; + interval = 5; + }; + + // Corpses and wrecks + class AllDead + { + lifeTime = 15; + interval = 5; + }; + + // Loot spawned inside a building + class Loot + { + lifeTime = 8; + interval = 1; + }; + + // Never touch this or you will break your sever! + class Groups + { + interval = 0.5; + }; + }; + + class Database + { + // Remove all deleted items from the database after X days + permanentlyDeleteTime = 3; + + // Remove all territories (and contructions + containers in it) that were not paid after X days + territoryLifeTime = 7; + + // Remove all containers outside of territories that have not been used for X days + // Example: Tents + containerLifeTime = 10; + + // Remove all constructions outside of territories that are older than X days or not moved for X days + // Example: Work Benches + constructionLifeTime = 2; + + // Remove all vehicles that were not moved/used for X days + vehicleLifeTime = 3; + + // Set safe as abandoned + abandonedTime = 7; + + // Deletes a base X days after the flag is stolen if the ransom money isn't paid + stolenFlagLifeTime = 3; + + // Sets door & safe pins to 0000 and marks safes to abandoned X days after the flag is stolen if the ransom money isn't paid + unlockLifeTime = 2; + }; + }; + + /////////////////////////////////////////////////////////////////////// + // RESPECT, YO + /////////////////////////////////////////////////////////////////////// + class Respect + { + /** + * Defines the factor of respect you gain for every pop tab in revenue + * + * Default: Get 1 respect for every 10 pop tabs + */ + tradingRespectFactor = 0.1; + + /** + * Defines the the minimum amount of Respect earned/lost for a kill + */ + minRespectTransfer = 50; + + /** + * Defines the amount of respect earned/lost for certain types of frags + */ + class Frags + { + domination = 80; // Keeps killing the same guy + letItRain = 150; // MG, also vehicle MGs + humiliation = 300; // Axe + passenger = 400; // Out of car/chopper/boat + roadKill = 200; // :) + bigBird = 600; // Roadkill, but with chopper/plane + chuteGreaterChopper = 1000; // Someone flies into chute and chopper/plane explodes + }; + + class Percentages + { + unlucky = 1; // Dying for an unknown reason costs you 1% respect + crash = 1; // Crashing your car costs you 1% respect + suicide = 2; // Comitting suicide costs you 2% of your respect + friendyFire = 3; // Friendly fire costs you 3% + npc = 4; // Being killed by an NPC costs you 4% + bambiKill = 5; // Killing a bambi costs you 5% + frag = 5; // Killing someone will get you 5% and remove 5% from the victim + }; + + class Handcuffs + { + trapping = -50; // A handcuffs B + breakingFree = 100; // B broke free + releasedByHero = 100; // C releases B + releasedByHostageTaker = 50; // A releases B + }; + + class Bonus + { + // Bonus per full 100m + per100mDistance = 10; + + // First blood after server restart + firstBlood = 100; + + // If you kill someone while you are in your own territory + homie = 20; + + // If you kill someone who is in his own territory + raid = 20; + + /* + Example with killstreak = 50 + + Frag Factor Bonus + 2 * 50 +100 + 3 * 50 +150 + 4 * 50 +200 + 5 * 50 +250 + */ + killStreak = 50; + + // Kills within this amount of seconds stack (default: 2 minutes) + killStreakTimeout = 120; + }; + }; + + /////////////////////////////////////////////////////////////////////// + // KILLFEED MAN! + /////////////////////////////////////////////////////////////////////// + + class KillFeed + { + // Shows a kill feed for well kills + showKillFeed = 1; + }; + + /////////////////////////////////////////////////////////////////////// + // PLAYER SPAWN CONFIGURATION + /////////////////////////////////////////////////////////////////////// + class BambiSettings + { + /** + * Loadout of new bambi players + * + * (They will always spawn with a bambi overall - you cannot + * change the loadout uniform) + */ + loadOut[] = + { + "ItemCompass", + "ItemMap", // Because why not + "Exile_Item_XM8", + "ItemRadio", + "Exile_Item_PlasticBottleFreshWater" + }; + + /** + * Enables or disables parachute spawning. + * + * 1 = On + * 0 = Off + */ + parachuteSpawning = 1; + + /** + * Enables or disables halo jumping. Only applies + * if parachute spawning is enabled. + * + * Remember that if you enable halo jump, it is adviced + * to adjust the parachuteDropHeight to something around + * 1km or so. + * + * 1 = On + * 0 = Off + */ + haloJump = 1; + + /** + * Parachute drop height in meters. + */ + parachuteDropHeight = 1000; + + /** + * Number of minutes where a fresh spawned player remains in the + * bambi state. It will end the bambi state after this timeout + * expired or when they pick up their first weapon. Whatever + * happens first. + */ + protectionDuration = 5; + + /** + * Radius of spawn zones around the center of spawn zone markers. + */ + spawnZoneRadius = 500; + + /** + * These vehicles spawn on server restart close to spawn zones. + * They are non-persistent and will despawn on server restart. + * Basically they are just used to get away from the spawn zone + * faster. + * + * {Number of vehicles *per* spawn zone, vehicle class name} + */ + spawnZoneVehicles[] = + { + {5, "Exile_Bike_OldBike"}, + {5, "Exile_Bike_MountainBike"} + }; + }; + + /////////////////////////////////////////////////////////////////////// + // VEHICLE SPAWN CONFIGURATION + /////////////////////////////////////////////////////////////////////// + + class VehicleSpawn + { + /** + * Grid Size for vehicle spawning, + * smaller the number more vehicles, + * you get the point + */ + vehiclesGridSize = 2200; + + /** + * Vehicle ammount per grid + * kinda self explanitory + */ + vehiclesGridAmount = 2; + + /** + * Creates global markers for vehicle spawn tweeking, + * after you are satisfied with vehicle ammount and spread set this to 0. + */ + vehiclesDebugMarkers = 0; + + /** + * The server will apply random damage up to this value when spawning a vehicle. + */ + damageChance = 20; // 20% chance for a vehicle HITPOINT to be damaged + maximumDamage = 0.9; + + /** + * If "randmizeFuel" is set to 1, vehicles will spawn with randomized + * fuel. In this case, "fuel" controls the percentage of fuel that + * can be in the vehicle at a maximum. For example, if you set this to + * 0.5, then vehicles will spawn with something random between 0% and 50%. + * + * If "randomizeFuel" is set to 0, all vehicles will spawn exactly the + * fuel percentage defined in "fuel". For example, setting this to 0.5 + * will spawn all vehicles with 50% fuel. Setting it to 0 would spawn + * all vehicles without fuel. + */ + randomizeFuel = 1; + fuel = 1; + + /** + * Works exactly the same as the fuel setting ^ + */ + randomizeAmmo = 1; + ammo = 1; + + // Stuff to spawn on water + water[] = + { + "Exile_Boat_MotorBoat_Police", + "Exile_Boat_MotorBoat_Orange", + "Exile_Boat_MotorBoat_White", + "Exile_Boat_RubberDuck_CSAT", + "Exile_Boat_RubberDuck_Digital", + "Exile_Boat_RubberDuck_Orange", + "Exile_Boat_RubberDuck_Blue", + "Exile_Boat_RubberDuck_Black", + "Exile_Boat_SDV_CSAT", + "Exile_Boat_SDV_Digital", + "Exile_Boat_SDV_Grey" + }; + + // Stuff to spawn on roads + ground[] = + { + "Exile_Bike_QuadBike_Black", + "Exile_Bike_QuadBike_Blue", + "Exile_Bike_QuadBike_Red", + "Exile_Bike_QuadBike_White", + "Exile_Bike_QuadBike_Nato", + "Exile_Bike_QuadBike_Csat", + "Exile_Bike_QuadBike_Fia", + "Exile_Bike_QuadBike_Guerilla01", + "Exile_Bike_QuadBike_Guerilla02", + "Exile_Car_Volha_Blue", + "Exile_Car_Volha_White", + "Exile_Car_Lada_Green", + "Exile_Car_Lada_Taxi", + "Exile_Car_TowTractor_White", + "Exile_Car_UAZ_Open_Green", + "Exile_Car_UAZ_Green", + "Exile_Car_LandRover_Ambulance_Desert", + "Exile_Car_Tractor_Red", + "Exile_Car_OldTractor_Red", + "Exile_Car_Octavius_White" + }; + + /** + * Enables or disables nightvision optics on ALL vehicles + * + * 0 = off + * 1 = on + */ + nightVision = 1; + + /** + * Enables or disables thermal optics on ALL vehicles + * + * 0 = off + * 1 = on + */ + thermalVision = 0; + + /** + * Set this to 1 to unlock vehicles on server boot if they are in safe zones + * + * 0 = off + * 1 = on + */ + unlockInSafeZonesAfterRestart = 1; + }; + + class Weather + { + /* + You can define multiple "keyframes" for the weather to change. The server will pick + a keyframe randomly to simulate the weather. It will change the weather-keyframes + based on the following interval + */ + interval = 30; + + /* + Add the keyframes here. The server will pick one random, so if you want one + weather type of be more dominant compared to others, add it multiple times + */ + //keyframes[] = {"Sunny", "Cloudy", "Thunderstorm"}; + keyframes[] = {"Sunny"}; + + /* + This is a keyframe. Look up the BIKI to get more details about the parameters + + Be sure to design the fog settings at a view distance of 1,600m as this is the + limit in multiplayer by default + + https://community.bistudio.com/wiki/fogParams + https://community.bistudio.com/wiki/overcast + https://community.bistudio.com/wiki/setWaves + https://community.bistudio.com/wiki/setWindStr + https://community.bistudio.com/wiki/setGusts + https://community.bistudio.com/wiki/setRain + https://community.bistudio.com/wiki/setLightnings + https://community.bistudio.com/wiki/setRainbow + */ + class Sunny + { + fogValue = 0.1; + fogDecay = 0.2; + fogBase = 5; + overcast = 0.2; + waves = 0.2; + wind = 0.25; + gusts = 0.1; + rain = 0; + lightnings = 0; + rainbows = 0; + }; + + class Cloudy + { + fogValue = 0.2; + fogDecay = 0.1; + fogBase = 5; + overcast = 0.4; + waves = 0.4; + wind = 0.25; + gusts = 0.5; + rain = 0.1; + lightnings = 0.1; + rainbows = 1; + }; + + class Thunderstorm + { + fogValue = 0.7; + fogDecay = 0.2; + fogBase = 5; + overcast = 1; + waves = 1; + wind = 0.25; + gusts = 0.5; + rain = 1; + lightnings = 1; + rainbows = 0.5; + }; + }; + + class Time + { + // Uses Dedicated Server time as ingame Time + useRealTime = 0; + + // Will overide RealTime + useStaticTime = 1; + + // time in ARMA FORMAT << CONFIG + // https://community.bistudio.com/wiki/setDate + + staticTime[] = {2039,10,24,15,30}; + }; + + + class RCON + { + /* + Note that for this to work you need to have serverCommandPassowrd defined in config.cfg and BE enabled + */ + + // This needs to match config.cfg serverCommandPassword + serverPassword = ""; + + // Autolocks server until its ready to accept players + useAutoLock = 0; + + // Server will autoLock at that time before restart (minutes) + restartAutoLock = 3; + + /* + Number of hours and minutes of your restart period. + + Examples: + + {4, 0} = Every 4 hours + {1, 30} = Every one and a half hour (who the hell would do this?) + */ + restartTimer[] = {3, 0}; + + /* + Kicks players before restart to prevent gear loss. + We strongely recommend to use this! + + 0 = off + 1 = on + */ + useAutoKick = 0; + + /* + Number of minutes before the server kicks players that did + not disconnect before the restart. Should at least be two + minutes! + */ + kickTime = 2; + + /* + Self-explanatory + + 0 = off + 1 = on + */ + useRestartMessages = 0; + + /* + Number of minutes before the restart to inform your players. + + Only use full minutes here. Value like 5.5 have not been tested. + */ + restartWarningTime[] = {15, 10, 5, 3}; + + /* + If set to 1 server will execute '#shutdown', + to try to shutdown the server + */ + + useShutdown = 0; + }; + + class ServerSettings + { + /* + Support for custom server FSM if wanted + */ + serverFSM = "exile_server\fsm\main.fsm"; + + /* + If this is enabled, Exile developers will spawn with a ton of pop tabs. + We will have a hard time debugging things if you disable this. + */ + devFriendyMode = 1; + + devs[] = + { + {"76561197985241690","[EXILE|DEV] Eichi"}, + {"76561198022879703","[EXILE|DEV] Grim"}, + {"76561198075905447","[EXILE|DEV] Vishpala"}, + {"76561197968613061","[EXILE|DEV] Niuva"} + }; + }; + + class Events + { + /* + A list of events that are active + */ + enabledEvents[] = {"SupplyBox", "AbandonedSafe", "AmbientFlyOver", "EarthQuake"}; + + class EarthQuake + { + type = "spawn"; + function = "ExileServer_system_event_earthQuake_start"; + minTime = 60; + maxTime = 180; + minimumPlayersOnline = 1; + }; + + class SupplyBox + { + /* + Drops a supply box on a parachute next to a random airport on the map. + The box may contain items. The box can be transported to a territory + and installed to become a normal storage container. + */ + type = "spawn"; + function = "ExileServer_system_event_supplyBox_start"; + minTime = 60; // minutes + maxTime = 180; // minutes + minimumPlayersOnline = 10; + dropRadius = 500; // 500m around an airport (including the main airport on Altis!) + dropAltitude = 100; // altitude of the drop + markerTime = 10; // minutes + + /* + These are different types of boxes can be dropped. + You can specify the cargo a box should contain. + The type of box is chosen randomly from the following list. + Add a type multiple times to increase the chance of being used. + */ + types[] = {"Beer", "Beer", "Tools", "Food", "Food", "RepairParts"}; + + class BoxTypes + { + class Beer + { + items[] = + { + {"Exile_Item_Beer", 24} + }; + }; + + class Food + { + items[] = + { + {"Exile_Item_BBQSandwich", 5}, + {"Exile_Item_Catfood", 5}, + {"Exile_Item_ChristmasTinner", 5}, + {"Exile_Item_GloriousKnakworst", 5}, + {"Exile_Item_SausageGravy", 5}, + {"Exile_Item_Surstromming", 5}, + {"Exile_Item_CanOpener", 1}, + {"Exile_Item_CookingPot", 1}, + {"Exile_Item_Matches", 1} + }; + }; + + class Tools + { + items[] = + { + {"Exile_Item_Wrench", 1}, + {"Exile_Item_Shovel", 1}, + {"Exile_Item_Screwdriver", 1}, + {"Exile_Item_Pliers", 1}, + {"Exile_Item_Handsaw", 1}, + {"Exile_Item_FireExtinguisher", 1}, + {"Exile_Item_DuctTape", 1} + }; + }; + + class RepairParts + { + items[] = + { + {"Exile_Item_CarWheel", 8}, + {"Exile_Item_FuelCanisterFull", 4}, + {"Exile_Item_OilCanister", 1}, + {"Exile_Item_Grinder", 1}, + {"Exile_Item_CordlessScrewdriver", 1} + }; + }; + }; + }; + + class AbandonedSafe + { + type = "spawn"; + function = "ExileServer_system_event_abandonedSafe_start"; + minTime = 60; // minutes + maxTime = 120; // minutes + minimumPlayersOnline = 0; + markerTime = 15; // minutes + }; + + class AmbientFlyOver + { + type = "call"; + function = "ExileServer_system_event_ambientFlyOver_start"; + minTime = 30; // minutes + maxTime = 90; // minutes + minimumPlayersOnline = 1; + }; + }; + + class Logging + { + /* + If logging is enabled separate logs will be made in the sql logs folder for each type + */ + traderLogging = 1; + deathLogging = 1; + territoryLogging = 1; + }; +}; \ No newline at end of file diff --git a/@exileserver/basic.cfg b/@exileserver/basic.cfg new file mode 100644 index 0000000..03169fd --- /dev/null +++ b/@exileserver/basic.cfg @@ -0,0 +1,45 @@ +// +// Exile Mod basic.cfg Settings +// +// This file has been tuned for a box running only one Arma 3 server on a +// 1 GBit/s pipe with 100 slots +// +// See https://community.bistudio.com/wiki/basic.cfg +// + +/////////////////////////////////////////////////////////////////////////////// +// Default Options +/////////////////////////////////////////////////////////////////////////////// +language = "English"; +adapter = -1; +3D_Performance = 1.000000; +Resolution_W = 800; +Resolution_H = 600; +Resolution_Bpp = 32; + +/////////////////////////////////////////////////////////////////////////////// +// Bandwidth Tuning +// +// Be sure to adjust this to your server settings! +// This example is for 1GBit/s pipe +/////////////////////////////////////////////////////////////////////////////// +// 100MB * 1024 * 1024 = 104857600 +MinBandwidth = 104857600; + +// Do NOT set this too high or your Arma server will simulate ego-ddos +// 600MB * 1024 * 1024 = 629145600 +MaxBandwidth = 629145600; + +/////////////////////////////////////////////////////////////////////////////// +// Network Tuning +// +// Usually something we developers set. Only change these if you really know +// what you are doing. Do something wrong here and your sever will burn in hell +// and cause massive desych. +/////////////////////////////////////////////////////////////////////////////// +MaxMsgSend = 256; +MaxSizeGuaranteed = 512; +MaxSizeNonguaranteed = 256; +MinErrorToSend = 0.004; +MinErrorToSendNear = 0.03; +MaxCustomFileSize = 0; \ No newline at end of file diff --git a/@exileserver/config.cfg b/@exileserver/config.cfg new file mode 100644 index 0000000..75e0b4c --- /dev/null +++ b/@exileserver/config.cfg @@ -0,0 +1,43 @@ +hostname = "exilemod.com (1.0.2|1.64)"; +password = ""; +passwordAdmin = "changeme"; +serverCommandPassword = "changeme"; +logFile = "server.log"; +verifySignatures = 1; // Do NOT use verifySignatures=2! It costs too many FPS +BattlEye = 1; +requiredBuild = 138497; // 1.64 stable +allowedLoadFileExtensions[] = {:}; +allowedPreprocessFileExtensions[] = {"sqf"}; +allowedHTMLLoadExtensions[] = {"html"}; +motdInterval = 5; +maxPlayers = 100; +voteMissionPlayers = 200; +voteThreshold = 200; +disableVoN = 0; +vonCodecQuality = 30; +persistent = 1; +kickDuplicate = 1; +equalModRequired = 0; +kickClientsOnSlowNetwork = 0; +timeStampFormat = "short"; +onUserConnected = ""; +onUserDisconnected = ""; +doubleIdDetected = ""; +onUnsignedData = "kick (_this select 0)"; +onHackedData = "kick (_this select 0)"; +onDifferentData = "kick (_this select 0)"; +motd[] = {"Welcome to Arma 3 Exile Mod!", "www.exilemod.com", "Enjoy your stay!" }; + +class Missions +{ + class Exile + { + template = exile.chernarus; // Exile.Namalsk, Exile.Altis + + // do NOT use custom difficulties! + // Use either ExileRegular or ExileHardcore + // or you will break Exile! + difficulty = "ExileRegular"; + }; +}; + diff --git a/@exileserver/extDB3.dll b/@exileserver/extDB3.dll new file mode 100644 index 0000000..2ec9427 Binary files /dev/null and b/@exileserver/extDB3.dll differ diff --git a/@exileserver/extDB3.so b/@exileserver/extDB3.so new file mode 100644 index 0000000..49cd1d0 Binary files /dev/null and b/@exileserver/extDB3.so differ diff --git a/@exileserver/extDB3_x64.dll b/@exileserver/extDB3_x64.dll new file mode 100644 index 0000000..972ef6c Binary files /dev/null and b/@exileserver/extDB3_x64.dll differ diff --git a/@exileserver/extdb3-conf.ini b/@exileserver/extdb3-conf.ini new file mode 100644 index 0000000..3a212ee --- /dev/null +++ b/@exileserver/extdb3-conf.ini @@ -0,0 +1,26 @@ +[Main] +Version = 1 + +Randomize Config File = false +;; Randomizes Config File after loading. +;; Recommend to turn on, if you have enabled filepatching on arma. + +Allow Reset = false +;; Allows 9:RESET, usefull for development work + +Thread = 0; +;; Option to force number of worker threads for extDB3. +;; Min = 2, Max = 6 + +[Log] +Flush = false; +;; Flush logfile after each update. +;; Option really only usefull if running DEBUG BUILD + + +[Database] +IP = 127.0.0.1 +Port = 3306 +Username = changeme +Password = changeme +Database = changeme diff --git a/@exileserver/sql_custom/exile.ini b/@exileserver/sql_custom/exile.ini new file mode 100644 index 0000000..93e11c8 --- /dev/null +++ b/@exileserver/sql_custom/exile.ini @@ -0,0 +1,681 @@ +[Default] + +Version = 1 + +Strip Chars = "\/\|;{}<>\'" + +Strip Chars Mode = 0 + +Input SQF Parser = false +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Account related queries +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +[isKnownAccount] +SQL1_1 = SELECT CASE WHEN EXISTS(SELECT uid FROM account WHERE uid = ?) THEN 'true' ELSE 'false' END + +SQL1_INPUTS = 1 +OUTPUT = 1 + +[createAccount] +SQL1_1 = INSERT INTO account SET uid = ?, name = ? + +SQL1_INPUTS = 1,2 + +[startAccountSession] +SQL1_1 = UPDATE account SET name = ?, last_connect_at = NOW(), total_connections = total_connections + 1 WHERE uid = ? + +SQL1_INPUTS = 2,1 + +[endAccountSession] +SQL1_1 = UPDATE account SET last_disconnect_at = NOW() WHERE uid = ? + +SQL1_INPUTS = 1 + +[getAccountStats] +SQL1_1 = SELECT score, kills, deaths, clan_id, locker, ai_kills FROM account WHERE uid = ? +SQL1_INPUTS = 1 +OUTPUT = 1,2,3,4,5,6 + +[addAccountKill] +SQL1_1 = UPDATE account SET kills = kills + 1 WHERE uid = ? + +SQL1_INPUTS = 1 + +[addAccountDeath] +SQL1_1 = UPDATE account SET deaths = deaths + 1 WHERE uid = ? + +SQL1_INPUTS = 1 + +[getAccountScore] +SQL1_1 = SELECT score FROM account WHERE uid = ? + +SQL1_INPUTS = 1 +OUTPUT = 1 + +[setAccountScore] +SQL1_1 = UPDATE account SET score = ? WHERE uid = ? + +SQL1_INPUTS = 1,2 + +[modifyAccountScore] +SQL1_1 = UPDATE account SET score = score + ? WHERE uid = ? + +SQL1_INPUTS = 1,2 + +[updateLocker] +SQL1_1 = UPDATE account SET locker = ? WHERE uid = ? + +SQL1_INPUTS = 1,2 + +[getLocker] +SQL1_1 = SELECT locker FROM account WHERE uid = ? + +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 + +SQL1_INPUTS = 1 +OUTPUT = 1 + +[createPlayer] +SQL1_1 = INSERT INTO player SET account_uid = ?, name = ? + +SQL1_INPUTS = 1,2 +Return InsertID = true + +[insertPlayerHistory] +SQL1_1 = INSERT INTO player_history SET account_uid = ?, name = ?, position_x = ?, position_y = ?, position_z = ? + +SQL1_INPUTS = 1,2,3,4,5 + +[deletePlayer] +SQL1_1 = DELETE FROM player WHERE id = ? + +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 = ? +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 = ? + +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 = ?, +SQL1_15 = ammo = '[]' +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 = ? + +SQL1_INPUTS = 1 + +[loadVehicleIdPage] +SQL1_1 = SELECT id FROM vehicle WHERE deleted_at IS NULL LIMIT ?,? + +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 = ? +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 = ? + +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 = ? +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 = ? + +SQL1_INPUTS = 1,2 + +[vehicleSetPinCode] +SQL1_1 = UPDATE vehicle SET pin_code = ? WHERE id = ? + +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 = ? + +SQL1_INPUTS = 1,2,3,4,5,6,7,8,9,10,11,12 +Return InsertID = true + +[deleteConstruction] +SQL1_1 = DELETE FROM construction WHERE id = ? + +SQL1_INPUTS = 1 + +[loadConstructionIdPage] +SQL1_1 = SELECT id FROM construction WHERE deleted_at IS NULL LIMIT ?,? + +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 = ? + +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 + +OUTPUT = 1 + +[constructionSetPinCode] +SQL1_1 = UPDATE construction SET pin_code= ? WHERE id = ? + +SQL1_INPUTS = 1,2 + +[upgradeObject] +SQL1_1 = UPDATE construction SET class=? WHERE id = ? + +SQL1_INPUTS = 1,2 + +[addDoorLock] +SQL1_1 = UPDATE construction SET pin_code = ?,is_locked = -1 WHERE id = ? + +SQL1_INPUTS = 1,2 + +[updateLock] +SQL1_1 = UPDATE construction SET is_locked = ? WHERE id = ? + +SQL1_INPUTS = 1,2 + +[updateConstructionTerritoryIDs] +SQL1_1 = UPDATE construction SET territory_id = ? WHERE id IN(?) + +SQL1_INPUTS = 1,2 + +[updateDamage] +SQL1_1 = UPDATE construction SET damage = ? WHERE id = ? + +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 = ? + +SQL1_INPUTS = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18 +Return InsertID = true + +[deleteContainer] +SQL1_1 = DELETE FROM container WHERE id = ? + +SQL1_INPUTS = 1 + +[loadContainerIdPage] +SQL1_1 = SELECT id FROM container WHERE deleted_at IS NULL LIMIT ?,? + +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 = ? + +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 = ? + +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 = ?, +SQL1_17 = money = ? +SQL1_18 = WHERE id = ? +SQL1_INPUTS = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17 + +[containerSetPinCode] +SQL1_1 = UPDATE container SET pin_code= ? WHERE id = ? + +SQL1_INPUTS = 1,2 + +[updateContainerTerritoryIDs] +SQL1_1 = UPDATE container SET territory_id = ? WHERE id IN(?) + +SQL1_INPUTS = 1,2 + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Clan related queries +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +[createClan] +SQL1_1 = INSERT INTO clan SET leader_uid = ?, name = ? + +SQL1_INPUTS = 1,2 +Return InsertID = true + +[setAccountClanLink] +SQL1_1 = UPDATE account SET clan_id = ? WHERE uid = ? + +SQL1_INPUTS = 1,2 + +[unLinkClanLink] +SQL1_1 = UPDATE account SET clan_id = NULL WHERE uid = ? + +SQL1_INPUTS = 1 + +[updateClanLeader] +SQL1_1 = UPDATE clan SET leader_uid = ? WHERE id = ? + +SQL1_INPUTS = 1,2 + +[deleteClan] +SQL1_1 = DELETE FROM clan WHERE id = ? + +SQL1_INPUTS = 1 + +[loadClansIdPage] +SQL1_1 = SELECT id FROM clan LIMIT ?,? + +SQL1_INPUTS = 1,2 +OUTPUT = 1 + +[getClanInfo] +SQL1_1 = SELECT name,leader_uid FROM clan WHERE id = ? + +SQL1_INPUTS = 1 +OUTPUT = 1-STRING,2-STRING + +[getClanMembers] +SQL1_1 = SELECT uid,name FROM account WHERE clan_id = ? + +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 = ? + +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 = ? + +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 = ? + +SQL1_INPUTS = 1,2,3 +Return InsertID = true + +[deleteMarker] +SQL1_1 = DELETE FROM clan_map_marker WHERE id = ? + +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 = NULL , build_rights = ? , moderators = ? + +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 ?,? + +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 + +SQL1_INPUTS = 1 +OUTPUT = 1,2-STRING,3-STRING,4,5,6,7,8,9-STRING,10,11-STRING,12-STRING,13,14,15,16 + +[setTerritoryLevel] +SQL1_1 = UPDATE territory SET level = ? WHERE id = ? + +SQL1_INPUTS = 1,2 + +[setTerritorySize] +SQL1_1 = UPDATE territory SET radius = ? WHERE id = ? + +SQL1_INPUTS = 1,2 + +[updateTerritoryBuildRights] +SQL1_1 = UPDATE territory SET build_rights = ? WHERE id = ? + +SQL1_INPUTS = 1,2 + +[updateTerritoryModerators] +SQL1_1 = UPDATE territory SET moderators = ? WHERE id = ? + +SQL1_INPUTS = 1,2 + +[maintainTerritory] +SQL1_1 = UPDATE territory SET last_paid_at = NOW(),xm8_protectionmoney_notified = 0 WHERE id = ? + +SQL1_INPUTS = 1 + +[deleteTerritory] +SQL1_1 = DELETE FROM territory WHERE id = ? + +SQL1_INPUTS = 1 + +[flagStolen] +SQL1_1 = UPDATE territory SET flag_stolen = 1, flag_stolen_by_uid = ?, flag_stolen_at = NOW() WHERE id = ? + +SQL1_INPUTS = 1,2 + +[flagRestore] +SQL1_1 = UPDATE territory SET flag_stolen = 0, flag_stolen_by_uid = NULL, flag_stolen_at = NULL WHERE id = ? + +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 + +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 + +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 + +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 + +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 + +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) + +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) +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) + +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 + +SQL1_INPUTS = 1 + +[deleteBaseFlagStolen] +SQL1_1 = DELETE FROM territory WHERE flag_stolen_at < DATE_SUB(NOW(), INTERVAL ? DAY) + +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' + +SQL1_INPUTS = 1 +SQL2_INPUTS = 1 + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Moneh moneh moneh +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +[setPlayerMoney] +SQL1_1 = UPDATE player SET money = ? WHERE id = ? + +SQL1_INPUTS = 1,2 + +[getPlayerMoney] +SQL1_1 = SELECT money FROM player WHERE id = ? + +SQL1_INPUTS = 1 +OUTPUT = 1 + +[setContainerMoney] +SQL1_1 = UPDATE container SET money = ? WHERE id = ? + +SQL1_INPUTS = 1,2 + +[setVehicleMoney] +SQL1_1 = UPDATE vehicle SET money = ? WHERE id = ? + +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 + +SQL1_INPUTS = 1 + +[setTerritoryNotified] +SQL1_1 = UPDATE territory SET xm8_protectionmoney_notified = ? WHERE id = ? + +SQL1_INPUTS = 1,2