Jump to content

Quest System for Maverick Talent Tree


Recommended Posts

 

RELIC QUESTING SYSTEM

[Complete] You may attempt to install this, let me know if it works.

6942B329EE217AD42A69072FE321065F93E605B7

 

 

Disclaimer: I have been given permission to release my work of the questing system added into maverick apps modular talent tree

 

Requirements: Have a valid purchased copy of maverick apps modular talent tree

 

What this does: Adds a questing system to your talent tree, giving experience per quest completion and..

- Stage 1: Find the 4 relics hidden around the map, bring them to an NPC for a reward [unlocks quest 2]

- Stage 2: Rob the gold convoy (another maverick apps script) to receive the next relic and bring it to the NPC [unlocks quest 3]

- Stage 3: Rob the federal reserve to receive the last relic, allowing you to collect a expensive virtual item from a new zone I've added in.

 

Features:

- Cannot trade relics to other players

- Anti market trading of relics

- Removal of the relics on player death to stop transfer of the virtual items

- (optional) Complete rework of the federal reserve system to simply give money + virtual items, experience, etc.

 

___________________________________________________________________________________________________________________________________________________________________________________

TUTORIAL

___________________________________________________________________________________________________________________________________________________________________________________

 

Mission.SQM:

1. Place this into 4 separate objects on your map that you place, I used statues:

this addAction["Collect Relic",life_fnc_relic1,"",0,false,false,"",'playerSide == civilian && vehicle player == player && player distance _target < 4'];

Replace 'life_fnc_relic1' with relic1 -> relic4 for each

 

2. Place this into an NPC, it will be your relic dealer, your players must trade the relics to him for rewards:

this addAction["Trade in your relics for the reward",life_fnc_relicReward,"",0,false,false,"",'playerSide == civilian && vehicle player == player && player distance _target < 4'];        this addAction["Trade in your transport relic",life_fnc_relicRewardTransport,"",0,false,false,"",'playerSide == civilian && vehicle player == player && player distance _target < 4'];             this addAction["Trade in your federal reserve relic",life_fnc_relicRewardFed,"",0,false,false,"",'playerSide == civilian && vehicle player == player && player distance _target < 4'];        this addAction[localize"STR_Shops_Archeologist",life_fnc_virt_menu,"archeologist"];

 

 

Functions:

1. Download Quests.rar

2. Place it in your core folder

3. Open functions.h, place this block somewhere in life_client_core

class Quests {
        file = "core\quests\Relics";
        class relic1 {};
        class relic2 {};
        class relic3 {};
        class relic4 {};
        class relicReward {};
        class relicRewardTransport {};
        class relicRewardFed {};
    };

 

 

Virtual Items:

1. Edited by moderators: please get your own icons, original icons were from copyrighted sources

2. place them in your icons folder (make sure the virtual items code listed below calls to right location)'

3. Open Config_Vitems and place these in class VirtualItems:

//relics
    class relic1 {
        variable = "relic1";
        displayName = "STR_Item_relic1";
        weight = 3;
        buyPrice = -1;
        sellPrice = -1;
        illegal = false;
        edible = -1;
        icon = "images\icons\ico_relic1.paa";
    };
    class relic2 {
        variable = "relic2";
        displayName = "STR_Item_relic2";
        weight = 3;
        buyPrice = -1;
        sellPrice = -1;
        illegal = false;
        edible = -1;
        icon = "images\icons\ico_relic2.paa";
    };
    class relic3 {
        variable = "relic3";
        displayName = "STR_Item_relic3";
        weight = 3;
        buyPrice = -1;
        sellPrice = -1;
        illegal = false;
        edible = -1;
        icon = "images\icons\ico_relic3.paa";
    };
    class relic4 {
        variable = "relic4";
        displayName = "STR_Item_relic4";
        weight = 3;
        buyPrice = -1;
        sellPrice = -1;
        illegal = false;
        edible = -1;
        icon = "images\icons\ico_relic4.paa";
    };
    //relicTransport
    class relicTransport {
        variable = "relicTransport";
        displayName = "STR_Item_relicTransport";
        weight = 3;
        buyPrice = -1;
        sellPrice = -1;
        illegal = true;
        edible = -1;
        icon = "images\icons\ico_relicTransport.paa";
    };
    //RelicFed
    class relicFed {
        variable = "relicFed";
        displayName = "STR_Item_relicFed";
        weight = 3;
        buyPrice = -1;
        sellPrice = -1;
        illegal = true;
        edible = -1;
        icon = "images\icons\ico_relicFed.paa";
    };
    //relic end

 

 

4. Somewhere at the end of your federal reserve robbery reward file, place this so the player gains the relic upon completion

[true,"relicFed",1] call life_fnc_handleInv;

or make it so it appears in the box, but i recommend the first option

 

5. In configuration.sqf, place these below life_civGang = grpNull;

mav_ttm_var_relicReward = 0;
mav_ttm_var_relicReward2 = 0;
mav_ttm_var_relicReward3 = 0;

 

6. Open fn_dropItems, place these in the switch (_item) do array:

//nodrop
        case "relic1": {
            if (_value > 0) then {
                missionNamespace setVariable [_itemName,0];
            };
        };
        case "relic2": {
            if (_value > 0) then {
                missionNamespace setVariable [_itemName,0];
            };
        };
        case "relic3": {
            if (_value > 0) then {
                missionNamespace setVariable [_itemName,0];
            };
        };
        case "relic4": {
            if (_value > 0) then {
                missionNamespace setVariable [_itemName,0];
            };
        };
        case "relicTransport": {
            if (_value > 0) then {
                missionNamespace setVariable [_itemName,0];
            };
        };
        case "relicFed": {
            if (_value > 0) then {
                missionNamespace setVariable [_itemName,0];
            };
        };

 

7. Open fn_giveItem.sqf, place this under: if (isNull _unit) exitWith {ctrlShow[2002,true];};

if (_item == "relic1" || _item == "relic2" || _item == "relic3" || _item == "relic4" || _item == "relicTransport" || _item == "relicFed") exitWith { hint "You cannot trade these items"};

 

8. open fn_ vehStoreItem, place this underneath: if (_ctrl == "goldbar" && {!(life_trunk_vehicle isKindOf "LandVehicle")})

//Relic
if (_ctrl == "relic1" || _ctrl == "relic2" || _ctrl == "relic3" || _ctrl == "relic4" || _ctrl == "relicTransport" || _ctrl == "planeTreasure" || _ctrl == "excavator") exitWith {hint "you cannot store this item"};

 

9. Optional if you have the virtual auction house script, if you do, open fn_vAH_sell.sqf and place this under: (_bad) exitWith {closeDialog 0;};

if (_classname == "relic1" || _classname == "relic2" || _classname == "relic3" || _classname == "relic4" || _classname == "relicTransport" || _classname == "relicFed" || _classname == "excavator" || _classname == "planeTreasure") exitWith {hint "You cannot sell these items"};

 

10. For your relic transport, you can change how you obtain it if you don't have the script, but i placed this unto the virtual loot:

{"relicTransport", 2},

 

11. Open stringtable.xml, place these into it somewhere:

 <Key ID="STR_Item_relic1">
            <Original>Takhi Relic</Original>
        </Key>
        <Key ID="STR_Item_relic2">
            <Original>Arkhan Relic</Original>
        </Key>
        <Key ID="STR_Item_relic3">
            <Original>Shakrhi Relic</Original>
        </Key>
        <Key ID="STR_Item_relic4">
            <Original>Lewni Relic</Original>
        </Key>
		<Key ID="STR_Item_relicTransport">
            <Original>Prized Relic</Original>
        </Key>
        <Key ID="STR_Item_relicFed">
            <Original>Federal Reserve Relic</Original>
        </Key>

 

 

Maverick addition:

 

1. Open actions.cpp inside maverick_perkset_1 folder, place these near the bottom, you can edit the values obviously:

class relic {
    expToAdd = 1375;
	message = "Relic Quest Complete!";
};

class relic2 {
    expToAdd = 1900;
	message = "Relic Quest 2 Complete!";
};

class relic3 {
    expToAdd = 2300;
	message = "Relic Quest 3 Complete!";
};

 

2. Download the relicreward.rar file, place all the files inside \maverick\talent-tree-modular\modules\maverick_perkset_1\functions folder

 

3. Open the perks.cpp file inside the maverick_perkset_1 folder, add these at the bottom:

class functions_relicReward {
	displayName = "Quest: Collecting Relics";
	requiredPerkPoints = 9999;
	requiredLevel = 1;
	requiredPerk = "";
	subtitle = "Collecting Hidden Relics";
	description = "Bring all the hidden relics around the map (4) to the archeologist <br/><br/><t color='#10FF45'>Reward: 1375 xp</t>";
	initScript = "maverick\talent-tree-modular\modules\maverick_perkset_1\functions\functions_relicReward.sqf";
	limitToSides[] = {};
	color[] = {0,0.46,0.76,1};
};

class functions_relicReward2 {
	displayName = "Quest: Collecting Relics 2";
	requiredPerkPoints = 9999;
	requiredLevel = 1;
	requiredPerk = "functions_relicReward";
	subtitle = "Gold Transport Relic";
	description = "Intercept the gold transport and gather the relic inside the main transport vehicle, bring it to the archeologist <br/><br/><t color='#10FF45'>Reward: 1900 xp</t>";
	initScript = "maverick\talent-tree-modular\modules\maverick_perkset_1\functions\functions_relicReward2.sqf";
	limitToSides[] = {};
	color[] = {0,0.46,0.76,1};
};

class functions_relicReward3 {
	displayName = "Quest: Collecting Relics 3";
	requiredPerkPoints = 9999;
	requiredLevel = 1;
	requiredPerk = "functions_relicReward2";
	subtitle = "Federal Reserve Relic";
	description = "Rob the federal reserve, gather the relic from the reward and bring it to the archeologist <br/><br/><t color='#10FF45'>Reward: 2300 xp and the ability to loot oil rig cargo</t>";
	initScript = "maverick\talent-tree-modular\modules\maverick_perkset_1\functions\functions_relicReward3.sqf";
	limitToSides[] = {};
	color[] = {0,0.46,0.76,1};
};

quests.rar

relicreward.rar

 

Edited by Deadlesszombie
  • Like 3
  • Thanks 1
Link to post
Share on other sites

i place a npc as relic dealer but the npc is not displayed ???

and you use in fn_relic1 - 4 this

#include "..\..\..\script_macros.hpp"

and in fn_relicReward this

#include "..\..\script_macros.hpp"

same in fn_relicRewardFed and fn_relicRewardTransport

Edited by AnonOp
Link to post
Share on other sites
On 18-9-2017 at 11:49 PM, Repentz said:

4. Somewhere at the end of your federal reserve robbery reward file, place this so the player gains the relic upon completion

[true,"relicFed",1] call life_fnc_handleInv;

or make it so it appears in the box, but i recommend the first option

what do you even mean with "end of your federal reserve robbery reward file" can you give a file name?

 

and is there a way to get the 2nd relic without the script? yes i have seen number 10 but don't really get it

Edited by Them Ripper (Tim_The)
Link to post
Share on other sites
On 9/27/2017 at 8:20 AM, Them Ripper (Tim_The) said:

what do you even mean with "end of your federal reserve robbery reward file" can you give a file name?

 

and is there a way to get the 2nd relic without the script? yes i have seen number 10 but don't really get it

there is a way, simply put this into a script when a player completes something to give them the second relic

[true,"relicTransport",1] call life_fnc_handleInv;

 

Link to post
Share on other sites
On 30.9.2017 at 8:34 AM, AnonOp said:
this addAction["Trade in your relics for the reward",life_fnc_relicReward,"",0,false,false,"",'playerSide == civilian && vehicle player == player && player distance _target < 4'];

place this in NPC and the NPC will not showing on Map ???

NPC for Dealer ist not showing on map??

Link to post
Share on other sites
Error in expression <ace setVariable [_itemName,0]; }; }; }; } forEach (("true" configClasses (missio>
  Error position: <} forEach (("true" configClasses (missio>
  Error Missing {
File core\functions\fn_dropItems.sqf [life_fnc_dropItems], line 35
Error in expression <ace setVariable [_itemName,0]; }; }; }; } forEach (("true" configClasses (missio>
  Error position: <} forEach (("true" configClasses (missio>
  Error Missing {
File core\functions\fn_dropItems.sqf [life_fnc_dropItems], line 35

 

Link to post
Share on other sites
3 hours ago, AnonOp said:
Error in expression <ace setVariable [_itemName,0]; }; }; }; } forEach (("true" configClasses (missio>
  Error position: <} forEach (("true" configClasses (missio>
  Error Missing {
File core\functions\fn_dropItems.sqf [life_fnc_dropItems], line 35
Error in expression <ace setVariable [_itemName,0]; }; }; }; } forEach (("true" configClasses (missio>
  Error position: <} forEach (("true" configClasses (missio>
  Error Missing {
File core\functions\fn_dropItems.sqf [life_fnc_dropItems], line 35

 

That's a you problem, start over with the installation on fn_dropitems. Sqf

Link to post
Share on other sites
3 hours ago, Jettman101 said:

I dont understand, Im running altis life 5.0 and i cant find the rewards file and i think its messing up my script and mission files. Where is the file exactly and what is the name of the file??

Okay in your directory you have arma3server.exe

@life_server

Mpmissions (where mission file is) 

Etc etc

Go into life server and look around, gold bars are based on total players, might be init.sqf in the life_server.pbo

 

Or read the instructions and find the bank robbery files in the mission files? 

Edited by Deadlesszombie
Link to post
Share on other sites
Just now, AnonOp said:

right ...

 [["functions_relicReward",1],[[["functions_relicReward2",1],

but fakt i can make the quest after restart again.

did you do this:

 

mav_ttm_var_relicReward = 0;
mav_ttm_var_relicReward2 = 0;
mav_ttm_var_relicReward3 = 0;

in configuration.sqf

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.