Search the Community
Showing results for tags 'vendor'.
Found 1 result
-
ravage (WIP) Weapon Attachment Trader Script for Ravage
Vandeanson posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
(WIP) Weapon Attachment Trader Script for Ravage Fellow Ravagers, in case you want to be able to buy weapon attachments such as scopes, silencers, flashlight or laser pointers in your Ravage mission, in addition to the original Ravage traders, look no further;) Functions of the script - Spawns a trader at a marker position (multiple markers are possible if you want the trader to move around) - Matching attachments for weapons as defined per array - the first item the trader sells matches the players current weapon (if carrying any) - uses rvg_money as currency - checks if you have enough money and enough space in your inventory before you are able to buy an item - the base price per item is set at 90 with some randomization (per item sold) each time the script is triggered - currently the items sold refresh after you select "Back" in the scroll menu. Each time you press back you get to call for new items to be offered. - after successfully buying an item, the position will be removed from the scroll menue How to create, use and Install the script: Step 1 - init.sqf 1. Open notepad. 2. Copy this code -------> [] execVM "TraderspawnAtt.sqf"; 3. Paste the code into your notepad doc. 4. Save the notepad document with this name -----> init.sqf 5. Move the init.sqf to your mission folder. =================================== Note - if you already have an init.sqf then just add the code from 2 to it. init.sqf: Step 2 - Back.sqf 1. Open notepad. 2. Copy this code ------> from the spoiler below 3. Paste the code into your notepad doc. 4. Save the notepad document with this name ------> Back.sqf 5. Move the Back.sqf to your mission folder. ========================================= Back.sqf : Step 3 - TraderspawnAtt.sqf 1. Open notepad. 2. Copy this code ------> from the spoiler below 3. Paste the code into your notepad doc. 4. Save the notepad document with this name ------> TraderspawnAtt.sqf 5. Move the TraderspawnAtt.sqf to your mission folder. ========================================= TraderspawnAtt.sqf OR: add custom items: If you want to define the attachments that may be sold by yourself, copy the below code into TraderspawnAtt.sqf instead of the above and add your attachment classnames in the array AttachementArray =["classname1","classname2"]; Script Dependencies: - Ravage mod is required to run this script - CBA (required by Ravage) Using the script without Ravage mod: If you want to use this without the Ravage and CBA mod, you would replace the currency ("rvg_money") with whatever classname of an item that you use as currency. Setting up the Script in the editor: 1. Start your mission via editor and place markers named: mrkrTR_1 2. To name a marker, add the above name into the Variable Names field like this: mrkrTR_1 Place your player and start your mission. Personalize the script - (additional markers) The trader will keep respawning at one location, if only one marker is placed. 1. To place more markers and achieve that the trader is "moving around", just add additional marker names under _traderspawn = [.....]. in the script. 2. The last marker needs to end without comma "mrkrTR_5"];. Leaving a comma at the end of the array "mrkrTR_5,"]; would not work. 3. Place the new markers on the map. Adding items The script selects Weapon Attachments based on randomly selected weapons from WeaponArray =[...]; Add remove weapons there to ensure attachments that match your weapons will spawn. To Dos: - find a way to sell back Weapon Attachments (to a lower price) - general code/script optimization and simplification - i might add some delay before the item list can be refreshed with "Back". - gather your input and change stuffs to make it better;) - MP not tested, happy to receive input on how to make this MP friendly Other stuff that is in the pipeline @ Vandeansons script factory: - Different Tier of traders connected to a reputation system (would be a separate script) - Vehicle trader (Planes, Helis, Cars,...) - currency exchange to allow for two different money systems (e.g. trader ravage currency versus the currency from HG Simple Shops) - Adaptation of the EDN_Fortification Base building mod to include it into your Ravage mission (spawn in collectible Blueprints, spawn in building materials, customize and add own blueprints) - Dynamic and infinite ongoing task generator connected to reward system (e.g. Money, equipment...) - tasks are either automatically assigned one after the other upon completion or document folders are spawned into in buildings around the player that, after collecting it, will assign a new task =================================== Changelog v.0.1 2018.08.22 - release of working version