Guest

[Release] Fishing boat script [UPDATED]

42 posts in this topic

Guest

This is a script to simulate fishing.   They need a burlap sack and have to sit in a boat.

 

Basic fishing script for exile by JackFrost

modify by Serveratze

---------------------------------------------------------------------------------

Step 1

Copy the Folder custom to you Exile.YourMap Folder

---------------------------------------------------------------------------------

Step 2

Copy the Folder overrides to you Exile.YourMap Folder

in the Config.cpp in the ection CfgExileCustomCode you Add:

ExileClient_gui_hud_event_onKeyUp = "overrides\ExileClient_gui_hud_event_onKeyUp.sqf";

---------------------------------------------------------------------------------

Copy the Folder overrides to you Exile.YourMap Folder or the contents of the overrides to your existsting overides folder, if you have one. Or put the override wherever you put your overrides in your Exile.YourMap Folder. Don´t forget to change the path in "overrides\ExileClient_gui_hud_event_onKeyUp.sqf" to "wherever you put your overrides\ExileClient_gui_hud_event_onKeyUp.sqf", if you don´t use the overrides folder...

---------------------------------------------------------------------------------

Use shift key right for Fishing!

---------------------------------------------------------------------------------

Have Fun with this Modification :)

 

GitHub-Code:  https://github.com/serveratze/-EXILE-Fishing-Boat

pic1:

Spoiler

1.jpg

pic2:

Spoiler

2.jpg

pic3:

Spoiler

3.jpg

pic4:

Spoiler

4.jpg

pic5:

Spoiler

5.jpg

pic:6

Spoiler

6.jpg

pic:7

Spoiler

7.jpg

pic:8

Spoiler

8.jpg

pic:9

Spoiler

4.jpg

pic:10

Spoiler

9.jpg

pic: 11

Spoiler

10.jpg

edit: small change

new: added random chance to lose you net

new: [29.9.2017] updated for more realistic

Edited by 110
UPDATED SCRIPT AND PIC's
  • Like 1

Share this post


Link to post
Share on other sites
Advertisement

Step 2

Copy the Folder overrides to you Exile.YourMap Folder or the contents of the overrides to your existsting overides folder, if you have one. Or put the override wherever you put your overrides in your Exile.YourMap Folder. Don´t forget to change the path in "overrides\ExileClient_gui_hud_event_onKeyUp.sqf" to "wherever you put your overrides\ExileClient_gui_hud_event_onKeyUp.sqf", if you don´t use the overrides folder...

:D

Btw, great idea!!!

Installed it, wrote a recipe for burlap sack crafting(don´t we have any nets, like camo nets?), now i am gonna try it.

If i understood right, it works with every boat?

Edited by AlienfromouterSpace

Share this post


Link to post
Share on other sites
Guest
2 hours ago, AlienfromouterSpace said:

If i understood right, it works with every boat?

yes

Share this post


Link to post
Share on other sites

Looks  great :),

Little Suggestions its is possible currently its giving two option catching a fish or not catching a fish you can also adding the destroyed or loss off the net.

I think it will make them better because so players need in example more then one net for an fishing tour. :)

 

That is what i mean

Catching a fish percantages is 85%?

Catching not a fish 15%?   <---  there we go

that is what i mean form this i think it will be better to add the loss option you can loss them or simple not catching a fish.

 

So its always a chance to los you net.

Edited by Sgt. ScrapMetal
  • Like 1

Share this post


Link to post
Share on other sites

Would appreciate if you didn't scrub my name off of credit on this, ripped from our mission file..

Current build atm has only fishing boats able to catch fish, variable chances of fish during rain and how your speed is or if you are in a safezone. A fishing Frenzy zone, where your catch rates are improved.

place "Flag_Larkin_F" in a spot through the editor , set map markers so people know where to go and you are good.

Drop

Quote

/*
 Basic fishing script for exile by JackFrost, redone/reworked by Pattoh.
*/
private["_fisharray","_canAdd","_chance","_FishCenter","_fishzone"];

if !(typeOf(vehicle player) == "CUP_C_Fishing_Boat_Chernarus") exitwith { ["ErrorTitleOnly", ["You need to be in a fishing boat to fish!"]] call ExileClient_gui_toaster_addTemplateToast;};
_canAdd = [player, "Exile_item_tunafilet_raw"] call ExileClient_util_playerCargo_canAdd;
if !(_canAdd) exitwith { ["ErrorTitleAndText", ["Your inventory is full!", "You need more inventory space to carry more fish!"]] call ExileClient_gui_toaster_addTemplateToast;};

if (typeOf(vehicle player) == "CUP_C_Fishing_Boat_Chernarus") then {
    disableUserInput true;
    ["<t color='#ff9900' size = '1'>Throwing net out!</t>",-1,-1,4,1,0,789] spawn BIS_fnc_dynamicText;    
    _chance = 12;
};
if (speed vehicle player >= 5) then {_chance = 16};
if (speed vehicle player <= -5) then {_chance = 18};
if (rain > 0) then { _chance = _chance / 2; ["InfoTitleAndText", ["Its raining!", "You feel your catch rates are increasing!"]] call ExileClient_gui_toaster_addTemplateToast;};
if (ExilePlayerInSafezone) then {_chance = 100; ["ErrorTitleAndText", ["Not many fish here", "Looks like this spot is fished out, best to move out of here."]] call ExileClient_gui_toaster_addTemplateToast;};
    
uisleep 8;
_FishCenter = "Flag_Larkin_F";
_fishzone = count nearestObjects [player, [_FishCenter], 400];

switch (true) do {
case (_fishzone > 0):
{    
    if (random _chance <= 5) then {
        _fisharray = ["Exile_Item_catsharkfilet_raw",
                     "Exile_item_tunafilet_raw",
                     "Exile_item_turtlefilet_raw",
                     "Exile_item_turtlefilet_raw"] call BIS_fnc_selectRandom;
        player addItem _fisharray;
        ["<t color='#ff9900' size = '1'>YOU GOT A BIGGER ONE!</t>",-1,-1,4,1,0,789] spawn BIS_fnc_dynamicText;
        ["InfoTitleAndText", ["Feeding Frenzy!", "The fish are going crazy out here!"]] call ExileClient_gui_toaster_addTemplateToast;
        }
        else
        { 
        ["<t color='#ff9900' size = '1'>You didn't catch anything this time.</t>",-1,-1,4,1,0,789] spawn BIS_fnc_dynamicText;
        };
    };
default 
{
    if (random _chance <= 4) then {
        _fisharray = ["Exile_Item_catsharkfilet_raw",
                     "Exile_Item_MackerelFilet_Raw",
                     "Exile_Item_MackerelFilet_Raw",
                     "Exile_Item_MackerelFilet_Raw",
                     "Exile_Item_mulletFilet_raw",
                     "Exile_Item_mulletFilet_raw",
                     "Exile_Item_mulletFilet_raw",
                     "Exile_item_ornatefilet_raw",
                     "Exile_item_ornatefilet_raw",
                     "Exile_Item_salemaFilet_raw",
                     "Exile_Item_salemaFilet_raw",
                     "Exile_Item_salemaFilet_raw",
                     "Exile_item_tunafilet_raw",
                     "Exile_Item_FinSteak_Raw",
                     "Exile_Item_FinSteak_Raw",
                     "Exile_item_turtlefilet_raw",
                     "Exile_item_turtlefilet_raw"] call BIS_fnc_selectRandom;
        player addItem _fisharray;
        ["<t color='#ff9900' size = '1'>YOU GOT A BIG ONE!</t>",-1,-1,4,1,0,789] spawn BIS_fnc_dynamicText;
        }
        else
        { 
        ["<t color='#ff9900' size = '1'>You didn't catch anything this time.</t>",-1,-1,4,1,0,789] spawn BIS_fnc_dynamicText;
        };
    };
};
uisleep 1;    
disableUserInput false;
 

 

Edited by Pattoh
  • Like 2

Share this post


Link to post
Share on other sites
Guest
2 hours ago, Pattoh said:

Would appreciate if you didn't scrub my name off of credit on this, ripped from our mission file..

Current build atm has only fishing boats able to catch fish, variable chances of fish during rain and how your speed is. A fishing Frenzy zone, where your catch rates are improved.

place "Flag_Larkin_F" in a spot through the editor , set map markers so people know where to go and you are good.

Drop

 

You have a nice copy with more functions.

Edited by 110

Share this post


