Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /
- //Spawn helper function
- void SpawnObject( string type, vector position, vector orientation )
- {
- auto obj = GetGame().CreateObject( type, position );
- obj.SetPosition( position );
- obj.SetOrientation( orientation );
- obj.SetOrientation( obj.GetOrientation() ); //Collision fix
- obj.Update();
- obj.SetAffectPathgraph( true, false );
- if( obj.CanAffectPathgraph() ) GetGame().GetCallQueue( CALL_CATEGORY_SYSTEM ).CallLater( GetGame().UpdatePathgraphRegionByObject, 100, false, obj );
- }
- void main()
- {
- //INIT WEATHER BEFORE ECONOMY INIT------------------------
- Weather weather = g_Game.GetWeather();
- weather.MissionWeather(false); // false = use weather controller from Weather.c
- weather.GetOvercast().Set( Math.RandomFloatInclusive(0.4, 0.6), 1, 0);
- weather.GetRain().Set( 0, 0, 1);
- weather.GetFog().Set( Math.RandomFloatInclusive(0.05, 0.1), 1, 0);
- //INIT ECONOMY--------------------------------------
- Hive ce = CreateHive();
- if ( ce )
- ce.InitOffline();
- //Your custom spawned objects
- SpawnObject("DC_BankingATM", "3706.7 402.012 5984.86", "90 0 0"); //Green ATM
- SpawnObject("DC_BankingATM", "3704.7 402.332 6003.1", "275 0 0"); //Green ATM
- SpawnObject("DC_BankingATM", "8360.15 292.054 5994.15", "325 0 0"); //Kumyrna ATM
- SpawnObject("DC_BankingATM", "8350.7 292.011 5978.3", "235 0 0"); //Kumyrna ATM
- SpawnObject("DC_BankingATM", "8780.619141 221.009995 11631.502930", "4.000000 0.000000 -1.000000"); //Gvodzno ATM
- SpawnObject("DC_BankingATM", "14576.046875 154.533432 14440.675781", "54.999992 0.000000 0.000000"); //Blackmarket ATM
- //GvozdnoTrader
- SpawnObject( "Land_Mil_Guardhouse2", "8790.570313 223.223007 11609.599609", "-89.000000 0.000000 0.000000" ); //CarTrader
- SpawnObject( "Land_Village_store", "8784.879883 224.097000 11636.200195", "96.000092 2.000000 0.000000" ); //HealthTrader
- SpawnObject( "MSFC_MapObject_WeaponTrader_Tent", "8805.799805 223.265457 11635.091797", "-172.999390 2.000000 0.000000" ); //WeaponTrader
- SpawnObject( "FP4_GunShop", "8800.319336 222.910934 11635.454102", "97.000137 0.000000 0.000000" ); //AttachTrader
- SpawnObject( "MSFC_MapObject_WeaponWorkBench", "8793.513672 223.251602 11635.920898", "-85.000137 0.000000 0.000000" ); //ToolsTrader
- SpawnObject( "Chainsaw", "8793.349609 222.598740 11634.210938", "-53.401123 -36.816494 -3.965740" );
- SpawnObject( "bldr_conference_table_a", "8788.858398 222.362152 11632.909180", "-175.000000 0.000000 2.000000" ); //ClothTrader
- SpawnObject( "bldr_cashier", "8789.099609 222.716232 11632.875000", "6.000007 0.000000 -1.000000" );
- //Blackmarket Trader
- SpawnObject( "bldr_mil_camonet_tent2", "14570.7 156.053 14446.3", "8.009.11 -2.000 -5.99999" );
- SpawnObject( "Land_Dead_MassGrave", "14570.00 153.56 14437.10", "0.000000 15.000000 -4.000000" );
- //DATE RESET AFTER ECONOMY INIT-------------------------
- int year, month, day, hour, minute;
- int reset_month = 9, reset_day = 20;
- GetGame().GetWorld().GetDate(year, month, day, hour, minute);
- if ((month == reset_month) && (day < reset_day))
- {
- GetGame().GetWorld().SetDate(year, reset_month, reset_day, hour, minute);
- }
- else
- {
- if ((month == reset_month + 1) && (day > reset_day))
- {
- GetGame().GetWorld().SetDate(year, reset_month, reset_day, hour, minute);
- }
- else
- {
- if ((month < reset_month) || (month > reset_month + 1))
- {
- GetGame().GetWorld().SetDate(year, reset_month, reset_day, hour, minute);
- }
- }
- }
- }
- class CustomMission: MissionServer
- {
- void SetRandomHealth(EntityAI itemEnt)
- {
- if ( itemEnt )
- {
- int rndHlt = Math.RandomInt(55,100);
- itemEnt.SetHealth("","",rndHlt);
- }
- }
- override PlayerBase CreateCharacter(PlayerIdentity identity, vector pos, ParamsReadContext ctx, string characterName)
- {
- Entity playerEnt;
- playerEnt = GetGame().CreatePlayer(identity, characterName, pos, 0, "NONE");//Creates random player
- Class.CastTo(m_player, playerEnt);
- GetGame().SelectPlayer(identity, m_player);
- return m_player;
- }
- override void StartingEquipSetup(PlayerBase player, bool clothesChosen)
- {
- PlayerIdentity ident = PlayerIdentity.Cast(player.GetIdentity());
- int h= m_humanity.GetHumanity(ident.GetPlainId());
- {
- case -4:
- // Bandit LvL 4
- player.GetInventory().CreateInInventory("BalaclavaMask_BlackSkull");
- player.GetInventory().CreateInInventory("FP4_PPSH");
- player.GetInventory().CreateInInventory("MilitaryBoots_Redpunk");
- player.GetInventory().CreateInInventory("MSFCSTALKERBanditPants");
- player.GetInventory().CreateInInventory("RidersJacket_Black");
- player.GetInventory().CreateInInventory("Mag_PPSH_50Rnd");
- player.GetInventory().CreateInInventory("Mag_PPSH_50Rnd");
- player.GetInventory().CreateInInventory("TAGn_CherRIp");
- player.GetInventory().CreateInInventory("AssaultBag_Black");
- player.GetInventory().CreateInInventory("Canteen");
- player.GetInventory().CreateInInventory("CombatKnife");
- player.GetInventory().CreateInInventory("Rag");
- player.GetInventory().CreateInInventory("Rag");
- player.GetInventory().CreateInInventory("Rag");
- player.GetInventory().CreateInInventory("PeachesCan");
- break;
- case -3:
- // Bandit LvL 3
- player.GetInventory().CreateInInventory("Balaclava3Holes_Black");
- player.GetInventory().CreateInInventory("STG_44");
- player.GetInventory().CreateInInventory("MilitaryBoots_Redpunk");
- player.GetInventory().CreateInInventory("MSFCSTALKERBanditPants");
- player.GetInventory().CreateInInventory("RidersJacket_Black");
- player.GetInventory().CreateInInventory("Mag_STG44_30Rnd");
- player.GetInventory().CreateInInventory("Mag_STG44_30Rnd");
- player.GetInventory().CreateInInventory("Mag_STG44_30Rnd");
- player.GetInventory().CreateInInventory("TAGn_CherRIp");
- player.GetInventory().CreateInInventory("AssaultBag_Black");
- player.GetInventory().CreateInInventory("Canteen");
- player.GetInventory().CreateInInventory("CombatKnife");
- player.GetInventory().CreateInInventory("Rag");
- player.GetInventory().CreateInInventory("Rag");
- player.GetInventory().CreateInInventory("Rag");
- player.GetInventory().CreateInInventory("PeachesCan");
- break;
- case -2:
- // Bandit LvL 2
- player.GetInventory().CreateInInventory("Balaclava3Holes_Black");
- player.GetInventory().CreateInInventory("Mac10");
- player.GetInventory().CreateInInventory("MilitaryBoots_Redpunk");
- player.GetInventory().CreateInInventory("MSFCSTALKERBanditPants");
- player.GetInventory().CreateInInventory("RidersJacket_Black");
- player.GetInventory().CreateInInventory("Mag_Mac10_30Rnd");
- player.GetInventory().CreateInInventory("Mag_Mac10_30Rnd");
- player.GetInventory().CreateInInventory("Mag_Mac10_30Rnd");
- player.GetInventory().CreateInInventory("TAGn_CherRIp");
- player.GetInventory().CreateInInventory("AssaultBag_Black");
- player.GetInventory().CreateInInventory("Canteen");
- player.GetInventory().CreateInInventory("CombatKnife");
- player.GetInventory().CreateInInventory("Rag");
- player.GetInventory().CreateInInventory("Rag");
- player.GetInventory().CreateInInventory("Rag");
- player.GetInventory().CreateInInventory("PeachesCan");
- break;
- case -1:
- // Bandit LvL 1
- player.GetInventory().CreateInInventory("Balaclava3Holes_Black");
- player.GetInventory().CreateInInventory("M9_Berreta");
- player.GetInventory().CreateInInventory("MilitaryBoots_Redpunk");
- player.GetInventory().CreateInInventory("MSFCSTALKERBanditPants");
- player.GetInventory().CreateInInventory("RidersJacket_Black");
- player.GetInventory().CreateInInventory("Mag_m9_15Rnd");
- player.GetInventory().CreateInInventory("Mag_m9_15Rnd");
- player.GetInventory().CreateInInventory("Mag_m9_15Rnd");
- player.GetInventory().CreateInInventory("TAGn_CherRIp");
- player.GetInventory().CreateInInventory("AssaultBag_Black");;
- player.GetInventory().CreateInInventory("Canteen");
- player.GetInventory().CreateInInventory("CombatKnife");
- player.GetInventory().CreateInInventory("Rag");
- player.GetInventory().CreateInInventory("Rag");
- player.GetInventory().CreateInInventory("Rag");
- player.GetInventory().CreateInInventory("PeachesCan");
- break;
- case 0:
- // Bambi
- player.GetInventory().CreateInInventory("FNX45");
- player.GetInventory().CreateInInventory("CombatBoots_Black");
- player.GetInventory().CreateInInventory("CargoPants_Black");
- player.GetInventory().CreateInInventory("M65Jacket_Black");
- player.GetInventory().CreateInInventory("Mag_FNX45_15Rnd");
- player.GetInventory().CreateInInventory("Mag_FNX45_15Rnd");
- player.GetInventory().CreateInInventory("Reflexvest");
- player.GetInventory().CreateInInventory("DryBag_Black");
- player.GetInventory().CreateInInventory("Compass");
- player.GetInventory().CreateInInventory("Canteen");
- player.GetInventory().CreateInInventory("CombatKnife");
- player.GetInventory().CreateInInventory("Flashlight");
- player.GetInventory().CreateInInventory("Rag");
- player.GetInventory().CreateInInventory("Rag");
- player.GetInventory().CreateInInventory("Rag");
- player.GetInventory().CreateInInventory("PeachesCan");
- break;
- case 1:
- // Hero LvL 1
- EntityAI gun = player.GetHumanInventory().CreateInHands("GP_Colt1911");
- gun.GetInventory().CreateAttachment("Tundra_Suppressor");
- gun.GetInventory().CreateAttachment("TLRLight");
- player.GetInventory().CreateInInventory("MSFCBlackCamoBoots");
- player.GetInventory().CreateInInventory("BoonieHat_Olive");
- player.GetInventory().CreateInInventory("MSFCSTALKERMilitaryJacket");
- player.GetInventory().CreateInInventory("Mag_1911_7Rnd");
- player.GetInventory().CreateInInventory("Mag_1911_7Rnd");
- player.GetInventory().CreateInInventory("Mag_1911_7Rnd");
- player.GetInventory().CreateInInventory("Mag_1911_7Rnd");
- player.GetInventory().CreateInInventory("Mag_1911_7Rnd");
- player.GetInventory().CreateInInventory("Mag_1911_7Rnd");
- player.GetInventory().CreateInInventory("Battery9v");
- player.GetInventory().CreateInInventory("MSFCSTALKERMilitaryPants");
- player.GetInventory().CreateInInventory("TAG_Rang1");
- player.GetInventory().CreateInInventory("MSFCSTALKERMilitaryBag");
- player.GetInventory().CreateInInventory("Compass");
- player.GetInventory().CreateInInventory("Canteen");
- player.GetInventory().CreateInInventory("CombatKnife");
- player.GetInventory().CreateInInventory("Rag");
- player.GetInventory().CreateInInventory("Rag");
- player.GetInventory().CreateInInventory("Rag");
- player.GetInventory().CreateInInventory("PeachesCan");
- break;
- case 2:
- // Hero LvL 2
- EntityAI gun = player.GetHumanInventory().CreateInHands("MP5K");
- gun.GetInventory().CreateAttachment("mp5k_RailHndgrd");
- gun.GetInventory().CreateAttachment("mp5k_stockbttstck");
- gun.GetInventory().CreateAttachment("Tundra_Suppressor");
- gun.GetInventory().CreateAttachment("Universallight");
- player.GetInventory().CreateInInventory("MSFCBlackCamoBoots");
- player.GetInventory().CreateInInventory("BoonieHat_Olive");
- player.GetInventory().CreateInInventory("MSFCSTALKERMilitaryJacket");
- player.GetInventory().CreateInInventory("Mag_mp5_30Rnd");
- player.GetInventory().CreateInInventory("Mag_mp5_30Rnd");
- player.GetInventory().CreateInInventory("Mag_mp5_30Rnd");
- player.GetInventory().CreateInInventory("Battery9v");
- player.GetInventory().CreateInInventory("MSFCSTALKERMilitaryPants");
- player.GetInventory().CreateInInventory("TAG_Rang2");
- player.GetInventory().CreateInInventory("MSFCSTALKERMilitaryBag");
- player.GetInventory().CreateInInventory("Compass");
- player.GetInventory().CreateInInventory("Canteen");
- player.GetInventory().CreateInInventory("CombatKnife");
- player.GetInventory().CreateInInventory("Rag");
- player.GetInventory().CreateInInventory("Rag");
- player.GetInventory().CreateInInventory("Rag");
- player.GetInventory().CreateInInventory("PeachesCan");
- break;
- case 3:
- // Hero LvL 3
- EntityAI gun = player.GetHumanInventory().CreateInHands("MSFC_AK74_Redux_Dark");
- gun.GetInventory().CreateAttachment("MSFC_AK_RailHndgrd_DARK");
- gun.GetInventory().CreateAttachment("MSFC_AK_Tactical_Buttstck");
- gun.GetInventory().CreateAttachment("Hx762_suppressor");
- gun.GetInventory().CreateAttachment("Universallight");
- player.GetInventory().CreateInInventory("MSFCBlackCamoBoots");
- player.GetInventory().CreateInInventory("BoonieHat_Olive");
- player.GetInventory().CreateInInventory("MSFCSTALKERMilitaryJacket");
- player.GetInventory().CreateInInventory("Mag_AK74_30Rnd_Black");
- player.GetInventory().CreateInInventory("Mag_AK74_30Rnd_Black");
- player.GetInventory().CreateInInventory("Mag_AK74_30Rnd_Black");
- player.GetInventory().CreateInInventory("Battery9v");
- player.GetInventory().CreateInInventory("MSFCSTALKERMilitaryPants");
- player.GetInventory().CreateInInventory("TAG_Rang3");
- player.GetInventory().CreateInInventory("MSFCSTALKERMilitaryBag");
- player.GetInventory().CreateInInventory("Compass");
- player.GetInventory().CreateInInventory("Canteen");
- player.GetInventory().CreateInInventory("CombatKnife");
- player.GetInventory().CreateInInventory("Rag");
- player.GetInventory().CreateInInventory("Rag");
- player.GetInventory().CreateInInventory("Rag");
- player.GetInventory().CreateInInventory("PeachesCan");
- break;
- case 4:
- // Hero LvL 4
- EntityAI gun = player.GetHumanInventory().CreateInHands("MSFC_AK74_Redux_Dark");
- gun.GetInventory().CreateAttachment("MSFC_AK_RailHndgrd_DARK");
- gun.GetInventory().CreateAttachment("MSFC_AK_Tactical_Buttstck");
- gun.GetInventory().CreateAttachment("Hx762_suppressor");
- gun.GetInventory().CreateAttachment("Universallight");
- player.GetInventory().CreateInInventory("MSFCBlackCamoBoots");
- player.GetInventory().CreateInInventory("BoonieHat_Olive");
- player.GetInventory().CreateInInventory("MSFCSTALKERMilitaryJacket");
- player.GetInventory().CreateInInventory("Mag_AK74_30Rnd_Black");
- player.GetInventory().CreateInInventory("Mag_AK74_30Rnd_Black");
- player.GetInventory().CreateInInventory("Mag_AK74_30Rnd_Black");
- player.GetInventory().CreateInInventory("Battery9v");
- player.GetInventory().CreateInInventory("MSFCSTALKERMilitaryPants");
- player.GetInventory().CreateInInventory("TAG_Rang3");
- player.GetInventory().CreateInInventory("MSFCSTALKERMilitaryBag");
- player.GetInventory().CreateInInventory("Compass");
- player.GetInventory().CreateInInventory("Canteen");
- player.GetInventory().CreateInInventory("CombatKnife");
- player.GetInventory().CreateInInventory("Rag");
- player.GetInventory().CreateInInventory("Rag");
- player.GetInventory().CreateInInventory("Rag");
- player.GetInventory().CreateInInventory("PeachesCan");
- break;
- default:
- break;
- }
- }
- Mission CreateCustomMission(string path)
- {
- return new CustomMission();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement