Jump to content

DeathF0X

Member
  • Content Count

    143
  • Joined

  • Last visited

  • Medals

Everything posted by DeathF0X

  1. DeathF0X

    AI Paradrop?

    Some snippets from my mission, i hope it helps you vars: enemySupportHeli : Heli class heli_spawn : marker exit : marker enemySide : enemyside / east enemySupportParas : array with untis ["O_rifle","xdsa"] line 30 replace resistance with side / thx found a bug :) line 39 change path to script call [object like gamelogic ] execVM "reinforcements.sqf" https://bitbucket.org/Skullfox/a3-burning-sky/src/717cb91689e5912bd25929a9626b3aa60aef278a/lib/reinforcements.sqf?at=master https://bitbucket.org/Skullfox/a3-burning-sky/src/717cb91689e5912bd25929a9626b3aa60aef278a/lib/eject_from_plane.sqf?at=master //GER sonst ts3 188.40.81.66:9990 und frag nach Phil
  2. Some snippets from my random mission script i use DAC for enemy spawning. clean_village.sqf is simple "kill all enemy to free the town" modul. short explanation: server.sqf: will setup some vars and stuff. init_mission: will select a random town and execute the clean_village.sqf with the town as location. clean_village: setup the main mission and some mission related stuff like marker, task, DAC and a mission trigger. place a logic name it "server", and a helipad name it "target", you need to change some paths for the scripts and remove some execVMs serverside: server.sqf systemChat "Start Server"; //Missions mission_types = ["clean_village"]; sidemission_types = ["crash_site"]; //Array with used main missions used_cities = []; //first start init vars server setVariable ["bs_mission","noActive"]; server setVariable ["bs_sidemission","noActive"]; mission_abort = false; sidemission_abort = false; //setup mhq execVM "server\mhq\init_mhq.sqf"; //ambient stuff civs,ieds etc execVM "server\ambient.sqf"; //wait for dac waituntil{DAC_Basic_Value == 1}; //get param, random 0, request 1 _missionParam = paramsArray select 0; if(_missionParam == 0)then{ systemChat "Mission Type Random"; sleep 20; [] execVM "server\mission\init_missions.sqf"; }else{ systemChat "Mission Type Request"; }; init_missions.sqf //request need mission type, get one if available mission_abort = false; _arg = [_this, 0, ""] call BIS_fnc_param; systemChat format["%1",_this select 0]; _req = _this select 0; sleep 5; //get all villages on map _cities = nearestLocations [position Server, ["NameVillage"], 80000]; //select a random one _target = [_cities] call fncLib_randomArray; //return village string _loc = text _target; //if already used restart script if( _loc in used_cities )then{ execVM "server\mission\init_missions.sqf"; }else{ //get mission status _v = server getVariable "bs_mission"; systemChat format["%1",_v]; if(_v == "noActive")then{ //add village to array used_cities = used_cities + [_loc]; if(_req != "" )then{ systemChat format ["req - %1",_req]; //if reqest take that [_req] call fncLib_startMission; }else{ systemChat "ran"; //select random main mission _mission = [mission_types] call fncLib_randomArray; systemChat format ["ran - %1",_mission]; [_mission] call fncLib_startMission; }; }else{ hq_logic_papa commandChat "Keine Mission verfügbar"; }; }; clean_village.sqf //string town _text = _this select 0; //location town _target = _this select 1; //setup task [_text,"Clean " + _text,"Säubern sie " + _text] call SHK_Taskmaster_add; //create marker _markerstr = [_target] call mission_marker; target setpos getMarkerPos _markerstr; [_markerstr] call mission_dummy_unit; [_markerstr,target,hq_logic_papa] call mission_enemy_support; systemChat "start dac"; waituntil{DAC_NewZone == 0}; _dac = "z_" + str floor(time); _values = [_dac,[1,0,0,0],[6,4,20,6],[3,2,30,5],[ ],[],[0,4,0,6,1]]; //[ [ position _target select 0, position _target select 1] ,350,350,0,0,_values] call DAC_fNewZone; [target] call mission_trigger; /* * Setup Global Vars */ server setVariable ["bs_mission_dac",_dac]; _g = server getVariable "bs_mission_support_object"; _r = server getVariable "bs_mission"; waitUntil { (kt == kb) AND ( DAC_NewZone == 0 ) AND (damage _g > 0.8 ) OR (mission_abort) }; if( (_text == _r ) AND (!mission_abort))then{ player sidechat format["%1 - %2",_text,_r]; [_markerstr,_r] call mission_successful; sleep 5; execVM "server\mission\standby.sqf"; }else{ //Mission abort _v = server getVariable "bs_mission"; if(_v != "noActive")then{ ['marker'] call fncLib_abortMissionVars; ['trigger'] call fncLib_abortMissionVars; ['support'] call fncLib_abortMissionVars; ['task'] call fncLib_abortMissionVars; }else{ [hq_logic_papa, "Keine laufende Mision"] call zp_globalCommandChatClients; }; } mission functions: not all used sidemission_marker = { _target = _this select 0; _markerstr = createMarker ["smtarget_" + str(time), _target ]; _markerstr setMarkerShape "ICON"; _markerstr setMarkerColor "ColorRed"; _markerstr setMarkerType "waypoint"; server setVariable ["bs_sidemission_marker",_markerstr]; publicVariable "server"; _markerstr }; sidemission_successful = { _t = _this select 0; _m = _this select 1; deleteMarker _m; [_t,"succeeded"] call SHK_Taskmaster_upd; server setVariable ["bs_sidemission","noActive"]; publicVariable "server"; }; fncLib_addActionOption = { _array = _this select 0; _sqf = _this select 1; _name = _this select 2; { _x addAction [_name,format["client\actions\%1.sqf",_sqf] ]; }foreach _array; }; fncLib_abortMissionVars = { _typ = _this select 0; switch (_typ) do { case 'marker': { _d = server getVariable "bs_mission_marker"; _d setMarkerColor "ColorBlue"; server setVariable ["bs_mission_marker",false]; }; case 'trigger': { _f = server getVariable "bs_mission_trigger"; deletevehicle _f; server setVariable ["bs_mission_trigger",false]; }; case 'support': { _a = server getVariable "bs_mission_support_object"; _a setDamage 1; server setVariable ["bs_mission_support_object",false]; }; case 'task': { _v = server getVariable "bs_mission"; [_v,"failed"] call SHK_Taskmaster_upd; server setVariable ["bs_mission","noActive"]; [hq_logic_papa, "Mission wurde abgebrochen"] call zp_globalCommandChatClients; }; case 'bs_join_sm_grp_player': { server setVariable ["bs_join_sm_grp_player_0",false]; server getVariable ["bs_join_sm_grp_player_1",false]; server getVariable ["bs_join_sm_grp_player_2",false]; server getVariable ["bs_join_sm_grp_player_3",false]; server getVariable ["bs_join_sm_grp_player_4",false]; }; default { hint "fncLib_abortMissionVars no params" }; }; systemChat "cleaned up"; publicVariable "server"; }; fncLib_startMission = { _mission = _this select 0; //format string and start mission file _file = Format ["server\mission\m\%1.sqf",_mission]; server setVariable ["bs_mission",_loc]; publicVariable "server"; systemchat _file; [_loc,_target] execVM _file; hq_logic_papa commandChat "Übertrage Missions Informationen"; }; fncLib_randomArray = { _array = _this select 0; _c = count _array; _n = floor ( random _c ); _i = _array select _n; _i }; // Executed on the server. zp_requestSideMission = { private ["_param1", "_param2", "_param3", "_param4"]; _param1 = _this select 0; [hq_logic_papa, "Neue SMission wird angefordert"] call zp_globalCommandChatClients; [_param1] execVM "server\mission\init_sidemission.sqf"; }; fncLib_stratMapPort = { _m = _this select 0; player setpos getmarkerPos _m; }; mission_trigger = { _target = _this select 0; systemChat "setup trigger"; kt = str( floor( time ) ) + "_" + str ( floor( random( 999 ) ) ); kb = 'birdistheword'; _trigger = createTrigger ["EmptyDetector", position _target ]; _trigger setTriggerArea [400, 400, 0, true]; _trigger setTriggerActivation ["east", "NOT PRESENT", true]; _trigger setTriggerStatements ["this",format["kb = '%1'",kt], ""]; server setVariable ["bs_mission_trigger",_trigger]; server setVariable ["bs_mission_cleaned",kt]; }; mission_dummy_unit = { _position_truck = getMarkerPos _markerstr findEmptyPosition [10,350,"O_Truck_02_covered_F"]; waitUntil { if (count _position_truck > 1) exitWith {true}; // has to return true to continue sleep 1; _position_truck = getMarkerPos _markerstr findEmptyPosition [10,350,"O_Truck_02_covered_F"]; }; _vehicle = createVehicle ["O_Truck_02_covered_F" , [ _position_truck select 0, _position_truck select 1], [], 0, ""]; createVehicleCrew _vehicle; systemChat "truck done"; }; mission_enemy_support = { _markerstr = _this select 0; _target = _this select 1; _hq_logic_papa = _this select 1; _position_antenna = getMarkerPos _markerstr findEmptyPosition [10,350,"PowGen_Big"]; waitUntil { // exit loop if the unit gets deleted if (count _position_antenna > 1) exitWith {true}; // has to return true to continue sleep 1; _position_antenna = getMarkerPos _markerstr findEmptyPosition [10,350,"PowGen_Big"]; }; _ant_marker = createMarker ["antenna_"+ str(time), [ _position_antenna select 0, _position_antenna select 1]]; _ant_marker setMarkerShape "ICON"; _ant_marker setMarkerType "loc_Transmitter"; _ant_marker setMarkerColor "ColorRed"; _land_antenna = createVehicle ["PowGen_Big" , [ _position_antenna select 0, _position_antenna select 1], [], 0, ""]; _land_antenna addEventHandler ["killed", { [hq_logic_papa, "Keine Feindlichen funkübertragungen mehr im Gebiet"] call zp_globalCommandChatClients;}]; server setVariable ["bs_mission_support_object",_land_antenna]; systemChat "antenna done"; [_land_antenna,_target,_hq_logic_papa] spawn { _land_antenna_spawn = _this select 0; _paras = _this select 1; _hq = _this select 2; systemChat "paras waiting"; while { damage _land_antenna_spawn < 0.8 } do { sleep 540; [_paras] execVM "lib\reinforcements.sqf" }; }; }; mission_successful = { _markerstr = _this select 0; _text = _this select 1; _markerstr setMarkerColor "ColorGreen"; [_text,"succeeded"] call SHK_Taskmaster_upd; server setVariable ["bs_mission","noActive"]; publicVariable "server"; }; mission_marker = { _target = _this select 0; _markerstr = createMarker ["target_" + str(time),[ position _target select 0, position _target select 1] ]; _markerstr setMarkerShape "ELLIPSE"; _markerstr setMarkerBrush "FDiagonal"; _markerstr setMarkerSize [400,400]; _markerstr setMarkerColor "ColorRed"; server setVariable ["bs_mission_marker",_markerstr]; _markerstr }; zp_abortMission = { }; // Executed on the server. zp_abortMission = { private ["_param1", "_param2", "_param3", "_param4"]; mission_abort = true; }; fncLib_carRadio = { _car = _this select 0; _player = _this select 1; _status = _this select 2; hint"Radio ist kaputt"; }; fncLib_findHousePos = { _target = _this select 0; _nearesthouses = position target nearObjects ["House",350]; _houseList = []; { for "_i" from 0 to 20 do { if ( [(_x buildingPos _i), [0,0,0]] call BIS_fnc_arrayCompare ) exitWith { if (_i > 0) then { _houseList set [count _houseList, [_x, _i]]; }; }; }; }forEach _nearesthouses; _randomHouse = _houseList select (floor (random (count _houseList))); _housePos = (_randomHouse select 0) buildingPos (floor (random (_randomHouse select 1))); if( dev )then{ _crate_marker = createMarker ["aas_" + str( time ), _housePos]; _crate_marker setMarkerShape "ICON"; _crate_marker setMarkerType "loc_Tree"; _crate_marker setMarkerColor "ColorRed"; }; _housePos }; fnclib_chatDump = { _str = _this select 0; player sidechat _str; }; fncLib_teleport = { onMapSingleClick "player setPos _pos; onMapSingleClick ''"; }; fncLib_airstrike = { }; zp_requestMission = { private ["_param1", "_param2", "_param3", "_param4"]; _param1 = _this select 0; [hq_logic_papa, "Neue Mission wird angefordert"] call zp_globalCommandChatClients; [_param1] execVM "server\mission\init_missions.sqf"; }; fncLib_captive = { player setcaptive true; }; zp_globalCommandChat = { private ["_caller", "_text"]; _caller = _this select 0; _text = _this select 1; _caller commandChat _text; }; fnclib_findPos = { if (!isServer) exitWith {}; _NameVillage = nearestLocations [position Server, ["NameVillage"], 100000]; _possibleLocation = []; _blacklist = []; { _newmarker = createMarker [str(position _x),position _x]; _newmarker setMarkerShape "ICON"; _newmarker setMarkerText str(_number); _newmarker setMarkerColor "ColorYellow"; _newmarker setMarkerType "mil_objective"; //Mögliche positionen _possibleLocation = _possibleLocation + [_x]; //aus schleife entfernen _NameVillage = _NameVillage - [_x]; }foreach _NameVillage; _NameCityCapital = nearestLocations [position Server, ["NameCityCapital"], 100000]; _possibleLocation = []; _blacklist = []; { _newmarker = createMarker [str(position _x),position _x]; _newmarker setMarkerShape "ICON"; _newmarker setMarkerText str(_number); _newmarker setMarkerColor "ColorGreen"; _newmarker setMarkerType "mil_objective"; //Mögliche positionen _possibleLocation = _possibleLocation + [_x]; //aus schleife entfernen _NameCityCapital = _NameCityCapital - [_x]; }foreach _NameCityCapital; _NameCity = nearestLocations [position Server, ["NameCity"], 100000]; _possibleLocation = []; _blacklist = []; { _newmarker = createMarker [str(position _x),position _x]; _newmarker setMarkerShape "ICON"; _newmarker setMarkerText str(_number); _newmarker setMarkerColor "ColorBlue"; _newmarker setMarkerType "mil_objective"; //Mögliche positionen _possibleLocation = _possibleLocation + [_x]; //aus schleife entfernen _NameCity = _NameCity - [_x]; }foreach _NameCity; }
  3. Hey, can someone post me a example of the CBA flexi menu with sub entries, i after hours of try and error i get a level 1 self interaction menu working. Yes i already read this . The explanation there is not really good. And if possible also with item interaction, when i bind the menu to a object. ATM im @work, when im home i will post my menu code. I need it for my random mission generation, request and abort mission. Phil
  4. DeathF0X

    CBA Flexi Menu

    My code: if( (typeOf player == "BWA3_TL_Tropen" ) OR ( _uid in _uidArrray ) OR (_uid == "_SP_PLAYER_") )then{ ["player", [0x0F], -66, ["client\menu\menu.sqf", "main"]] call CBA_ui_fnc_add; }; _menu = [ ["main", "DEV MENU", "popup"], [ ["Teleport",{[player] call fncLib_teleport;}] , ["Neutral",{[player] call fncLib_captive;}], ["Neue Mission",{[] call zp_requestMissionServer;}], ["Clean City",{["clean_village"] call zp_requestMissionServer;}], ["Destroy Chaches",{["chaches"] call zp_requestMissionServer;}], ["Kill HVT",{["hvt"] call zp_requestMissionServer;}] ] ]; _menu
  5. Hey, Yes the addon work with A3 Beta IniDB is awesome OK first if you have problems about client-server communication use the ASCOM framework http://www.armaholic.com/page.php?id=19804 This should fix lot of problems. Ok,my problem: I need to check if a player is in the ini file. Function: // Executed on the server. fncClib_verifyPlayer = { private ["_uid"]; _uid = _this select 0; _check = ["myDatabaseFile", _uid, "uid"] call iniDB_read; //if the uid not found the return value is any,else the value is the uid ......... _return }; I need a bool true if uid found and bool false if not.I cant find any solution. So i need a script to check the any return value. I hope someone have a nice idea ;) Phil
  6. Hey, here is my simple suicide bomber script. You can add player classes which the suicide bomber will attack. The next release include alice support for random suicide bomber action short video,i excluded my class in this video. http://www.youtube.com/watch?v=q-Z0HEzgMcs&list=UUqvEtOkTTT9Jic4OXpxh6hw&index=1 http://www.youtube.com/watch?v=WfIzPqVCeSo&feature=youtu.be Put it in the Init of a civilian. nul=[this] execVM "suicide_bomber.sqf"; V1.0 suicide_bomber.sqf private ["_player","_suicidebomber","_playerarray","_nmax","_select"]; _suicidebomber = _this select 0; waitUntil {_suicidebomber distance player <= 25}; //hint"in distance 25m"; //Player Classes Change to attack _playerarray = nearestObjects [_suicidebomber, ["US_Army_Soldier_SL","US_Soldier_EP1","US_Soldier_Medic_EP1","US_Soldier_Engineer_EP1"],30]; _nmax = count _playerarray; _select =floor(random _nmax); _player = (_playerarray select _select); //hint"found my target and ready to go"; waitUntil {_suicidebomber distance _player <= 15}; _suicidebomber SetSpeedMode "Full"; _suicidebomber SetCombatMode "Red"; _suicidebomber SetBehaviour "Careless"; hint"Allua Akba"; //get a sound file //_suicidebomber say3D "xyz"; _suicidebomber domove getpos _player; waitUntil {_suicidebomber distance _player <= 3}; if ((alive _suicidebomber) AND (_suicidebomber distance _player <= 4)) then { "ARTY_Sh_105_HE" createVehicle getPos _suicidebomber; }else { //Code if failed };
  7. Hello Im working since 2 days to start server,now 1 problem left. How to combine A2+OA, i searched with google for hours bur i cant find a good answer. Infos: OA is installed and working alone no problems folder : /home/server2_co after that i copy my whole arma 2 dic in " /home/server2_co/arma2 but i cant find a solution. i really hope someone can help me arma2oaserver #!/bin/bash # # armaserver: ArmA 2 Linux Dedicated Server Control Script # (c) 2010 BIStudio # ArmA 2 binary version must be 1.04 or later # # mod by: Psycho Dad , Date: 2012/08/05 #======================================================================= #======== CONFIGURATION PARAMETERS ======== #======== MUST BE EDITED MANUALLY TO FIT YOUR SYSTEM PARAMETERS ======== #======================================================================= ARMA_DIR=. CONFIG=server.cfg PORT=2305 PIDFILE=${ARMA_DIR}/${PORT}.pid RUNFILE=${ARMA_DIR}/${PORT}.run LOGFILE=${ARMA_DIR}/${PORT}.log SERVER=${ARMA_DIR}/server [color="#FF0000"]OTHERPARAMS="-mod=expansion;ca;arma2\;"[/color] #======================================================================= ulimit -c 1000000 # setup the libraries, local dir first! (add!) export LD_LIBRARY_PATH=".:${ARMA_DIR}/lib32:/usr/lib32:${LD_LIBRARY_PATH}" case "$1" in start) if [ -f ${RUNFILE} ]; then $0 stop fi echo "Starting ArmA 2 server..." # remove core dumps (add!) find ${ARMA_DIR} -name core -type f -print | xargs -r rm -f # file to mark we want server running... echo "go" >${RUNFILE} # launch the background watchdog process to run the server (mod!) nohup </dev/null >/dev/null 2>&1 $0 watchdog-port-${PORT} & ;; stop) echo "Stopping ArmA 2 server..." if [ -f ${RUNFILE} ]; then # ask watcher process to exit by deleting its runfile... rm -f ${RUNFILE} fi # and terminate ArmA 2 server process if [ -f ${PIDFILE} ]; then kill -TERM $(< ${PIDFILE}) if [ -f ${PIDFILE} ]; then rm -f ${PIDFILE} fi sleep 1s fi # kill watchdog (add!) pgrep -U ${UID} -fl watchdog-port-${PORT} | awk '{print $1}' | xargs -r kill -TERM >/dev/null 2>&1 ;; status) if [ -f ${RUNFILE} ]; then echo "Server should be running..." else echo "Server should not be running..." fi if [ -f ${PIDFILE} ]; then PID=$(< ${PIDFILE}) echo "PID file exists (PID=${PID})..." if [ -f /proc/${PID}/cmdline ]; then echo "Server process seems to be running..." fi fi ;; check) echo -n "ArmA 2 directory: ${ARMA_DIR} " if [ -d ${ARMA_DIR} ]; then echo "OK" else echo "MISSING!" fi echo -n "Server executable: ${SERVER} " if [ -x ${SERVER} ]; then echo "OK" else echo "ERROR!" fi echo "Port number: ${PORT}" echo -n "Config file: ${CONFIG} " if [ -f ${CONFIG} ]; then echo "OK" else echo "MISSING!" fi echo "PID file: ${PIDFILE}" echo "RUN file: ${RUNFILE}" ;; restart) echo "Restarting ArmA 2 server..." $0 stop >/dev/null $0 start >/dev/null ;; watchdog-port-${PORT}) # this is a background watchdog process. Do not start directly while [ -f ${RUNFILE} ]; do # launch the server... cd ${ARMA_DIR} echo >>${LOGFILE} "WATCHDOG ($$): [$(date)] Starting server (port ${PORT})..." ${SERVER} >>${LOGFILE} 2>&1 -server -config=${CONFIG} -port=${PORT} -pid=${PIDFILE} ${OTHERPARAMS} if [ -f ${RUNFILE} ]; then echo >>${LOGFILE} "WATCHDOG ($$): [$(date)] Server died, waiting to restart..." sleep 10s else echo >>${LOGFILE} "WATCHDOG ($$): [$(date)] Server shutdown intentional, watchdog terminating" fi done ;; *) echo "$0 (start|stop|restart|status|check)" ;; esac
  8. i found the solution Yeaa THX for helping me http://forums.bistudio.com/showthread.php?123563-Ubuntu-10-04-amp-ArmA2-OA&p=2002534&viewfull=1#post2002534 => install the whole game (vanilla&OA) on windows => patch the game to what ever (current 1.59) => make a copie from the whole game (backup is good everytime) => create a txt file into the arma folder with "patched 1.59 or whatever" for overview only => structure into the main dir must be: (rest you can delete - not needed on linux) - AddOns - Common - Dta - Expansion *! - Keys - Missions - MPmissions
  9. upload A2,create expansion,upload a2oa in ex.,now when i the server start he "died" http://pastebin.com/jCS5SMfe expansion folder: arma2oaserver ARMA_DIR=/home/server3_co_ace <--i only used a new folder to test CONFIG=server.cfg PORT=2305 PIDFILE=${ARMA_DIR}/${PORT}.pid RUNFILE=${ARMA_DIR}/${PORT}.run LOGFILE=${ARMA_DIR}/log.${PORT}.txt SERVER=${ARMA_DIR}/server OTHERPARAMS=-cpucount=2
  10. first i have uploaded oa in this folder,then i created an arma2 in the oa folder and upload arma2 in this folder. You mean i have to install a2 first and then overwrite it with arma2oa ?
×