Link to post
Share on other sites
On 06/07/2017 at 0:07 AM, AlienfromouterSpace said:

Wow, Pattohs script sounds great.

What is needed to make it work with every boat, ship, like in 110`s version?

 

Quote

/*
 Basic fishing script for exile by JackFrost, redone/reworked by Pattoh.
*/
private["_fisharray","_canAdd","_chance","_FishCenter","_fishzone"];

if !(vehicle player isKindOf "Ship") exitwith { ["ErrorTitleOnly", ["You need to be in a boat to fish!"]] call ExileClient_gui_toaster_addTemplateToast;};
_canAdd = [player, "Exile_item_tunafilet_raw"] call ExileClient_util_playerCargo_canAdd;
if !(_canAdd) exitwith { ["ErrorTitleAndText", ["Your inventory is full!", "You need more inventory space to carry more fish!"]] call ExileClient_gui_toaster_addTemplateToast;};

if (vehicle player isKindOf "Ship") then {
    disableUserInput true;
    ["<t color='#ff9900' size = '1'>Throwing net out!</t>",-1,-1,4,1,0,789] spawn BIS_fnc_dynamicText;    
    _chance = 12;
};
if (speed vehicle player >= 5) then {_chance = 16};
if (speed vehicle player <= -5) then {_chance = 18};
if (rain > 0) then { _chance = _chance / 2; ["InfoTitleAndText", ["Its raining!", "You feel your catch rates are increasing!"]] call ExileClient_gui_toaster_addTemplateToast;};
if (ExilePlayerInSafezone) then {_chance = 100; ["ErrorTitleAndText", ["Not many fish here", "Looks like this spot is fished out, best to move out of here!"]] call ExileClient_gui_toaster_addTemplateToast;};
    
uisleep 8;
_FishCenter = "Flag_Larkin_F";
_fishzone = count nearestObjects [player, [_FishCenter], 400];

switch (true) do {
case (_fishzone > 0):
{    
    if (random _chance <= 5) then {
        _fisharray = ["Exile_Item_catsharkfilet_raw",
                     "Exile_item_tunafilet_raw",
                     "Exile_item_turtlefilet_raw",
                     "Exile_item_turtlefilet_raw"] call BIS_fnc_selectRandom;
        player addItem _fisharray;
        ["<t color='#ff9900' size = '1'>YOU GOT A BIGGER ONE!</t>",-1,-1,4,1,0,789] spawn BIS_fnc_dynamicText;
        ["InfoTitleAndText", ["Feeding Frenzy!", "The fish are going crazy out here!"]] call ExileClient_gui_toaster_addTemplateToast;
        }
        else
        { 
        ["<t color='#ff9900' size = '1'>You didn't catch anything this time.</t>",-1,-1,4,1,0,789] spawn BIS_fnc_dynamicText;
        };
    };
default 
{
    if (random _chance <= 4) then {
        _fisharray = ["Exile_Item_catsharkfilet_raw",
                     "Exile_Item_MackerelFilet_Raw",
                     "Exile_Item_MackerelFilet_Raw",
                     "Exile_Item_MackerelFilet_Raw",
                     "Exile_Item_mulletFilet_raw",
                     "Exile_Item_mulletFilet_raw",
                     "Exile_Item_mulletFilet_raw",
                     "Exile_item_ornatefilet_raw",
                     "Exile_item_ornatefilet_raw",
                     "Exile_Item_salemaFilet_raw",
                     "Exile_Item_salemaFilet_raw",
                     "Exile_Item_salemaFilet_raw",
                     "Exile_item_tunafilet_raw",
                     "Exile_Item_FinSteak_Raw",
                     "Exile_Item_FinSteak_Raw",
                     "Exile_item_turtlefilet_raw",
                     "Exile_item_turtlefilet_raw"] call BIS_fnc_selectRandom;
        player addItem _fisharray;
        ["<t color='#ff9900' size = '1'>YOU GOT A BIG ONE!</t>",-1,-1,4,1,0,789] spawn BIS_fnc_dynamicText;
        }
        else
        { 
        ["<t color='#ff9900' size = '1'>You didn't catch anything this time.</t>",-1,-1,4,1,0,789] spawn BIS_fnc_dynamicText;
        };
    };
};
uisleep 1;    
disableUserInput false;
 

 

Edited by Pattoh
  • Like 2

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.