GolovaRaoul 221 Report post Posted September 20, 2017 (edited) Hello there! This is a very simple "script", which makes you able to harvest weed and get something in return for that. I put "script" between quotes because I can barely call this a script because it's like 10 lines or something. Basically what this script does, is at the moment you are near a weed plant and you have a Knife (Exile_Item_Knife) in your inventory, you get a scroll action and once you fire that, it will delete the nearest weed plant, play an animation which cannot be interrupted and add an item to your inventory (CUP_Item_Money). Note: weed plants are a part of the mod "CUP - Core", and as far as I know there are no weed plants in vanilla ArmA 3. Another note, there's no "Kilo of Hemp" item available in ArmA or any mod that I'm aware of, so I choose to give the player an item called "CUP_Item_Money" so atleast he has something physical instead of just adding poptabs. You can change the reward to anything you want. How to install? Open up config.cpp located clientside (Exile.Chernarus.PBO for example) Locate CfgInteractionMenus After this code: Spoiler class CfgInteractionMenus { Add this: Spoiler class Weed { targetType = 2; target = "CUP_p_fiberPlant_EP1"; class Actions { class HarvestWeed: ExileAbstractAction { title = "Harvest the Weed"; condition = "('Exile_Item_Knife' in (magazines player) && !ExilePlayerInSafezone)"; action = "Custom\weed.sqf"; }; }; }; Note that it says action = Custom\weed.sqf. This is the path for the script, you can change this to anything you like. Create a new file at the path given, and paste the following content into that file: Spoiler /* Harvest the good shit by GolovaRaoul */ private ["_player","_weed"]; switch (true) do { disableUserInput true; _weed = nearestObject [player, "CUP_p_fiberPlant_EP1"]; deleteVehicle _weed; systemChat "Started Harvesting the Good Shit Man"; if(vehicle player != player) exitWith {}; for "_i" from 0 to 2 do { player playMove "AinvPercMstpSnonWnonDnon_Putdown_AmovPercMstpSnonWnonDnon"; waitUntil{animationState player != "AinvPercMstpSnonWnonDnon_Putdown_AmovPercMstpSnonWnonDnon";}; sleep 2.5; }; systemChat "You hands are all sticky, but you harvested some good shit man! Go sell the money at Trader City!"; disableUserInput false; player addItem "CUP_Item_Money" exitWith{}; }; Last but not least, don't forget to add the item you are giving the player to the traders. You can easily do this by looking at your config.cpp clientside (again), and Ctrl + F for CfgExileArsenal. Add the following line somewhere at in the class: Spoiler class CUP_item_Money { quality = 1; price = 75000; sellPrice = 15000; }; Ur done m8! Hope the install instructions are clear and someone can use this for their own server Have fun!! GolovaRaoul Edited September 20, 2017 by GolovaRaoul 9 Share this post Link to post Share on other sites
GolovaRaoul 221 Report post Posted September 23, 2017 Here's a demonstration of the script 5 Share this post Link to post Share on other sites
AlienfromouterSpace 25 Report post Posted September 29, 2017 One dumb question, how do the plants come to the map? It would be nice if we could sow some kind of seeds and grow the plants. Any posibility for this? Share this post Link to post Share on other sites
Riker2335 171 Report post Posted September 29, 2017 Works as advertised @AlienfromouterSpace the script was created by GolovaRaoul for the purposes of harvesting the plants from a weed mission he created and released on the forums. The mission is what you can see him doing in the video posted above. Currently, you'd have to spawn the plants in with a mission or actually place them on the map in a fixed location. If you want to setup some sort of growth system, someone is going to have to figure out how to do that within the bounds of the Exile territory system with restart monitoring & database entries. It wouldn't be impossible, you'd either need to do it yourself or see if you can inspire someone on the forums to have a go. The last option would be to look through Golovaraoul's recent releases as he released a bunch of missions which operate like the old DayZ Ikea mission where they pop up for a short time with a general area marked on the map and players have to hunt for the loot. You might be able to edit this (if Golova didn't include it in the pack) to drop in a pile of weed plants instead.... not quite what you had in mind but might be fun. 2 Share this post Link to post Share on other sites
AlienfromouterSpace 25 Report post Posted September 30, 2017 Thanks, Riker I am just waiting for my new video card, my computer doctor is on it´s way with some fresh organs to implant, guess in two hours he will be here... yippieh! And i think you are talking about the 4Types of Side Events. They are waiting on my desktop, like the harvest hemp thing and Lord Ramparts Loot Search script, till i don´t have to use onboard graphics anymore. I will play around with them later, after my machine is fixed. Can´t wait for it! Main thing is that the herbs come to the map somehow, i am not good in putting things on my map. Tried it once and failed miserably... And for the growth system, i think that would be a great addition to Exile, for the survival part. It would be a good way to dodge conflicts, if people want to chill maybe rather than to fight for a while, but nevertheless make some money. "Guerrilla Farming", hidden in the jungle somewhere, like those Moonshiners in the states... 2 Share this post Link to post Share on other sites
AlienfromouterSpace 25 Report post Posted October 9, 2017 I have a question. I don´t want to use Cup Core, it´s too big to upload at 10Mbit/s upload speed. And i only would use the one plant and nothing else of it. So i found a hemp plant on Armaholic, made it a local mod and used this instead of the Cup plant. Everything worked fine with the weed part of the 4 types of events script, the plants spawned and looked very realistic. But i couldn´t harvest them. Might it be that the other hemp model is the cause, because i checked everything several times, installed and uninstalled several times, but i can´t "cut down the herbs, man"... Share this post Link to post Share on other sites
dima054 59 Report post Posted October 9, 2017 @AlienfromouterSpace Find out model name from that mod and change it in script. 2 Share this post Link to post Share on other sites
AlienfromouterSpace 25 Report post Posted October 9, 2017 44 minutes ago, dima054 said: @AlienfromouterSpace Find out model name from that mod and change it in script. That´s what i did, but unfortunately it didn´t work. But to be sure i will try it once more, i installed three or four different things that day. Share this post Link to post Share on other sites
dima054 59 Report post Posted October 9, 2017 (edited) Did you change it in both pieces of code? Does menu item "Harvest the Weed" come up? Edited October 9, 2017 by dima054 1 Share this post Link to post Share on other sites
AlienfromouterSpace 25 Report post Posted October 11, 2017 Sorry that i answer that late, a lot of stuff to do the last days. Yes, i installed it again, checked everything a thousand times, everything was right. I think it has got something to do with the plant model. Maybe Lord Rampant Hump can create a nice weed plant for us, will ask him. Share this post Link to post Share on other sites