Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void main()
- {
- //INIT ECONOMY--------------------------------------
- Hive ce = CreateHive();
- if ( ce )
- ce.InitOffline();
- //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);
- }
- }
- }
- //EditorLoaderModule.ExportLootData = true;
- }
- class CustomMission: MissionServer
- {
- void SetRandomHealth(EntityAI itemEnt)
- {
- if ( itemEnt )
- {
- float rndHlt = Math.RandomFloat( 0.45, 0.65 );
- itemEnt.SetHealth01( "", "", rndHlt );
- }
- }
- override PlayerBase CreateCharacter(PlayerIdentity identity, vector pos, ParamsReadContext ctx, string characterName)
- {
- Entity playerEnt;
- playerEnt = GetGame().CreatePlayer( identity, characterName, pos, 0, "NONE" );
- Class.CastTo( m_player, playerEnt );
- GetGame().SelectPlayer( identity, m_player );
- return m_player;
- }
- ref TStringArray admins = {"76561198205607135","76561199156853297","76561198074995392"};
- override void StartingEquipSetup(PlayerBase player, bool clothesChosen)
- {
- EntityAI itemClothing;
- EntityAI itemEnt;
- ItemBase itemBs;
- float rand;
- player.RemoveAllItems();
- for ( int i = 0; i < admins.Count(); ++i )
- if (player.GetIdentity().GetPlainId() == admins[i])
- {
- player.RemoveAllItems();
- player.GetInventory().CreateAttachment("NVGHeadstrap").GetInventory().CreateAttachment("NVGoggles").GetInventory().CreateAttachment("Battery9V");
- player.GetInventory().CreateAttachment("BoonieHat_DPM").GetInventory().CreateAttachment("Bait");
- player.GetInventory().CreateAttachment("Balaclava3Holes_Green");
- EntityAI A1Top = player.GetInventory().CreateAttachment("M65Jacket_Olive");
- A1Top.GetInventory().CreateInInventory("BandageDressing");
- A1Top.GetInventory().CreateInInventory("BandageDressing");
- A1Top.GetInventory().CreateInInventory("CanOpener");
- A1Top.GetInventory().CreateInInventory("Matchbox");
- A1Top.GetInventory().CreateInInventory("Lockpick");
- A1Top.GetInventory().CreateInInventory("TacticalBaconCan_Opened");
- A1Top.GetInventory().CreateInInventory("TacticalBaconCan");
- A1Top.GetInventory().CreateInInventory("Whetstone");
- A1Top.GetInventory().CreateInInventory("SewingKit");
- player.GetInventory().CreateAttachment("Armband_Bohemia");
- player.GetInventory().CreateAttachment("TacticalGloves_Green");
- EntityAI PrimVest = player.GetInventory().CreateAttachment("PlateCarrierVest_Camo");
- PrimVest.GetInventory().CreateAttachment("Grenade_ChemGas");
- PrimVest.GetInventory().CreateAttachment("M18SmokeGrenade_White");
- PrimVest.GetInventory().CreateAttachment("M67Grenade");
- PrimVest.GetInventory().CreateAttachment("FlashGrenade");
- EntityAI Pouches = PrimVest.GetInventory().CreateAttachment("PlateCarrierPouches_Camo");
- EntityAI Mag0 = Pouches.GetInventory().CreateInInventory("Mag_STANAG_30Rnd");
- Pouches.GetInventory().CreateInInventory("Mag_STANAG_30Rnd");
- Pouches.GetInventory().CreateInInventory("Mag_STANAG_30Rnd");
- EntityAI MagD0 = Pouches.GetInventory().CreateInInventory("Mag_MKII_9rnd");
- Pouches.GetInventory().CreateInInventory("Mag_MKII_9rnd");
- Pouches.GetInventory().CreateInInventory("Mag_SVD_10Rnd");
- Pouches.GetInventory().CreateInInventory("Mag_SVD_10Rnd");
- Pouches.GetInventory().CreateInInventory("Mag_SVD_10Rnd");
- EntityAI Holst0 = PrimVest.GetInventory().CreateAttachment("PlateCarrierHolster_Camo");
- EntityAI Gold0 = Holst0.GetInventory().CreateAttachment("MKII_Gold");
- EntityAI PrimBelt = player.GetInventory().CreateAttachment("MilitaryBelt");
- EntityAI Cant0 = PrimBelt.GetInventory().CreateAttachment("Canteen");
- EntityAI PrimNylon = PrimBelt.GetInventory().CreateAttachment("NylonKnifeSheath");
- PrimNylon.GetInventory().CreateInInventory("CombatKnife")
- EntityAI Holst00 = PrimBelt.GetInventory().CreateAttachment("PlateCarrierHolster_Camo");
- Holst00.GetInventory().CreateAttachment("Magnum");
- EntityAI PrimPant = player.GetInventory().CreateAttachment("USMCPants_Woodland");
- EntityAI Rod0 = PrimPant.GetInventory().CreateInInventory("FishingRod").GetInventory().CreateAttachment("Bait");
- player.GetInventory().CreateAttachment("MilitaryBoots_Black").GetInventory().CreateAttachment("FangeKnife");
- EntityAI PrimBag = player.GetInventory().CreateAttachment("AliceBag_Camo");
- EntityAI PrimRadio = PrimBag.GetInventory().CreateAttachment("GPSReceiver").GetInventory().CreateAttachment("Battery9V");
- EntityAI PrimAbox = PrimBag.GetInventory().CreateInInventory("AmmoBox");
- PrimAbox.GetInventory().CreateInInventory("AmmoBox_556x45_20Rnd");
- PrimAbox.GetInventory().CreateInInventory("AmmoBox_556x45_20Rnd");
- PrimAbox.GetInventory().CreateInInventory("AmmoBox_556x45_20Rnd");
- PrimAbox.GetInventory().CreateInInventory("AmmoBox_556x45_20Rnd");
- PrimAbox.GetInventory().CreateInInventory("AmmoBox_556x45_20Rnd");
- PrimAbox.GetInventory().CreateInInventory("AmmoBox_357_20Rnd");
- PrimAbox.GetInventory().CreateInInventory("AmmoBox_357_20Rnd");
- PrimAbox.GetInventory().CreateInInventory("AmmoBox_357_20Rnd");
- PrimAbox.GetInventory().CreateInInventory("AmmoBox_357_20Rnd");
- PrimAbox.GetInventory().CreateInInventory("AmmoBox_357_20Rnd");
- PrimAbox.GetInventory().CreateInInventory("AmmoBox_762x54_20Rnd");
- PrimAbox.GetInventory().CreateInInventory("AmmoBox_762x54_20Rnd");
- PrimAbox.GetInventory().CreateInInventory("AmmoBox_762x54_20Rnd");
- PrimAbox.GetInventory().CreateInInventory("AmmoBox_762x54_20Rnd");
- PrimAbox.GetInventory().CreateInInventory("AmmoBox_762x54_20Rnd");
- PrimBag.GetInventory().CreateAttachment("Chemlight_Green");
- EntityAI Axe0 = PrimBag.GetInventory().CreateInInventory("FirefighterAxe_Green");
- EntityAI FirstA0 = PrimBag.GetInventory().CreateInInventory("FirstAidKit");
- FirstA0.GetInventory().CreateInInventory("VitaminBottle");
- FirstA0.GetInventory().CreateInInventory("TetracyclineAntibiotics");
- FirstA0.GetInventory().CreateInInventory("PurificationTablets");
- FirstA0.GetInventory().CreateInInventory("BloodTestKit");
- EntityAI FirstA00 = PrimBag.GetInventory().CreateInInventory("FirstAidKit");
- FirstA00.GetInventory().CreateInInventory("Epinephrine");
- FirstA00.GetInventory().CreateInInventory("Morphine");
- FirstA00.GetInventory().CreateInInventory("AntiChemInjector");
- FirstA00.GetInventory().CreateInInventory("BloodTestKit");
- EntityAI PrimGun0 = player.GetHumanInventory().CreateInHands("M4A1");
- PrimGun0.GetInventory().CreateAttachment("M4_RISHndgrd");
- PrimGun0.GetInventory().CreateAttachment("M4_CQBBttstck");
- PrimGun0.GetInventory().CreateAttachment("M4_Suppressor");
- PrimGun0.GetInventory().CreateAttachment("ACOGOptic");
- PrimGun0.GetInventory().CreateAttachment("UniversalLight").GetInventory().CreateAttachment("Battery9V");
- EntityAI PrimGun00 = player.GetHumanInventory().CreateAttachment("SVD");
- PrimGun00.GetInventory().CreateAttachment("AK_Suppressor");
- PrimGun00.GetInventory().CreateAttachment("PSO1Optic").GetInventory().CreateAttachment("Battery9V");
- player.SetQuickBarEntityShortcut(PrimGun0, 0, true);
- player.SetQuickBarEntityShortcut(Mag0, 1, true);
- player.SetQuickBarEntityShortcut(Gold0, 2, true);
- player.SetQuickBarEntityShortcut(MagD0, 3, true);
- player.SetQuickBarEntityShortcut(Axe0, 4, true);
- player.SetQuickBarEntityShortcut(PrimAbox, 5, true);
- player.SetQuickBarEntityShortcut(FirstA0, 6, true);
- rand = Math.RandomFloatInclusive(0.0, 1.0);
- if ( rand < 0.25 )
- itemEnt = player.GetInventory().CreateInInventory("SodaCan_Cola");
- else if ( rand > 0.75 )
- itemEnt = player.GetInventory().CreateInInventory("SodaCan_Spite");
- else
- itemEnt = player.GetInventory().CreateInInventory("SodaCan_Pipsi");
- SetRandomHealth(itemEnt);
- rand = Math.RandomFloatInclusive(0.0, 1.0);
- if ( rand < 0.35 )
- itemEnt = player.GetInventory().CreateInInventory("Apple");
- else if ( rand > 0.65 )
- itemEnt = player.GetInventory().CreateInInventory("Pear");
- else
- itemEnt = player.GetInventory().CreateInInventory("Plum");
- player.GetStatWater().Set( 900 );
- player.GetStatEnergy().Set( 1100 );
- }
- switch (Math.RandomInt(0, 9))
- {
- // -------------- Soldier -------------
- case 0:
- EntityAI Top0 = player.GetInventory().CreateAttachment("TShirt_Green");
- player.GetInventory().CreateAttachment("TTSKOPants");
- player.GetInventory().CreateAttachment("MilitaryBoots_Black");
- Top0.GetInventory().CreateInInventory("TacticalBaconCan");
- Top0.GetInventory().CreateInInventory("BandageDressing");
- EntityAI WB0 = Top0.GetInventory().CreateInInventory("WaterBottle");
- player.GetInventory().CreateInInventory("CombatKnife");
- player.GetInventory().CreateInInventory("Mag_MKII_10Rnd");
- EntityAI kn = player.GetHumanInventory().CreateInHands("MKII");
- player.SetQuickBarEntityShortcut(kn, 0, true);
- player.SetQuickBarEntityShortcut(WB0, 1, true);
- break;
- // -------------- Paramedic -------------
- case 1:
- EntityAI Top1 = player.GetInventory().CreateAttachment("ParamedicJacket_Green");
- player.GetInventory().CreateAttachment("SurgicalMask");
- player.GetInventory().CreateAttachment("SurgicalGloves_Green");
- player.GetInventory().CreateAttachment("ParamedicPants_Green");
- Top1.GetInventory().CreateInInventory("SalineBagIV");
- Top1.GetInventory().CreateInInventory("BandageDressing");
- player.GetInventory().CreateAttachment("AthleticShoes_Green");
- EntityAI WB1 = Top1.GetInventory().CreateInInventory("WaterBottle");
- player.GetInventory().CreateInInventory("SteakKnife");
- player.GetInventory().CreateInInventory("Mag_MKII_10Rnd");
- EntityAI kn1 = player.GetHumanInventory().CreateInHands("MKII");
- player.SetQuickBarEntityShortcut(kn1, 0, true);
- player.SetQuickBarEntityShortcut(WB1, 1, true);
- break;
- // -------------- Office worker -------------
- case 2:
- EntityAI Top2 = player.GetInventory().CreateAttachment("ManSuit_Black");
- player.GetInventory().CreateAttachment("SlacksPants_Black");
- player.GetInventory().CreateAttachment("DressShoes_Black");
- Top2.GetInventory().CreateInInventory("SodaCan_Cola");
- Top2.GetInventory().CreateInInventory("TunaCan");
- player.GetInventory().CreateAttachment("ThinFramesGlasses");
- Top2.GetInventory().CreateInInventory("BandageDressing");
- EntityAI WB2 = Top2.GetInventory().CreateInInventory("WaterBottle");
- player.GetInventory().CreateInInventory("KitchenKnife");
- player.GetInventory().CreateInInventory("Mag_MKII_10Rnd");
- EntityAI kn2 = player.GetHumanInventory().CreateInHands("MKII");
- player.SetQuickBarEntityShortcut(kn2, 0, true);
- player.SetQuickBarEntityShortcut(WB2, 1, true);
- break;
- // -------------- Biker -------------
- case 3:
- EntityAI Top3 = player.GetInventory().CreateAttachment("RidersJacket_Black");
- player.GetInventory().CreateAttachment("Jeans_Black");
- player.GetInventory().CreateAttachment("MotoHelmet_Red");
- player.GetInventory().CreateAttachment("HikingBootsLow_Black");
- Top3.GetInventory().CreateInInventory("Matchbox");
- Top3.GetInventory().CreateInInventory("KitchenKnife");
- Top3.GetInventory().CreateInInventory("BandageDressing");
- EntityAI WB3 = Top3.GetInventory().CreateInInventory("WaterBottle");
- player.GetInventory().CreateInInventory("NailedBaseballBat");
- player.GetInventory().CreateInInventory("Mag_MKII_10Rnd");
- EntityAI kn3 = player.GetHumanInventory().CreateInHands("MKII");
- player.SetQuickBarEntityShortcut(kn3, 0, true);
- player.SetQuickBarEntityShortcut(WB3, 1, true);
- break;
- // -------------- Hiker -------------
- case 4:
- EntityAI Top4 = player.GetInventory().CreateAttachment("HikingJacket_Red");
- player.GetInventory().CreateAttachment("Ushanka_Black");
- player.GetInventory().CreateAttachment("AthleticShoes_Blue");
- player.GetInventory().CreateAttachment("CargoPants_Blue");
- player.GetInventory().CreateAttachment("CivilianBelt");
- Top4.GetInventory().CreateInInventory("Heatpack");
- Top4.GetInventory().CreateInInventory("BandageDressing");
- EntityAI WB4 = Top4.GetInventory().CreateInInventory("WaterBottle");
- player.GetInventory().CreateInInventory("KitchenKnife");
- player.GetInventory().CreateInInventory("Mag_MKII_10Rnd");
- EntityAI kn4 = player.GetHumanInventory().CreateInHands("MKII");
- player.SetQuickBarEntityShortcut(kn4, 0, true);
- player.SetQuickBarEntityShortcut(WB4, 1, true);
- break;
- // -------------- Cop -------------
- case 5:
- EntityAI Top5 = player.GetInventory().CreateAttachment("PoliceJacket");
- player.GetInventory().CreateAttachment("PoliceCap");
- player.GetInventory().CreateAttachment("PolicePants");
- player.GetInventory().CreateAttachment("CombatBoots_Grey");
- Top5.GetInventory().CreateInInventory("Handcuffs");
- Top5.GetInventory().CreateInInventory("HandcuffKeys");
- Top5.GetInventory().CreateInInventory("PersonalRadio").GetInventory().CreateInInventory("Battery9V");
- Top5.GetInventory().CreateInInventory("BandageDressing");
- EntityAI WB5 = Top5.GetInventory().CreateInInventory("WaterBottle");
- player.GetInventory().CreateInInventory("KitchenKnife");
- player.GetInventory().CreateInInventory("Mag_MKII_10Rnd");
- EntityAI kn5 = player.GetHumanInventory().CreateInHands("MKII");
- player.SetQuickBarEntityShortcut(kn5, 0, true);
- player.SetQuickBarEntityShortcut(WB5, 1, true);
- break;
- // -------------- Lumberjack -------------
- case 6:
- EntityAI Top6 = player.GetInventory().CreateAttachment("Shirt_RedCheck");
- player.GetInventory().CreateAttachment("Jeans_Blue");
- player.GetInventory().CreateAttachment("WorkingBoots_Brown");
- player.GetInventory().CreateAttachment("Ushanka_Green");
- Top6.GetInventory().CreateInInventory("BandageDressing");
- EntityAI WB6 = player.GetInventory().CreateInInventory("WaterBottle");
- player.GetInventory().CreateInInventory("Hatchet");
- player.GetInventory().CreateInInventory("Mag_MKII_10Rnd");
- EntityAI kn6 = player.GetHumanInventory().CreateInHands("MKII");
- player.SetQuickBarEntityShortcut(kn6, 0, true);
- player.SetQuickBarEntityShortcut(WB6, 1, true);
- break;
- // -------------- Hood -------------
- case 7:
- EntityAI Top7 = player.GetInventory().CreateAttachment("TShirt_White");
- player.GetInventory().CreateAttachment("Crowbar");
- player.GetInventory().CreateAttachment("WorkingGloves_Black");
- player.GetInventory().CreateAttachment("Balaclava3Holes_Black");
- player.GetInventory().CreateAttachment("TrackSuitPants_Black");
- player.GetInventory().CreateAttachment("AthleticShoes_Black");
- Top7.GetInventory().CreateInInventory("BandageDressing");
- EntityAI WB7 = Top7.GetInventory().CreateInInventory("WaterBottle");
- player.GetInventory().CreateInInventory("KitchenKnife");
- player.GetInventory().CreateInInventory("Mag_MKII_10Rnd");
- EntityAI kn7 = player.GetHumanInventory().CreateInHands("MKII");
- player.SetQuickBarEntityShortcut(kn7, 0, true);
- player.SetQuickBarEntityShortcut(WB7, 1, true);
- break;
- // -------------- Fireman -------------
- case 8:
- EntityAI Top8 = player.GetInventory().CreateAttachment("FirefighterJacket_Beige");
- player.GetInventory().CreateAttachment("FirefightersPants_Beige");
- player.GetInventory().CreateAttachment("FirefightersHelmet_White");
- player.GetInventory().CreateAttachment("WorkingBoots_Yellow");
- Top8.GetInventory().CreateInInventory("BandageDressing");
- EntityAI WB8 = Top8.GetInventory().CreateInInventory("WaterBottle");
- player.GetInventory().CreateInInventory("FirefighterAxe");
- player.GetInventory().CreateInInventory("Mag_MKII_10Rnd");
- EntityAI fa8 = player.GetHumanInventory().CreateInHands("MKII");
- player.SetQuickBarEntityShortcut(fa8, 0, true);
- player.SetQuickBarEntityShortcut(WB8, 1, true);
- break;
- }
- // ----- Loot Para Todos -------------
- player.GetInventory().CreateInInventory("AmmoBox_22_50Rnd");
- player.GetInventory().CreateInInventory("Pen_Blue");
- player.GetInventory().CreateInInventory("BakedBeansCan_Opened");
- player.GetInventory().CreateInInventory("TunaCan");
- string chemlightArray[] = { "Chemlight_White", "Chemlight_Yellow", "Chemlight_Green", "Chemlight_Red" };
- int rndIndex = Math.RandomInt(0, 4);
- itemEnt = player.GetInventory().CreateInInventory(chemlightArray[rndIndex]);
- SetRandomHealth(itemEnt);
- rand = Math.RandomFloatInclusive(0.0, 1.0);
- if ( rand < 0.35 )
- itemEnt = player.GetInventory().CreateInInventory("Apple");
- else if ( rand > 0.65 )
- itemEnt = player.GetInventory().CreateInInventory("Pear");
- else
- itemEnt = player.GetInventory().CreateInInventory("Plum");
- SetRandomHealth(itemEnt);
- }
- };
- Mission CreateCustomMission(string path)
- {
- return new CustomMission();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement