Jump to content

Crate Trader


BoleParty

Recommended Posts

This is my first script so i am asking the smart guys for some assistance. I know that there is an option to merge all scripts and call each single one with a switch do function but i wasn`t able to get it working.

I would highly appreciate it if somebody could point me into right direction.

 

I just started with this whole scripting stuff and what i found out so far is that i dont know nothing.

 

Now i have even more respect for the real coders.

As said, this is my first script and i am sure there are much better options out there and once i got more knowledge i think i will be able to release better ones.
 

 

 

 

Feel free to use and to modify this work but please don`t remove the credits. Thank you.

 

By adding these files to your server in each spawn zone (East/Central/West) on Altis there will be an A.I. unit. This A.I. offers medical treatment and from this A.I. you can buy crates with different loadouts.

Once purchased the crate will spawn in front of you. You can buy as many crates as you want as long you have enough Krypto.

In each script you can change the content and the prices to you liking.


Two options to install the script:

1.)

Unpack your mission and copy the \CrateTrader folder into your mission root.Then copy your unpacked mission to: C:\Users\Yourusername\Arma3\Missions

Start your arma and go to the editor. Choose Altis map and load your epoch mission.

Place as many units or objects on the map wherever you want the action to be activated and add this code to the init field:

"this addaction [""Crate Content"", {[(_this select 1)] execVM ""scripts\CrateTrader\CrateContent.sqf""}];this addaction [""Soldier Kit - Price: 200"", {[(_this select 1)] execVM ""scripts\CrateTrader\SoldierKit.sqf""}];this addaction [""Sniper Kit - Price: 300"", {[(_this select 1)] execVM ""scripts\CrateTrader\SniperKit.sqf""}];this addaction [""Elite Sniper Kit - Price: 1200"", {[(_this select 1)] execVM ""scripts\CrateTrader\EliteSniperKit.sqf""}];this addaction [""Diver Kit - Price: 350 Krypto"", {[(_this select 1)] execVM ""scripts\CrateTrader\DiverKit.sqf""}];this addaction [""MG Kit - Price: 375 Krypto"", {[(_this select 1)] execVM ""scripts\CrateTrader\MGKit.sqf""}];this addaction [""Heavy Gunner Kit - Price: 1250"", {[(_this select 1)] execVM ""scripts\CrateTrader\HeavyGunnerKit.sqf""}];;this addaction [""Combat Medic Kit - Price: 300 Krypto"", {[(_this select 1)] execVM ""scripts\CrateTrader\MedicKit.sqf""}];this addaction [""Demolition Kit - Price: 1000 Krypto"", {[(_this select 1)] execVM ""scripts\CrateTrader\DemoKit.sqf""}];this addaction [""Supply Crate - Price: 400 Krypto"", {[(_this select 1)] execVM ""scripts\CrateTrader\SupplyCrate.sqf""}]; this addaction [""Medical Treatment - Price: 50 Krypto"", {[(_this select 1)] execVM ""scripts\CrateTrader\Heal.sqf""}];this disableAI ""move""; this allowDamage false;";

Save your mission and go back to Desktop and then to C:\Users\Yourusername\Arma3\Missions and repack your mission..

Upload your pbo to your servers \mpmissions folder.



2.)

Unpack your mission and copy the \CrateTrader folder into your mission root.

Replace your mission.sqm with the attached one.

Repack your mission and upload to your server.



Battleye - add these exceptions to scripts.txt:

!"this allowDamage false;" !"_crate allowDamage false;"  to allowDamage line

!"_player setDamage 0;" to setDamage line
 
!"_crate addWeaponCargoGlobal" to addWeaponCargo line

!"_crate addMagazineCargoGlobal" to addMagazineCargo line

!"_crate addItemCargoGlobal" to addItemCargo line

!"_crate addBackpackCargoGlobal" to addBackpackCargo line

 

 

Download here: https://github.com/BoleParty/CrateTrader

Have fun!

Regards

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Discord

×
×
  • Create New...