GolovaRaoul

Harvest Weed

28 posts in this topic

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?

  1. Open up config.cpp located clientside (Exile.Chernarus.PBO for example)
  2. Locate CfgInteractionMenus
  3. 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";
                };
            };
        };

     

  4. 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{};
    };

     

  5. 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.

  6. Add the following line somewhere at in the class:
     

    Spoiler

    class CUP_item_Money                            { quality = 1; price = 75000; sellPrice = 15000; };

     

  7. Ur done m8!

Hope the install instructions are clear and someone can use this for their own server :)

Have fun!!
GolovaRaoul

Edited by GolovaRaoul
  • Like 9

Share this post


Link to post
Share on other sites
Advertisement

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.

  • Like 2

Share this post


Link to post
Share on other sites

Thanks, Riker :D

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... :D

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... :bandit:

 

  • Like 2

Share this post


Link to post
Share on other sites

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"... :D

Share this post


Link to post
Share on other sites

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.

:D

Share this post


Link to post
Share on other sites
Advertisement

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

  • Recently Browsing   0 members

    No registered users viewing this page.