Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- class CustomMission: MissionGameplay
- {
- void CustomMission()
- {
- }
- };
- Mission CreateCustomMission(string path)
- {
- return new CustomMission();
- }
- */
- void SetRandomHealth(EntityAI itm)
- {
- int rndHlt = Math.RandomInt(40,100);
- itm.SetHealth("","",rndHlt);
- }
- void main()
- {
- vector player_pos;
- int index;
- TVectorArray positions = {"2383.05 0 7945.36"};
- TStringArray tops = {"Hoodie_Blue","Hoodie_Black","Hoodie_Brown","Hoodie_Green","Hoodie_Grey","Hoodie_Red"};
- TStringArray pants = {"Jeans_Black","Jeans_BlueDark","Jeans_Blue","Jeans_Brown","Jeans_Green","Jeans_Grey","CanvasPants_Beige","CanvasPants_Blue","CanvasPants_Grey"};
- TStringArray shoes = {"AthleticShoes_Black","AthleticShoes_Blue","AthleticShoes_Brown","AthleticShoes_Green","AthleticShoes_Grey"};
- Print(positions);
- index = Math.RandomInt(0, positions.Count() );
- player_pos = positions.Get(index);
- Print(player_pos);
- Entity playerEnt = GetGame().CreatePlayer( NULL, GetGame().CreateRandomPlayer(), player_pos, 0, "NONE");
- PlayerBase player = (PlayerBase) playerEnt;
- EntityAI item = player.GetInventory().CreateInInventory(tops.GetRandomElement());
- EntityAI item2 = player.GetInventory().CreateInInventory(pants.GetRandomElement());
- EntityAI item3 = player.GetInventory().CreateInInventory(shoes.GetRandomElement());
- EntityAI itemEnt;
- EntityAI itemIn;
- ItemBase itemBs;
- int rndQnt;
- itemEnt = player.GetInventory().CreateInInventory("Rag");
- itemBs = ItemBase.Cast(itemEnt);
- itemBs.SetQuantity(4);
- SetRandomHealth(itemEnt);
- itemEnt = player.GetInventory().CreateInInventory("Mag_IJ70_8Rnd");
- SetRandomHealth(itemEnt);
- itemEnt = player.GetInventory().CreateInInventory("HuntingKnife");
- SetRandomHealth(itemEnt);
- itemEnt = player.GetInventory().CreateInInventory("MakarovIJ70");
- SetRandomHealth(itemEnt);
- player.SetQuickBarEntityShortcut(itemEnt, 2);
- itemIn = itemEnt.GetInventory().CreateAttachment("Mag_IJ70_8Rnd");
- SetRandomHealth(itemIn);
- itemEnt = player.GetInventory().CreateInInventory("Izh18");
- SetRandomHealth(itemEnt);
- player.SetQuickBarEntityShortcut(itemEnt, 0);
- itemBs = ItemBase.Cast(itemEnt);
- itemBs.SetQuantity(rndQnt);
- itemEnt = player.GetInventory().CreateInInventory("Ammo_762x39");
- rndQnt = Math.RandomInt(5,20);
- SetRandomHealth(itemEnt);
- player.SetQuickBarEntityShortcut(itemEnt, 1);
- itemEnt = player.GetInventory().CreateInInventory("Ammo_380");
- SetRandomHealth(itemEnt);
- GetGame().SelectPlayer(NULL, player);
- //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 myHive = CreateHive();
- if( myHive )
- {
- myHive.InitOffline();
- }
- //DATE RESET AFTER ECONOMY INIT-------------------------
- int year;
- int month;
- int day;
- int hour;
- int minute;
- GetGame().GetWorld().GetDate(year, month, day, hour, minute);
- GetTesting().ExportProxyData("7500 0 7500", 10000); //Centre of map, radius of how far to go out and find buildings.
- if (((month <= 9) && (day < 20)) || ((month >= 10) && (day > 20)))
- {
- month = 9;
- day = 20;
- GetGame().GetWorld().SetDate(year, month, day, hour, minute);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement