Jump to content
  • 0

Need Help with 4 Scripts


Kimarik

Question

Hello. I'm looking for someone to help me rewrite 4 scripts to Epoch 1.0.6.1 because I don´t know about the new Variables.

Here are the scripts I need.

Script is from Deploy Bike, but i need one for ATV with Toolbox, Engine and Wheel and one for Mozzie with Toolbox, Engine and Mainrotor

  Reveal hidden contents

buy + Humanity

  Reveal hidden contents

buy - Humanity

  Reveal hidden contents

In the humanity scripts the coin deduction from the player works, but you get no humanity credited or deducted.
Hope someone can help me.

Sry for the bad English i use Google Tranlator

 

Link to comment
Share on other sites

19 answers to this question

Recommended Posts

  • 0
  On 4/23/2017 at 9:11 AM, Kimarik said:

Hello. I'm looking for someone to help me rewrite 4 scripts to Epoch 1.0.6.1 because I don´t know about the new Variables.

Here are the scripts I need.

Script is from Deploy Bike, but i need one for ATV with Toolbox, Engine and Wheel and one for Mozzie with Toolbox, Engine and Mainrotor

  Reveal hidden contents

buy + Humanity

  Reveal hidden contents

buy - Humanity

  Reveal hidden contents

In the humanity scripts the coin deduction from the player works, but you get no humanity credited or deducted.
Hope someone can help me.

Sry for the bad English i use Google Tranlator

 

Expand  

 

 

Link to comment
Share on other sites

  • 0

@Kimarik

atv

  Reveal hidden contents

change the item and the id for made the mozzie script.

Mozzie and gyro ids

CSJ_GyroC

CSJ_GyroCover

CSJ_GyroP

 

PartVRotor  PartEngine

Link to comment
Share on other sites

  • 0
  Reveal hidden contents

compare this one to yours, using a software called Beyond compare. Right click on one, compare, right click n the other, and compare... it will highlight both differences in each file.

it will help you do more.

You also need a pack script....that one can be modified in a very similar way than this one.  You give back the items once packed. IF you dont have any packing scripts let me know...

You will also need to add any new vehicle you allow players to spawn in the DayZ_SafeObjects in variables.sqf

So open variables.sqf and look for DayZ_SafeObjects. In that array, at the end add your new vehicle, in this case the atv...

buyhumanity

  Reveal hidden contents

remove humanity

  Reveal hidden contents

I havnt tested anything, but it should work

Link to comment
Share on other sites

  • 0
  On 4/23/2017 at 3:36 PM, theduke said:
  Reveal hidden contents

compare this one to yours, using a software called Beyond compare. Right click on one, compare, right click n the other, and compare... it will highlight both differences in each file.

it will help you do more.

You also need a pack script....that one can be modified in a very similar way than this one.  You give back the items once packed. IF you dont have any packing scripts let me know...

You will also need to add any new vehicle you allow players to spawn in the DayZ_SafeObjects in variables.sqf

So open variables.sqf and look for DayZ_SafeObjects. In that array, at the end add your new vehicle, in this case the atv...

buyhumanity

  Reveal hidden contents

remove humanity

  Reveal hidden contents

I havnt tested anything, but it should work

Expand  

Where would this be added? i would love to test this feature out  for the humanity gain/loos buying

Link to comment
Share on other sites

  • 0

@Kimarik about humanity,, you also can sell a specific value for humanity.. for example Set my humanity in -10.000

so the script looks:

private ["_cost","_wealth"];

_cost = 1000000;
_wealth = player getVariable[Z_moneyVariable,0];
if(_wealth < _cost) exitWith { cutText [format["You need %1 coins to change your Humanity",_cost], "PLAIN DOWN"]; };
player setVariable[Z_moneyVariable,(_wealth - _cost),true];
titleText [format["Humanity Change by -10000"] , "PLAIN DOWN", 1]; 
sleep 0.1;
player setVariable["humanity",-10000,true];

 

Link to comment
Share on other sites

  • 0
  On 4/23/2017 at 3:36 PM, theduke said:
  Reveal hidden contents

compare this one to yours, using a software called Beyond compare. Right click on one, compare, right click n the other, and compare... it will highlight both differences in each file.

it will help you do more.

You also need a pack script....that one can be modified in a very similar way than this one.  You give back the items once packed. IF you dont have any packing scripts let me know...

You will also need to add any new vehicle you allow players to spawn in the DayZ_SafeObjects in variables.sqf

So open variables.sqf and look for DayZ_SafeObjects. In that array, at the end add your new vehicle, in this case the atv...

buyhumanity

  Reveal hidden contents

remove humanity

  Reveal hidden contents

I havnt tested anything, but it should work

Expand  

hmm, is there a way of doing this at a trader? similar to how players trader bio meat?  Or something where i dont have to use the custom gui

Link to comment
Share on other sites

  • 0
  On 4/24/2017 at 10:45 PM, DieTanx said:

hmm, is there a way of doing this at a trader? similar to how players trader bio meat?  Or something where i dont have to use the custom gui

Expand  

custom fn_selfaction

find:

if ((_cursorTarget isKindOf "Plastic_Pole_EP1_DZ") && {speed player <= 1}) then {

above paste:

//pay hum
if ((_cursorTarget isKindOf "CIV_EuroMan01_EP1") && {speed player <= 1}) then {
if (s_player_ht < 0) then {
            s_player_ht = player addaction[("<t color=""#F7D708"">" + ("Humanity bandit") +"</t>"),"humanitytrader\hbtrader.sqf"];
        };
if (s_player_hth < 0) then {
            s_player_hth = player addaction[("<t color=""#F7D708"">" + ("Humanity hero") +"</t>"),"humanitytrader\hhtrader.sqf"];
        };
    } else {
        player removeAction s_player_ht;
        s_player_ht = -1;
		 player removeAction s_player_hth;
        s_player_hth = -1;
	};

find:

} else {
    //Engineering

below paste:

player removeAction s_player_ht;
        s_player_ht = -1;

player removeAction s_player_hth;
        s_player_hth = -1;

 

now drop and rename the humanity files by

hhtrader.sqf

  Reveal hidden contents

hbtrader.sqf

  Reveal hidden contents

the folder for this two must be mpmissions\your instance\humanitytrader\

the // Weapons neutral trader gonna take the humanity script.  change the id to give the option to another trader.

//pay hum
if ((_cursorTarget isKindOf "CIV_EuroMan01_EP1") && {speed player <= 1}) then {

Link to comment
Share on other sites

  • 0
  On 4/23/2017 at 9:11 AM, Kimarik said:

 i need one for ATV with Toolbox, Engine and Wheel

Expand  

Just about realistic ....... a ATV has 4 (in words: four) wheels AND a FUELTANK. I dont know why allways make things fucking easy ......... reciept ATV: 1 engine, 4 wheels and 1 fuel tank.

On my server you can deploy a BTR40 (not armed) from: 1 engine, 1 fuel tank, 4 wheels, 3 tank traps and 3 metal plates.

Or a yellow pook (bell 47) from: 1 rotor, 2 engines, 2 fuel tanks, 2 metal scrap and 2 glass.

 

Link to comment
Share on other sites

  • 0
  On 4/26/2017 at 9:35 AM, Anhor said:

Just about realistic ....... a ATV has 4 (in words: four) wheels AND a FUELTANK. I dont know why allways make things fucking easy ......... reciept ATV: 1 engine, 4 wheels and 1 fuel tank.

On my server you can deploy a BTR40 (not armed) from: 1 engine, 1 fuel tank, 4 wheels, 3 tank traps and 3 metal plates.

Or a yellow pook (bell 47) from: 1 rotor, 2 engines, 2 fuel tanks, 2 metal scrap and 2 glass.

 

Expand  

atv required items

_hasitem = [["PartWheel",4], "PartEngine","PartFueltank"] call player_checkItems;
_removed = [["PartWheel",4], "PartEngine","PartFueltank"] call player_removeItems; 

 

Link to comment
Share on other sites

  • 0

Hi i testet the humanity script. it take my money but i don´t get any humanity

Maybe this could help for make it working. It´s form Infistar Admintool.

  Reveal hidden contents

 

Link to comment
Share on other sites

  • 0
  On 4/26/2017 at 8:41 PM, Kimarik said:

Hi i testet the humanity script. it take my money but i don´t get any humanity

Maybe this could help for make it working. It´s form Infistar Admintool.

  Reveal hidden contents

 

Expand  
 _humanity = player getVariable['humanity',0];
 player setVariable['humanity',_humanity+2500,true]; 

 

 

private ["_cost","_wealth","_humanity"];

_cost = 100000;
_wealth = player getVariable["cashMoney",0];
if(_wealth < _cost) exitWith { cutText [format["You need %1 coins to change your Humanity",_cost], "PLAIN DOWN"]; };
player setVariable["cashMoney",(_wealth - _cost),true];
titleText ["your humanity has been changed","PLAIN DOWN"]; titleFadeOut 5;
sleep 0.1;
_humanity = player getVariable['humanity',0];
player setVariable['humanity',_humanity+2500,true]; 

 

Link to comment
Share on other sites

  • 0
  On 4/25/2017 at 12:03 AM, juandayz said:

custom fn_selfaction

find:

if ((_cursorTarget isKindOf "Plastic_Pole_EP1_DZ") && {speed player <= 1}) then {

above paste:

//pay hum
if ((_cursorTarget isKindOf "CIV_EuroMan01_EP1") && {speed player <= 1}) then {
if (s_player_ht < 0) then {
            s_player_ht = player addaction[("<t color=""#F7D708"">" + ("Humanity bandit") +"</t>"),"humanitytrader\hbtrader.sqf"];
        };
if (s_player_hth < 0) then {
            s_player_hth = player addaction[("<t color=""#F7D708"">" + ("Humanity hero") +"</t>"),"humanitytrader\hhtrader.sqf"];
        };
    } else {
        player removeAction s_player_ht;
        s_player_ht = -1;
		 player removeAction s_player_hth;
        s_player_hth = -1;
	};

find:

} else {
    //Engineering

below paste:

player removeAction s_player_ht;
        s_player_ht = -1;

player removeAction s_player_hth;
        s_player_hth = -1;

 

now drop and rename the humanity files by

hhtrader.sqf

  Reveal hidden contents

hbtrader.sqf

  Reveal hidden contents

the folder for this two must be mpmissions\your instance\humanitytrader\

the // Weapons neutral trader gonna take the humanity script.  change the id to give the option to another trader.

//pay hum
if ((_cursorTarget isKindOf "CIV_EuroMan01_EP1") && {speed player <= 1}) then {

Expand  

Getting this error when launching, I also get the results of coins removed, but humanity is unaffected

  Reveal hidden contents
  Reveal hidden contents
Link to comment
Share on other sites

  • 0

@DieTanx use it in fn_selfactions


//pay hum
if ((_cursorTarget isKindOf "CIV_EuroMan01_EP1") && {speed player <= 1}) then {
if (s_player_ht < 0) then {
            s_player_ht = player addaction[("<t color=""#F7D708"">" + ("Humanity bandit") +"</t>"),"humanitytrader\hbtrader.sqf"];
        };
if (s_player_hth < 0) then {
            s_player_hth = player addaction[("<t color=""#F7D708"">" + ("Humanity hero") +"</t>"),"humanitytrader\hhtrader.sqf"];
        };
    } else {
        player removeAction s_player_ht;
        s_player_ht = -1;
		 player removeAction s_player_hth;
        s_player_hth = -1;
	};

hhtrader.sqf

  Reveal hidden contents

hbtrader.sqf

  Reveal hidden contents

 

Link to comment
Share on other sites

  • 0
  On 4/27/2017 at 1:14 AM, juandayz said:

@DieTanx use it in fn_selfactions


//pay hum
if ((_cursorTarget isKindOf "CIV_EuroMan01_EP1") && {speed player <= 1}) then {
if (s_player_ht < 0) then {
            s_player_ht = player addaction[("<t color=""#F7D708"">" + ("Humanity bandit") +"</t>"),"humanitytrader\hbtrader.sqf"];
        };
if (s_player_hth < 0) then {
            s_player_hth = player addaction[("<t color=""#F7D708"">" + ("Humanity hero") +"</t>"),"humanitytrader\hhtrader.sqf"];
        };
    } else {
        player removeAction s_player_ht;
        s_player_ht = -1;
		 player removeAction s_player_hth;
        s_player_hth = -1;
	};

hhtrader.sqf

  Reveal hidden contents

hbtrader.sqf

  Reveal hidden contents

 

Expand  

Get this now when looking at the trader

 

Error in expression <P1") && {speed player <= 1}) then {
if (s_player_ht < 0) then {
s_player_ht = pl>
  Error position: <s_player_ht < 0) then {
s_player_ht = pl>
  Error Undefined variable in expression: s_player_ht
File mpmissions\__CUR_MP.Chernarus\dayz_code\compile\fn_selfActions.sqf, line 621

 

 

 

Link to comment
Share on other sites

  • 0
  On 4/27/2017 at 10:30 AM, DieTanx said:

Get this now when looking at the trader

 

Error in expression <P1") && {speed player <= 1}) then {
if (s_player_ht < 0) then {
s_player_ht = pl>
  Error position: <s_player_ht < 0) then {
s_player_ht = pl>
  Error Undefined variable in expression: s_player_ht
File mpmissions\__CUR_MP.Chernarus\dayz_code\compile\fn_selfActions.sqf, line 621

 

 

 

Expand  

@DieTanxIf you have a custom variables.sqf (i.e if you're using ZSC or similar)  you will need to add that variable (s_player_ht) into this codeblock: https://github.com/oiad/ZSC/blob/master/dayz_code/init/variables.sqf#L12-L105

i.e: 

s_player_ht = -1;

 

Link to comment
Share on other sites

  • 0
  On 4/27/2017 at 10:50 AM, salival said:

@DieTanxIf you have a custom variables.sqf (i.e if you're using ZSC or similar)  you will need to add that variable (s_player_ht) into this codeblock: https://github.com/oiad/ZSC/blob/master/dayz_code/init/variables.sqf#L12-L105

i.e: 

s_player_ht = -1;

 

Expand  
     s_player_ht = -1;
     s_player_hth = -1;

After adding these 2 to Variables, this now works! YAY!

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...